So, I have a contract deployed which has a simple function which returns a uint.
If I make the function constant it returns the correct value set as a BigNumber object, but if I remove the constant keyword then it doesn't return a BigNumber object.
Can anyone throw some light as to why this happens? As far as I know, the constant keyword is used so that you don't have to pay gas for retrieving the value.
My contract function code :
function getMyNymber() returns (uint256) {
return myNumber;
}
The above method doesn't return a Big Number object.
function getMyNymber() constant returns (uint256) {
return myNumber;
}
This returns a Big Number object, the only difference being the constant keyword.