hardhat-gas-reporter
hardhat-gas-reporter copied to clipboard
Support Other EVM-Compatible Chains?
Absolutely phenomenal hardhat plugin!
I'm using hardhat to develop smart contracts on the Avalanche C-Chain, which is EVM-compatible. I'd love to be able to display usd (avg) prices for the Avalanche blockchain rather than the Ethereum blockchain. Is this currently supported? What would it take to report prices in AVAX->USD rather than ETH->USD?
I've confused block limit with transaction gas limit.
Ethereum's block limit is Block limit: 30000000 gas
, as shown by this plugin. I'm not sure what Avalanche's block limit is. If it's different, this would need to be a configuration option.
Avalanche indicates its gas limit is 8,000,000 here. I believe that is the per-transaction gas limit.
I'm not sure if Avalanche has significantly different opcode pricing that Ethereum.
However, I'd be very interested in seeing some support for Ethereum L2s like Arbitrum and Optimism. L2s have the unique attribute of having disproportionately expensive calldata compared to other costs.
@dmihal Are you running your tests against an Optimism client? Is their receipt in a special format?
@cgewecke, nope just testing against the normal hardhat node
Optimism L2 gas is roughly the same as Ethereum L2 gas, however Optimism and Arbitrum add additional fees for calldata (which much be posted to Ethereum L1)
I wonder if this could be simulated by adding an extra charge based on the length of the tx calldata.
I wonder if this could be simulated by adding an extra charge based on the length of the tx calldata.
@dmihal Oh! Smart idea .... agree we should definitely do that if it's possible.
Am planning to profile gas usage for a work-related project this month and will look at this....
Any news on this?
The latest version (2.0) adds support for L2s (starting with Optimism). Arbitrum support is in the pipeline and being tracked via #181.
Closing in favor of #181
https://github.com/cgewecke/hardhat-gas-reporter/releases/tag/v2.0.0