Skip to content

Commit

Permalink
feat: add arbitrum sepolia (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherlymite authored Mar 8, 2024
1 parent dabd5bf commit d6124b0
Show file tree
Hide file tree
Showing 18 changed files with 349 additions and 69 deletions.
2 changes: 2 additions & 0 deletions scripts/configs/networks/arbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const arbitrumSepoliaAddresses: NetworkAddresses = {
name: 'ArbitrumSepolia',
chainId: ChainId.arbitrum_sepolia,
addresses: {
TRANSPARENT_PROXY_FACTORY: '0x43A8B7eC945a12a3Acb127B77ede19bd73ad76f8',
PROXY_ADMIN: '0xCB5B3ca20603231945dC5731C33E7f7F7679Ea89',
GHO_TOKEN: '0xb13Cfa6f8B2Eed2C37fB00fF0c1A59807C585810',
},
};
9 changes: 9 additions & 0 deletions scripts/configs/networks/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ export const baseAddresses: NetworkAddresses<{
cbETH_ETH_AGGREGATOR: '0x868a501e68F3D1E89CfC0D22F6b22E8dabce5F04',
},
};

export const baseSepoliaAddresses: NetworkAddresses = {
name: 'BaseSepolia',
chainId: ChainId.base_sepolia,
addresses: {
TRANSPARENT_PROXY_FACTORY: '0xd90f09ea5ee893b8c0564719e855f1cf0455d894',
PROXY_ADMIN: '0xF9e48edc704BDF494309cA457BCea4c0696f591d',
},
};
11 changes: 0 additions & 11 deletions scripts/configs/networks/baseSepolia.ts

This file was deleted.

9 changes: 9 additions & 0 deletions scripts/configs/networks/optimism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ export const optimismAddresses: NetworkAddresses<{
rETH_ETH_AGGREGATOR: '0x22F3727be377781d1579B7C9222382b21c9d1a8f',
},
};

export const optimismSepoliaAddresses: NetworkAddresses = {
name: 'OptimismSepolia',
chainId: ChainId.optimism_sepolia,
addresses: {
TRANSPARENT_PROXY_FACTORY: '0xb172a90A7C238969CE9B27cc19D13b60A91e7F00',
PROXY_ADMIN: '0xe892E40C92c2E4D281Be59b2E6300F271d824E75'
},
};
11 changes: 0 additions & 11 deletions scripts/configs/networks/optimismSepolia.ts

This file was deleted.

16 changes: 16 additions & 0 deletions scripts/configs/pools/arbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ export const arbitrumProtoV3: PoolConfig = {
WITHDRAW_SWAP_ADAPTER: '0x5598BbFA2f4fE8151f45bBA0a3edE1b54B51a0a9',
},
};

export const arbitrumSepoliaProtoV3: PoolConfig = {
name: 'ArbitrumSepolia',
chainId: ChainId.arbitrum_sepolia,
POOL_ADDRESSES_PROVIDER: '0xB25a5D144626a0D488e52AE717A051a2E9997076',
additionalAddresses: {
L2_ENCODER: '0x2E45e7dCD1e94d8edf1605FfF4602912FDC662bC',
CONFIG_ENGINE: '0x0a275C06556EeB3c7Ff2b0f0cfD462A7645772EF',
POOL_ADDRESSES_PROVIDER_REGISTRY: '0xbB7492Cce831eE6F349960a6E2da8eadC4b50cA3',
RATES_FACTORY: '0x6376D4df995f32f308f2d5049a7a320943023232',
UI_INCENTIVE_DATA_PROVIDER: '0xB90fa850a4af6D30feA8b41989eaAecDcA8fd414',
UI_POOL_DATA_PROVIDER: '0x97Cf44bF6a9A3D2B4F32b05C480dBEdC018F72A9',
WALLET_BALANCE_PROVIDER: '0x1Be33D186a081eFDf15310e4bdEd81E828C47f9b',
WETH_GATEWAY: '0x20040a64612555042335926d72B4E5F667a67fA1'
},
};
16 changes: 16 additions & 0 deletions scripts/configs/pools/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ export const baseProtoV3: PoolConfig = {
WETH_GATEWAY: '0x8be473dCfA93132658821E67CbEB684ec8Ea2E74',
},
};

