interface icon indicating copy to clipboard operation
interface copied to clipboard

V2 protocol does not work in interface

Open 0xZXDX opened this issue 2 years ago • 6 comments

Describe the bug

Below is the address of the contract I deployed

root@56953fdb14dd:/src# git show
commit 61c2273a992f655c6d3e7d716a0c2f1b97a55a92
Merge: d998c2f4 138446bb
Author: Lasse Herskind <[email protected]>
Date:   Mon Jan 10 17:58:16 2022 +0100

    Merge pull request #264 from aave/revert/reserves-cap

    Release Fix: Revert reserves cap change due breaking change at ILendingPool interface

root@56953fdb14dd:/src# npm run print-contracts:kovan

> @aave/[email protected] print-contracts:kovan /src
> npm run hardhat:kovan -- print-contracts


> @aave/[email protected] hardhat:kovan /src
> hardhat --network kovan "print-contracts"

- Enviroment
  - Network : kovan
Contracts deployed at kovan
---------------------------------
N# Contracts: 30
LendingPoolAddressesProvider: 0x937E72Fb6Fc133D2CF437d65B3AD7E4C613c3C7E
ReserveLogic: 0x50408FeA8500415AaBCd3707b26f0ed055792ad5
GenericLogic: 0x30a61Abf4B6e461d5ceE8522C911C0F7A1E710bC
ValidationLogic: 0x24c6051793f86C939F13CC401F924C9d3290B951
LendingPoolImpl: 0xb537824cf0C9fAdC13bF1Eb319fde9daA7989E6d
LendingPool: 0x25971b0364c4d4eeE145ebc7255973561CDd8232
LendingPoolConfiguratorImpl: 0xf780D35201125755a1D494164EdaaAC28917C7DC
LendingPoolConfigurator: 0x39e5AbDAB8B74a45Cb431d6A03030b370A5A82AF
StableAndVariableTokensHelper: 0x3fD85623BB3d22903b8CD71A54735baeefaDC6B5
ATokensAndRatesHelper: 0xd99ace887D136da4C8a82E89123B624179f274FE
AaveOracle: 0x315a0aAf097838a9219A86386baD35a20f861Ba2
LendingRateOracle: 0x8d7A42d3292868d3d5964aB97c48Eab1422b4428
AaveProtocolDataProvider: 0xBc8c10b7F8720eDf3754B599927eb9Ac31f18013
AToken: 0x8309b0B2ffC006bB338f5591F1e4c9c1502697f7
DelegationAwareAToken: 0x8fa8CDBd1Fa8a5c31f485478ef35df7aC773387B
StableDebtToken: 0xFb2811213B284245F32e6fbcfaB7ce9b4bB6F9a7
VariableDebtToken: 0x2bCcA8Fa644F75FDE3E41fcEa7190B8aD027CB5d
DefaultReserveInterestRateStrategy: 0x2e693a2FeB857990C25BF5486b8C1fcB6BF0f08E
rateStrategyAAVE: 0xd7dae0956888C05c1a88cC178c9BB139D7Ff0720
rateStrategyVolatileOne: 0x58b4e8aa526f38d695bA4B3eB7b382c485DEAC4a
rateStrategyStableOne: 0xEAF6bB8624d92815f9321C632405d2463FEc07a5
rateStrategyStableTwo: 0x1330552fB3eA62b3a192F89A09C06AC4f1cE301C
rateStrategyVolatileTwo: 0xFc3Ca4BaaCB227c415562114A35CfF7AbaD4D812
rateStrategyVolatileThree: 0x8DdD2308872edBFcdfbdDb50DDfB2f4d11bA7e8A
rateStrategyStableThree: 0x77E627eD1FF2fa4A33657bbd3Ab782f7b40c8135
rateStrategyWETH: 0x2e693a2FeB857990C25BF5486b8C1fcB6BF0f08E
WalletBalanceProvider: 0xFE2413d89371d9478f477236c64be5c02dA1af5F
WETHGateway: 0x9A04494965A8a8EA9844D798f9ACC69B0456AAa6
UiPoolDataProvider: 0x27211785F1ED5489337040f67584CCb508b61a2D  # is UiPoolDataProviderV2V3
UiIncentiveDataProviderV2V3: 0x35a305eD9737B2AeE68FF90e1Bce84fA1137E0dF

I posted a question before, in which I was told that UiPoolDataProvider and UiIncentiveDataProvider should deploy V2V3 version and now deploy V2V3 version

1 2

I cloned the interface repo locally and changed the address corresponding to kovan

  [CustomMarket.proto_kovan]: {
    marketTitle: 'Ethereum Kovan',
    chainId: ChainId.kovan,
    enabledFeatures: {
      governance: true,
      staking: true,
      incentives: true,
    },
    rpcOnly: true,
    addresses: {
      LENDING_POOL_ADDRESS_PROVIDER: '0x937E72Fb6Fc133D2CF437d65B3AD7E4C613c3C7E'.toLowerCase(),
      LENDING_POOL: '0x25971b0364c4d4eeE145ebc7255973561CDd8232',
      WETH_GATEWAY: '0x9A04494965A8a8EA9844D798f9ACC69B0456AAa6',
      WALLET_BALANCE_PROVIDER: '0xFE2413d89371d9478f477236c64be5c02dA1af5F',
      UI_POOL_DATA_PROVIDER: '0x27211785F1ED5489337040f67584CCb508b61a2D',
      UI_INCENTIVE_DATA_PROVIDER: '0x35a305eD9737B2AeE68FF90e1Bce84fA1137E0dF',
    },
  },

