I use solidity Remix to build smart contract. I don't understand about transaction cost. why transaction cost alway equal execution cost. Can I change transaction cost different from execution cost ?
Asked
Active
Viewed 32 times
0
-
there is a gasLimit parameter in the transaction , i.e. the maximum cost you can spend, and the real gas spent during execution of the contract. that is probably what transaction cost is, the gasLimit parameter. (I don't use Remix) – Nulik Feb 01 '23 at 15:40
1 Answers
1
According to this answer:
Transaction costs are based on the cost of sending data to the blockchain. There are 4 items which make up the full transaction cost:
- the base cost of a transaction (21000 gas)
- the cost of a contract deployment (32000 gas)
- the cost for every zero byte of data or code for a transaction.
- the cost of every non-zero byte of data or code for a transaction.
Execution costs are based on the cost of computational operations which are executed as a result of the transaction.
You can give your upvote to the original author.
Wuzhong - Chainstack DevEx
- 1,424
- 2
- 10