export const baseSepoliaProtoV3: PoolConfig = {
name: 'BaseSepolia',
chainId: ChainId.base_sepolia,
POOL_ADDRESSES_PROVIDER: '0xd449FeD49d9C443688d6816fE6872F21402e41de',
additionalAddresses: {
CONFIG_ENGINE: '0xC18ECB3DEf8BAaB2be2714324c5AdA75608e0a48',
RATES_FACTORY: '0x777fBA024bA1228fDa76149A4ff8B23475ed057D',
L2_ENCODER: '0x458d281bFFCE958E34571B33F1F26Bd42Aa27c44',
POOL_ADDRESSES_PROVIDER_REGISTRY: '0x1169e227cD901899A02c8FD242251a311D73b252',
UI_INCENTIVE_DATA_PROVIDER: '0x52Cb5CDf732889be3fd5d5E3A5D589446e060C0D',
UI_POOL_DATA_PROVIDER: '0x884702E4b1d0a2900369E83d5765d537F469cAC9',
WALLET_BALANCE_PROVIDER: '0xdeB02056E277174566A1c425a8e60550142B70A2',
WETH_GATEWAY: '0xF6Dac650dA5616Bc3206e969D7868e7c25805171',
},
};
18 changes: 0 additions & 18 deletions scripts/configs/pools/baseSepolia.ts

This file was deleted.

16 changes: 16 additions & 0 deletions scripts/configs/pools/optimism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ export const optimismProtoV3: PoolConfig = {
WITHDRAW_SWAP_ADAPTER: '0x78F8Bd884C3D738B74B420540659c82f392820e0',
},
};

export const optimismSepoliaProtoV3: PoolConfig = {
name: 'OptimismSepolia',
chainId: ChainId.optimism_sepolia,
POOL_ADDRESSES_PROVIDER: '0x36616cf17557639614c1cdDb356b1B83fc0B2132',
additionalAddresses: {
L2_ENCODER: '0xBeC519531F0E78BcDdB295242fA4EC5251B38574',
CONFIG_ENGINE: '0x1D0f881Ce1a646E2f27Dec3c57Fa056cB838BCC2',
POOL_ADDRESSES_PROVIDER_REGISTRY: '0x1236010CECea55998384e795B59815D871f5f94d',
RATES_FACTORY: '0x83E0E6095a318446b313f7D27e0c33Ed1e9c0213',
UI_INCENTIVE_DATA_PROVIDER: '0xCFDAdA7DCd2e785cF706BaDBC2B8Af5084d595e9',
UI_POOL_DATA_PROVIDER: '0x86E2938daE289763D4e09a7e42c5cCcA62Cf9809',
WALLET_BALANCE_PROVIDER: '0x4172E6aAEC070ACB31aaCE343A58c93E4C70f44D',
WETH_GATEWAY: '0x589750BA8aF186cE5B55391B0b7148cAD43a1619'
},
};
18 changes: 0 additions & 18 deletions scripts/configs/pools/optimismSepolia.ts

This file was deleted.

