Skip to content

Commit

Permalink
fix: pdp address on amm is in a different slot (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra authored Nov 14, 2023
1 parent 594297e commit 1d47ffe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion scripts/generator/protocolV2Generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {A_TOKEN_V2_ABI} from '../abi/aToken_v2_abi';
import {INCENTIVES_CONTROLLER_ABI} from '../abi/incentivesController_abi';
import {generateAssetsLibrary} from './assetsLibraryGenerator';
import {IUiPoolDataProvider_ABI} from '../../src/ts/abis/IUiPoolDataProvider';
import {mainnetAmmV2Pool} from '../configs/pools/ethereum';

export interface PoolV2Addresses {
POOL_ADDRESSES_PROVIDER: AddressInfo;
Expand Down Expand Up @@ -98,7 +99,9 @@ export async function getPoolV2Addresses(pool: PoolConfig): Promise<PoolV2Addres
addressProviderContract.read.getPoolAdmin(),
addressProviderContract.read.getEmergencyAdmin(),
addressProviderContract.read.getAddress([
'0x0100000000000000000000000000000000000000000000000000000000000000',
pool.name === mainnetAmmV2Pool.name
? '0x1000000000000000000000000000000000000000000000000000000000000000'
: '0x0100000000000000000000000000000000000000000000000000000000000000',
]),
addressProviderContract.read.getLendingPoolCollateralManager(),
]);
Expand Down
4 changes: 2 additions & 2 deletions src/AaveV2EthereumAMM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ library AaveV2EthereumAMM {
ILendingRateOracle internal constant LENDING_RATE_ORACLE =
ILendingRateOracle(0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D);

// https://etherscan.io/address/0x0000000000000000000000000000000000000000
// https://etherscan.io/address/0xc443AD9DDE3cecfB9dfC5736578f447aFE3590ba
IAaveProtocolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER =
IAaveProtocolDataProvider(0x0000000000000000000000000000000000000000);
IAaveProtocolDataProvider(0xc443AD9DDE3cecfB9dfC5736578f447aFE3590ba);

// https://etherscan.io/address/0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A
address internal constant POOL_ADMIN = 0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A;
Expand Down
4 changes: 2 additions & 2 deletions src/ts/AaveV2EthereumAMM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const ORACLE = '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9';
// ILendingRateOracle https://etherscan.io/address/0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D
export const LENDING_RATE_ORACLE = '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D';

// IAaveProtocolDataProvider https://etherscan.io/address/0x0000000000000000000000000000000000000000
export const AAVE_PROTOCOL_DATA_PROVIDER = '0x0000000000000000000000000000000000000000';
// IAaveProtocolDataProvider https://etherscan.io/address/0xc443AD9DDE3cecfB9dfC5736578f447aFE3590ba
export const AAVE_PROTOCOL_DATA_PROVIDER = '0xc443AD9DDE3cecfB9dfC5736578f447aFE3590ba';

// https://etherscan.io/address/0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A
export const POOL_ADMIN = '0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A';
Expand Down

0 comments on commit 1d47ffe

Please sign in to comment.