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

feat: make contract and hook types work without a generated output #255

Merged
merged 9 commits into from
Mar 24, 2023

Conversation

sverps
Copy link
Collaborator

@sverps sverps commented Mar 23, 2023

Fixes #254

A dev that doesn't need any custom contract can simply remove the hardhat_contracts.ts import in the scaffold.config, and set contracts: null.

Typescript won't complain due to types resolving differently when contracts is set to null in the config.

@technophile-04 technophile-04 marked this pull request as ready for review March 24, 2023 03:49
@technophile-04 technophile-04 marked this pull request as draft March 24, 2023 03:51
@sverps sverps mentioned this pull request Mar 24, 2023
@carletex carletex marked this pull request as ready for review March 24, 2023 11:11
@sverps
Copy link
Collaborator Author

sverps commented Mar 24, 2023

Found another confusing thing: the generateTsAbi script just spits out an error when called directly (which is logical since the json doesn't exist). This can be rather confusing for a user that is exploring which scripts exist in the package.json. He might not understand that this script is only used as part of the deploy and is not to be used directly (even though the name suggests it could).

So I removed the separate script for it and just added it to the deploy script instead.

@carletex
Copy link
Member

So I removed the separate script for it and just added it to the deploy script instead.

Yep, nice one. Make sense!

This looks great. Merging it.

Thank you @sverps

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

Successfully merging this pull request may close these issues.

Vercel builds fails
2 participants