15 changes: 6 additions & 9 deletions scripts/generateAddresses.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import {appendFileSync, existsSync, mkdirSync, readdirSync, rmSync, writeFileSync} from 'fs';
import {governanceConfigMainnet, governanceConfigGoerli} from './configs/governance/ethereum';
import {arbitrumProtoV3} from './configs/pools/arbitrum';
import {arbitrumProtoV3, arbitrumSepoliaProtoV3} from './configs/pools/arbitrum';
import {
avalancheProtoV2,
avalancheProtoV3,
fujiProtoV2,
fujiProtoV3,
} from './configs/pools/avalanche';
import {baseProtoV3} from './configs/pools/base';
import {baseSepoliaProtoV3} from './configs/pools/baseSepolia';
import {baseProtoV3, baseSepoliaProtoV3} from './configs/pools/base';
import {
mainnetProtoV3Pool,
mainnetAmmV2Pool,
Expand All @@ -24,8 +23,7 @@ import {metisProtoV3} from './configs/pools/metis';
import {gnosisProtoV3} from './configs/pools/gnosis';
import {bnbProtoV3} from './configs/pools/bnb';
import {polygonZkEvmProtoV3} from './configs/pools/polygonZkEvm';
import {optimismProtoV3} from './configs/pools/optimism';
import {optimismSepoliaProtoV3} from './configs/pools/optimismSepolia';
import {optimismProtoV3, optimismSepoliaProtoV3} from './configs/pools/optimism';
import {
mumbaiProtoV2,
mumbaiProtoV3,
Expand All @@ -48,16 +46,14 @@ import {governanceConfigMetis} from './configs/governance/metis';
import {governanceConfigBase} from './configs/governance/base';
import {governanceConfigBNB} from './configs/governance/bnb';
import {governanceConfigGnosis} from './configs/governance/gnosis';
import {baseAddresses} from './configs/networks/base';
import {baseSepoliaAddresses} from './configs/networks/baseSepolia';
import {baseAddresses, baseSepoliaAddresses} from './configs/networks/base';
import {generateNetworkAddresses} from './generator/networkGenerator';
import {arbitrumAddresses, arbitrumSepoliaAddresses} from './configs/networks/arbitrum';
import {avalancheAddresses} from './configs/networks/avalanche';
import {ethereumAddresses, sepoliaAddresses} from './configs/networks/ethereum';
import {mumbaiAddresses, polygonAddresses} from './configs/networks/polygon';
import {fantomAddresses} from './configs/networks/fantom';
import {optimismAddresses} from './configs/networks/optimism';
import {optimismSepoliaAddresses} from './configs/networks/optimismSepolia';
import {optimismAddresses, optimismSepoliaAddresses} from './configs/networks/optimism';
import {metisAddresses} from './configs/networks/metis';
import {gnosisAddresses} from './configs/networks/gnosis';
import {bnbAddresses} from './configs/networks/bnb';
Expand Down Expand Up @@ -126,6 +122,7 @@ async function main() {
polygonZkEvmProtoV3,
bnbProtoV3,
arbitrumProtoV3,
arbitrumSepoliaProtoV3,
optimismProtoV3,
optimismSepoliaProtoV3,
scrollProtoV3,
Expand Down
1 change: 1 addition & 0 deletions src/AaveAddressBook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {AaveV3Gnosis} from './AaveV3Gnosis.sol';
import {AaveV3PolygonZkEvm} from './AaveV3PolygonZkEvm.sol';
import {AaveV3BNB} from './AaveV3BNB.sol';
import {AaveV3Arbitrum} from './AaveV3Arbitrum.sol';
import {AaveV3ArbitrumSepolia} from './AaveV3ArbitrumSepolia.sol';
import {AaveV3Optimism} from './AaveV3Optimism.sol';
import {AaveV3OptimismSepolia} from './AaveV3OptimismSepolia.sol';
import {AaveV3Scroll} from './AaveV3Scroll.sol';
Expand Down
127 changes: 127 additions & 0 deletions src/AaveV3ArbitrumSepolia.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
// 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 AaveV3ArbitrumSepolia {
// https://sepolia.arbiscan.io/address/0xB25a5D144626a0D488e52AE717A051a2E9997076
IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER =
IPoolAddressesProvider(0xB25a5D144626a0D488e52AE717A051a2E9997076);

// https://sepolia.arbiscan.io/address/0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff
IPool internal constant POOL = IPool(0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff);

// https://sepolia.arbiscan.io/address/0x8E4Bb46E6245a507F1a267ef488228B08c0dc664
IPoolConfigurator internal constant POOL_CONFIGURATOR =
IPoolConfigurator(0x8E4Bb46E6245a507F1a267ef488228B08c0dc664);

// https://sepolia.arbiscan.io/address/0xEf95A6B9e88Bd509Fd67BA741cf2b263DaC65c00
IAaveOracle internal constant ORACLE = IAaveOracle(0xEf95A6B9e88Bd509Fd67BA741cf2b263DaC65c00);

// https://sepolia.arbiscan.io/address/0x12373B5085e3b42D42C1D4ABF3B3Cf4Df0E0Fa01
IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER =
IPoolDataProvider(0x12373B5085e3b42D42C1D4ABF3B3Cf4Df0E0Fa01);

// https://sepolia.arbiscan.io/address/0xB66f0fF09f256A73d2E2b5faF596b363A21a7D68
IACLManager internal constant ACL_MANAGER =
IACLManager(0xB66f0fF09f256A73d2E2b5faF596b363A21a7D68);

// https://sepolia.arbiscan.io/address/0xC08C599C22bfD4a729E33e1Ed9b49456Abad0005
address internal constant ACL_ADMIN = 0xC08C599C22bfD4a729E33e1Ed9b49456Abad0005;

// https://sepolia.arbiscan.io/address/0xa0208CE8356ad6C5EC6dFb8996c9A6B828212022
ICollector internal constant COLLECTOR = ICollector(0xa0208CE8356ad6C5EC6dFb8996c9A6B828212022);

// https://sepolia.arbiscan.io/address/0x3A203B14CF8749a1e3b7314c6c49004B77Ee667A
address internal constant DEFAULT_INCENTIVES_CONTROLLER =
0x3A203B14CF8749a1e3b7314c6c49004B77Ee667A;

// https://sepolia.arbiscan.io/address/0xc0Bac16A64FbAa7EE6483bD12a759e28cD13dcBe
address internal constant DEFAULT_A_TOKEN_IMPL_REV_1 = 0xc0Bac16A64FbAa7EE6483bD12a759e28cD13dcBe;

// https://sepolia.arbiscan.io/address/0x486C2D3F59E4d72f3cAa301a7eF19E3db657F5b0
address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_1 =
0x486C2D3F59E4d72f3cAa301a7eF19E3db657F5b0;

// https://sepolia.arbiscan.io/address/0x6259AE15400421d341f114f5c2dF43B351D1320E
address internal constant DEFAULT_STABLE_DEBT_TOKEN_IMPL_REV_1 =
0x6259AE15400421d341f114f5c2dF43B351D1320E;

// https://sepolia.arbiscan.io/address/0x54E3aa872c3d2A89D1A6495F770f2cCa2C4Fc185
address internal constant EMISSION_MANAGER = 0x54E3aa872c3d2A89D1A6495F770f2cCa2C4Fc185;

// https://sepolia.arbiscan.io/address/0x2E45e7dCD1e94d8edf1605FfF4602912FDC662bC
address internal constant L2_ENCODER = 0x2E45e7dCD1e94d8edf1605FfF4602912FDC662bC;

// https://sepolia.arbiscan.io/address/0x0a275C06556EeB3c7Ff2b0f0cfD462A7645772EF
address internal constant CONFIG_ENGINE = 0x0a275C06556EeB3c7Ff2b0f0cfD462A7645772EF;

// https://sepolia.arbiscan.io/address/0xbB7492Cce831eE6F349960a6E2da8eadC4b50cA3
address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY =
0xbB7492Cce831eE6F349960a6E2da8eadC4b50cA3;

// https://sepolia.arbiscan.io/address/0x6376D4df995f32f308f2d5049a7a320943023232
address internal constant RATES_FACTORY = 0x6376D4df995f32f308f2d5049a7a320943023232;

// https://sepolia.arbiscan.io/address/0xB90fa850a4af6D30feA8b41989eaAecDcA8fd414
address internal constant UI_INCENTIVE_DATA_PROVIDER = 0xB90fa850a4af6D30feA8b41989eaAecDcA8fd414;

// https://sepolia.arbiscan.io/address/0x97Cf44bF6a9A3D2B4F32b05C480dBEdC018F72A9
address internal constant UI_POOL_DATA_PROVIDER = 0x97Cf44bF6a9A3D2B4F32b05C480dBEdC018F72A9;

// https://sepolia.arbiscan.io/address/0x1Be33D186a081eFDf15310e4bdEd81E828C47f9b
address internal constant WALLET_BALANCE_PROVIDER = 0x1Be33D186a081eFDf15310e4bdEd81E828C47f9b;

// https://sepolia.arbiscan.io/address/0x20040a64612555042335926d72B4E5F667a67fA1
address internal constant WETH_GATEWAY = 0x20040a64612555042335926d72B4E5F667a67fA1;
}

library AaveV3ArbitrumSepoliaAssets {
// https://sepolia.arbiscan.io/address/0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d
address internal constant USDC_UNDERLYING = 0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d;

uint8 internal constant USDC_DECIMALS = 6;

// https://sepolia.arbiscan.io/address/0x460b97BD498E1157530AEb3086301d5225b91216
address internal constant USDC_A_TOKEN = 0x460b97BD498E1157530AEb3086301d5225b91216;

// https://sepolia.arbiscan.io/address/0x4fBE3A94C60A5085dA6a2D309965DcF34c36711d
address internal constant USDC_V_TOKEN = 0x4fBE3A94C60A5085dA6a2D309965DcF34c36711d;

// https://sepolia.arbiscan.io/address/0x74801168f69fE402da6274F2328fCfA539d3Be1a
address internal constant USDC_S_TOKEN = 0x74801168f69fE402da6274F2328fCfA539d3Be1a;

// https://sepolia.arbiscan.io/address/0x0153002d20B96532C639313c2d54c3dA09109309
address internal constant USDC_ORACLE = 0x0153002d20B96532C639313c2d54c3dA09109309;

// https://sepolia.arbiscan.io/address/0x5C0A210C9C0df2Ab147BDE7D9583c07cEb3131CD
address internal constant USDC_INTEREST_RATE_STRATEGY =
0x5C0A210C9C0df2Ab147BDE7D9583c07cEb3131CD;

// https://sepolia.arbiscan.io/address/0x1dF462e2712496373A347f8ad10802a5E95f053D
address internal constant WETH_UNDERLYING = 0x1dF462e2712496373A347f8ad10802a5E95f053D;

uint8 internal constant WETH_DECIMALS = 18;

// https://sepolia.arbiscan.io/address/0xf5f17EbE81E516Dc7cB38D61908EC252F150CE60
address internal constant WETH_A_TOKEN = 0xf5f17EbE81E516Dc7cB38D61908EC252F150CE60;

// https://sepolia.arbiscan.io/address/0x372eB464296D8D78acaa462b41eaaf2D3663dAD3
address internal constant WETH_V_TOKEN = 0x372eB464296D8D78acaa462b41eaaf2D3663dAD3;

// https://sepolia.arbiscan.io/address/0x4F364534B30Bbcd285EBfee61579115727Cb27c5
address internal constant WETH_S_TOKEN = 0x4F364534B30Bbcd285EBfee61579115727Cb27c5;

// https://sepolia.arbiscan.io/address/0xd30e2101a97dcbAeBCBC04F14C3f624E67A35165
address internal constant WETH_ORACLE = 0xd30e2101a97dcbAeBCBC04F14C3f624E67A35165;

// https://sepolia.arbiscan.io/address/0x46d3a2A27E2c700d74f21AD3290A20cB8437F7b7
address internal constant WETH_INTEREST_RATE_STRATEGY =
0x46d3a2A27E2c700d74f21AD3290A20cB8437F7b7;
}

library AaveV3ArbitrumSepoliaEModes {
uint8 internal constant NONE = 0;
}
6 changes: 6 additions & 0 deletions src/MiscArbitrumSepolia.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
pragma solidity >=0.6.0;

library MiscArbitrumSepolia {
// https://sepolia.arbiscan.io/address/0x43A8B7eC945a12a3Acb127B77ede19bd73ad76f8
address internal constant TRANSPARENT_PROXY_FACTORY = 0x43A8B7eC945a12a3Acb127B77ede19bd73ad76f8;

// https://sepolia.arbiscan.io/address/0xCB5B3ca20603231945dC5731C33E7f7F7679Ea89
address internal constant PROXY_ADMIN = 0xCB5B3ca20603231945dC5731C33E7f7F7679Ea89;

// https://sepolia.arbiscan.io/address/0xb13Cfa6f8B2Eed2C37fB00fF0c1A59807C585810
address internal constant GHO_TOKEN = 0xb13Cfa6f8B2Eed2C37fB00fF0c1A59807C585810;
}
1 change: 1 addition & 0 deletions src/ts/AaveAddressBook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export * as AaveV3Gnosis from './AaveV3Gnosis';
export * as AaveV3PolygonZkEvm from './AaveV3PolygonZkEvm';
export * as AaveV3BNB from './AaveV3BNB';
export * as AaveV3Arbitrum from './AaveV3Arbitrum';
export * as AaveV3ArbitrumSepolia from './AaveV3ArbitrumSepolia';
export * as AaveV3Optimism from './AaveV3Optimism';
export * as AaveV3OptimismSepolia from './AaveV3OptimismSepolia';
export * as AaveV3Scroll from './AaveV3Scroll';
Expand Down
Loading

0 comments on commit d6124b0

Please sign in to comment.