2

I was reading an old post: How to get the actual Gas price?

If the gas price currently is, for instance, 14 gwei and I have a transaction cost of 80000, does it mean the price of my transaction is 14*80000 = 1120000 gwei?

And last question, do I gotta add my execution cost to transaction cost in order to know the total cost of my operation (I'm using Remix IDE)?

enter image description here

Thanks in advance!

1 Answer 1

2

If the gas price currently is, for instance, 14 gwei and I have a transaction cost of 80000, does it mean the price of my transaction is 14*80000 = 1120000 gwei?

Correct. The gas price is how much you pay for each unit of gas used by the transaction. You can use the tool here to convert from Gwei to Ether.

And last question, do I gotta add my execution cost to transaction cost in order to know the total cost of my operation (I'm using Remix IDE)?

You want to look at the transaction cost, this is the total amount of gas that the transaction used. The execution cost is the total cost of executing the code in the smart contract, so it does not include the base transaction cost (21,000 gas) and the cost of the data included in the transaction, etc.

2
  • Oh, I see... thanks a lot. But I have to pay that cost, right? (I'm talking about execution cost). I mean, I have to pay transaction cost + execution cost at the end.
    – Joncarre
    Commented Oct 27, 2020 at 13:13
  • The transaction cost includes the execution cost.
    – Morten
    Commented Oct 27, 2020 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.