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

getReservesHumanized not running properly #412

Open
Acarulo opened this issue Aug 29, 2022 · 2 comments
Open

getReservesHumanized not running properly #412

Acarulo opened this issue Aug 29, 2022 · 2 comments

Comments

@Acarulo
Copy link

Acarulo commented Aug 29, 2022

Method returns a call revert exception when triggered.

I tried running:

const uiPoolDataProviderAddress = "0x47e300dDd1d25447482E2F7e5a5a967EA2DA8634";
const lendingPoolAddressProvider = "0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5";

const provider = new ethers.providers.JsonRpcProvider("https://mainnet.infura.io/v3/process.env.KEY");
const poolDataProviderContract = new UiPoolDataProvider({uiPoolDataProviderAddress, provider});

const reserves = await poolDataProviderContract.getReservesHumanized({lendingPoolAddressProvider});

The current math-utils and contract-helpers versions are 1.6. I also tried with 1.5.2. From what I see, there's a significant difference between the getReservesData ABI outputs that are loaded within the IUiPoolDataProviderV3__factory file and the actual ABI from the contract deployed on mainnet. There are some extra attributes on the file that the contract method does not return. As a result, my call output is the following:

Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="getReservesData(address)", data="0x00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000023ef6a6a9000000000000000000000000000000000000000000000000000000023ef6a6a900000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000 [a lot of characters going on here],
errorArgs: null,
errorName: null,
errorSignature: null,
address: '0x47e300dDd1d25447482E2F7e5a5a967EA2DA8634',
args: [ '0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5' ],
transaction: {
data: '0xec489c21000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c5',
to: '0x47e300dDd1d25447482E2F7e5a5a967EA2DA8634'
}
}

Thanks in advance for your assistance.

@defispartan
Copy link
Collaborator

This is the latest version of the UiPoolDataProvider on Eth mainnet which will work with the latest of contract-helpers and math-utils: 0x30375522F67a6308630d49A694ca1491fA2D3BC6

@maxschnaider
Copy link

@Acarulo make sure you're using the latest contract addresses from https://docs.aave.com/developers/deployed-contracts/v3-mainnet

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

3 participants