solidity/test/libsolidity/gasTests/storage_costs.sol

25 lines
428 B
Solidity
Raw Normal View History

2021-04-13 08:25:01 +00:00
contract C {
uint x;
function setX(uint y) public {
x = y;
}
function resetX() public {
x = 0;
}
function readX() public view returns(uint) {
return x;
}
}
// ====
// optimize: true
// optimize-yul: true
// ----
// creation:
// codeDepositCost: 27200
2021-04-13 08:25:01 +00:00
// executionCost: 81
// totalCost: 27281
2021-04-13 08:25:01 +00:00
// external:
2021-04-13 07:15:32 +00:00
// readX(): 2290
2021-04-13 08:25:01 +00:00
// resetX(): 5116
2021-04-13 07:15:32 +00:00
// setX(uint256): 22312