December 2018
Intermediate to advanced
222 pages
6h 6m
English
The output parameters can be declared after the return keyword, as shown in the following code snippet:
function getColor() public view returns (uint){ return uint(color); }
In solidity, pure functions are functions that are promised not to modify, or read the state.
pure|constant|view|payable
If the function modifier is defined as view, it indicates that the function will not change the storage state.
If the function modifier is defined as pure, it indicates that the function will not read the storage state.
If the function modifier is defined as constant, it indicates that the function won't modify the contract storage.
If the function modifier is defined as payable, modifier can receive funds.
uint amount =0; function ...
Read now
Unlock full access