From 54374cda0df337cac277b93e12c1d509901216c6 Mon Sep 17 00:00:00 2001 From: Mark Grothe Date: Fri, 15 Nov 2024 15:20:33 -0600 Subject: [PATCH] feat: gnosis paraswap adapters --- safe.csv | 4 ++++ scripts/configs/pools/gnosis.ts | 4 ++++ src/AaveV3Gnosis.sol | 13 +++++++++++++ src/ts/AaveV3Gnosis.ts | 12 ++++++++++++ 4 files changed, 33 insertions(+) diff --git a/safe.csv b/safe.csv index 803f382c..423e2efa 100644 --- a/safe.csv +++ b/safe.csv @@ -1046,6 +1046,7 @@ address,name,chainId 0x33AE1f41546a2e05368Bf789b3d868813c0Ae658,AaveV3Gnosis CAPS_PLUS_RISK_STEWARD,100 0x3e652E97ff339B73421f824F5b03d75b62F1Fb51,AaveV3Gnosis COLLECTOR,100 0x97CB9e81d480A2AB03299760654C1DDC0C16bE07,AaveV3Gnosis CONFIG_ENGINE,100 +0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034,AaveV3Gnosis DEBT_SWAP_ADAPTER,100 0x589750BA8aF186cE5B55391B0b7148cAD43a1619,AaveV3Gnosis DEFAULT_A_TOKEN_IMPL_REV_1,100 0xaD4F91D26254B6B0C6346b390dDA2991FDE2F20d,AaveV3Gnosis DEFAULT_INCENTIVES_CONTROLLER,100 0xBeC519531F0E78BcDdB295242fA4EC5251B38574,AaveV3Gnosis DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_1,100 @@ -1058,12 +1059,15 @@ address,name,chainId 0x7304979ec9E4EaA0273b6A037a31c4e9e5A75D16,AaveV3Gnosis POOL_CONFIGURATOR,100 0x4816b2C2895f97fB918f1aE7Da403750a0eE372e,AaveV3Gnosis POOL_CONFIGURATOR_IMPL,100 0xF2C312BfAF4CF0429DB4DA15a0cf5F770Ea3E770,AaveV3Gnosis POOL_IMPL,100 +0x86b0521f92a554057e54B93098BA2A6Aaa2F4ACB,AaveV3Gnosis REPAY_WITH_COLLATERAL_ADAPTER,100 0x677c9f358dA5DC83aF6760a839E4448D72840d04,AaveV3Gnosis RISK_STEWARD,100 0x02e9b27599C4Bf8f789d34b6E65C51092c3d9FA6,AaveV3Gnosis STATIC_A_TOKEN_FACTORY,100 +0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4,AaveV3Gnosis SWAP_COLLATERAL_ADAPTER,100 0x5d4D4007A4c6336550DdAa2a7c0d5e7972eebd16,AaveV3Gnosis UI_INCENTIVE_DATA_PROVIDER,100 0x5598BbFA2f4fE8151f45bBA0a3edE1b54B51a0a9,AaveV3Gnosis UI_POOL_DATA_PROVIDER,100 0x4172E6aAEC070ACB31aaCE343A58c93E4C70f44D,AaveV3Gnosis WALLET_BALANCE_PROVIDER,100 0x7B9c12915c594a68dE96201Cbdc79147F09da278,AaveV3Gnosis WETH_GATEWAY,100 +0xc0179321f0825c3e0F59Fe7Ca4E40557b97797a3,AaveV3Gnosis WITHDRAW_SWAP_ADAPTER,100 0xF937ffAeA1363e4Fa260760bDFA2aA8Fc911F84D,GovernanceV3Gnosis CL_EMERGENCY_ORACLE,100 0x8Dc5310fc9D3D7D1Bb3D1F686899c8F082316c9F,GovernanceV3Gnosis CROSS_CHAIN_CONTROLLER,100 0x1dF462e2712496373A347f8ad10802a5E95f053D,GovernanceV3Gnosis EXECUTOR_LVL_1,100 diff --git a/scripts/configs/pools/gnosis.ts b/scripts/configs/pools/gnosis.ts index e0df84c0..8157b4b1 100644 --- a/scripts/configs/pools/gnosis.ts +++ b/scripts/configs/pools/gnosis.ts @@ -16,5 +16,9 @@ export const gnosisProtoV3: PoolConfig = { RISK_STEWARD: '0x677c9f358dA5DC83aF6760a839E4448D72840d04', FREEZING_STEWARD: '0x3Ceaf9b6CAb92dFe6302D0CC3F1BA880C28d35e5', STATIC_A_TOKEN_FACTORY: '0x02e9b27599C4Bf8f789d34b6E65C51092c3d9FA6', + REPAY_WITH_COLLATERAL_ADAPTER: '0x86b0521f92a554057e54B93098BA2A6Aaa2F4ACB', + SWAP_COLLATERAL_ADAPTER: '0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4', + DEBT_SWAP_ADAPTER: '0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034', + WITHDRAW_SWAP_ADAPTER: '0xc0179321f0825c3e0F59Fe7Ca4E40557b97797a3', }, }; diff --git a/src/AaveV3Gnosis.sol b/src/AaveV3Gnosis.sol index 3a665caf..5e136bbb 100644 --- a/src/AaveV3Gnosis.sol +++ b/src/AaveV3Gnosis.sol @@ -83,6 +83,19 @@ library AaveV3Gnosis { // https://gnosisscan.io/address/0x02e9b27599C4Bf8f789d34b6E65C51092c3d9FA6 address internal constant STATIC_A_TOKEN_FACTORY = 0x02e9b27599C4Bf8f789d34b6E65C51092c3d9FA6; + + // https://gnosisscan.io/address/0x86b0521f92a554057e54B93098BA2A6Aaa2F4ACB + address internal constant REPAY_WITH_COLLATERAL_ADAPTER = + 0x86b0521f92a554057e54B93098BA2A6Aaa2F4ACB; + + // https://gnosisscan.io/address/0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4 + address internal constant SWAP_COLLATERAL_ADAPTER = 0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4; + + // https://gnosisscan.io/address/0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034 + address internal constant DEBT_SWAP_ADAPTER = 0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034; + + // https://gnosisscan.io/address/0xc0179321f0825c3e0F59Fe7Ca4E40557b97797a3 + address internal constant WITHDRAW_SWAP_ADAPTER = 0xc0179321f0825c3e0F59Fe7Ca4E40557b97797a3; } library AaveV3GnosisAssets { // https://gnosisscan.io/address/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1 diff --git a/src/ts/AaveV3Gnosis.ts b/src/ts/AaveV3Gnosis.ts index 946ce5d3..0d580ed6 100644 --- a/src/ts/AaveV3Gnosis.ts +++ b/src/ts/AaveV3Gnosis.ts @@ -71,6 +71,18 @@ export const FREEZING_STEWARD = '0x3Ceaf9b6CAb92dFe6302D0CC3F1BA880C28d35e5'; // https://gnosisscan.io/address/0x02e9b27599C4Bf8f789d34b6E65C51092c3d9FA6 export const STATIC_A_TOKEN_FACTORY = '0x02e9b27599C4Bf8f789d34b6E65C51092c3d9FA6'; +// https://gnosisscan.io/address/0x86b0521f92a554057e54B93098BA2A6Aaa2F4ACB +export const REPAY_WITH_COLLATERAL_ADAPTER = '0x86b0521f92a554057e54B93098BA2A6Aaa2F4ACB'; + +// https://gnosisscan.io/address/0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4 +export const SWAP_COLLATERAL_ADAPTER = '0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4'; + +// https://gnosisscan.io/address/0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034 +export const DEBT_SWAP_ADAPTER = '0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034'; + +// https://gnosisscan.io/address/0xc0179321f0825c3e0F59Fe7Ca4E40557b97797a3 +export const WITHDRAW_SWAP_ADAPTER = '0xc0179321f0825c3e0F59Fe7Ca4E40557b97797a3'; + export const CHAIN_ID = 100; export const ASSETS = { WETH: {