From 1301c5ee9068f9015345923ff96b0ddd540c5a8a Mon Sep 17 00:00:00 2001 From: sendra Date: Mon, 18 Mar 2024 11:34:09 +0100 Subject: [PATCH] fix: updated base contract to add receivers only if receiving chains exist. Added discussion links --- ...itrum_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- ...anche_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- ...V3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- ...BNB_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol | 2 +- ...3Base_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- ...ereum_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- ...nosis_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- ...sis_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol | 2 +- ...Metis_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- ...imism_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- ...lygon_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- ...croll_UpdateADIImplementationAndCCIPAdapters_20240313.sol | 3 +-- .../BaseAdaptersUpdatePayload.sol | 5 ++++- .../UpdateADIImplementationAndCCIPAdapters.md | 5 ++--- 14 files changed, 18 insertions(+), 26 deletions(-) diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313.sol index d39fb2b29..a3030e5bd 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -8,8 +8,7 @@ import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdateP /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseCCCImplementationUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313.sol index f4f13a117..21c4d67a2 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -9,8 +9,7 @@ import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol'; /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseAdaptersUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.sol index 54221d243..267c5cda3 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -9,8 +9,7 @@ import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol'; /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseAdaptersUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol index 446319b85..90491cacc 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol @@ -20,7 +20,7 @@ contract AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313_Test is BaseT MiscBNB.PROXY_ADMIN, type(AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313).creationCode, 'bnb', - 36903911 + 37073128 ) {} } diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313.sol index 5e52a2b7e..d6ed97266 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -8,8 +8,7 @@ import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdateP /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseCCCImplementationUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313.sol index 5f1fc2927..72b2128e5 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -9,8 +9,7 @@ import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol'; /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseAdaptersUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.sol index b0aa6dd94..bc9fa4b51 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -8,8 +8,7 @@ import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdateP /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseCCCImplementationUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol index 30d3b0c5e..71b99ecf0 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol @@ -16,7 +16,7 @@ contract AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313_Test is MiscGnosis.PROXY_ADMIN, type(AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313).creationCode, 'gnosis', - 32897310 + 32990165 ) { diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Metis_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Metis_UpdateADIImplementationAndCCIPAdapters_20240313.sol index 0bf40587d..6913b3d4b 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Metis_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Metis_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -8,8 +8,7 @@ import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdateP /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3Metis_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseCCCImplementationUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Optimism_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Optimism_UpdateADIImplementationAndCCIPAdapters_20240313.sol index 3dcb0490f..f1288e44b 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Optimism_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Optimism_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -8,8 +8,7 @@ import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdateP /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3Optimism_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseCCCImplementationUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313.sol index acbe0ba6f..c04e92853 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -9,8 +9,7 @@ import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol'; /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseAdaptersUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Scroll_UpdateADIImplementationAndCCIPAdapters_20240313.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Scroll_UpdateADIImplementationAndCCIPAdapters_20240313.sol index 183df358f..c48042a90 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Scroll_UpdateADIImplementationAndCCIPAdapters_20240313.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Scroll_UpdateADIImplementationAndCCIPAdapters_20240313.sol @@ -8,8 +8,7 @@ import {BaseCCCImplementationUpdatePayload} from './BaseCCCImplementationUpdateP /** * @title aDI and bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21 */ contract AaveV3Scroll_UpdateADIImplementationAndCCIPAdapters_20240313 is BaseCCCImplementationUpdatePayload( diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/BaseAdaptersUpdatePayload.sol b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/BaseAdaptersUpdatePayload.sol index e23f11ccc..c70ea812e 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/BaseAdaptersUpdatePayload.sol +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/BaseAdaptersUpdatePayload.sol @@ -53,13 +53,16 @@ abstract contract BaseAdaptersUpdatePayload is BaseCCCImplementationUpdatePayloa ); uint256[] memory chainsToSend = getChainsToSend(); + uint256[] memory chainsToReceive = getChainsToReceive(); - if (chainsToSend.length != 0) { + if (chainsToReceive.length != 0) { // add receiver adapters ICrossChainReceiver(CROSS_CHAIN_CONTROLLER).allowReceiverBridgeAdapters( getReceiverBridgeAdaptersToAllow() ); + } + if (chainsToSend.length != 0) { // add forwarding adapters ICrossChainForwarder(CROSS_CHAIN_CONTROLLER).enableBridgeAdapters( getForwarderBridgeAdaptersToEnable() diff --git a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/UpdateADIImplementationAndCCIPAdapters.md b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/UpdateADIImplementationAndCCIPAdapters.md index 79d2ed6c5..be2080ef5 100644 --- a/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/UpdateADIImplementationAndCCIPAdapters.md +++ b/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/UpdateADIImplementationAndCCIPAdapters.md @@ -1,7 +1,7 @@ --- title: "Update a.DI implementation and CCIP adapters" author: "BGD Labs @bgdlabs" -discussions: "" +discussions: "https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21" --- ## Simple Summary @@ -51,8 +51,7 @@ Updates the bridge adapters used to connect between networks - Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313.sol), [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Optimism_UpdateADIImplementationAndCCIPAdapters_20240313.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Metis_UpdateADIImplementationAndCCIPAdapters_20240313.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Scroll_UpdateADIImplementationAndCCIPAdapters_20240313.sol), [AaveV3BNB](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.sol) - Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Ethereum_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Polygon_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol), [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Avalanche_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Optimism_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Arbitrum_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Metis_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Base_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Gnosis_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3Scroll_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol), [AaveV3BNB](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/AaveV3BNB_UpdateADIImplementationAndCCIPAdapters_20240313.t.sol) - -- [Snapshot](TODO) -- [Discussion](TODO) +- [Discussion](https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/21) ## Copyright