Skip to content

Lesson 7: question About DeployFundMe script #77

Answered by alymurtazamemon
Perso77 asked this question in Q&A
Discussion options

You must be logged in to vote

@Perso77 DeployFundMe script creates the HelperConfig script contract which either gets the price feed address if the network is testnet, in the case of localhost such as Anvil it first create the mock contract and then return the price feed address;

MockV3Aggregator mockPriceFeed = new MockV3Aggregator(
    DECIMALS,
    INITIAL_PRICE
);

and after that, the DeployFundMe script deployed the FundMe contract; due to that, you see two contracts deployed on the anvil.

FundMe fundMe = new FundMe(priceFeed);

Replies: 2 comments 3 replies

Comment options

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

Comment options

You must be logged in to vote
2 replies
@Perso77
Comment options

@cromewar
Comment options

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