Skip to main content
Improved code formatting.
Source Link
SYED ASAD KAZMI
  • 5.8k
  • 2
  • 7
  • 22

The ILendingPoolAddressProvider does not contain the getLendingPool function.

async function getLendingPool(account) { const lendingPoolAddressProvider = await ethers.getContractAt( "ILendingPoolAddressesProvider", // This is the interface "0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5", account, ) const lendingPoolAddress = await lendingPoolAddressProvider.getLendingPool() const lendingPool = await ethers.getContractAt( "ILendingPoool", lendingPoolAddress, account, ) return lendingPool

async function getLendingPool(account) {
  const lendingPoolAddressProvider = await ethers.getContractAt(
    "ILendingPoolAddressesProvider", // This is the interface
    "0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5",
    account,
  )
  const lendingPoolAddress = await lendingPoolAddressProvider.getLendingPool()
  const lendingPool = await ethers.getContractAt(
    "ILendingPoool",
    lendingPoolAddress,
    account,
  )
  return lendingPool
}

The ILendingPoolAddressProvider does not contain the getLendingPool function.

async function getLendingPool(account) { const lendingPoolAddressProvider = await ethers.getContractAt( "ILendingPoolAddressesProvider", // This is the interface "0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5", account, ) const lendingPoolAddress = await lendingPoolAddressProvider.getLendingPool() const lendingPool = await ethers.getContractAt( "ILendingPoool", lendingPoolAddress, account, ) return lendingPool

The ILendingPoolAddressProvider does not contain the getLendingPool function.

async function getLendingPool(account) {
  const lendingPoolAddressProvider = await ethers.getContractAt(
    "ILendingPoolAddressesProvider", // This is the interface
    "0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5",
    account,
  )
  const lendingPoolAddress = await lendingPoolAddressProvider.getLendingPool()
  const lendingPool = await ethers.getContractAt(
    "ILendingPoool",
    lendingPoolAddress,
    account,
  )
  return lendingPool
}
Source Link

Calling `getLendingPool` in a function call `getLendingPool`

The ILendingPoolAddressProvider does not contain the getLendingPool function.

async function getLendingPool(account) { const lendingPoolAddressProvider = await ethers.getContractAt( "ILendingPoolAddressesProvider", // This is the interface "0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5", account, ) const lendingPoolAddress = await lendingPoolAddressProvider.getLendingPool() const lendingPool = await ethers.getContractAt( "ILendingPoool", lendingPoolAddress, account, ) return lendingPool