From 8156fd6157f132a8bbb74225c8e2be71126418ac Mon Sep 17 00:00:00 2001 From: sendra Date: Mon, 25 Mar 2024 15:04:44 +0100 Subject: [PATCH 1/9] feat: add payloads to update native aDI bridge adapters --- ...um_NativeBridgeAdaptersUpdate_20240322.sol | 48 +++ ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 22 + ...se_NativeBridgeAdaptersUpdate_20240322.sol | 47 +++ ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 22 + ...um_NativeBridgeAdaptersUpdate_20240322.sol | 170 ++++++++ ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 22 + ...is_NativeBridgeAdaptersUpdate_20240322.sol | 36 ++ ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 22 + ...is_NativeBridgeAdaptersUpdate_20240322.sol | 48 +++ ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 22 + ...sm_NativeBridgeAdaptersUpdate_20240322.sol | 48 +++ ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 22 + ...on_NativeBridgeAdaptersUpdate_20240322.sol | 48 +++ ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 22 + ...ll_NativeBridgeAdaptersUpdate_20240322.sol | 48 +++ ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 22 + .../BaseAdaptersUpdatePayload.sol | 159 +++++++ .../BaseTest.sol | 396 ++++++++++++++++++ .../NativeBridgeAdaptersUpdate.md | 22 + .../NativeBridgeAdaptersUpdate_20240322.s.sol | 268 ++++++++++++ .../config.ts | 31 ++ 21 files changed, 1545 insertions(+) create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.t.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.t.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.t.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.t.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.t.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.t.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseAdaptersUpdatePayload.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseTest.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol create mode 100644 src/20240322_Multi_NativeBridgeAdaptersUpdate/config.ts diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol new file mode 100644 index 000000000..a35424a54 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {BaseAdaptersUpdatePayload, ICrossChainReceiver, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol'; +import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Native bridge adapters update + * @author BGD Labs @bgdlabs + * - Snapshot: TODO + * - Discussion: TODO + */ +contract AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322 is + BaseAdaptersUpdatePayload( + BaseAdaptersUpdatePayload.ConstructorInput({ + ccc: GovernanceV3Arbitrum.CROSS_CHAIN_CONTROLLER, + newAdapter: 0xc8a2ADC4261c6b669CdFf69E717E77C9cFeB420d, + adapterToRemove: 0x3829943c53F2d00e20B58475aF19716724bF90Ba // not removing + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } + + function getForwarderBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory) + { + return new ICrossChainForwarder.BridgeAdapterToDisable[](0); + } + + // @dev in this AIP we are not removing old adapter, in case connection gets broken. This way, we would just need to + // re enable old adapter on origin, and we would have reestablished the connection + function getReceiverBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory) + { + return new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](0); + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.t.sol new file mode 100644 index 000000000..aeec4b349 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import './BaseTest.sol'; +import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol'; +import {AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol'; + +/** + * @dev Test for AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322 + * command: make test-contract filter=AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322 + */ +contract AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { + constructor() + BaseTest( + GovernanceV3Arbitrum.CROSS_CHAIN_CONTROLLER, + type(AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322).creationCode, + 'arbitrum', + 193049277, + 'Arbitrum native adapter' + ) + {} +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol new file mode 100644 index 000000000..7691d46bf --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {BaseAdaptersUpdatePayload, ICrossChainReceiver, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol'; +import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; +/** + * @title Native bridge adapters update + * @author BGD Labs @bgdlabs + * - Snapshot: TODO + * - Discussion: TODO + */ +contract AaveV3Base_NativeBridgeAdaptersUpdate_20240322 is + BaseAdaptersUpdatePayload( + BaseAdaptersUpdatePayload.ConstructorInput({ + ccc: GovernanceV3Base.CROSS_CHAIN_CONTROLLER, + newAdapter: 0x7120b1f8e5b73c0C0DC99C6e52Fe4937E7EA11e0, + adapterToRemove: 0x7b62461a3570c6AC8a9f8330421576e417B71EE7 // not removing + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } + + function getForwarderBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory) + { + return new ICrossChainForwarder.BridgeAdapterToDisable[](0); + } + + // @dev in this AIP we are not removing old adapter, in case connection gets broken. This way, we would just need to + // re enable old adapter on origin, and we would have reestablished the connection + function getReceiverBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory) + { + return new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](0); + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol new file mode 100644 index 000000000..9bde7dcb8 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import './BaseTest.sol'; +import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol'; +import {AaveV3Base_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol'; + +/** + * @dev Test for AaveV3Base_NativeBridgeAdaptersUpdate_20240322 + * command: make test-contract filter=AaveV3Base_NativeBridgeAdaptersUpdate_20240322 + */ +contract AaveV3Base_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { + constructor() + BaseTest( + GovernanceV3Base.CROSS_CHAIN_CONTROLLER, + type(AaveV3Base_NativeBridgeAdaptersUpdate_20240322).creationCode, + 'base', + 12163947, + 'Arbitrum native adapter' + ) + {} +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol new file mode 100644 index 000000000..0fe07a54e --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {BaseAdaptersUpdatePayload, ICrossChainReceiver, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol'; +import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Native bridge adapters update + * @author BGD Labs @bgdlabs + * - Snapshot: TODO + * - Discussion: TODO + */ +contract AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322 is + BaseAdaptersUpdatePayload( + BaseAdaptersUpdatePayload.ConstructorInput({ + ccc: GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER, + newAdapter: address(0), + adapterToRemove: address(0) + }) + ) +{ + // Enable the polygon native bridge to receive from polygon network + function getReceiverBridgeAdaptersToAllow() + public + pure + override + returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory) + { + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory bridgeAdapterConfig = new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](1); + + bridgeAdapterConfig[0] = ICrossChainReceiver.ReceiverBridgeAdapterConfigInput({ + bridgeAdapter: 0x1562F1b2487F892BBA8Ef325aF054Fd157510a71, + chainIds: new uint256[](1) + }); + bridgeAdapterConfig[0].chainIds[0] = ChainIds.POLYGON; + + return bridgeAdapterConfig; + } + + function getForwarderBridgeAdaptersToEnable() + public + pure + override + returns (ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] memory) + { + ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] + memory bridgeAdaptersToEnable = new ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[]( + 8 + ); + + bridgeAdaptersToEnable[0] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: 0x88d6D01e08d3e64513b15fD46528dBbA7d755883, + destinationBridgeAdapter: 0xc8a2ADC4261c6b669CdFf69E717E77C9cFeB420d, + destinationChainId: ChainIds.ARBITRUM + }); + bridgeAdaptersToEnable[1] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: 0x1562F1b2487F892BBA8Ef325aF054Fd157510a71, + destinationBridgeAdapter: 0x853649f897383f89d8441346Cf26a9ed02720B02, + destinationChainId: ChainIds.POLYGON + }); + bridgeAdaptersToEnable[2] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: 0x0e24524778fdc67f53eEf144b8cbf50261E930B3, + destinationBridgeAdapter: 0xAE93BEa44dcbE52B625169588574d31e36fb3A67, + destinationChainId: ChainIds.OPTIMISM + }); + bridgeAdaptersToEnable[3] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: 0x7238d75fD75bb936E83b75854c653F104Ce9c9d8, + destinationBridgeAdapter: 0x3C06dce358add17aAf230f2234bCCC4afd50d090, + destinationChainId: ChainIds.GNOSIS + }); + bridgeAdaptersToEnable[4] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: 0xA4dC3F123e1c601A19B3DC8382BB9311F678cafA, + destinationBridgeAdapter: 0x3C06dce358add17aAf230f2234bCCC4afd50d090, + destinationChainId: ChainIds.SCROLL + }); + bridgeAdaptersToEnable[5] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: 0xa5948b0ac79f72966dFFC5C13E44f6dfDD3D58A0, + destinationBridgeAdapter: 0x7120b1f8e5b73c0C0DC99C6e52Fe4937E7EA11e0, + destinationChainId: ChainIds.BASE + }); + bridgeAdaptersToEnable[6] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: 0x6B3Dc800E7c813Db3fe8D0F30fDCaE636935dC14, + destinationBridgeAdapter: 0xf41193E25408F652AF878c47E4401A01B5E4B682, + destinationChainId: ChainIds.METIS + }); + bridgeAdaptersToEnable[7] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: 0x6cfbd2aA4691fc18B9C209bDd43DC3943C228FCf, + destinationBridgeAdapter: 0x6cfbd2aA4691fc18B9C209bDd43DC3943C228FCf, + destinationChainId: ChainIds.MAINNET + }); + + return bridgeAdaptersToEnable; + } + + function getForwarderBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory) + { + ICrossChainForwarder.BridgeAdapterToDisable[] + memory forwarderAdaptersToRemove = new ICrossChainForwarder.BridgeAdapterToDisable[](8); + + forwarderAdaptersToRemove[0] = ICrossChainForwarder.BridgeAdapterToDisable({ + bridgeAdapter: 0xE2a33403eaD139873820da597531f07f65ED0E3c, + chainIds: new uint256[](1) + }); + forwarderAdaptersToRemove[0].chainIds[0] = ChainIds.ARBITRUM; + + forwarderAdaptersToRemove[1] = ICrossChainForwarder.BridgeAdapterToDisable({ + bridgeAdapter: 0xb13712De579E1f9943502FFCf72eab6ec348cF79, + chainIds: new uint256[](1) + }); + forwarderAdaptersToRemove[1].chainIds[0] = ChainIds.POLYGON; + + forwarderAdaptersToRemove[2] = ICrossChainForwarder.BridgeAdapterToDisable({ + bridgeAdapter: 0x2ecC4F6CDbe6ea77107dd131Af81ec82Db330d6b, + chainIds: new uint256[](1) + }); + forwarderAdaptersToRemove[2].chainIds[0] = ChainIds.OPTIMISM; + + forwarderAdaptersToRemove[3] = ICrossChainForwarder.BridgeAdapterToDisable({ + bridgeAdapter: 0xe95B40b2CF5fA2F56AAEf9E52f5Bd1e70C059858, + chainIds: new uint256[](1) + }); + forwarderAdaptersToRemove[3].chainIds[0] = ChainIds.GNOSIS; + + forwarderAdaptersToRemove[4] = ICrossChainForwarder.BridgeAdapterToDisable({ + bridgeAdapter: 0xb29F03cbCc646201eC83E9F2C164747beA84b162, + chainIds: new uint256[](1) + }); + forwarderAdaptersToRemove[4].chainIds[0] = ChainIds.SCROLL; + + forwarderAdaptersToRemove[5] = ICrossChainForwarder.BridgeAdapterToDisable({ + bridgeAdapter: 0xEB442296880a3FC7C00FFe695c40B09d970fb936, + chainIds: new uint256[](1) + }); + forwarderAdaptersToRemove[5].chainIds[0] = ChainIds.BASE; + + forwarderAdaptersToRemove[6] = ICrossChainForwarder.BridgeAdapterToDisable({ + bridgeAdapter: 0x619643b346E3389062527cdb60C8720415B39860, + chainIds: new uint256[](1) + }); + forwarderAdaptersToRemove[6].chainIds[0] = ChainIds.METIS; + + forwarderAdaptersToRemove[7] = ICrossChainForwarder.BridgeAdapterToDisable({ + bridgeAdapter: 0x118DFD5418890c0332042ab05173Db4A2C1d283c, + chainIds: new uint256[](1) + }); + forwarderAdaptersToRemove[7].chainIds[0] = ChainIds.MAINNET; + + return forwarderAdaptersToRemove; + } + + function getChainsToSend() public pure override returns (uint256[] memory) { + uint256[] memory chainsToSend = new uint256[](8); + chainsToSend[0] = ChainIds.ARBITRUM; + chainsToSend[1] = ChainIds.POLYGON; + chainsToSend[2] = ChainIds.OPTIMISM; + chainsToSend[3] = ChainIds.GNOSIS; + chainsToSend[4] = ChainIds.SCROLL; + chainsToSend[5] = ChainIds.BASE; + chainsToSend[6] = ChainIds.METIS; + chainsToSend[7] = ChainIds.MAINNET; + + return chainsToSend; + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.t.sol new file mode 100644 index 000000000..f52c5d08a --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import './BaseTest.sol'; +import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; +import {AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol'; + +/** + * @dev Test for AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322 + * command: make test-contract filter=AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322 + */ +contract AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { + constructor() + BaseTest( + GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER, + type(AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322).creationCode, + 'mainnet', + 19490720, + 'Polygon native adapter' + ) + {} +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol new file mode 100644 index 000000000..e147f03e1 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {BaseAdaptersUpdatePayload, ICrossChainReceiver, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol'; +import {GovernanceV3Gnosis} from 'aave-address-book/GovernanceV3Gnosis.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; +/** + * @title Native bridge adapters update + * @author BGD Labs @bgdlabs + * - Snapshot: TODO + * - Discussion: TODO + */ +contract AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322 is + BaseAdaptersUpdatePayload( + BaseAdaptersUpdatePayload.ConstructorInput({ + ccc: GovernanceV3Gnosis.CROSS_CHAIN_CONTROLLER, + newAdapter: 0x3C06dce358add17aAf230f2234bCCC4afd50d090, + adapterToRemove: 0x889c0cc3283DB588A34E89Ad1E8F25B0fc827b4b // we can remove native adapter because we can reach confirmations with other 2 bridges + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } + + function getForwarderBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory) + { + return new ICrossChainForwarder.BridgeAdapterToDisable[](0); + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol new file mode 100644 index 000000000..12dc0a6d7 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import './BaseTest.sol'; +import {GovernanceV3Gnosis} from 'aave-address-book/GovernanceV3Gnosis.sol'; +import {AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol'; + +/** + * @dev Test for AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322 + * command: make test-contract filter=AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322 + */ +contract AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { + constructor() + BaseTest( + GovernanceV3Gnosis.CROSS_CHAIN_CONTROLLER, + type(AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322).creationCode, + 'gnosis', + 33059583, + 'Gnosis native adapter' + ) + {} +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol new file mode 100644 index 000000000..6a7637750 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {BaseAdaptersUpdatePayload, ICrossChainReceiver, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol'; +import {GovernanceV3Metis} from 'aave-address-book/GovernanceV3Metis.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Native bridge adapters update + * @author BGD Labs @bgdlabs + * - Snapshot: TODO + * - Discussion: TODO + */ +contract AaveV3Metis_NativeBridgeAdaptersUpdate_20240322 is + BaseAdaptersUpdatePayload( + BaseAdaptersUpdatePayload.ConstructorInput({ + ccc: GovernanceV3Metis.CROSS_CHAIN_CONTROLLER, + newAdapter: 0xf41193E25408F652AF878c47E4401A01B5E4B682, + adapterToRemove: 0x746c675dAB49Bcd5BB9Dc85161f2d7Eb435009bf // not removing + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } + + function getForwarderBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory) + { + return new ICrossChainForwarder.BridgeAdapterToDisable[](0); + } + + // @dev in this AIP we are not removing old adapter, in case connection gets broken. This way, we would just need to + // re enable old adapter on origin, and we would have reestablished the connection + function getReceiverBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory) + { + return new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](0); + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.t.sol new file mode 100644 index 000000000..3cda3e731 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import './BaseTest.sol'; +import {GovernanceV3Metis} from 'aave-address-book/GovernanceV3Metis.sol'; +import {AaveV3Metis_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol'; + +/** + * @dev Test for AaveV3Metis_NativeBridgeAdaptersUpdate_20240322 + * command: make test-contract filter=AaveV3Metis_NativeBridgeAdaptersUpdate_20240322 + */ +contract AaveV3Metis_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { + constructor() + BaseTest( + GovernanceV3Metis.CROSS_CHAIN_CONTROLLER, + type(AaveV3Metis_NativeBridgeAdaptersUpdate_20240322).creationCode, + 'metis', + 15632608, + 'Metis native adapter' + ) + {} +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol new file mode 100644 index 000000000..c84e9cb54 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {BaseAdaptersUpdatePayload, ICrossChainReceiver, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol'; +import {GovernanceV3Optimism} from 'aave-address-book/GovernanceV3Optimism.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Native bridge adapters update + * @author BGD Labs @bgdlabs + * - Snapshot: TODO + * - Discussion: TODO + */ +contract AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322 is + BaseAdaptersUpdatePayload( + BaseAdaptersUpdatePayload.ConstructorInput({ + ccc: GovernanceV3Optimism.CROSS_CHAIN_CONTROLLER, + newAdapter: 0xAE93BEa44dcbE52B625169588574d31e36fb3A67, + adapterToRemove: 0x81d32B36380e6266e1BDd490eAC56cdB300afBe0 // not removing + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } + + function getForwarderBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory) + { + return new ICrossChainForwarder.BridgeAdapterToDisable[](0); + } + + // @dev in this AIP we are not removing old adapter, in case connection gets broken. This way, we would just need to + // re enable old adapter on origin, and we would have reestablished the connection + function getReceiverBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory) + { + return new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](0); + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.t.sol new file mode 100644 index 000000000..7170262b8 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import './BaseTest.sol'; +import {GovernanceV3Optimism} from 'aave-address-book/GovernanceV3Optimism.sol'; +import {AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol'; + +/** + * @dev Test for AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322 + * command: make test-contract filter=AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322 + */ +contract AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { + constructor() + BaseTest( + GovernanceV3Optimism.CROSS_CHAIN_CONTROLLER, + type(AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322).creationCode, + 'optimism', + 117759224, + 'Optimism native adapter' + ) + {} +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol new file mode 100644 index 000000000..223bd6bf4 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {BaseAdaptersUpdatePayload, ICrossChainReceiver, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol'; +import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Native bridge adapters update + * @author BGD Labs @bgdlabs + * - Snapshot: TODO + * - Discussion: TODO + */ +contract AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322 is + BaseAdaptersUpdatePayload( + BaseAdaptersUpdatePayload.ConstructorInput({ + ccc: GovernanceV3Polygon.CROSS_CHAIN_CONTROLLER, + newAdapter: 0x853649f897383f89d8441346Cf26a9ed02720B02, + adapterToRemove: 0xb13712De579E1f9943502FFCf72eab6ec348cF79 // not removing + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } + + function getForwarderBridgeAdaptersToEnable() + public + view + override + returns (ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] memory) + { + ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] + memory bridgeAdaptersToEnable = new ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[]( + 8 + ); + + bridgeAdaptersToEnable[0] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: NEW_ADAPTER, + destinationBridgeAdapter: 0x1562F1b2487F892BBA8Ef325aF054Fd157510a71, + destinationChainId: ChainIds.MAINNET + }); + + return bridgeAdaptersToEnable; + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.t.sol new file mode 100644 index 000000000..e46c4e4f0 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import './BaseTest.sol'; +import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol'; +import {AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol'; + +/** + * @dev Test for AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322 + * command: make test-contract filter=AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322 + */ +contract AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { + constructor() + BaseTest( + GovernanceV3Polygon.CROSS_CHAIN_CONTROLLER, + type(AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322).creationCode, + 'polygon', + 54954005, + 'Polygon native adapter' + ) + {} +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol new file mode 100644 index 000000000..8af1d03e6 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {BaseAdaptersUpdatePayload, ICrossChainReceiver, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol'; +import {GovernanceV3Scroll} from 'aave-address-book/GovernanceV3Scroll.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Native bridge adapters update + * @author BGD Labs @bgdlabs + * - Snapshot: TODO + * - Discussion: TODO + */ +contract AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322 is + BaseAdaptersUpdatePayload( + BaseAdaptersUpdatePayload.ConstructorInput({ + ccc: GovernanceV3Scroll.CROSS_CHAIN_CONTROLLER, + newAdapter: 0x3C06dce358add17aAf230f2234bCCC4afd50d090, + adapterToRemove: 0x118DFD5418890c0332042ab05173Db4A2C1d283c // not removing + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } + + function getForwarderBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory) + { + return new ICrossChainForwarder.BridgeAdapterToDisable[](0); + } + + // @dev in this AIP we are not removing old adapter, in case connection gets broken. This way, we would just need to + // re enable old adapter on origin, and we would have reestablished the connection + function getReceiverBridgeAdaptersToRemove() + public + pure + override + returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory) + { + return new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](0); + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.t.sol new file mode 100644 index 000000000..8225662b1 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import './BaseTest.sol'; +import {GovernanceV3Scroll} from 'aave-address-book/GovernanceV3Scroll.sol'; +import {AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol'; + +/** + * @dev Test for AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322 + * command: make test-contract filter=AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322 + */ +contract AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { + constructor() + BaseTest( + GovernanceV3Scroll.CROSS_CHAIN_CONTROLLER, + type(AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322).creationCode, + 'scroll', + 4339218, + 'Scroll native adapter' + ) + {} +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseAdaptersUpdatePayload.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseAdaptersUpdatePayload.sol new file mode 100644 index 000000000..fafac8fc6 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseAdaptersUpdatePayload.sol @@ -0,0 +1,159 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {ICrossChainReceiver, ICrossChainForwarder} from 'aave-address-book/common/ICrossChainController.sol'; +import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; + +/** + * @title Base payload aDI and bridge adapters update + * @author BGD Labs @bgdlabs + */ +abstract contract BaseAdaptersUpdatePayload is IProposalGenericExecutor { + struct ConstructorInput { + address ccc; + address adapterToRemove; + address newAdapter; + } + struct DestinationAdaptersInput { + address adapter; + uint256 chainId; + } + + address public immutable CROSS_CHAIN_CONTROLLER; + address public immutable ADAPTER_TO_REMOVE; + address public immutable NEW_ADAPTER; + + constructor(ConstructorInput memory constructorInput) { + CROSS_CHAIN_CONTROLLER = constructorInput.ccc; + ADAPTER_TO_REMOVE = constructorInput.adapterToRemove; + NEW_ADAPTER = constructorInput.newAdapter; + } + + function execute() public override { + // remove old Receiver bridge adapter + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory receiversToRemove = getReceiverBridgeAdaptersToRemove(); + if (receiversToRemove.length != 0) { + ICrossChainReceiver(CROSS_CHAIN_CONTROLLER).disallowReceiverBridgeAdapters(receiversToRemove); + } + + // remove forwarding adapters + ICrossChainForwarder.BridgeAdapterToDisable[] + memory forwardersToRemove = getForwarderBridgeAdaptersToRemove(); + if (forwardersToRemove.length != 0) { + ICrossChainForwarder(CROSS_CHAIN_CONTROLLER).disableBridgeAdapters(forwardersToRemove); + } + + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory receiversToAllow = getReceiverBridgeAdaptersToAllow(); + if (receiversToAllow.length != 0) { + // add receiver adapters + ICrossChainReceiver(CROSS_CHAIN_CONTROLLER).allowReceiverBridgeAdapters(receiversToAllow); + } + ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] + memory forwardersToEnable = getForwarderBridgeAdaptersToEnable(); + if (forwardersToEnable.length != 0) { + // add forwarding adapters + ICrossChainForwarder(CROSS_CHAIN_CONTROLLER).enableBridgeAdapters(forwardersToEnable); + } + } + + function getDestinationAdapters() + public + pure + virtual + returns (DestinationAdaptersInput[] memory) + { + DestinationAdaptersInput[] memory destinationAdapters; + return destinationAdapters; + } + + function getChainsToReceive() public pure virtual returns (uint256[] memory) { + return new uint256[](0); + } + + function getChainsToSend() public pure virtual returns (uint256[] memory) { + DestinationAdaptersInput[] memory destinationAdapters = getDestinationAdapters(); + uint256[] memory chainsToSend = new uint256[](destinationAdapters.length); + for (uint256 i = 0; i < destinationAdapters.length; i++) { + chainsToSend[i] = destinationAdapters[i].chainId; + } + return chainsToSend; + } + + function getReceiverBridgeAdaptersToRemove() + public + view + virtual + returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory) + { + // remove old Receiver bridge adapter + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory bridgeAdaptersToRemove = new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](1); + + bridgeAdaptersToRemove[0] = ICrossChainReceiver.ReceiverBridgeAdapterConfigInput({ + bridgeAdapter: ADAPTER_TO_REMOVE, + chainIds: getChainsToReceive() + }); + + return bridgeAdaptersToRemove; + } + + function getForwarderBridgeAdaptersToRemove() + public + view + virtual + returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory) + { + ICrossChainForwarder.BridgeAdapterToDisable[] + memory forwarderAdaptersToRemove = new ICrossChainForwarder.BridgeAdapterToDisable[](1); + + forwarderAdaptersToRemove[0] = ICrossChainForwarder.BridgeAdapterToDisable({ + bridgeAdapter: ADAPTER_TO_REMOVE, + chainIds: getChainsToSend() + }); + + return forwarderAdaptersToRemove; + } + + function getReceiverBridgeAdaptersToAllow() + public + view + virtual + returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory) + { + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory bridgeAdapterConfig = new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](1); + + bridgeAdapterConfig[0] = ICrossChainReceiver.ReceiverBridgeAdapterConfigInput({ + bridgeAdapter: NEW_ADAPTER, + chainIds: getChainsToReceive() + }); + + return bridgeAdapterConfig; + } + + function getForwarderBridgeAdaptersToEnable() + public + view + virtual + returns (ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] memory) + { + DestinationAdaptersInput[] memory destinationAdapters = getDestinationAdapters(); + + ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] + memory bridgeAdaptersToEnable = new ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[]( + destinationAdapters.length + ); + + for (uint256 i = 0; i < destinationAdapters.length; i++) { + bridgeAdaptersToEnable[i] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ + currentChainBridgeAdapter: NEW_ADAPTER, + destinationBridgeAdapter: destinationAdapters[i].adapter, + destinationChainId: destinationAdapters[i].chainId + }); + } + + return bridgeAdaptersToEnable; + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseTest.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseTest.sol new file mode 100644 index 000000000..5528383ed --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseTest.sol @@ -0,0 +1,396 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'forge-std/console.sol'; +import 'aave-helpers/ProtocolV3TestBase.sol'; + +import {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol'; +import {ProtocolV3TestBase} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {ICrossChainReceiver, ICrossChainForwarder} from 'aave-address-book/common/ICrossChainController.sol'; +import {TransparentUpgradeableProxy} from 'solidity-utils/contracts/transparent-proxy/TransparentUpgradeableProxy.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; +import {ProxyAdmin} from 'solidity-utils/contracts/transparent-proxy/ProxyAdmin.sol'; +import {IBaseAdapter} from 'aave-address-book/common/IBaseAdapter.sol'; + +import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; +import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol'; +import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol'; + +import {AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol'; +import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol'; +import {AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Base_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Metis_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol'; + +struct AdapterName { + address adapter; + string name; +} + +struct TrustedRemote { + address adapter; + address expectedRemote; + uint256 remoteChainId; +} + +struct AdapterAllowed { + address adapter; + uint256 chainId; + bool allowed; +} + +struct AdaptersByChain { + address[] adapters; + uint256 chainId; +} + +struct ForwarderAdapters { + ICrossChainForwarder.ChainIdBridgeConfig[] adapters; + uint256 chainId; +} + +interface Payload { + function CROSS_CHAIN_CONTROLLER_IMPLEMENTATION() external returns (address); +} + +abstract contract BaseTest is ProtocolV3TestBase { + address public immutable CROSS_CHAIN_CONTROLLER; + + bytes public payloadCode; + address public payloadAddress; + string public network; + uint256 public blockNumber; + string public adapterName; + + BaseAdaptersUpdatePayload internal ethereumPayload; + BaseAdaptersUpdatePayload internal polygonPayload; + BaseAdaptersUpdatePayload internal arbitrumPayload; + BaseAdaptersUpdatePayload internal basePayload; + BaseAdaptersUpdatePayload internal gnosisPayload; + BaseAdaptersUpdatePayload internal metisPayload; + BaseAdaptersUpdatePayload internal scrollPayload; + BaseAdaptersUpdatePayload internal optimismPayload; + + constructor( + address ccc, + bytes memory _payloadCode, + string memory _network, + uint256 _blockNumber, + string memory _adapterName + ) { + CROSS_CHAIN_CONTROLLER = ccc; + network = _network; + blockNumber = _blockNumber; + payloadCode = _payloadCode; + adapterName = _adapterName; + } + + function setUp() public { + vm.createSelectFork(vm.rpcUrl(network), blockNumber); + payloadAddress = GovV3Helpers.deployDeterministic(payloadCode); + + ethereumPayload = new AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322(); + polygonPayload = new AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322(); + arbitrumPayload = new AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322(); + basePayload = new AaveV3Base_NativeBridgeAdaptersUpdate_20240322(); + gnosisPayload = new AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322(); + metisPayload = new AaveV3Metis_NativeBridgeAdaptersUpdate_20240322(); + optimismPayload = new AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322(); + scrollPayload = new AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322(); + } + + function getPayloadByChainId(uint256 chainId) public view returns (BaseAdaptersUpdatePayload) { + if (chainId == ChainIds.MAINNET) { + return ethereumPayload; + } else if (chainId == ChainIds.POLYGON) { + return polygonPayload; + } else if (chainId == ChainIds.GNOSIS) { + return gnosisPayload; + } else if (chainId == ChainIds.ARBITRUM) { + return arbitrumPayload; + } else if (chainId == ChainIds.OPTIMISM) { + return optimismPayload; + } else if (chainId == ChainIds.METIS) { + return metisPayload; + } else if (chainId == ChainIds.BASE) { + return basePayload; + } else if (chainId == ChainIds.SCROLL) { + return scrollPayload; + } + revert(); + } + + function getTrustedRemoteByChainId(uint256 chainId) public pure returns (address) { + if (chainId == ChainIds.MAINNET) { + return GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER; + } else if (chainId == ChainIds.POLYGON) { + return GovernanceV3Polygon.CROSS_CHAIN_CONTROLLER; + } else if (chainId == ChainIds.AVALANCHE) { + return GovernanceV3Avalanche.CROSS_CHAIN_CONTROLLER; + } + revert(); + } + + function test_trustedRemotes() public { + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory receivers = BaseAdaptersUpdatePayload(payloadAddress) + .getReceiverBridgeAdaptersToAllow(); + + for (uint256 i = 0; i < receivers.length; i++) { + for (uint256 j = 0; j < receivers[i].chainIds.length; j++) { + assertEq( + getTrustedRemoteByChainId(receivers[i].chainIds[j]), + IBaseAdapter(receivers[i].bridgeAdapter).getTrustedRemoteByChainId( + receivers[i].chainIds[j] + ) + ); + } + } + } + + function test_correctPathConfiguration() public { + ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] + memory destinationConfigs = BaseAdaptersUpdatePayload(payloadAddress) + .getForwarderBridgeAdaptersToEnable(); + + for (uint256 i = 0; i < destinationConfigs.length; i++) { + assertEq( + getPayloadByChainId(destinationConfigs[i].destinationChainId).NEW_ADAPTER(), + destinationConfigs[i].destinationBridgeAdapter + ); + } + } + + function test_correctAdapterNames() public { + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory receivers = BaseAdaptersUpdatePayload(payloadAddress) + .getReceiverBridgeAdaptersToAllow(); + + for (uint256 i = 0; i < receivers.length; i++) { + string memory contractAdapterName = IBaseAdapter(receivers[i].bridgeAdapter).adapterName(); + assertEq(keccak256(abi.encode(contractAdapterName)), keccak256(abi.encode(adapterName))); + } + } + + function test_receiversAreCorrectlySetAfterExecution() public { + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory beforeReceivers = BaseAdaptersUpdatePayload(payloadAddress) + .getReceiverBridgeAdaptersToAllow(); + + for (uint256 i = 0; i < beforeReceivers.length; i++) { + for (uint256 j = 0; j < beforeReceivers[i].chainIds.length; j++) { + assertEq( + ICrossChainReceiver(CROSS_CHAIN_CONTROLLER).isReceiverBridgeAdapterAllowed( + beforeReceivers[i].bridgeAdapter, + beforeReceivers[i].chainIds[j] + ), + false + ); + } + } + + executePayload(vm, payloadAddress); + + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory receivers = BaseAdaptersUpdatePayload(payloadAddress) + .getReceiverBridgeAdaptersToAllow(); + + for (uint256 i = 0; i < receivers.length; i++) { + for (uint256 j = 0; j < receivers[i].chainIds.length; j++) { + assertEq( + ICrossChainReceiver(CROSS_CHAIN_CONTROLLER).isReceiverBridgeAdapterAllowed( + receivers[i].bridgeAdapter, + receivers[i].chainIds[j] + ), + true + ); + } + } + } + + function test_onlyUpdatedNeededAdapter() public { + uint256[] memory supportedChainsBefore = ICrossChainReceiver(CROSS_CHAIN_CONTROLLER) + .getSupportedChains(); + AdaptersByChain[] memory adaptersBefore = _getCurrentReceiverAdaptersByChain(); + + executePayload(vm, payloadAddress); + + uint256[] memory supportedChainsAfter = ICrossChainReceiver(CROSS_CHAIN_CONTROLLER) + .getSupportedChains(); + + assertEq(supportedChainsBefore, supportedChainsAfter); + for (uint256 i = 0; i < supportedChainsBefore.length; i++) { + assertEq(supportedChainsAfter[i], supportedChainsBefore[i]); + } + + ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] + memory adaptersToRemove = BaseAdaptersUpdatePayload(payloadAddress) + .getReceiverBridgeAdaptersToRemove(); + + for (uint256 i = 0; i < adaptersBefore.length; i++) { + for (uint256 j = 0; j < adaptersToRemove.length; j++) { + for (uint256 x = 0; x < adaptersToRemove[j].chainIds.length; x++) { + if (adaptersToRemove[j].chainIds[x] == adaptersBefore[i].chainId) { + for (uint256 k = 0; k < adaptersBefore[i].adapters.length; k++) { + if (adaptersBefore[i].adapters[k] == adaptersToRemove[j].bridgeAdapter) { + assertEq( + ICrossChainReceiver(CROSS_CHAIN_CONTROLLER).isReceiverBridgeAdapterAllowed( + adaptersToRemove[j].bridgeAdapter, + adaptersBefore[i].chainId + ), + false + ); + } else { + assertEq( + ICrossChainReceiver(CROSS_CHAIN_CONTROLLER).isReceiverBridgeAdapterAllowed( + adaptersBefore[i].adapters[k], + adaptersBefore[i].chainId + ), + true + ); + } + } + } + } + } + } + } + + function test_forwarderAdaptersAreSet() public { + executePayload(vm, payloadAddress); + + ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] + memory forwarders = BaseAdaptersUpdatePayload(payloadAddress) + .getForwarderBridgeAdaptersToEnable(); + + for (uint256 i = 0; i < forwarders.length; i++) { + ICrossChainForwarder.ChainIdBridgeConfig[] + memory forwardersBridgeAdaptersByChain = ICrossChainForwarder(CROSS_CHAIN_CONTROLLER) + .getForwarderBridgeAdaptersByChain(forwarders[i].destinationChainId); + bool newAdapterFound; + for (uint256 j = 0; j < forwardersBridgeAdaptersByChain.length; j++) { + if ( + forwardersBridgeAdaptersByChain[j].destinationBridgeAdapter == + forwarders[i].destinationBridgeAdapter && + forwardersBridgeAdaptersByChain[j].currentChainBridgeAdapter == + forwarders[i].currentChainBridgeAdapter + ) { + newAdapterFound = true; + } + } + assertEq(newAdapterFound, true); + } + } + + function test_onlyChangedNeededForwarders() public { + ForwarderAdapters[] + memory forwardersBridgeAdaptersByChainBefore = _getCurrentForwarderAdaptersByChain(); + + ICrossChainForwarder.BridgeAdapterToDisable[] + memory adaptersToRemove = BaseAdaptersUpdatePayload(payloadAddress) + .getForwarderBridgeAdaptersToRemove(); + + executePayload(vm, payloadAddress); + + ForwarderAdapters[] + memory forwardersBridgeAdaptersByChainAfter = _getCurrentForwarderAdaptersByChain(); + + assertEq( + forwardersBridgeAdaptersByChainAfter.length, + forwardersBridgeAdaptersByChainBefore.length + ); + + for (uint256 l = 0; l < forwardersBridgeAdaptersByChainBefore.length; l++) { + for (uint256 j = 0; j < forwardersBridgeAdaptersByChainAfter.length; j++) { + if ( + forwardersBridgeAdaptersByChainBefore[l].chainId == + forwardersBridgeAdaptersByChainAfter[j].chainId + ) { + for (uint256 i = 0; i < forwardersBridgeAdaptersByChainBefore[l].adapters.length; i++) { + bool forwarderFound; + for (uint256 m = 0; m < forwardersBridgeAdaptersByChainAfter[j].adapters.length; m++) { + if ( + forwardersBridgeAdaptersByChainBefore[l].adapters[i].destinationBridgeAdapter == + forwardersBridgeAdaptersByChainAfter[j].adapters[m].destinationBridgeAdapter && + forwardersBridgeAdaptersByChainBefore[l].adapters[i].currentChainBridgeAdapter == + forwardersBridgeAdaptersByChainAfter[j].adapters[m].currentChainBridgeAdapter + ) { + forwarderFound = true; + break; + } + } + if (!forwarderFound) { + bool isAdapterToBeRemoved; + for (uint256 k = 0; k < adaptersToRemove.length; k++) { + if ( + forwardersBridgeAdaptersByChainBefore[l].adapters[i].currentChainBridgeAdapter == + adaptersToRemove[k].bridgeAdapter + ) { + for (uint256 n = 0; n < adaptersToRemove[k].chainIds.length; n++) { + if ( + forwardersBridgeAdaptersByChainBefore[l].chainId == + adaptersToRemove[k].chainIds[n] + ) { + isAdapterToBeRemoved = true; + break; + } + } + } + } + assertEq(isAdapterToBeRemoved, true); + } + } + } + } + } + } + + function _getCurrentForwarderAdaptersByChain() + internal + view + returns (ForwarderAdapters[] memory) + { + uint256[] memory supportedChains = new uint256[](10); + supportedChains[0] = ChainIds.POLYGON; + supportedChains[1] = ChainIds.AVALANCHE; + supportedChains[2] = ChainIds.BNB; + supportedChains[3] = ChainIds.GNOSIS; + supportedChains[4] = ChainIds.ARBITRUM; + supportedChains[5] = ChainIds.OPTIMISM; + supportedChains[6] = ChainIds.METIS; + supportedChains[7] = ChainIds.BASE; + supportedChains[8] = ChainIds.SCROLL; + supportedChains[9] = ChainIds.MAINNET; + + ForwarderAdapters[] memory forwarderAdapters = new ForwarderAdapters[](supportedChains.length); + + for (uint256 i = 0; i < supportedChains.length; i++) { + ICrossChainForwarder.ChainIdBridgeConfig[] memory forwarders = ICrossChainForwarder( + CROSS_CHAIN_CONTROLLER + ).getForwarderBridgeAdaptersByChain(supportedChains[i]); + + forwarderAdapters[i] = ForwarderAdapters({adapters: forwarders, chainId: supportedChains[i]}); + } + return forwarderAdapters; + } + + function _getCurrentReceiverAdaptersByChain() internal view returns (AdaptersByChain[] memory) { + uint256[] memory supportedChains = ICrossChainReceiver(CROSS_CHAIN_CONTROLLER) + .getSupportedChains(); + + AdaptersByChain[] memory receiverAdapters = new AdaptersByChain[](supportedChains.length); + + for (uint256 i = 0; i < supportedChains.length; i++) { + address[] memory receivers = ICrossChainReceiver(CROSS_CHAIN_CONTROLLER) + .getReceiverBridgeAdaptersByChain(supportedChains[i]); + + receiverAdapters[i] = AdaptersByChain({adapters: receivers, chainId: supportedChains[i]}); + } + + return receiverAdapters; + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md new file mode 100644 index 000000000..90047f95e --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md @@ -0,0 +1,22 @@ +--- +title: "Native bridge adapters update" +author: "BGD Labs @bgdlabs" +discussions: "" +--- + +## Simple Summary + +## Motivation + +## Specification + +## References + +- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.t.sol) +- [Snapshot](TODO) +- [Discussion](TODO) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol new file mode 100644 index 000000000..61a8b203d --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol @@ -0,0 +1,268 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; +import {EthereumScript, PolygonScript, OptimismScript, ArbitrumScript, MetisScript, BaseScript, GnosisScript, ScrollScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Metis_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Base_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol'; +import {AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322} from './AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol'; + +/** + * @dev Deploy Ethereum + * deploy-command: make deploy-ledger contract=src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol:DeployEthereum chain=mainnet + * verify-command: npx catapulta-verify -b broadcast/NativeBridgeAdaptersUpdate_20240322.s.sol/1/run-latest.json + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Polygon + * deploy-command: make deploy-ledger contract=src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol:DeployPolygon chain=polygon + * verify-command: npx catapulta-verify -b broadcast/NativeBridgeAdaptersUpdate_20240322.s.sol/137/run-latest.json + */ +contract DeployPolygon is PolygonScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Optimism + * deploy-command: make deploy-ledger contract=src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol:DeployOptimism chain=optimism + * verify-command: npx catapulta-verify -b broadcast/NativeBridgeAdaptersUpdate_20240322.s.sol/10/run-latest.json + */ +contract DeployOptimism is OptimismScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Arbitrum + * deploy-command: make deploy-ledger contract=src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol:DeployArbitrum chain=arbitrum + * verify-command: npx catapulta-verify -b broadcast/NativeBridgeAdaptersUpdate_20240322.s.sol/42161/run-latest.json + */ +contract DeployArbitrum is ArbitrumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Metis + * deploy-command: make deploy-ledger contract=src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol:DeployMetis chain=metis + * verify-command: npx catapulta-verify -b broadcast/NativeBridgeAdaptersUpdate_20240322.s.sol/1088/run-latest.json + */ +contract DeployMetis is MetisScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Metis_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Base + * deploy-command: make deploy-ledger contract=src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol:DeployBase chain=base + * verify-command: npx catapulta-verify -b broadcast/NativeBridgeAdaptersUpdate_20240322.s.sol/8453/run-latest.json + */ +contract DeployBase is BaseScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Base_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Gnosis + * deploy-command: make deploy-ledger contract=src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol:DeployGnosis chain=gnosis + * verify-command: npx catapulta-verify -b broadcast/NativeBridgeAdaptersUpdate_20240322.s.sol/100/run-latest.json + */ +contract DeployGnosis is GnosisScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Scroll + * deploy-command: make deploy-ledger contract=src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol:DeployScroll chain=scroll + * verify-command: npx catapulta-verify -b broadcast/NativeBridgeAdaptersUpdate_20240322.s.sol/534352/run-latest.json + */ +contract DeployScroll is ScrollScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Create Proposal + * command: make deploy-ledger contract=src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate_20240322.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](8); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereum[0] = GovV3Helpers.buildAction( + type(AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](1); + actionsPolygon[0] = GovV3Helpers.buildAction( + type(AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + payloads[1] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsOptimism = new IPayloadsControllerCore.ExecutionAction[](1); + actionsOptimism[0] = GovV3Helpers.buildAction( + type(AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + payloads[2] = GovV3Helpers.buildOptimismPayload(vm, actionsOptimism); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsArbitrum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsArbitrum[0] = GovV3Helpers.buildAction( + type(AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + payloads[3] = GovV3Helpers.buildArbitrumPayload(vm, actionsArbitrum); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsMetis = new IPayloadsControllerCore.ExecutionAction[](1); + actionsMetis[0] = GovV3Helpers.buildAction( + type(AaveV3Metis_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + payloads[4] = GovV3Helpers.buildMetisPayload(vm, actionsMetis); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsBase = new IPayloadsControllerCore.ExecutionAction[](1); + actionsBase[0] = GovV3Helpers.buildAction( + type(AaveV3Base_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + payloads[5] = GovV3Helpers.buildBasePayload(vm, actionsBase); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsGnosis = new IPayloadsControllerCore.ExecutionAction[](1); + actionsGnosis[0] = GovV3Helpers.buildAction( + type(AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + payloads[6] = GovV3Helpers.buildGnosisPayload(vm, actionsGnosis); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsScroll = new IPayloadsControllerCore.ExecutionAction[](1); + actionsScroll[0] = GovV3Helpers.buildAction( + type(AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322).creationCode + ); + payloads[7] = GovV3Helpers.buildScrollPayload(vm, actionsScroll); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md' + ) + ); + } +} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/config.ts b/src/20240322_Multi_NativeBridgeAdaptersUpdate/config.ts new file mode 100644 index 000000000..cda8c9de4 --- /dev/null +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/config.ts @@ -0,0 +1,31 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + author: 'BGD Labs @bgdlabs', + pools: [ + 'AaveV3Ethereum', + 'AaveV3Polygon', + 'AaveV3Optimism', + 'AaveV3Arbitrum', + 'AaveV3Metis', + 'AaveV3Base', + 'AaveV3Gnosis', + 'AaveV3Scroll', + ], + title: 'Native bridge adapters update', + shortName: 'NativeBridgeAdaptersUpdate', + date: '20240322', + discussion: '', + snapshot: '', + }, + poolOptions: { + AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 19490720}}, + AaveV3Polygon: {configs: {OTHERS: {}}, cache: {blockNumber: 54954005}}, + AaveV3Optimism: {configs: {OTHERS: {}}, cache: {blockNumber: 117759224}}, + AaveV3Arbitrum: {configs: {OTHERS: {}}, cache: {blockNumber: 193049277}}, + AaveV3Metis: {configs: {OTHERS: {}}, cache: {blockNumber: 15632608}}, + AaveV3Base: {configs: {OTHERS: {}}, cache: {blockNumber: 12163947}}, + AaveV3Gnosis: {configs: {OTHERS: {}}, cache: {blockNumber: 33059583}}, + AaveV3Scroll: {configs: {OTHERS: {}}, cache: {blockNumber: 4339218}}, + }, +}; From d46e30531a2fe562d5b9528289e8e5bd55c68e64 Mon Sep 17 00:00:00 2001 From: sendra Date: Mon, 25 Mar 2024 15:52:11 +0100 Subject: [PATCH 2/9] fix: fixed tests --- ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 2 +- ...um_NativeBridgeAdaptersUpdate_20240322.sol | 39 +++---------------- ..._NativeBridgeAdaptersUpdate_20240322.t.sol | 2 +- ...on_NativeBridgeAdaptersUpdate_20240322.sol | 22 ++++------- .../BaseTest.sol | 15 +++++-- 5 files changed, 27 insertions(+), 53 deletions(-) diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol index 9bde7dcb8..bbca7bf68 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -16,7 +16,7 @@ contract AaveV3Base_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { type(AaveV3Base_NativeBridgeAdaptersUpdate_20240322).creationCode, 'base', 12163947, - 'Arbitrum native adapter' + 'Base native adapter' ) {} } diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol index 0fe07a54e..5a1a2402d 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol @@ -15,28 +15,15 @@ contract AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload( BaseAdaptersUpdatePayload.ConstructorInput({ ccc: GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER, - newAdapter: address(0), - adapterToRemove: address(0) + newAdapter: 0x1562F1b2487F892BBA8Ef325aF054Fd157510a71, // POLYGON native bridge adapter + adapterToRemove: 0xb13712De579E1f9943502FFCf72eab6ec348cF79 // POLYGON native bridge adapter }) ) { - // Enable the polygon native bridge to receive from polygon network - function getReceiverBridgeAdaptersToAllow() - public - pure - override - returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory) - { - ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] - memory bridgeAdapterConfig = new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](1); - - bridgeAdapterConfig[0] = ICrossChainReceiver.ReceiverBridgeAdapterConfigInput({ - bridgeAdapter: 0x1562F1b2487F892BBA8Ef325aF054Fd157510a71, - chainIds: new uint256[](1) - }); - bridgeAdapterConfig[0].chainIds[0] = ChainIds.POLYGON; - - return bridgeAdapterConfig; + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.POLYGON; + return chains; } function getForwarderBridgeAdaptersToEnable() @@ -153,18 +140,4 @@ contract AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322 is return forwarderAdaptersToRemove; } - - function getChainsToSend() public pure override returns (uint256[] memory) { - uint256[] memory chainsToSend = new uint256[](8); - chainsToSend[0] = ChainIds.ARBITRUM; - chainsToSend[1] = ChainIds.POLYGON; - chainsToSend[2] = ChainIds.OPTIMISM; - chainsToSend[3] = ChainIds.GNOSIS; - chainsToSend[4] = ChainIds.SCROLL; - chainsToSend[5] = ChainIds.BASE; - chainsToSend[6] = ChainIds.METIS; - chainsToSend[7] = ChainIds.MAINNET; - - return chainsToSend; - } } diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol index 12dc0a6d7..c95dfb11d 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol @@ -15,7 +15,7 @@ contract AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322_Test is BaseTest { GovernanceV3Gnosis.CROSS_CHAIN_CONTROLLER, type(AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322).creationCode, 'gnosis', - 33059583, + 33108913, 'Gnosis native adapter' ) {} diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol index 223bd6bf4..bfe289085 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol @@ -16,7 +16,7 @@ contract AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload.ConstructorInput({ ccc: GovernanceV3Polygon.CROSS_CHAIN_CONTROLLER, newAdapter: 0x853649f897383f89d8441346Cf26a9ed02720B02, - adapterToRemove: 0xb13712De579E1f9943502FFCf72eab6ec348cF79 // not removing + adapterToRemove: 0xb13712De579E1f9943502FFCf72eab6ec348cF79 }) ) { @@ -26,23 +26,17 @@ contract AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322 is return chains; } - function getForwarderBridgeAdaptersToEnable() + function getDestinationAdapters() public - view + pure override - returns (ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] memory) + returns (DestinationAdaptersInput[] memory) { - ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] - memory bridgeAdaptersToEnable = new ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[]( - 8 - ); + DestinationAdaptersInput[] memory destinationAdapters = new DestinationAdaptersInput[](1); - bridgeAdaptersToEnable[0] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({ - currentChainBridgeAdapter: NEW_ADAPTER, - destinationBridgeAdapter: 0x1562F1b2487F892BBA8Ef325aF054Fd157510a71, - destinationChainId: ChainIds.MAINNET - }); + destinationAdapters[0].adapter = 0x1562F1b2487F892BBA8Ef325aF054Fd157510a71; + destinationAdapters[0].chainId = ChainIds.MAINNET; - return bridgeAdaptersToEnable; + return destinationAdapters; } } diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseTest.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseTest.sol index 5528383ed..72628a6e5 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseTest.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/BaseTest.sol @@ -158,10 +158,17 @@ abstract contract BaseTest is ProtocolV3TestBase { .getForwarderBridgeAdaptersToEnable(); for (uint256 i = 0; i < destinationConfigs.length; i++) { - assertEq( - getPayloadByChainId(destinationConfigs[i].destinationChainId).NEW_ADAPTER(), - destinationConfigs[i].destinationBridgeAdapter - ); + if (destinationConfigs[i].destinationChainId == block.chainid) { + assertEq( + destinationConfigs[i].currentChainBridgeAdapter, + destinationConfigs[i].destinationBridgeAdapter + ); + } else { + assertEq( + getPayloadByChainId(destinationConfigs[i].destinationChainId).NEW_ADAPTER(), + destinationConfigs[i].destinationBridgeAdapter + ); + } } } From 7bdb075d0ce3d8b989242e1a83c72d7a8936e0bc Mon Sep 17 00:00:00 2001 From: sendra Date: Mon, 25 Mar 2024 16:11:29 +0100 Subject: [PATCH 3/9] fix: updated readme --- .../NativeBridgeAdaptersUpdate.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md index 90047f95e..509f66f34 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md @@ -6,10 +6,30 @@ discussions: "" ## Simple Summary +This proposal updates the Native bridge adapters used on a.DI to connect Ethereum with Polygon, Arbitrum, Optimism, Base, Metis, Gnosis, Scroll, Base and the Ethereum SameChain adapter. + ## Motivation +The main motivation of this proposal is to bring the Native bridge adapters up to date + ## Specification +Updates the Native bridge adapters used to connect between networks to add Adapter Name to the contracts and provider specific gasLimit configuration + +| Network | Polygon Native | Gnosis Native | Metis Native | Arbitrum Native | Optimism Native | Base Native | Scroll Native | Same Chain | +| -------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| Ethereum | [0x1562F1b2487F892BBA8Ef325aF054Fd157510a71](https://etherscan.io/address/0x1562F1b2487F892BBA8Ef325aF054Fd157510a71) | [0x7238d75fD75bb936E83b75854c653F104Ce9c9d8](https://etherscan.io/address/0x7238d75fD75bb936E83b75854c653F104Ce9c9d8) | [0x6B3Dc800E7c813Db3fe8D0F30fDCaE636935dC14](https://etherscan.io/address/0x6B3Dc800E7c813Db3fe8D0F30fDCaE636935dC14) | [0x88d6D01e08d3e64513b15fD46528dBbA7d755883](https://etherscan.io/address/0x88d6D01e08d3e64513b15fD46528dBbA7d755883) | [0x0e24524778fdc67f53eEf144b8cbf50261E930B3](https://etherscan.io/address/0x0e24524778fdc67f53eEf144b8cbf50261E930B3) | [0xa5948b0ac79f72966dFFC5C13E44f6dfDD3D58A0](https://etherscan.io/address/0xa5948b0ac79f72966dFFC5C13E44f6dfDD3D58A0) | [0xA4dC3F123e1c601A19B3DC8382BB9311F678cafA](https://etherscan.io/address/0xA4dC3F123e1c601A19B3DC8382BB9311F678cafA) | [0x6cfbd2aA4691fc18B9C209bDd43DC3943C228FCf](https://etherscan.io/address/0x6cfbd2aA4691fc18B9C209bDd43DC3943C228FCf) | +| Polygon | [0x853649f897383f89d8441346Cf26a9ed02720B02](https://polygonscan.com/address/0x853649f897383f89d8441346Cf26a9ed02720B02) | - | - | - | - | - | - | - | +| Gnosis | | [0x3C06dce358add17aAf230f2234bCCC4afd50d090](https://gnosisscan.io/address/0x3C06dce358add17aAf230f2234bCCC4afd50d090) | - | - | - | - | - | - | +| Metis | | - | [0xf41193E25408F652AF878c47E4401A01B5E4B682](https://andromeda-explorer.metis.io/address/0xf41193E25408F652AF878c47E4401A01B5E4B682) | - | - | - | - | - | +| Arbitrum | | - | - | [0xc8a2ADC4261c6b669CdFf69E717E77C9cFeB420d](https://arbiscan.io/address/0xc8a2ADC4261c6b669CdFf69E717E77C9cFeB420d) | - | - | - | - | +| Optimism | | - | - | - | [0xa5cc218513305221201f196760E9e64e9D49d98A](https://optimistic.etherscan.io/address/0xa5cc218513305221201f196760E9e64e9D49d98A) | - | - | - | +| Base | | - | - | - | - | [0x7120b1f8e5b73c0C0DC99C6e52Fe4937E7EA11e0](https://basescan.org/address/0x7120b1f8e5b73c0C0DC99C6e52Fe4937E7EA11e0) | - | - | +| Scroll | | - | - | - | - | - | [0x3C06dce358add17aAf230f2234bCCC4afd50d090](https://scrollscan.com/address/0x3C06dce358add17aAf230f2234bCCC4afd50d090) | - | + +Code diffs for the different networks can be checked on a.DI diff repository for [revision 2](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2). +Adapter diffs: [HLAdapter](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2), [BaseAdapter](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2/base_adapter), [IBaseAdapter](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2/i_base_adapter) + ## References - Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol) From 34c427632948990a3613ac4da3e328ce2a0f5152 Mon Sep 17 00:00:00 2001 From: sendra Date: Mon, 25 Mar 2024 17:06:48 +0100 Subject: [PATCH 4/9] fix: correct path to diffs --- .../NativeBridgeAdaptersUpdate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md index 509f66f34..3d5a4487b 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md @@ -28,7 +28,7 @@ Updates the Native bridge adapters used to connect between networks to add Adapt | Scroll | | - | - | - | - | - | [0x3C06dce358add17aAf230f2234bCCC4afd50d090](https://scrollscan.com/address/0x3C06dce358add17aAf230f2234bCCC4afd50d090) | - | Code diffs for the different networks can be checked on a.DI diff repository for [revision 2](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2). -Adapter diffs: [HLAdapter](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2), [BaseAdapter](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2/base_adapter), [IBaseAdapter](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2/i_base_adapter) +Adapter diffs: [Native Adapters](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2/native), [BaseAdapter](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2/base_adapter), [IBaseAdapter](https://github.com/bgd-labs/aDI-diffs/tree/main/diffs/rev2/i_base_adapter) ## References From 11d4974e675678adf173e46a0bca0c1640c9f117 Mon Sep 17 00:00:00 2001 From: sendra Date: Tue, 26 Mar 2024 12:16:55 +0100 Subject: [PATCH 5/9] fix: use address(0) instead of old adapter, as it will not be removed --- .../AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol | 2 +- .../AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol | 2 +- .../AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol | 2 +- .../AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol | 2 +- .../AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol | 2 +- .../AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol index a35424a54..dfcb0f3b4 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol @@ -16,7 +16,7 @@ contract AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload.ConstructorInput({ ccc: GovernanceV3Arbitrum.CROSS_CHAIN_CONTROLLER, newAdapter: 0xc8a2ADC4261c6b669CdFf69E717E77C9cFeB420d, - adapterToRemove: 0x3829943c53F2d00e20B58475aF19716724bF90Ba // not removing + adapterToRemove: address(0) // @dev We dont remove old adapter so that system can be rescued by just re adding sender on Ethereum aDI }) ) { diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol index 7691d46bf..7713b6e1d 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol @@ -15,7 +15,7 @@ contract AaveV3Base_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload.ConstructorInput({ ccc: GovernanceV3Base.CROSS_CHAIN_CONTROLLER, newAdapter: 0x7120b1f8e5b73c0C0DC99C6e52Fe4937E7EA11e0, - adapterToRemove: 0x7b62461a3570c6AC8a9f8330421576e417B71EE7 // not removing + adapterToRemove: address(0) // @dev We dont remove old adapter so that system can be rescued by just re adding sender on Ethereum aDI }) ) { diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol index e147f03e1..b73226839 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol @@ -15,7 +15,7 @@ contract AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload.ConstructorInput({ ccc: GovernanceV3Gnosis.CROSS_CHAIN_CONTROLLER, newAdapter: 0x3C06dce358add17aAf230f2234bCCC4afd50d090, - adapterToRemove: 0x889c0cc3283DB588A34E89Ad1E8F25B0fc827b4b // we can remove native adapter because we can reach confirmations with other 2 bridges + adapterToRemove: 0x889c0cc3283DB588A34E89Ad1E8F25B0fc827b4b }) ) { diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol index 6a7637750..2722c8d57 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol @@ -16,7 +16,7 @@ contract AaveV3Metis_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload.ConstructorInput({ ccc: GovernanceV3Metis.CROSS_CHAIN_CONTROLLER, newAdapter: 0xf41193E25408F652AF878c47E4401A01B5E4B682, - adapterToRemove: 0x746c675dAB49Bcd5BB9Dc85161f2d7Eb435009bf // not removing + adapterToRemove: address(0) // @dev We dont remove old adapter so that system can be rescued by just re adding sender on Ethereum aDI }) ) { diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol index c84e9cb54..a596c2dba 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol @@ -16,7 +16,7 @@ contract AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload.ConstructorInput({ ccc: GovernanceV3Optimism.CROSS_CHAIN_CONTROLLER, newAdapter: 0xAE93BEa44dcbE52B625169588574d31e36fb3A67, - adapterToRemove: 0x81d32B36380e6266e1BDd490eAC56cdB300afBe0 // not removing + adapterToRemove: address(0) // @dev We dont remove old adapter so that system can be rescued by just re adding sender on Ethereum aDI }) ) { diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol index 8af1d03e6..1392c35d2 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol @@ -16,7 +16,7 @@ contract AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload.ConstructorInput({ ccc: GovernanceV3Scroll.CROSS_CHAIN_CONTROLLER, newAdapter: 0x3C06dce358add17aAf230f2234bCCC4afd50d090, - adapterToRemove: 0x118DFD5418890c0332042ab05173Db4A2C1d283c // not removing + adapterToRemove: address(0) // @dev We dont remove old adapter so that system can be rescued by just re adding sender on Ethereum aDI }) ) { From e9f1323ab8270feb532d336082965e0dfa9a8332 Mon Sep 17 00:00:00 2001 From: sendra Date: Thu, 28 Mar 2024 11:01:41 +0100 Subject: [PATCH 6/9] Update src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md Co-authored-by: Ernesto Boado --- .../NativeBridgeAdaptersUpdate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md index 3d5a4487b..bf61bdb20 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md @@ -10,7 +10,7 @@ This proposal updates the Native bridge adapters used on a.DI to connect Ethereu ## Motivation -The main motivation of this proposal is to bring the Native bridge adapters up to date +For the past month with a.DI in production, we have noticed small improvements due to the specific mechanics of each bridge provider. Additionally, as we improve the off-chain systems (e.g. monitoring) surrounding a.DI, sometimes it is simply better to add features to the smart contracts to facilitate this off-chain infrastructure. ## Specification From 76ec6fa6adaa31c03e378bce1080f4cd13d47e3d Mon Sep 17 00:00:00 2001 From: sendra Date: Thu, 28 Mar 2024 11:01:47 +0100 Subject: [PATCH 7/9] Update src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md Co-authored-by: Ernesto Boado --- .../NativeBridgeAdaptersUpdate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md index bf61bdb20..da8e7e6e0 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md @@ -6,7 +6,7 @@ discussions: "" ## Simple Summary -This proposal updates the Native bridge adapters used on a.DI to connect Ethereum with Polygon, Arbitrum, Optimism, Base, Metis, Gnosis, Scroll, Base and the Ethereum SameChain adapter. +This proposal updates the Native bridge adapters used on a.DI, to add extra naming metadata and make the gas limit configurations more granular. ## Motivation From 6e3340851a8db87d11e505005e1b6a532571a4bb Mon Sep 17 00:00:00 2001 From: sendra Date: Wed, 3 Apr 2024 09:40:14 +0200 Subject: [PATCH 8/9] fix: added discussion link --- .../AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol | 3 +-- .../AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol | 3 +-- .../AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol | 3 +-- .../AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol | 3 +-- .../AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol | 3 +-- .../AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol | 3 +-- .../AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol | 3 +-- .../AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol | 3 +-- .../NativeBridgeAdaptersUpdate.md | 3 +-- 9 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol index dfcb0f3b4..ac084cc63 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol @@ -8,8 +8,7 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol'; /** * @title Native bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26 */ contract AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload( diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol index 7713b6e1d..7b9b3c4fd 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol @@ -7,8 +7,7 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol'; /** * @title Native bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26 */ contract AaveV3Base_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload( diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol index 5a1a2402d..a164c7b21 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol @@ -8,8 +8,7 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol'; /** * @title Native bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26 */ contract AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload( diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol index b73226839..6b81a8d07 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol @@ -7,8 +7,7 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol'; /** * @title Native bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26 */ contract AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload( diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol index 2722c8d57..b241e17f7 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol @@ -8,8 +8,7 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol'; /** * @title Native bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26 */ contract AaveV3Metis_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload( diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol index a596c2dba..64f7712ef 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol @@ -8,8 +8,7 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol'; /** * @title Native bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26 */ contract AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload( diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol index bfe289085..8bb02828f 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol @@ -8,8 +8,7 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol'; /** * @title Native bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26 */ contract AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload( diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol index 1392c35d2..71878d1f7 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol @@ -8,8 +8,7 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol'; /** * @title Native bridge adapters update * @author BGD Labs @bgdlabs - * - Snapshot: TODO - * - Discussion: TODO + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26 */ contract AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322 is BaseAdaptersUpdatePayload( diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md index da8e7e6e0..ac3499294 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md @@ -34,8 +34,7 @@ Adapter diffs: [Native Adapters](https://github.com/bgd-labs/aDI-diffs/tree/main - Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.sol) - Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Ethereum_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Polygon_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Optimism_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Arbitrum_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Metis_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Base_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Gnosis_NativeBridgeAdaptersUpdate_20240322.t.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240322_Multi_NativeBridgeAdaptersUpdate/AaveV3Scroll_NativeBridgeAdaptersUpdate_20240322.t.sol) -- [Snapshot](TODO) -- [Discussion](TODO) +- [Discussion](https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26) ## Copyright From ee79810686cb7edf7067dd0f5b192f1061a5573d Mon Sep 17 00:00:00 2001 From: sendra Date: Thu, 4 Apr 2024 17:28:43 +0200 Subject: [PATCH 9/9] Update src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md --- .../NativeBridgeAdaptersUpdate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md index ac3499294..70099978a 100644 --- a/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md +++ b/src/20240322_Multi_NativeBridgeAdaptersUpdate/NativeBridgeAdaptersUpdate.md @@ -1,7 +1,7 @@ --- title: "Native bridge adapters update" author: "BGD Labs @bgdlabs" -discussions: "" +discussions: "https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/26" --- ## Simple Summary