I redeployed a contract on Github with the same compiler and optimization parameters.
However on token.transfer(), the redeployed contract uses about ~5k more gas than the original contract. Is there a warm up cost or initialization cost? I don't understand why the same code would use more gas only on token.transfer()

  • Does the contract have a dependency like OpenZeppelin? Can you check if you are using the same exact version? If the source code is exactly the same, the compiler is the same version down to minor release the bytecode should be the same, minus a metadata that inserts the compiler, but that metadata shouldn't affect runtime costs.
    – Ismael
    Sep 19 at 6:01

Your Answer

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

Browse other questions tagged or ask your own question.