You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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';
Bug Report
Unable to use sepolia testnet
Package name / version
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 };
![image](https://private-user-images.githubusercontent.com/99175614/401163988-d1b2cdc1-032a-4f92-bfdc-a3bfd7735609.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTM3ODcsIm5iZiI6MTczOTM1MzQ4NywicGF0aCI6Ii85OTE3NTYxNC80MDExNjM5ODgtZDFiMmNkYzEtMDMyYS00ZjkyLWJmZGMtYTNiZmQ3NzM1NjA5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA5NDQ0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlhMTAzMzZmMmNlMmJjZjRmZDBmOWZmNDQ1ZjRiODE2ZjgzNDJmYzNlMjJhODVjODE4MWFlZTMxODNiNTRjMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.5Qjh2Rx6PNsm4HgsQoOscvnDLN6ORmGdjpRpsLm56Io)
![image](https://private-user-images.githubusercontent.com/99175614/401164158-ac0539c1-04f6-4c61-8308-f7cd98df46c7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTM3ODcsIm5iZiI6MTczOTM1MzQ4NywicGF0aCI6Ii85OTE3NTYxNC80MDExNjQxNTgtYWMwNTM5YzEtMDRmNi00YzYxLTgzMDgtZjdjZDk4ZGY0NmM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA5NDQ0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA2YTk3NTNhNTYyMmRiODE2ODkyNzJlMjJiMWRmYjVlZjFhN2FjODQ1NTRkOWE0ZjUzZTU1YTdmZDAwMjVhMDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.zTt_mNnwXMWk8I8ChOTIOmn9HDgS5SY68hJKreTFjbw)
}
`
In the end I have such error:
which goes from
Steps to reproduce
Just to make a request
Expected behavior
to be able to connect to sepolia
Environment
Additional context / screenshots
The text was updated successfully, but these errors were encountered: