Skip to content

Commit

Permalink
feat: add celo pool addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherlymite committed Feb 17, 2025
1 parent 4583dcd commit 1d6fe10
Show file tree
Hide file tree
Showing 8 changed files with 245 additions and 13 deletions.
16 changes: 16 additions & 0 deletions safe.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,22 @@ address,name,chainId
0xEB0682d148e874553008730f0686ea89db7DA412,MiscArbitrum TRANSPARENT_PROXY_FACTORY,42161
0xF3272CAfe65b190e76caAF483db13424a3e23dD2,MiscArbitrum rETH_ETH_AGGREGATOR,42161
0xB1552C5e96B312d0Bf8b554186F846C40614a540,MiscArbitrum wstETH_stETH_AGGREGATOR,42161
0x33b7d355613110b4E842f5f7057Ccd36fb4cee28,AaveV3Celo AAVE_PROTOCOL_DATA_PROVIDER,42220
0x1dF462e2712496373A347f8ad10802a5E95f053D,AaveV3Celo ACL_ADMIN,42220
0x7a12dCfd73C1B4cddf294da4cFce75FcaBBa314C,AaveV3Celo ACL_MANAGER,42220
0xB25a5D144626a0D488e52AE717A051a2E9997076,AaveV3Celo CONFIG_ENGINE,42220
0x4725A0FdbEB14A77964bC1C221eE3a7982263103,AaveV3Celo DEFAULT_INCENTIVES_CONTROLLER,42220
0x9e04Cb339163b06068397d9b6af2dA78440954e0,AaveV3Celo EMISSION_MANAGER,42220
0x1e693D088ceFD1E95ba4c4a5F7EeA41a1Ec37e8b,AaveV3Celo ORACLE,42220
0x3E59A31363E2ad014dcbc521c4a0d5757d9f3402,AaveV3Celo POOL,42220
0x9F7Cf9417D5251C59fE94fB9147feEe1aAd9Cea5,AaveV3Celo POOL_ADDRESSES_PROVIDER,42220
0xB4B6939D0804DCE8d0Ac3e59b2eD5C072829d56b,AaveV3Celo POOL_ADDRESSES_PROVIDER_REGISTRY,42220
0x7567E3434CC1BEf724AB595e6072367Ef4914691,AaveV3Celo POOL_CONFIGURATOR,42220
0x87f6224536d9BD1d4FE6052e06f9647B51843e33,AaveV3Celo POOL_CONFIGURATOR_IMPL,42220
0x44D38b18a99E50E51B99F05C1f418Db26Ded315f,AaveV3Celo POOL_IMPL,42220
0x3A1Ea5fB3098b9767E0e85D63E28A5c0EAa44099,AaveV3Celo UI_INCENTIVE_DATA_PROVIDER,42220
0xf07fFd12b119b921C4a2ce8d4A13C5d1E3000d6e,AaveV3Celo UI_POOL_DATA_PROVIDER,42220
0xB91DA65093d54a1a7cb0fe684860F568A5E57123,AaveV3Celo WALLET_BALANCE_PROVIDER,42220
0x91b21900E91CD302EBeD05E45D8f270ddAED944d,GovernanceV3Celo CL_EMERGENCY_ORACLE,42220
0x50F4dAA86F3c747ce15C3C38bD0383200B61d6Dd,GovernanceV3Celo CROSS_CHAIN_CONTROLLER,42220
0x1dF462e2712496373A347f8ad10802a5E95f053D,GovernanceV3Celo EXECUTOR_LVL_1,42220
Expand Down
16 changes: 16 additions & 0 deletions scripts/configs/pools/celo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {ChainId} from '@bgd-labs/rpc-env';
import {PoolConfig} from '../types';

