Skip to content

3 Questions #2284

Answered by krakxn
OmarWaqar123 asked this question in Q&A
Sep 2, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

For questions, the category should be Q&A; therefore, it should be changed.

Now, as to your questions:

  1. getContract("FundMe", deployer); returns the instance of the contract FundMe with the signer/interface deployer. Whereas deployments.get("FundMe") returns the latest instance of the contract FundMe.

  2. For public state variables, an automatic getter function is generated by the Solidity compiler. fundMe.priceFeed(); basically works the same as a getter function, i.e. fundMe.getPriceFeed(). There is no difference between them. Both of them return the variable priceFeed in FundMe

  3. If it does not work even if you importing the packages properly in your hardhat.config.js, then it can be de…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by OmarWaqar123
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