From 2e2a69463e6c0fb9cb878afe5fb239186169f0ec Mon Sep 17 00:00:00 2001 From: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:06:01 +0100 Subject: [PATCH] feat: Add GHO token address to Aave V3 Sepolia Pool and Arbitrum Sepolia (#326) * feat: add SavingsDaiTokenWrapper address on Ethereum (#6) * feat: add SavingsDaiTokenWrapper address on Ethereum * fix: indent issue * fix: Replace address of SDAI token wrapper (#7) * add gho addresses for sepolia * feat: sepolia v3 gho (#8) * feat: add GHO config for primary Sepolia V3 test market * Feat: add latest addresses --------- Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com> * fix: add address for gho-sepolia canonical deployment * add Gho token * add Gho token for arbitrum sepolia * fix: contract name * fix: remove change in ts files * undo removal of asset and remove AaveV3ArbitrumSepoliaAssets lib * create MiscArbitrumSepolia * fix: Move GHO addresses to misc --------- Co-authored-by: Parth Patel Co-authored-by: defispartan --- scripts/configs/networks/arbitrum.ts | 9 +++++++++ scripts/configs/networks/ethereum.ts | 4 ++++ scripts/configs/pools/ethereum.ts | 2 +- scripts/configs/types.ts | 3 ++- scripts/generateAddresses.ts | 3 ++- src/AaveAddressBook.sol | 1 + src/AaveV3Ethereum.sol | 3 --- src/AaveV3Sepolia.sol | 3 +++ src/MiscArbitrumSepolia.sol | 8 ++++++++ src/MiscEthereum.sol | 7 +++++++ src/MiscSepolia.sol | 7 +++++++ src/ts/AaveAddressBook.ts | 1 + src/ts/AaveV3Ethereum.ts | 3 --- src/ts/AaveV3Sepolia.ts | 3 +++ src/ts/MiscArbitrumSepolia.ts | 5 +++++ src/ts/MiscEthereum.ts | 6 ++++++ src/ts/MiscSepolia.ts | 6 ++++++ 17 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 src/MiscArbitrumSepolia.sol create mode 100644 src/ts/MiscArbitrumSepolia.ts diff --git a/scripts/configs/networks/arbitrum.ts b/scripts/configs/networks/arbitrum.ts index c4d987bc..a6958976 100644 --- a/scripts/configs/networks/arbitrum.ts +++ b/scripts/configs/networks/arbitrum.ts @@ -12,3 +12,12 @@ export const arbitrumAddresses: NetworkAddresses = { PROTOCOL_GUARDIAN: '0xbbd9f90699c1fa0d7a65870d241dd1f1217c96eb', }, }; + + +export const arbitrumSepoliaAddresses: NetworkAddresses = { + name: 'ArbitrumSepolia', + chainId: ChainId.arbitrum_sepolia, + addresses: { + GHO_TOKEN: '0xb13Cfa6f8B2Eed2C37fB00fF0c1A59807C585810', + }, +}; diff --git a/scripts/configs/networks/ethereum.ts b/scripts/configs/networks/ethereum.ts index 1e67be72..1b8cfaf5 100644 --- a/scripts/configs/networks/ethereum.ts +++ b/scripts/configs/networks/ethereum.ts @@ -26,6 +26,8 @@ export const ethereumAddresses: NetworkAddresses<{ CREATE_3_FACTORY: '0xcc3C54B95f3f1867A43009B80ed4DD930E3cE2F7', PROTOCOL_GUARDIAN: '0xCA76Ebd8617a03126B6FB84F9b1c1A0fB71C2633', AAVE_MERKLE_DISTRIBUTOR: '0xa88c6D90eAe942291325f9ae3c66f3563B93FE10', + GHO_TOKEN: '0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f', + GHO_FLASHMINTER_FACILITATOR: '0xb639D208Bcf0589D54FaC24E655C79EC529762B8', }, }; @@ -35,5 +37,7 @@ export const sepoliaAddresses: NetworkAddresses = { addresses: { TRANSPARENT_PROXY_FACTORY: '0x3Bad08c7b17D77cE12A2e1438Db2353b58F7c4a2', PROXY_ADMIN: '0x8dDa7a1E3e96EB13BE50bB59e80485227E3DE2e7', + GHO_TOKEN: '0xc4bF5CbDaBE595361438F8c6a187bDc330539c60', + GHO_FLASHMINTER_FACILITATOR: '0xB5d0ef1548D9C70d3E7a96cA67A2d7EbC5b1173E', }, }; diff --git a/scripts/configs/pools/ethereum.ts b/scripts/configs/pools/ethereum.ts index b6a279f5..6bc1856c 100644 --- a/scripts/configs/pools/ethereum.ts +++ b/scripts/configs/pools/ethereum.ts @@ -39,6 +39,7 @@ export const sepoliaProtoV3: PoolConfig = { WALLET_BALANCE_PROVIDER: '0xCD4e0d6D2b1252E2A709B8aE97DBA31164C5a709', WETH_GATEWAY: '0x387d311e47e80b498169e6fb51d3193167d89F7D', STATIC_A_TOKEN_FACTORY: '0xd210dFB43B694430B8d31762B5199e30c31266C8', + UI_GHO_DATA_PROVIDER: '0x69B9843A16a6E9933125EBD97659BA3CCbE2Ef8A', }, }; @@ -95,7 +96,6 @@ export const mainnetProtoV3Pool: PoolConfig = { FREEZING_STEWARD: '0x2eE68ACb6A1319de1b49DC139894644E424fefD6', DEBT_SWAP_ADAPTER: '0x8761e0370f94f68Db8EaA731f4fC581f6AD0Bd68', DELEGATION_AWARE_A_TOKEN_IMPL_REV_1: '0x21714092D90c7265F52fdfDae068EC11a23C6248', - GHO_TOKEN: '0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f', CONFIG_ENGINE: '0xA3e44d830440dF5098520F62Ebec285B1198c51E', POOL_ADDRESSES_PROVIDER_REGISTRY: '0xbaA999AC55EAce41CcAE355c77809e68Bb345170', RATES_FACTORY: '0xcC47c4Fe1F7f29ff31A8b62197023aC8553C7896', diff --git a/scripts/configs/types.ts b/scripts/configs/types.ts index d3a23548..d12a27b8 100644 --- a/scripts/configs/types.ts +++ b/scripts/configs/types.ts @@ -59,7 +59,6 @@ export interface PoolConfig { STATIC_A_TOKEN_FACTORY?: Hex; CAPS_PLUS_RISK_STEWARD?: Hex; FREEZING_STEWARD?: Hex; - GHO_TOKEN?: Hex; UI_GHO_DATA_PROVIDER?: Hex; RATES_FACTORY?: Hex; PERMISSION_MANAGER?: Hex; @@ -100,5 +99,7 @@ export interface NetworkAddresses = {}> { CREATE_3_FACTORY?: Hex; PROTOCOL_GUARDIAN?: Hex; AAVE_MERKLE_DISTRIBUTOR?: Hex; + GHO_TOKEN?: Hex; + GHO_FLASHMINTER_FACILITATOR?: Hex; } & T; } diff --git a/scripts/generateAddresses.ts b/scripts/generateAddresses.ts index da10d1e6..a62f078d 100644 --- a/scripts/generateAddresses.ts +++ b/scripts/generateAddresses.ts @@ -48,7 +48,7 @@ import {governanceConfigBNB} from './configs/governance/bnb'; import {governanceConfigGnosis} from './configs/governance/gnosis'; import {baseAddresses} from './configs/networks/base'; import {generateNetworkAddresses} from './generator/networkGenerator'; -import {arbitrumAddresses} from './configs/networks/arbitrum'; +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'; @@ -132,6 +132,7 @@ async function main() { const networkAddresses = [ arbitrumAddresses, + arbitrumSepoliaAddresses, avalancheAddresses, baseAddresses, ethereumAddresses, diff --git a/src/AaveAddressBook.sol b/src/AaveAddressBook.sol index 49208bd8..742889fa 100644 --- a/src/AaveAddressBook.sol +++ b/src/AaveAddressBook.sol @@ -45,6 +45,7 @@ import {AaveV3ScrollSepolia} from './AaveV3ScrollSepolia.sol'; import {AaveV3FantomTestnet} from './AaveV3FantomTestnet.sol'; import {AaveV3Fantom} from './AaveV3Fantom.sol'; import {MiscArbitrum} from './MiscArbitrum.sol'; +import {MiscArbitrumSepolia} from './MiscArbitrumSepolia.sol'; import {MiscAvalanche} from './MiscAvalanche.sol'; import {MiscBase} from './MiscBase.sol'; import {MiscEthereum} from './MiscEthereum.sol'; diff --git a/src/AaveV3Ethereum.sol b/src/AaveV3Ethereum.sol index 5ebd220b..4add2daf 100644 --- a/src/AaveV3Ethereum.sol +++ b/src/AaveV3Ethereum.sol @@ -68,9 +68,6 @@ library AaveV3Ethereum { address internal constant DELEGATION_AWARE_A_TOKEN_IMPL_REV_1 = 0x21714092D90c7265F52fdfDae068EC11a23C6248; - // https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f - address internal constant GHO_TOKEN = 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f; - // https://etherscan.io/address/0xA3e44d830440dF5098520F62Ebec285B1198c51E address internal constant CONFIG_ENGINE = 0xA3e44d830440dF5098520F62Ebec285B1198c51E; diff --git a/src/AaveV3Sepolia.sol b/src/AaveV3Sepolia.sol index cd5ba525..a9070d7a 100644 --- a/src/AaveV3Sepolia.sol +++ b/src/AaveV3Sepolia.sol @@ -72,6 +72,9 @@ library AaveV3Sepolia { // https://sepolia.etherscan.io/address/0xd210dFB43B694430B8d31762B5199e30c31266C8 address internal constant STATIC_A_TOKEN_FACTORY = 0xd210dFB43B694430B8d31762B5199e30c31266C8; + + // https://sepolia.etherscan.io/address/0x69B9843A16a6E9933125EBD97659BA3CCbE2Ef8A + address internal constant UI_GHO_DATA_PROVIDER = 0x69B9843A16a6E9933125EBD97659BA3CCbE2Ef8A; } library AaveV3SepoliaAssets { diff --git a/src/MiscArbitrumSepolia.sol b/src/MiscArbitrumSepolia.sol new file mode 100644 index 00000000..3fb1d9a6 --- /dev/null +++ b/src/MiscArbitrumSepolia.sol @@ -0,0 +1,8 @@ +// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +library MiscArbitrumSepolia { + // https://sepolia.arbiscan.io/address/0xb13Cfa6f8B2Eed2C37fB00fF0c1A59807C585810 + address internal constant GHO_TOKEN = 0xb13Cfa6f8B2Eed2C37fB00fF0c1A59807C585810; +} diff --git a/src/MiscEthereum.sol b/src/MiscEthereum.sol index fd8e7eb9..8748d3e6 100644 --- a/src/MiscEthereum.sol +++ b/src/MiscEthereum.sol @@ -39,4 +39,11 @@ library MiscEthereum { // https://etherscan.io/address/0xa88c6D90eAe942291325f9ae3c66f3563B93FE10 address internal constant AAVE_MERKLE_DISTRIBUTOR = 0xa88c6D90eAe942291325f9ae3c66f3563B93FE10; + + // https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f + address internal constant GHO_TOKEN = 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f; + + // https://etherscan.io/address/0xb639D208Bcf0589D54FaC24E655C79EC529762B8 + address internal constant GHO_FLASHMINTER_FACILITATOR = + 0xb639D208Bcf0589D54FaC24E655C79EC529762B8; } diff --git a/src/MiscSepolia.sol b/src/MiscSepolia.sol index 77b0bac8..0ab49517 100644 --- a/src/MiscSepolia.sol +++ b/src/MiscSepolia.sol @@ -8,4 +8,11 @@ library MiscSepolia { // https://sepolia.etherscan.io/address/0x8dDa7a1E3e96EB13BE50bB59e80485227E3DE2e7 address internal constant PROXY_ADMIN = 0x8dDa7a1E3e96EB13BE50bB59e80485227E3DE2e7; + + // https://sepolia.etherscan.io/address/0xc4bF5CbDaBE595361438F8c6a187bDc330539c60 + address internal constant GHO_TOKEN = 0xc4bF5CbDaBE595361438F8c6a187bDc330539c60; + + // https://sepolia.etherscan.io/address/0xB5d0ef1548D9C70d3E7a96cA67A2d7EbC5b1173E + address internal constant GHO_FLASHMINTER_FACILITATOR = + 0xB5d0ef1548D9C70d3E7a96cA67A2d7EbC5b1173E; } diff --git a/src/ts/AaveAddressBook.ts b/src/ts/AaveAddressBook.ts index 9d1662ba..9929e169 100644 --- a/src/ts/AaveAddressBook.ts +++ b/src/ts/AaveAddressBook.ts @@ -42,6 +42,7 @@ export * as AaveV3ScrollSepolia from './AaveV3ScrollSepolia'; export * as AaveV3FantomTestnet from './AaveV3FantomTestnet'; export * as AaveV3Fantom from './AaveV3Fantom'; export * as MiscArbitrum from './MiscArbitrum'; +export * as MiscArbitrumSepolia from './MiscArbitrumSepolia'; export * as MiscAvalanche from './MiscAvalanche'; export * as MiscBase from './MiscBase'; export * as MiscEthereum from './MiscEthereum'; diff --git a/src/ts/AaveV3Ethereum.ts b/src/ts/AaveV3Ethereum.ts index a573ffc7..b683e537 100644 --- a/src/ts/AaveV3Ethereum.ts +++ b/src/ts/AaveV3Ethereum.ts @@ -53,9 +53,6 @@ export const DEBT_SWAP_ADAPTER = '0x8761e0370f94f68Db8EaA731f4fC581f6AD0Bd68'; // https://etherscan.io/address/0x21714092D90c7265F52fdfDae068EC11a23C6248 export const DELEGATION_AWARE_A_TOKEN_IMPL_REV_1 = '0x21714092D90c7265F52fdfDae068EC11a23C6248'; -// https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f -export const GHO_TOKEN = '0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f'; - // https://etherscan.io/address/0xA3e44d830440dF5098520F62Ebec285B1198c51E export const CONFIG_ENGINE = '0xA3e44d830440dF5098520F62Ebec285B1198c51E'; diff --git a/src/ts/AaveV3Sepolia.ts b/src/ts/AaveV3Sepolia.ts index 8c63ff42..53cefa79 100644 --- a/src/ts/AaveV3Sepolia.ts +++ b/src/ts/AaveV3Sepolia.ts @@ -59,6 +59,9 @@ export const WETH_GATEWAY = '0x387d311e47e80b498169e6fb51d3193167d89F7D'; // https://sepolia.etherscan.io/address/0xd210dFB43B694430B8d31762B5199e30c31266C8 export const STATIC_A_TOKEN_FACTORY = '0xd210dFB43B694430B8d31762B5199e30c31266C8'; +// https://sepolia.etherscan.io/address/0x69B9843A16a6E9933125EBD97659BA3CCbE2Ef8A +export const UI_GHO_DATA_PROVIDER = '0x69B9843A16a6E9933125EBD97659BA3CCbE2Ef8A'; + export const CHAIN_ID = 11155111; export const ASSETS = { DAI: { diff --git a/src/ts/MiscArbitrumSepolia.ts b/src/ts/MiscArbitrumSepolia.ts new file mode 100644 index 00000000..fb6b5c0d --- /dev/null +++ b/src/ts/MiscArbitrumSepolia.ts @@ -0,0 +1,5 @@ +// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR +// https://sepolia.arbiscan.io/address/0xb13Cfa6f8B2Eed2C37fB00fF0c1A59807C585810 +export const GHO_TOKEN = '0xb13Cfa6f8B2Eed2C37fB00fF0c1A59807C585810'; + +export const CHAIN_ID = 421614; diff --git a/src/ts/MiscEthereum.ts b/src/ts/MiscEthereum.ts index a6c5fd41..1b331e45 100644 --- a/src/ts/MiscEthereum.ts +++ b/src/ts/MiscEthereum.ts @@ -32,4 +32,10 @@ export const PROTOCOL_GUARDIAN = '0xCA76Ebd8617a03126B6FB84F9b1c1A0fB71C2633'; // https://etherscan.io/address/0xa88c6D90eAe942291325f9ae3c66f3563B93FE10 export const AAVE_MERKLE_DISTRIBUTOR = '0xa88c6D90eAe942291325f9ae3c66f3563B93FE10'; +// https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f +export const GHO_TOKEN = '0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f'; + +// https://etherscan.io/address/0xb639D208Bcf0589D54FaC24E655C79EC529762B8 +export const GHO_FLASHMINTER_FACILITATOR = '0xb639D208Bcf0589D54FaC24E655C79EC529762B8'; + export const CHAIN_ID = 1; diff --git a/src/ts/MiscSepolia.ts b/src/ts/MiscSepolia.ts index f6d9f027..b330c85c 100644 --- a/src/ts/MiscSepolia.ts +++ b/src/ts/MiscSepolia.ts @@ -5,4 +5,10 @@ export const TRANSPARENT_PROXY_FACTORY = '0x3Bad08c7b17D77cE12A2e1438Db2353b58F7 // https://sepolia.etherscan.io/address/0x8dDa7a1E3e96EB13BE50bB59e80485227E3DE2e7 export const PROXY_ADMIN = '0x8dDa7a1E3e96EB13BE50bB59e80485227E3DE2e7'; +// https://sepolia.etherscan.io/address/0xc4bF5CbDaBE595361438F8c6a187bDc330539c60 +export const GHO_TOKEN = '0xc4bF5CbDaBE595361438F8c6a187bDc330539c60'; + +// https://sepolia.etherscan.io/address/0xB5d0ef1548D9C70d3E7a96cA67A2d7EbC5b1173E +export const GHO_FLASHMINTER_FACILITATOR = '0xB5d0ef1548D9C70d3E7a96cA67A2d7EbC5b1173E'; + export const CHAIN_ID = 11155111;