export const celoProtoV3: PoolConfig = {
name: 'Celo',
chainId: ChainId.celo,
POOL_ADDRESSES_PROVIDER: '0x9F7Cf9417D5251C59fE94fB9147feEe1aAd9Cea5',
additionalAddresses: {
CONFIG_ENGINE: '0xB25a5D144626a0D488e52AE717A051a2E9997076',
POOL_ADDRESSES_PROVIDER_REGISTRY: '0xB4B6939D0804DCE8d0Ac3e59b2eD5C072829d56b',
UI_INCENTIVE_DATA_PROVIDER: '0x3A1Ea5fB3098b9767E0e85D63E28A5c0EAa44099',
UI_POOL_DATA_PROVIDER: '0xf07fFd12b119b921C4a2ce8d4A13C5d1E3000d6e',
WALLET_BALANCE_PROVIDER: '0xB91DA65093d54a1a7cb0fe684860F568A5E57123',
// STATA_FACTORY: '0x33992721c565dA3248bd3af80524e054F5F05b42',
},
};
2 changes: 2 additions & 0 deletions scripts/generateAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {polygonProtoV2, polygonProtoV3} from './configs/pools/polygon';
import {scrollSepoliaProtoV3, scrollProtoV3} from './configs/pools/scroll';
import {zkSyncProtoV3} from './configs/pools/zksync';
import {lineaProtoV3} from './configs/pools/linea';
import {celoProtoV3} from './configs/pools/celo';
import {generateGovernanceLibrary} from './generator/governanceV3Generator';
import {generateProtocolV2Library} from './generator/protocolV2Generator';
import {generateProtocolV3Library} from './generator/protocolV3Generator';
Expand Down Expand Up @@ -143,6 +144,7 @@ async function main() {
lidoEthereumMainnetProtoV3Pool,
etherFiEthereumMainnetProtoV3Pool,
lineaProtoV3,
celoProtoV3,
].map((config) => generateProtocolV3Library(config)),
);
const ghoAddresses = [ghoEthereum, ghoArbitrum, ghoBase].map((config) => generateGho(config));
Expand Down
87 changes: 87 additions & 0 deletions src/AaveV3Celo.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// 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 AaveV3Celo {
// https://celoscan.io/address/0x9F7Cf9417D5251C59fE94fB9147feEe1aAd9Cea5
IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER =
IPoolAddressesProvider(0x9F7Cf9417D5251C59fE94fB9147feEe1aAd9Cea5);

// https://celoscan.io/address/0x3E59A31363E2ad014dcbc521c4a0d5757d9f3402
IPool internal constant POOL = IPool(0x3E59A31363E2ad014dcbc521c4a0d5757d9f3402);

// https://celoscan.io/address/0x7567E3434CC1BEf724AB595e6072367Ef4914691
IPoolConfigurator internal constant POOL_CONFIGURATOR =
IPoolConfigurator(0x7567E3434CC1BEf724AB595e6072367Ef4914691);

// https://celoscan.io/address/0x1e693D088ceFD1E95ba4c4a5F7EeA41a1Ec37e8b
IAaveOracle internal constant ORACLE = IAaveOracle(0x1e693D088ceFD1E95ba4c4a5F7EeA41a1Ec37e8b);

// https://celoscan.io/address/0x1dF462e2712496373A347f8ad10802a5E95f053D
address internal constant ACL_ADMIN = 0x1dF462e2712496373A347f8ad10802a5E95f053D;

// https://celoscan.io/address/0x7a12dCfd73C1B4cddf294da4cFce75FcaBBa314C
IACLManager internal constant ACL_MANAGER =
IACLManager(0x7a12dCfd73C1B4cddf294da4cFce75FcaBBa314C);

// https://celoscan.io/address/0x33b7d355613110b4E842f5f7057Ccd36fb4cee28
IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER =
IPoolDataProvider(0x33b7d355613110b4E842f5f7057Ccd36fb4cee28);

// https://celoscan.io/address/0x44D38b18a99E50E51B99F05C1f418Db26Ded315f
address internal constant POOL_IMPL = 0x44D38b18a99E50E51B99F05C1f418Db26Ded315f;

// https://celoscan.io/address/0x87f6224536d9BD1d4FE6052e06f9647B51843e33
address internal constant POOL_CONFIGURATOR_IMPL = 0x87f6224536d9BD1d4FE6052e06f9647B51843e33;

