Printing into console
I need to print out values like these green lines:
1) Tried returning
When I call a function that returns a string, the hexa transaction address gets printed instead of the function value.
2) Tried js
Referencing this link, I loaded the following js file in hopes to print out variable values.
var abi = /*abi interface*/
var Insurance= web3.eth.contract(abi);
var insurance = Insurance.at(web3.eth.accounts[0]);
var event = insurance.claimInsurance();
// watch for changes
event.watch(function(error, result){
if (!error)
console.log(result);
});
event.get(function(error, result){
if (!error)
console.log(result);
});
I'm getting err: TypeError: 'watch' is not a function
.
Is there a way I can print out variables value from the geth console?