Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sepolia v3 integration #610

Open
nikitashaban11 opened this issue Jan 8, 2025 · 1 comment
Open

Sepolia v3 integration #610

nikitashaban11 opened this issue Jan 8, 2025 · 1 comment

Comments

@nikitashaban11
Copy link

nikitashaban11 commented Jan 8, 2025

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

@VictorRand
Copy link

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

Hello @nikitashaban11 Thank you for reaching to Our Github. Customer service may take some time to respond due to a large number of requests. We believe your case will be resolved as soon as possible. Kindly visit the HERE TO CONTACT OUR LIVE SUPPORT DEV for instant support response
Note: Click on the live chat icon at the bottom corner of the page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@nikitashaban11 @VictorRand and others