Is Gas displayed on "Remix" at function execution the same as when executed on the main net?

I'm using the Javascript VM as the environment.


It should be. The gas cost relates to the size of the contract to deploy and the OPCODES executed by functions in the course of a given transaction. Those should be same in either case.

A departure could be due to conditional logic where the initial conditions are different. For example if(block.number > 1000000) { // do conditional things }.

Hope it helps.

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.