About 00-deploy vs 01-deploy #2018
-
I understand in however in
And what is confusing me is why can anyone help me to understand this in easy terms please? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hey @MasterofBlockchain to be clear, 00-deploy is not for deploying our contract locally, it is for deploying mocks locally. We also use 01-deploy to deploy locally our contract. What the if statement above effectively says, is that if we are on a local chain, we want to deploy the mocks - as so we use 00-deploy to deploy these mocks. but if we are on a testnet, we use the address ethUsdAddress that we put in our helper-hardhat file as the address for the priceFeed |
Beta Was this translation helpful? Give feedback.
-
Put simply, If we are on a local network:
Whereas, if we are not on a local network (i.e. testnets, mainnets):
Why the difference? Because in the latter, |
Beta Was this translation helpful? Give feedback.
Hey @MasterofBlockchain to be clear, 00-deploy is not for deploying our contract locally, it is for deploying mocks locally. We also use 01-deploy to deploy locally our contract. What the if statement above effectively says, is that if we are on a local chain, we want to deploy the mocks - as so we use 00-deploy to deploy these mocks. but if we are on a testnet, we use the address ethUsdAddress that we put in our helper-hardhat file as the address for the priceFeed