-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add boilerplate of hardhat-exposed #7906
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
base: main
Are you sure you want to change the base?
Conversation
|
75f5179 to
9747f19
Compare
9747f19 to
26e590b
Compare
hardhatTotal size of the bundle: List of dependencies (sorted by size) |
| userConfig.paths !== undefined && | ||
| userConfig.paths.exposedContracts !== undefined && | ||
| typeof userConfig.paths.exposedContracts !== "string" |
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.
wouldn't that be enough ?
| userConfig.paths !== undefined && | |
| userConfig.paths.exposedContracts !== undefined && | |
| typeof userConfig.paths.exposedContracts !== "string" | |
| typeof userConfig.paths?.exposedContracts !== "string" |
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.
I think that change would make the exposedContracts required.
Maybe a simpler version could be:
const configType = typeof userConfig.paths?.exposedContracts;
if (configType !== "string" && configType !== "undefined) {
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.
We actually use zod in our plugins though, I kept it with minimal dependencies here because it's an example
dc613c9 to
257bd40
Compare
Please do not merge