Skip to content

Commit

Permalink
Add Lido V3 Ethereum addresses and generated artifacts (#491)
Browse files Browse the repository at this point in the history
* feat: add Lido V3 Ethereum addresses and generated artifacts

* fix: replace CONFIG_ENGINE for Lido

Replace CONFIG_ENGINE in Lido V3 config, to reuse INCENTIVES_CONTROLLER and COLLECTOR from Aave V3 Mainnet instance, remove STATIC_A_TOKEN_FACTORY due is not expected to be used for now, reuse WALLET_BALANCE_PROVIDER from Aave V3 Mainnet instance.

---------

Co-authored-by: kartojal <david@catapulta.sh>
  • Loading branch information
kartojal and kartojal authored Jul 18, 2024
1 parent 183dda3 commit 5ac7e50
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/configs/pools/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,24 @@ export const mainnetProtoV3Pool: PoolConfig = {
SAVINGS_DAI_TOKEN_WRAPPER: '0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034',
},
};

export const lidoEthereumMainnetProtoV3Pool: PoolConfig = {
name: 'EthereumLido',
chainId: ChainId.mainnet,
POOL_ADDRESSES_PROVIDER: '0xcfBf336fe147D643B9Cb705648500e101504B16d',
additionalAddresses: {
POOL_ADDRESSES_PROVIDER_REGISTRY: '0xC6cAB8D39D93DC0Bd5986E7Ce5Bb956E30103A43',
REPAY_WITH_COLLATERAL_ADAPTER: '0xd0EAE3B730AE736614c66Cb40aFd1e0063f74286',
SWAP_COLLATERAL_ADAPTER: '0xD0887AA7fEBC8962c622493646195e7c76D94fCE',
WITHDRAW_SWAP_ADAPTER: '0x43eDB797834151D041619EEF833Edc784B509dAE',
UI_INCENTIVE_DATA_PROVIDER: '0xB3a0fA312853A8E24C7756e6857cD56592b24c99',
UI_POOL_DATA_PROVIDER: '0x07060168141ab016abb8933b86d2541d66b4f74a',
WALLET_BALANCE_PROVIDER: '0xC7be5307ba715ce89b152f3Df0658295b3dbA8E2',
WETH_GATEWAY: '0x702B6770A81f75964cA5D479F369eFB31dfa7C32',
CONFIG_ENGINE: '0xC80f057d40Fc7f0A01ad4a634f35520Df8079707',
// STATIC_A_TOKEN_FACTORY: '',
// CAPS_PLUS_RISK_STEWARD: '',
// FREEZING_STEWARD: '',
// RATES_FACTORY: '',
},
};
2 changes: 2 additions & 0 deletions scripts/generateAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
mainnetArcV2Pool,
mainnetProtoV2Pool,
sepoliaProtoV3,
lidoEthereumMainnetProtoV3Pool,
} from './configs/pools/ethereum';
import {fantomProtoV3, fantomTestnetProtoV3} from './configs/pools/fantom';
import {harmonyProtoV3} from './configs/pools/harmony';
Expand Down Expand Up @@ -119,6 +120,7 @@ async function main() {
fantomTestnetProtoV3,
fantomProtoV3,
harmonyProtoV3,
lidoEthereumMainnetProtoV3Pool,
].map((config) => generateProtocolV3Library(config)),
);

Expand Down
1 change: 1 addition & 0 deletions src/AaveAddressBook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {AaveV3ScrollSepolia} from './AaveV3ScrollSepolia.sol';
import {AaveV3FantomTestnet} from './AaveV3FantomTestnet.sol';
import {AaveV3Fantom} from './AaveV3Fantom.sol';
import {AaveV3Harmony} from './AaveV3Harmony.sol';
import {AaveV3EthereumLido} from './AaveV3EthereumLido.sol';
import {MiscArbitrum} from './MiscArbitrum.sol';
import {MiscArbitrumSepolia} from './MiscArbitrumSepolia.sol';
import {MiscAvalanche} from './MiscAvalanche.sol';
Expand Down
79 changes: 79 additions & 0 deletions src/AaveV3EthereumLido.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;

import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager} from './AaveV3.sol';
import {ICollector} from './common/ICollector.sol';

