Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Other EVM-Compatible Chains? #78

Closed
xanderdunn opened this issue Nov 15, 2021 · 7 comments
Closed

Support Other EVM-Compatible Chains? #78

xanderdunn opened this issue Nov 15, 2021 · 7 comments

Comments

@xanderdunn
Copy link

xanderdunn commented Nov 15, 2021

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?

@xanderdunn
Copy link
Author

xanderdunn commented Nov 15, 2021

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.

@dmihal
Copy link

dmihal commented Dec 8, 2021

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.

@cgewecke
Copy link
Owner

cgewecke commented Dec 8, 2021

@dmihal Are you running your tests against an Optimism client? Is their receipt in a special format?

@dmihal
Copy link

dmihal commented Dec 15, 2021

@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.

@cgewecke
Copy link
Owner

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....

@azerpas
Copy link

azerpas commented Oct 26, 2022

Any news on this?

@cgewecke cgewecke mentioned this issue Jan 11, 2024
@cgewecke cgewecke mentioned this issue Feb 11, 2024
54 tasks
@cgewecke
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants