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 hardhat #34

Closed
cgewecke opened this issue Oct 13, 2020 · 17 comments
Closed

Support hardhat #34

cgewecke opened this issue Oct 13, 2020 · 17 comments

Comments

@cgewecke
Copy link
Owner

cgewecke commented Oct 13, 2020

A list of known issues:

Update: a beta is available

npm install --save-dev hardhat-gas-reporter@beta

(It may be missing some data if your project contains shadowed contract names. See more below)

@alcuadrado
Copy link
Collaborator

Hey Chris!

Lot's of new things are coming out with hardhat. We'll have a migration guide for plugins in a few days.

We also took some time to adapt solidity-coverage. We'll send a PR soon. We are just finishing some details on how plugins are managed. Hardhat will be closer to the og version of Buidler, were plugins were just imported/required. This means that users won't need to deal with the type extensions manually.

@cgewecke
Copy link
Owner Author

@alcuadrado Ok fantastic, thanks so much. 🙂

@alcuadrado
Copy link
Collaborator

Hey @cgewecke, we have a migration guide for plugins now: https://github.com/nomiclabs/buidler-ts-plugin-boilerplate/blob/hardhat-migration/MIGRATION.md

There are @rc version of the hardhat plugins now. The main package is hardhat, and the plugins @nomiclabs/hardhat-*

@cgewecke
Copy link
Owner Author

@alcuadrado

Do you think it might make sense to make a new repo called hardhat-gas-reporter and deprecate this one?

@alcuadrado
Copy link
Collaborator

alcuadrado commented Oct 19, 2020

We are planning to rename the repos and leave a 1-line message explaining about the migration in the readme.

@mudgen
Copy link

mudgen commented Oct 23, 2020

@cgewecke @alcuadrado
How is adding support for hardhat coming along?

@cgewecke
Copy link
Owner Author

cgewecke commented Oct 23, 2020

@mudgen Will look at it this weekend. Should be simple here...

@jmonteer
Copy link

hola!

any news on the support for hardhat?

thanks!

@cgewecke
Copy link
Owner Author

@jmonteer Doing it today!! Swear.

@mudgen
Copy link

mudgen commented Oct 27, 2020

@cgewecke You are the man!

@mudgen
Copy link

mudgen commented Oct 28, 2020

@cgewecke How is it going? I am curious. Is it easy or hard to port a buidler plugin to hardhat?

@cgewecke
Copy link
Owner Author

@mudgen

Really sorry - this is slightly trickier than I thought - I might have to modify the way eth-gas-reporter processes artifacts and publish a new version over there as well. Am working on this today and will get it out...

@alcuadrado
Copy link
Collaborator

Let me know if you need help with this, Chris!

@cgewecke
Copy link
Owner Author

@alcuadrado Thanks Patricio!

@cgewecke cgewecke mentioned this issue Oct 28, 2020
@cgewecke
Copy link
Owner Author

@mudgen There's a beta published now if you need this ASAP.

npm install --save-dev hardhat-gas-reporter@beta

If there are contracts that Hardhat needs a path-qualified name to load the artifact of, they'll be missing from the report.

This should only happen if the contract name is duplicated somewhere in the project (like in a node_modules dependency) or you're staging multiple versions of the same contracts in your project (like old/, new/)

@mudgen
Copy link

mudgen commented Oct 29, 2020

@cgewecke Great. Thank you.

@cgewecke
Copy link
Owner Author

cgewecke commented Oct 30, 2020

This is out as hardhat-gas-reporter@1.0.0

Please just lmk if you run into problems with it. One thing that jumped out in e2e testing is that projects with qualified contract names have wide reports. (Perhaps over-wide, really)

Addressing that in a forth-coming patch at eth-gas-reporter and tracking the issue here in #40.

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