library AaveV3EthereumLido {
// https://etherscan.io/address/0xcfBf336fe147D643B9Cb705648500e101504B16d
IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER =
IPoolAddressesProvider(0xcfBf336fe147D643B9Cb705648500e101504B16d);

// https://etherscan.io/address/0x4e033931ad43597d96D6bcc25c280717730B58B1
IPool internal constant POOL = IPool(0x4e033931ad43597d96D6bcc25c280717730B58B1);

// https://etherscan.io/address/0xdA8d159352ba3700d37E6e7B6a027E1bf3188C60
address internal constant POOL_IMPL = 0xdA8d159352ba3700d37E6e7B6a027E1bf3188C60;

// https://etherscan.io/address/0x342631c6CeFC9cfbf97b2fe4aa242a236e1fd517
IPoolConfigurator internal constant POOL_CONFIGURATOR =
IPoolConfigurator(0x342631c6CeFC9cfbf97b2fe4aa242a236e1fd517);

// https://etherscan.io/address/0x5704f0Ed2B5B47f380aAF5993819062D62eDC219
address internal constant POOL_CONFIGURATOR_IMPL = 0x5704f0Ed2B5B47f380aAF5993819062D62eDC219;

// https://etherscan.io/address/0xE3C061981870C0C7b1f3C4F4bB36B95f1F260BE6
IAaveOracle internal constant ORACLE = IAaveOracle(0xE3C061981870C0C7b1f3C4F4bB36B95f1F260BE6);

// https://etherscan.io/address/0xa3206d66cF94AA1e93B21a9D8d409d6375309F4A
IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER =
IPoolDataProvider(0xa3206d66cF94AA1e93B21a9D8d409d6375309F4A);

// https://etherscan.io/address/0x013E2C7567b6231e865BB9273F8c7656103611c0
IACLManager internal constant ACL_MANAGER =
IACLManager(0x013E2C7567b6231e865BB9273F8c7656103611c0);

// https://etherscan.io/address/0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A
address internal constant ACL_ADMIN = 0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A;

// https://etherscan.io/address/0x428E3747BC60B76c20EE7CF89510072C24b544D3
address internal constant DEFAULT_INCENTIVES_CONTROLLER =
0x428E3747BC60B76c20EE7CF89510072C24b544D3;

// https://etherscan.io/address/0x0982B6B8839D589621Bd1BC87BF072864926a97D
address internal constant EMISSION_MANAGER = 0x0982B6B8839D589621Bd1BC87BF072864926a97D;

// https://etherscan.io/address/0xC6cAB8D39D93DC0Bd5986E7Ce5Bb956E30103A43
address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY =
0xC6cAB8D39D93DC0Bd5986E7Ce5Bb956E30103A43;

// https://etherscan.io/address/0xd0EAE3B730AE736614c66Cb40aFd1e0063f74286
address internal constant REPAY_WITH_COLLATERAL_ADAPTER =
0xd0EAE3B730AE736614c66Cb40aFd1e0063f74286;

// https://etherscan.io/address/0xD0887AA7fEBC8962c622493646195e7c76D94fCE
address internal constant SWAP_COLLATERAL_ADAPTER = 0xD0887AA7fEBC8962c622493646195e7c76D94fCE;

// https://etherscan.io/address/0x43eDB797834151D041619EEF833Edc784B509dAE
address internal constant WITHDRAW_SWAP_ADAPTER = 0x43eDB797834151D041619EEF833Edc784B509dAE;

// https://etherscan.io/address/0xB3a0fA312853A8E24C7756e6857cD56592b24c99
address internal constant UI_INCENTIVE_DATA_PROVIDER = 0xB3a0fA312853A8E24C7756e6857cD56592b24c99;

// https://etherscan.io/address/0x07060168141ab016AbB8933B86D2541D66B4F74A
address internal constant UI_POOL_DATA_PROVIDER = 0x07060168141ab016AbB8933B86D2541D66B4F74A;

// https://etherscan.io/address/0xC7be5307ba715ce89b152f3Df0658295b3dbA8E2
address internal constant WALLET_BALANCE_PROVIDER = 0xC7be5307ba715ce89b152f3Df0658295b3dbA8E2;

// https://etherscan.io/address/0x702B6770A81f75964cA5D479F369eFB31dfa7C32
address internal constant WETH_GATEWAY = 0x702B6770A81f75964cA5D479F369eFB31dfa7C32;

// https://etherscan.io/address/0xC80f057d40Fc7f0A01ad4a634f35520Df8079707
address internal constant CONFIG_ENGINE = 0xC80f057d40Fc7f0A01ad4a634f35520Df8079707;
}

library AaveV3EthereumLidoAssets {}

library AaveV3EthereumLidoEModes {}
1 change: 1 addition & 0 deletions src/ts/AaveAddressBook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export * as AaveV3ScrollSepolia from './AaveV3ScrollSepolia';
export * as AaveV3FantomTestnet from './AaveV3FantomTestnet';
export * as AaveV3Fantom from './AaveV3Fantom';
export * as AaveV3Harmony from './AaveV3Harmony';
export * as AaveV3EthereumLido from './AaveV3EthereumLido';
export * as MiscArbitrum from './MiscArbitrum';
export * as MiscArbitrumSepolia from './MiscArbitrumSepolia';
export * as MiscAvalanche from './MiscAvalanche';
Expand Down
64 changes: 64 additions & 0 deletions src/ts/AaveV3EthereumLido.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR
// IPoolAddressesProvider https://etherscan.io/address/0xcfBf336fe147D643B9Cb705648500e101504B16d
export const POOL_ADDRESSES_PROVIDER = '0xcfBf336fe147D643B9Cb705648500e101504B16d';