// https://celoscan.io/address/0x4725A0FdbEB14A77964bC1C221eE3a7982263103
address internal constant DEFAULT_INCENTIVES_CONTROLLER =
0x4725A0FdbEB14A77964bC1C221eE3a7982263103;

// https://celoscan.io/address/0x9e04Cb339163b06068397d9b6af2dA78440954e0
address internal constant EMISSION_MANAGER = 0x9e04Cb339163b06068397d9b6af2dA78440954e0;

// https://celoscan.io/address/0xB25a5D144626a0D488e52AE717A051a2E9997076
address internal constant CONFIG_ENGINE = 0xB25a5D144626a0D488e52AE717A051a2E9997076;

// https://celoscan.io/address/0xB4B6939D0804DCE8d0Ac3e59b2eD5C072829d56b
address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY =
0xB4B6939D0804DCE8d0Ac3e59b2eD5C072829d56b;

// https://celoscan.io/address/0x3A1Ea5fB3098b9767E0e85D63E28A5c0EAa44099
address internal constant UI_INCENTIVE_DATA_PROVIDER = 0x3A1Ea5fB3098b9767E0e85D63E28A5c0EAa44099;

// https://celoscan.io/address/0xf07fFd12b119b921C4a2ce8d4A13C5d1E3000d6e
address internal constant UI_POOL_DATA_PROVIDER = 0xf07fFd12b119b921C4a2ce8d4A13C5d1E3000d6e;

// https://celoscan.io/address/0xB91DA65093d54a1a7cb0fe684860F568A5E57123
address internal constant WALLET_BALANCE_PROVIDER = 0xB91DA65093d54a1a7cb0fe684860F568A5E57123;
}
library AaveV3CeloAssets {}
library AaveV3CeloEModes {
uint8 internal constant NONE = 0;
}
library AaveV3CeloExternalLibraries {
// https://celoscan.io/address/0x0b3486805D3bda7ACb2d5aa7E26f0b68aF647bc5
address internal constant FLASHLOAN_LOGIC = 0x0b3486805D3bda7ACb2d5aa7E26f0b68aF647bc5;

// https://celoscan.io/address/0xAB3218d0900Ba992084a6592b43f66926D4F5757
address internal constant BORROW_LOGIC = 0xAB3218d0900Ba992084a6592b43f66926D4F5757;

// https://celoscan.io/address/0x028a1Bc3769209345C9476aFBa72EE4274Cd2A5A
address internal constant BRIDGE_LOGIC = 0x028a1Bc3769209345C9476aFBa72EE4274Cd2A5A;

// https://celoscan.io/address/0xc463D0Ef209A60318F6aF2e8D29958a665d89B1e
address internal constant E_MODE_LOGIC = 0xc463D0Ef209A60318F6aF2e8D29958a665d89B1e;

// https://celoscan.io/address/0x70Ac8F684eED3769960b2f863e405afc90CabCD4
address internal constant LIQUIDATION_LOGIC = 0x70Ac8F684eED3769960b2f863e405afc90CabCD4;

// https://celoscan.io/address/0x50B8ed003a371cc498c57518e3581a059834c70c
address internal constant POOL_LOGIC = 0x50B8ed003a371cc498c57518e3581a059834c70c;

// https://celoscan.io/address/0x0742d8afd443B9D9B0587536d3750Ef94d69e4b7
address internal constant SUPPLY_LOGIC = 0x0742d8afd443B9D9B0587536d3750Ef94d69e4b7;
}
1 change: 1 addition & 0 deletions src/ts/AaveAddressBook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export * as AaveV3Harmony from './AaveV3Harmony';
export * as AaveV3EthereumLido from './AaveV3EthereumLido';
export * as AaveV3EthereumEtherFi from './AaveV3EthereumEtherFi';
export * as AaveV3Linea from './AaveV3Linea';
export * as AaveV3Celo from './AaveV3Celo';
export * as MiscArbitrum from './MiscArbitrum';
export * as MiscArbitrumSepolia from './MiscArbitrumSepolia';
export * as MiscAvalanche from './MiscAvalanche';
Expand Down
53 changes: 53 additions & 0 deletions src/ts/AaveV3Celo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR
// IPoolAddressesProvider https://celoscan.io/address/0x9F7Cf9417D5251C59fE94fB9147feEe1aAd9Cea5
export const POOL_ADDRESSES_PROVIDER = '0x9F7Cf9417D5251C59fE94fB9147feEe1aAd9Cea5';

