Calculating Network Gas
There is no concrete formula for calculating gas fees. It could vary from one transaction to another depending on some blends of internal and external factors acting on the transaction fields like network congestion, mempool size, security, and so forth. However, you could estimate gas by simulating the transaction on the Cosmos SDK or using the transaction call function provider.estimateGas for Ethereum contracts. Additionally, virtual machines like Ethereum have a corresponding gas amount for every opcode on the EVM. There is an evolving list of opcodes and their corresponding gas on the Ethereum docs.
Last updated