cgewecke / hardhat-gas-reporter

Gas Usage Analytics for Hardhat
MIT License
411 stars 57 forks source link

Built-in support for Arbitrum gas fees #181

Closed cgewecke closed 6 months ago

cgewecke commented 7 months ago

Proposed as part of #170. It's not clear how accurate fees would be when run on an Ethereum EVM (like HH or Anvil). Arbitrum has special precompiles with their own prices. (Assume the differences are microscopic but unsure.)

One approach is to create an option for an async hook for price resolution that the user can define. Whenever the plugin needs L1gasUsed it could call the relevant estimation endpoints at Arbitrum (as in the JS script linked below). This would be useful primarily for hardhat run, but might be ok for small test suites too. (This strategy Is lower effort but also general purpose)

Higher effort is feature parity with Optimism and would require that we emulate the estimation locally using Brotli compression etc. (Definitely wait till Atlas fork for this)

EIP 4844 Schedule

Resources

cgewecke commented 6 months ago

Closed via #225. This is in the 2.1.0 release