Closed makoto closed 7 years ago
Instead of
function get() returns(uint r) { return info; }
do
function get() constant returns(uint r) { return info; }
This way, the function does not incur transaction gas when called via RPC (or use internal keyword if intended to be used only internally).
internal
http://solidity.readthedocs.io/en/latest/contracts.html?highlight=constant#constants
Oh this is interesting. So that's how it knows it's not modifying state?
https://github.com/makoto/blockparty/pull/37
Instead of
do
This way, the function does not incur transaction gas when called via RPC (or use
internal
keyword if intended to be used only internally).http://solidity.readthedocs.io/en/latest/contracts.html?highlight=constant#constants