contract A {
uint x = 10;
function test2() public {
x = 0;
}
}
I can see that:
- Transaction cost is 13204
- Execution cost is 5136
How can this be ? I calculate differently.
Those 3 are taken from white paper.
- Paid for every transaction - 21000
- Paid for an SSTORE operation when the storage value’s zeroness remains unchanged or is set to zero. - 5000
- Refund given (added into refund counter) when the storage value is set to zero from non-zero - 15000
So, 21000 + 5000 - 15000 = 11000. How did we get 13204 ?