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?



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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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