// IPool https://etherscan.io/address/0x4e033931ad43597d96D6bcc25c280717730B58B1
export const POOL = '0x4e033931ad43597d96D6bcc25c280717730B58B1';

// https://etherscan.io/address/0xdA8d159352ba3700d37E6e7B6a027E1bf3188C60
export const POOL_IMPL = '0xdA8d159352ba3700d37E6e7B6a027E1bf3188C60';

// IPoolConfigurator https://etherscan.io/address/0x342631c6CeFC9cfbf97b2fe4aa242a236e1fd517
export const POOL_CONFIGURATOR = '0x342631c6CeFC9cfbf97b2fe4aa242a236e1fd517';

// https://etherscan.io/address/0x5704f0Ed2B5B47f380aAF5993819062D62eDC219
export const POOL_CONFIGURATOR_IMPL = '0x5704f0Ed2B5B47f380aAF5993819062D62eDC219';

// IAaveOracle https://etherscan.io/address/0xE3C061981870C0C7b1f3C4F4bB36B95f1F260BE6
export const ORACLE = '0xE3C061981870C0C7b1f3C4F4bB36B95f1F260BE6';

// IPoolDataProvider https://etherscan.io/address/0xa3206d66cF94AA1e93B21a9D8d409d6375309F4A
export const AAVE_PROTOCOL_DATA_PROVIDER = '0xa3206d66cF94AA1e93B21a9D8d409d6375309F4A';

// IACLManager https://etherscan.io/address/0x013E2C7567b6231e865BB9273F8c7656103611c0
export const ACL_MANAGER = '0x013E2C7567b6231e865BB9273F8c7656103611c0';

// https://etherscan.io/address/0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A
export const ACL_ADMIN = '0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A';

// https://etherscan.io/address/0x428E3747BC60B76c20EE7CF89510072C24b544D3
export const DEFAULT_INCENTIVES_CONTROLLER = '0x428E3747BC60B76c20EE7CF89510072C24b544D3';

// https://etherscan.io/address/0x0982B6B8839D589621Bd1BC87BF072864926a97D
export const EMISSION_MANAGER = '0x0982B6B8839D589621Bd1BC87BF072864926a97D';

// https://etherscan.io/address/0xC6cAB8D39D93DC0Bd5986E7Ce5Bb956E30103A43
export const POOL_ADDRESSES_PROVIDER_REGISTRY = '0xC6cAB8D39D93DC0Bd5986E7Ce5Bb956E30103A43';

// https://etherscan.io/address/0xd0EAE3B730AE736614c66Cb40aFd1e0063f74286
export const REPAY_WITH_COLLATERAL_ADAPTER = '0xd0EAE3B730AE736614c66Cb40aFd1e0063f74286';

// https://etherscan.io/address/0xD0887AA7fEBC8962c622493646195e7c76D94fCE
export const SWAP_COLLATERAL_ADAPTER = '0xD0887AA7fEBC8962c622493646195e7c76D94fCE';

// https://etherscan.io/address/0x43eDB797834151D041619EEF833Edc784B509dAE
export const WITHDRAW_SWAP_ADAPTER = '0x43eDB797834151D041619EEF833Edc784B509dAE';

// https://etherscan.io/address/0xB3a0fA312853A8E24C7756e6857cD56592b24c99
export const UI_INCENTIVE_DATA_PROVIDER = '0xB3a0fA312853A8E24C7756e6857cD56592b24c99';

// https://etherscan.io/address/0x07060168141ab016AbB8933B86D2541D66B4F74A
export const UI_POOL_DATA_PROVIDER = '0x07060168141ab016AbB8933B86D2541D66B4F74A';

// https://etherscan.io/address/0xC7be5307ba715ce89b152f3Df0658295b3dbA8E2
export const WALLET_BALANCE_PROVIDER = '0xC7be5307ba715ce89b152f3Df0658295b3dbA8E2';

// https://etherscan.io/address/0x702B6770A81f75964cA5D479F369eFB31dfa7C32
export const WETH_GATEWAY = '0x702B6770A81f75964cA5D479F369eFB31dfa7C32';

// https://etherscan.io/address/0xC80f057d40Fc7f0A01ad4a634f35520Df8079707
export const CONFIG_ENGINE = '0xC80f057d40Fc7f0A01ad4a634f35520Df8079707';

export const CHAIN_ID = 1;
export const ASSETS = {} as const;
export const E_MODES = {} as const;

0 comments on commit 5ac7e50

Please sign in to comment.