-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add Advanced Sample Project that uses TypeScript #1770
Conversation
d15141f
to
429071d
Compare
429071d
to
1c332be
Compare
Partially addresses review comment #1632 (comment)
Minor point but: I think we should use |
Co-authored-by: Franco Victorio <[email protected]>
Co-authored-by: Franco Victorio <[email protected]>
Addresses review comment #1770 (comment)
🦋 Changeset detectedLatest commit: a00345c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think @alcuadrado was going to review this one too.
Oh, one minor comment is that running the suggested
I don't know if there's a perfect solution for this. If we always use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool! ❤️
packages/hardhat-core/sample-projects/advanced-ts/hardhat.config.ts
Outdated
Show resolved
Hide resolved
}, | ||
gasReporter: { | ||
enabled: process.env.REPORT_GAS !== undefined, | ||
currency: "USD", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, wrt your issue at hardhat-gas-reporter 72. Was not able to reproduce (using a valid coinmarketcap api. key). I know you tried that but ... maybe there was a copy-paste error or something?
Price data seems to be working ok for latest hardhat in this recent CI run for the plugin.
The config used for that test is:
gasReporter: {
coinmarketcap: process.env.CMC_API_KEY
}
[EDIT - I think the price problem is a race-condition issue that likely only affects tiny projects (like a sample). More detail about this in hh-gas-reporter 72 comment]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgewecke, is there a way to disable this feature and just show the prices in eth? While i find it really cool, it would be nice if we don't ask the users to provide another api key in these sample projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes good idea,. Someone else has requested that here as well ... (cross-linking: cgewecke/eth-gas-reporter#219)
packages/hardhat-core/sample-projects/advanced-ts/hardhat.config.ts
Outdated
Show resolved
Hide resolved
packages/hardhat-core/sample-projects/advanced-ts/hardhat.config.ts
Outdated
Show resolved
Hide resolved
}, | ||
gasReporter: { | ||
enabled: process.env.REPORT_GAS !== undefined, | ||
currency: "USD", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgewecke, is there a way to disable this feature and just show the prices in eth? While i find it really cool, it would be nice if we don't ask the users to provide another api key in these sample projects.
Addresses review comment #1770 (comment)
Addresses review comment #1770 (comment)
Addresses review comment #1770 (comment)
Now matches what we were already doing in the advanced JS project. Addresses review comment #1770 (comment)
Store source file as npmignore (without the leading period) so that it doesn't instruct the packaging of hardhat itself to exclude the files listed therein, otherwise they won't be available at project creation time. Addresses review comment #1770 (comment)
Addresses review comment #1770 (comment)
Now matches what we were already doing in the advanced JS project. Addresses review comment #1770 (comment)
48a4c56
to
91d1203
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now, @feuGeneA!
I just added another changeset mentioning there were changes to the advance sample project.
Fixes #1755
require
toimport
inpackages/hardhat-core/sample-projects/advanced-ts/scripts/deploy.ts
.