contract Assign {

  secret uint256 private a; // <--- secret

  function assign(secret uint256 value) public { // <--- secret
    a = value;
  }
}

Test Code

TLDR - Total Gas Savings

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.

Real World Savings

Let’s put all this in context on:


Detailed Changes

Before Changes

Deployment Costs

201187 + 45,916 + 72269 + 2225102 + 3137960 + 28816 = 5711250

Function Call Costs

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