contract Assign {
secret uint256 private a; // <--- secret
function assign(secret uint256 value) public { // <--- secret
a = value;
}
}
Deployment Gas Savings: 2.61**%**
Transaction Gas Savings: 1.0001**%**
These percentages are estimates based on the basic Assign Contract. Numbers may vary for more complex contracts, although these changes can only lead to gas savings, so there will be no contract for which these changes cause an increase in gas cost.
Let’s put all this in context on:
201187 + 45,916 + 72269 + 2225102 + 3137960 + 28816 = 5711250
Function Call | Gas |
---|---|
Assign (5) | 1843113 |
Assign (10) | 1812383 |
Assign (10) | 1794636 |
Assign (10) | 1815492 |
Assign (10) | 1794624 |
Assign (5) | 1797698 |
Assign (10000) | 1797063 |
Total Gas | 12655009 |