then I open the browser, visit: http://localhost:3000/ and switch to the test network, there is the following error prompt

3

the error is the code of usePoolDataRPC.tsx

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

the error comes from the getReservesData method

const { 0: reservesRaw, 1: poolBaseCurrencyRaw }: ReservesData =
  await this.getReservesData({ lendingPoolAddressProvider });

but my call from browser is successful

4

I don't understand why there is such a problem, please help me, it is difficult for me to read the contract code without the interface

0xZXDX avatar Jul 05 '22 16:07 0xZXDX

The contract-helpers library uses a single version of the UiPoolDataProvider and UiIncentiveDataProvider for all markets (V2 and V3). The current version used by all markets on the interface is from this commit: https://github.com/aave/aave-v3-periphery/blob/b04d26e91cb8d795ccd75eba44fc0f350180debf/contracts/misc/UiPoolDataProviderV3.sol

defispartan avatar Jul 05 '22 23:07 defispartan

The contract-helpers library uses a single version of the UiPoolDataProvider and UiIncentiveDataProvider for all markets (V2 and V3). The current version used by all markets on the interface is from this commit: https://github.com/aave/aave-v3-periphery/blob/b04d26e91cb8d795ccd75eba44fc0f350180debf/contracts/misc/UiPoolDataProviderV3.sol

Sorry, I don't understand very well, do you mean that I need to deploy an aave-v3-periphery contract to replace the original UiPoolDataProvider and UiIncentiveDataProvider?

0xZXDX avatar Jul 06 '22 02:07 0xZXDX

The contract-helpers library uses a single version of the UiPoolDataProvider and UiIncentiveDataProvider for all markets (V2 and V3). The current version used by all markets on the interface is from this commit: https://github.com/aave/aave-v3-periphery/blob/b04d26e91cb8d795ccd75eba44fc0f350180debf/contracts/misc/UiPoolDataProviderV3.sol

Sorry, I don't understand very well, do you mean that I need to deploy an aave-v3-periphery contract to replace the original UiPoolDataProvider and UiIncentiveDataProvider?

That's what I was intending when I wrote the comment, but actually looking at this contract the constructor doesn't take any market-specific parameters so you can just use the existing contract on Kovan.

If you replace the UI_POOL_DATA_PROVIDER and UI_INCENTIVE_DATA_PROVIDER addresses in your marketConfig with the addresses linked here it should work.

defispartan avatar Jul 06 '22 03:07 defispartan

The contract-helpers library uses a single version of the UiPoolDataProvider and UiIncentiveDataProvider for all markets (V2 and V3). The current version used by all markets on the interface is from this commit: https://github.com/aave/aave-v3-periphery/blob/b04d26e91cb8d795ccd75eba44fc0f350180debf/contracts/misc/UiPoolDataProviderV3.sol

Sorry, I don't understand very well, do you mean that I need to deploy an aave-v3-periphery contract to replace the original UiPoolDataProvider and UiIncentiveDataProvider?

That's what I was intending when I wrote the comment, but actually looking at this contract the constructor doesn't take any market-specific parameters so you can just use the existing contract on Kovan.

If you replace the UI_POOL_DATA_PROVIDER and UI_INCENTIVE_DATA_PROVIDER addresses in your marketConfig with the addresses linked here it should work.

Thanks, I use the original UI_POOL_DATA_PROVIDER and UI_INCENTIVE_DATA_PROVIDER addresses, it works normally and no error is reported, but when I try to pledge, he has an unknown error, I don't understand if it is related to UI_POOL_DATA_PROVIDER, UI_INCENTIVE_DATA_PROVIDER

1

0xZXDX avatar Jul 06 '22 03:07 0xZXDX

What's the error message?

If it contains SERVER_ERROR it's most likely an RPC issue. The Kovan network is technically deprecated, so the RPCs are very unreliable.

defispartan avatar Jul 06 '22 15:07 defispartan

What's the error message?

If it contains SERVER_ERROR it's most likely an RPC issue. The Kovan network is technically deprecated, so the RPCs are very unreliable.

I found no errors on chroma's console or on the network, only the UI has a reminder, I suspect it is a contract problem, but I can't deploy aave-v3-periphery now, because it relies on @aave/deploy-v3 this private repo, I don't have permission to access.....

0xZXDX avatar Jul 06 '22 15:07 0xZXDX

This repo is public now: https://github.com/aave/aave-v3-deploy, any issues with these deployment steps can be opened on this repo

defispartan avatar Jan 05 '23 16:01 defispartan