aave-utilities icon indicating copy to clipboard operation
aave-utilities copied to clipboard

Sepolia v3 integration

Open nikitashaban11 opened this issue 9 months ago • 0 comments

Bug Report

Unable to use sepolia testnet

Package name / version

"@aave/contract-helpers": "^1.30.5",
"@aave/math-utils": "^1.30.5",
"@bgd-labs/aave-address-book": "^4.7.3",

Description

I am trying to use aavev3 protocol. With mainnet everything works ok, but with sepolia I have an error. `import { ethers } from 'ethers'; import { UiPoolDataProvider, UiIncentiveDataProvider, ChainId, } from '@aave/contract-helpers'; import * as markets from '@bgd-labs/aave-address-book';

console.log(markets.AaveV3Sepolia.UI_POOL_DATA_PROVIDER);

const TESTNET = 'https://sepolia.infura.io/v3/key';

const provider = new ethers.providers.JsonRpcProvider(TESTNET);

const poolDataProviderContract = new UiPoolDataProvider({ uiPoolDataProviderAddress: markets.AaveV3Sepolia.UI_POOL_DATA_PROVIDER, provider, chainId: ChainId.sepolia, });

const incentiveDataProviderContract = new UiIncentiveDataProvider({ uiIncentiveDataProviderAddress: markets.AaveV3Ethereum.UI_INCENTIVE_DATA_PROVIDER, provider, chainId: ChainId.sepolia, });

export async function fetchContractData(userAccount: string) {

const reserves = await poolDataProviderContract.getReservesHumanized({ lendingPoolAddressProvider: markets.AaveV3Sepolia.POOL_ADDRESSES_PROVIDER, });

const userReserves = await poolDataProviderContract.getUserReservesHumanized({ lendingPoolAddressProvider: markets.AaveV3Sepolia.POOL_ADDRESSES_PROVIDER, user: userAccount, });

const reserveIncentives = await incentiveDataProviderContract.getReservesIncentivesDataHumanized({ lendingPoolAddressProvider: markets.AaveV3Sepolia.POOL_ADDRESSES_PROVIDER, });

const userIncentives = await incentiveDataProviderContract.getUserReservesIncentivesDataHumanized({ lendingPoolAddressProvider: markets.AaveV3Sepolia.POOL_ADDRESSES_PROVIDER, user: userAccount, });

console.log({ reserves, userReserves, reserveIncentives, userIncentives });

return { reserves, userReserves, reserveIncentives, userIncentives }; } ` In the end I have such error: image which goes from image

Steps to reproduce

Just to make a request

Expected behavior

to be able to connect to sepolia

Environment

  • OS: [e.g., OSX 13.3.1 ]
  • Node/npm version: [e.g., Node v20.17.0/npm 10.8.2]
  • Browser: [e.g., Chrome]

Additional context / screenshots

nikitashaban11 avatar Jan 08 '25 13:01 nikitashaban11