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

Fix gas report generation #4824

Merged
merged 9 commits into from
Jan 12, 2024
Merged

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Jan 11, 2024

Gas report generaton has been broken for a while.
It looks like the json file is no longer generated by default. Adding an envvar should fix that.

WIP: multiple issues have been identified and are being worked on.

Copy link

changeset-bot bot commented Jan 11, 2024

⚠️ No Changeset found

Latest commit: 3192dd4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Amxx Amxx requested a review from ernestognw January 11, 2024 13:48
@Amxx Amxx marked this pull request as draft January 11, 2024 15:09
Copy link

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: @nomicfoundation/hardhat-toolbox@4.0.0

@Amxx
Copy link
Collaborator Author

Amxx commented Jan 12, 2024

This should work.
@ernestognw, how do you feel about hre.getSigners as a replacement for hre.ethers.getSigners ?

@ernestognw
Copy link
Member

This should work.
@ernestognw, how do you feel about hre.getSigners as a replacement for hre.ethers.getSigners ?

I like the idea and looks very clean, but I don't like that it's implicit (e.g. is not obvious for a contributor). I need to review first to fully understand the changes. I think it's fine but not preferrable.

@Amxx Amxx marked this pull request as ready for review January 12, 2024 16:19
@Amxx
Copy link
Collaborator Author

Amxx commented Jan 12, 2024

Removed env-contracts.js that was not working as intended anyway. Will create an issue to consider re-implementing this mechanism.

Comment on lines 58 to 59
// "implies" doesn't work correctly. we force gas if gasReport is set
argv.gas ||= !!argv.gasReport;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty weird it's not working as expected. I'll take a look to understand what's going on here. We shouldn't merge it if we're misinterpreting how it works.

Otherwise, we may remove the implies.

test/sanity.test.js Show resolved Hide resolved
hardhat.config.js Outdated Show resolved Hide resolved
@Amxx Amxx requested a review from ernestognw January 12, 2024 20:49
ernestognw
ernestognw previously approved these changes Jan 12, 2024
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I see the runnings are still not producing the gas comparison. Is it because it's not merged yet?

@Amxx
Copy link
Collaborator Author

Amxx commented Jan 12, 2024

LGTM but I see the runnings are still not producing the gas comparison. Is it because it's not merged yet?

Yes, gas reports produced by PR are not pushed, because nothing is going to be compared to that.
We save the reports for commits on branches that will be references for further PR.

.github/workflows/checks.yml Outdated Show resolved Hide resolved
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
@ernestognw ernestognw enabled auto-merge (squash) January 12, 2024 23:18
@ernestognw ernestognw merged commit efb8c1a into OpenZeppelin:master Jan 12, 2024
19 checks passed
@ernestognw ernestognw added the breaking change Changes that break backwards compatibility of the public API. label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Changes that break backwards compatibility of the public API. ignore-changeset
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants