Skip to content

Lessson 13 : Not getting LendingPool Address in the output, instead getting "Got 200000.... WETH " twice #5771

Answered by alfaqi
Prayag2003 asked this question in Q&A
Discussion options

You must be logged in to vote

the issue with this additional code in getWeth.js

getWeth()
    .then(() => process.exit(0))
    .catch((err) => {
        console.log(err);
        process.exit(1);
    })

just delete it, and it works fine.
like this
getWeth.js

const { getNamedAccounts } = require("hardhat");
const { ethers } = require("hardhat");
const AMOUNT = ethers.utils.parseEther("0.01");

async function getWeth() {
    const { deployer } = await getNamedAccounts();

    // call the deposit function on the WETH Contract
    // abi , contract address 
    // 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
    const iWeth = await ethers.getContractAt(
        "IWeth",  // ABI
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C7…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Prayag2003
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
2 participants