Skip to content

Lesson 7 : AssertionError: expected '0x5FbDB2315678afecb367f032d93F642f641…' to equal undefined #6015

Answered by Naman1729
wwwbaraccuda asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @wwwbaraccuda , In v6 we use getContractAt in which it takes three argument (nameOfContract, addressOfContract, signerOfContract)

All contract instances are stored in the contracts by this:

const contracts = await deployments.fixture(["all"]);

For the addressOfContract we use this:

const fundMeAddress = contracts["FundMe"].address;

For the signerOfContract we use getSigner:

const signer = await ethers.getSigner(deployer);

we can take the instance of the contract by this :

mockV3Aggregator = contracts["MockV3Aggregator"];

then we have :

const { deployments, ethers, getNamedAccounts } = require("hardhat")
const { assert } = require("chai")

describe("FundMe", async function () {
    let f…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@wwwbaraccuda
Comment options

@AbhimanyuAjudiya
Comment options

@UmitRock
Comment options

Answer selected by wwwbaraccuda
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants