There are many EVM implementations, such as js-EVM, Py-EVM and geth. So I was wondering which EVM implementation generated the gasUsed on Etherscan (i.e., the gasUsed got by using web3) ?

  • There's a difference between the gas you see reported on Etherscan and the one estimated by your web3.js client (assuming this is what you mean by "web3"). The former is computed by whatever Ethereum client the block producer runs, while the latter is probably generated via the JavaScript release of the Solidity compiler. – Paul Razvan Berg Apr 17 at 16:39
  • Just to add on top of @Raul's answer, the biggest difference in gas between Etherscan (actual gas used) and a local web3 estimation will be due to the nature of the contract state changing before your transaction is included. This change in state can in some cases dramatically change the gas costs (hence the gas limit parameter). – Markus - soliditydeveloper.com Apr 17 at 22:02

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.