Skip to content

Lesson 7: why use helper-hardhat-config? #1239

Answered by krakxn
hamednasr asked this question in Q&A
Discussion options

You must be logged in to vote

It would lead to a circular dependency, and also as it is irrelevant in hardhat-config.js

We intend on keeping the contents inside hardhat-config.js solely for importing packages which Hardhat requires, and further configurations for Hardhat. So, it's relevance is solely for Hardhat and should be kept that way. Or, put simply, contents only which Hardhat needs.

Hardhat does not need to know of our networkConfig, we are using it for our own logic.

Put simply, networkConfig does not belong there and only used for OUR purposes, so we make a helper config.

You definitely could do that, but it would go against following the Modularity principle of Software Engineering - of keeping modules' con…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hamednasr
Comment options

Answer selected by hamednasr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants