|
|
|
|
|
by pests
3106 days ago
|
|
So both instructions and memory uses something called gas. Right now 1 gas = 0.00000002 eth. Now a MUL costs 5 gas and a ADD costs 3 for example. So you have to pay for contract complexity. Now memory costs are not linear. The current gas cost equation for memory is Gmem * a * (a^2/512) where Gmem is a constant that is currently 3 and 'a' is the number of 255bit words (ints) you are storing. This is for EVM internal memory that can later be accessed by the smart contract or other contracts. There is a way for contracts to output data that can be read out-of-band called logs but that is for getting data out of the EVM, not in. |
|