New answers tagged

2

Data storage in the blockchain always costs gas. Data reading also costs gas if it is performed in a transaction (typically when the same transaction stores and reads data). You always use a node to access the blockchain and the node has all of the blockchain data. Therefore you can read the data directly from the node without sending any transaction (called,...


2

In this code: contract Test { uint256 times_called; function tc () public returns (uint256) { times_called += 1; return times_called; } } times_called is a state variable because it is (correctly) declared in the global section. (There are other ways but this will do for now because you are early in your journey). State ...


Top 50 recent answers are included