Skip to content

Lesson 7: FundMe.test.js "Error: call revert exception", on testing the constructor #4593

Answered by pacelliv
enless-c asked this question in Q&A
Discussion options

You must be logged in to vote

Hello , the problem seems to be that you're implementing getContractAt() as if it were the getContract() method.

The getContractAt() method takes three arguments: getContractAt(x, y, z), Where:

  • x is the name (string) or the abi of the contract.
  • y is the address of the deployed contract.
  • z is the signer.

Currently you're passing the deployer as the address of the deployed contract, which is incorrect. So no contracts are stored in the fundMe and mockV3Aggregator variables.

I'm not sure if it's your intention to use this method or if the autocomplete messed with you, but probably what you want to use is getContract(), which you're basically implementing.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@enless-c
Comment options

@pacelliv
Comment options

@zeeshan615
Comment options

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