1

I'm recently started to learn how to developing smart contract using solidity in Remix IDE.

I'm using Remix VM (London) environment.

My question is, how can transaction costs and execution costs be the same in all transactions?

I know that transaction cost is the cost of putting data on the blockchain, and execution cost is the cost of executing it.

I'd appreciate your help. Thanks.

example

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – 70ny Oct 24 '22 at 07:36

1 Answers1

1

The transaction and execution cost will be the same every time if the same work is being done.

If you have a function which calculates A+B and returns C then this will always be consistent and the same cost.

If you have a function which saves a string input by the user then the cost will changed based on the size of the string the user inputs.

CathalMF
  • 9,705
  • 6
  • 70
  • 106