-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Update dependency hardhat-gas-reporter to v2 #4979
Conversation
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/[email protected], npm/[email protected] |
The breaks gas comparaison because report either changed format or location. Need to fix the comparaison script. |
@ernestognw I updated the script for gas comparaison. Also needed a hardhat config to replicate old behavior. |
Comparaison gets generated, but results are widelly different from what we have before. That is strange. Will investigate. Edit running only |
Apologies for looking over your shoulder @Amxx... Are the methods with a lot of variance using OZ's upgrades plugin? That's a possible source of change in the gas readings because v1.0 was unable to resolve shadowed method calls routed through proxies correctly. v2.0 now does this automatically if it detects the upgrades plugin in the environment. UPDATE Looking through the markdown report it seems this is likely - V2 has discovered some new contract/method entries which did not appear in the V1 report and V1 was incorrectly attributing gas readings for these methods to other contracts whose methods have the same function signature. (The gas-reporter's policy has been to fall back on method signatures alone to associate gas data with a contract if all else fails.) For example
This means the V1 gas-reporter was misattributing the ERC4626 method call to ERC20 whereas V2 correctly resolves it. |
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. ⚠ Warning: custom changes will be lost. |
Thanks for the clarification @cgewecke, it would've taken a lot for us to figure it out. The gas differences are mainly shown in ERC4626, which make sense with what you shared. |
This PR contains the following updates:
^1.0.9
->^2.0.0
Release Notes
cgewecke/hardhat-gas-reporter (hardhat-gas-reporter)
v2.0.2
: Fix crash with --parallel flagCompare Source
What's Changed
Full Changelog: cgewecke/hardhat-gas-reporter@v2.0.1...v2.0.2
v2.0.1
: Optimism Ecotone (EIP-4844)Compare Source
What's Changed
Full Changelog: cgewecke/hardhat-gas-reporter@v2.0.0...v2.0.1
v2.0.0
: : Optimism L2 & View/Pure Method GasCompare Source
What's New
Configuration for chains with Etherscan support has been simplified to a single key. Just set the
L1
option to one of the supported networks and the reporter will take care of the rest. (You'll still need a coinmarketcap api key)Gas reporting for L2 networks is coming online, starting with Optimism.
Gas metrics for⚠️ There are performance hits when the view and pure options are enabled)
view
andpure
methods are now available as an option. You can also exclude intrinsic gas costs for state-changing methods. (There are multiple report formats, including markdown.
The reporter now supports sub-gwei gas prices. Sub-penny cost display is possible by configuring the
currencyDisplayPrecision
optionDedicated support for the OpenZeppelin Upgrades plugin has been added. (Their proxy pattern often resulted in missing gas data because the reporter didn't know what contract was being called - that's all handled under the hood now.)
Dedicated support for the hardhat-viem plugin has been added (this was broken and should be fixed by this release)
There are many new output, display and low-level options - check out the Config Examples section of the docs
There's additional support for custom proxy contract resolution. If you're routing your calls through contract middleware you can configure the reporter to understand how that works and get the data you expect.
Additionally:
Breaking
gas-reporter:merge
task has been renamedhhgas:merge
onlyCalledMethods
option has been renamedshowUncalledMethods
and must be set totrue
(if you want that).Funding
Work on V2 was funded in part by OpenZeppelin via DRIPS, a public goods protocol that helps direct funding to packages in your dependency tree. If you're using DRIPS and want to add hardhat-gas-reporter to the packages you support its page is here.
Full Changelog: cgewecke/hardhat-gas-reporter@v1.10.0...v2.0.0
v1.0.10
Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.