0

How do I calculate the gasfee for a call to a function, which increments an uint globally?

uint index;

function addUp () public returns (uint result) { index += 1; // increment value result = index; //return it }

Where should I start to get an answer for my question?

Suisse
  • 123
  • 7

1 Answers1

0

If you want to know the gas estimation during development time, you can use testrpc(similar local ethereum blockchain that runs on local machine for testing purpose)by sending transaction and you can see gas usage of that function in terminal.

you can also refer the this stack exchange answer to get more details on it.

Mahesh Rajput
  • 1,211
  • 7
  • 17