// IPool https://celoscan.io/address/0x3E59A31363E2ad014dcbc521c4a0d5757d9f3402
export const POOL = '0x3E59A31363E2ad014dcbc521c4a0d5757d9f3402';

// IPoolConfigurator https://celoscan.io/address/0x7567E3434CC1BEf724AB595e6072367Ef4914691
export const POOL_CONFIGURATOR = '0x7567E3434CC1BEf724AB595e6072367Ef4914691';

// IAaveOracle https://celoscan.io/address/0x1e693D088ceFD1E95ba4c4a5F7EeA41a1Ec37e8b
export const ORACLE = '0x1e693D088ceFD1E95ba4c4a5F7EeA41a1Ec37e8b';

// https://celoscan.io/address/0x1dF462e2712496373A347f8ad10802a5E95f053D
export const ACL_ADMIN = '0x1dF462e2712496373A347f8ad10802a5E95f053D';

// IACLManager https://celoscan.io/address/0x7a12dCfd73C1B4cddf294da4cFce75FcaBBa314C
export const ACL_MANAGER = '0x7a12dCfd73C1B4cddf294da4cFce75FcaBBa314C';

// IPoolDataProvider https://celoscan.io/address/0x33b7d355613110b4E842f5f7057Ccd36fb4cee28
export const AAVE_PROTOCOL_DATA_PROVIDER = '0x33b7d355613110b4E842f5f7057Ccd36fb4cee28';

// https://celoscan.io/address/0x44D38b18a99E50E51B99F05C1f418Db26Ded315f
export const POOL_IMPL = '0x44D38b18a99E50E51B99F05C1f418Db26Ded315f';

// https://celoscan.io/address/0x87f6224536d9BD1d4FE6052e06f9647B51843e33
export const POOL_CONFIGURATOR_IMPL = '0x87f6224536d9BD1d4FE6052e06f9647B51843e33';

// https://celoscan.io/address/0x4725A0FdbEB14A77964bC1C221eE3a7982263103
export const DEFAULT_INCENTIVES_CONTROLLER = '0x4725A0FdbEB14A77964bC1C221eE3a7982263103';

// https://celoscan.io/address/0x9e04Cb339163b06068397d9b6af2dA78440954e0
export const EMISSION_MANAGER = '0x9e04Cb339163b06068397d9b6af2dA78440954e0';

// https://celoscan.io/address/0xB25a5D144626a0D488e52AE717A051a2E9997076
export const CONFIG_ENGINE = '0xB25a5D144626a0D488e52AE717A051a2E9997076';

// https://celoscan.io/address/0xB4B6939D0804DCE8d0Ac3e59b2eD5C072829d56b
export const POOL_ADDRESSES_PROVIDER_REGISTRY = '0xB4B6939D0804DCE8d0Ac3e59b2eD5C072829d56b';

// https://celoscan.io/address/0x3A1Ea5fB3098b9767E0e85D63E28A5c0EAa44099
export const UI_INCENTIVE_DATA_PROVIDER = '0x3A1Ea5fB3098b9767E0e85D63E28A5c0EAa44099';

// https://celoscan.io/address/0xf07fFd12b119b921C4a2ce8d4A13C5d1E3000d6e
export const UI_POOL_DATA_PROVIDER = '0xf07fFd12b119b921C4a2ce8d4A13C5d1E3000d6e';

// https://celoscan.io/address/0xB91DA65093d54a1a7cb0fe684860F568A5E57123
export const WALLET_BALANCE_PROVIDER = '0xB91DA65093d54a1a7cb0fe684860F568A5E57123';

