cgewecke / hardhat-gas-reporter

Gas Usage Analytics for Hardhat
MIT License
409 stars 56 forks source link

how to estimate gas for Optimisim and Arbitrum Nova? #148

Closed Andriy-Kulak closed 5 months ago

Andriy-Kulak commented 1 year ago

Hi Team!

Is there a way to generate gas costs for Opitimism & Arbitrum? There is no documentation on which tokens are supported. i tried adding token "OP" for optimism which seems to work but costs seem really low so I am not sure if I should trust them since there is no documentation on which tokens can be passed in.

If OP / Arbitrum is not supported here, is there a way to estimate gas costs of contract deployment and method execution using hardhat?

math77 commented 1 year ago

I'm interested too

cgewecke commented 5 months ago

Support for optimism has been added in the latest release (2.0). To get gas usage for that network just set the L2 option as below:

gasReporter: {
  L2: "optimism"    
}

Arbitrum support is in the pipeline and being tracked via #181. Closing here as partially complete in favor of #181.

https://github.com/cgewecke/hardhat-gas-reporter/releases/tag/v2.0.0