I have 1 contract deploying on test net, let say it use 300,000 gas for executing 1 function.
On main net, this contract will cost 300,000 gas per function also?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
Yes, the gas limit and gas used by the transaction will remain the same across networks, including the main net. This is because operations on the EVM have a defined set of costs associated to them, which is implemented the same on the test networks as well. You can also test this between two different test networks, like Ropsten and Rinkeby.
What can change your transaction fee is the gas price you set for that transaction. Where if you set a higher gas price, the transaction fee will be higher as well, since it's a product of the gas limit and the gas price.