export const CHAIN_ID = 42220;
export const ASSETS = {} as const;
export const E_MODES = {} as const;
export const EXTERNAL_LIBRARIES = {} as const;
38 changes: 25 additions & 13 deletions tests/__snapshots__/verification.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@

exports[`verification > should have all contracts verified except for the known set of errors 1`] = `
[
{
"item": {
"chainId": 8453,
"path": [
"AaveV3Base",
"ASSETS",
"WETH",
"STATA_TOKEN",
],
"value": "0xe298b938631f750DD409fB18227C4a23dCdaab9b",
},
},
{
"item": {
"chainId": 42220,
Expand All @@ -36,7 +24,19 @@ exports[`verification > should have all contracts verified except for the known
},
{
"item": {
"chainId": 1,
"chainId": 8453,
"path": [
"AaveV3Base",
"ASSETS",
"WETH",
"STATA_TOKEN",
],
"value": "0xe298b938631f750DD409fB18227C4a23dCdaab9b",
},
},
{
"item": {
"chainId": 8453,
"path": [
"AaveV3Base",
"ASSETS",
Expand Down Expand Up @@ -118,6 +118,18 @@ exports[`verification > should have all contracts verified except for the known
"value": "0xF8F10f39116716e89498c1c5E94137ADa11b2BC7",
},
},
{
"item": {
"chainId": 8453,
"path": [
"AaveV3Base",
"ASSETS",
"GHO",
"STATA_TOKEN",
],
"value": "0x88b1Cd4b430D95b406E382C3cDBaE54697a0286E",
},
},
{
"item": {
"chainId": 42161,
Expand Down
45 changes: 45 additions & 0 deletions tests/cache/verified.json
Original file line number Diff line number Diff line change
Expand Up @@ -5903,6 +5903,51 @@
},
"0x38BC0ED9d90Bc2309A436f4ED6Ca6Bc4D5C0DFA6": {
"name": "GnosisSafeProxy"
},
"0x9F7Cf9417D5251C59fE94fB9147feEe1aAd9Cea5": {
"name": "PoolAddressesProvider"
},
"0x3E59A31363E2ad014dcbc521c4a0d5757d9f3402": {
"name": "InitializableImmutableAdminUpgradeabilityProxy"
},
"0x7567E3434CC1BEf724AB595e6072367Ef4914691": {
"name": "InitializableImmutableAdminUpgradeabilityProxy"
},
"0x1e693D088ceFD1E95ba4c4a5F7EeA41a1Ec37e8b": {
"name": "AaveOracle"
},
"0x7a12dCfd73C1B4cddf294da4cFce75FcaBBa314C": {
"name": "ACLManager"
},
"0x33b7d355613110b4E842f5f7057Ccd36fb4cee28": {
"name": "AaveProtocolDataProvider"
},
"0x44D38b18a99E50E51B99F05C1f418Db26Ded315f": {
"name": "PoolInstance"
},
"0x87f6224536d9BD1d4FE6052e06f9647B51843e33": {
"name": "PoolConfiguratorInstance"
},
"0x4725A0FdbEB14A77964bC1C221eE3a7982263103": {
"name": "InitializableImmutableAdminUpgradeabilityProxy"
},
"0x9e04Cb339163b06068397d9b6af2dA78440954e0": {
"name": "EmissionManager"
},
"0xB25a5D144626a0D488e52AE717A051a2E9997076": {
"name": "AaveV3ConfigEngine"
},
"0xB4B6939D0804DCE8d0Ac3e59b2eD5C072829d56b": {
"name": "PoolAddressesProviderRegistry"
},
"0x3A1Ea5fB3098b9767E0e85D63E28A5c0EAa44099": {
"name": "UiIncentiveDataProviderV3"
},
"0xf07fFd12b119b921C4a2ce8d4A13C5d1E3000d6e": {
"name": "UiPoolDataProviderV3"
},
"0xB91DA65093d54a1a7cb0fe684860F568A5E57123": {
"name": "WalletBalanceProvider"
}
},
"43113": {
Expand Down

0 comments on commit 1d6fe10

Please sign in to comment.