diff --git a/diffs/adi_AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..18d683103 --- /dev/null +++ b/diffs/adi_AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,14 @@ +## Raw diff + +```json +{ + "receiverAdaptersByChain": { + "1": { + "0x3829943c53F2d00e20B58475aF19716724bF90Ba": { + "from": true, + "to": null + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/adi_AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..25e950947 --- /dev/null +++ b/diffs/adi_AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,30 @@ +## Raw diff + +```json +{ + "forwarderAdaptersByChain": { + "1": { + "0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04": { + "from": "0x6Abb61beb5848B476d026C4934E8a6415e2E75a8", + "to": null + }, + "0x617332a777780F546261247F621051d0b98975Eb": { + "from": null, + "to": "0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1" + } + } + }, + "receiverAdaptersByChain": { + "1": { + "0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04": { + "from": true, + "to": null + }, + "0x617332a777780F546261247F621051d0b98975Eb": { + "from": null, + "to": true + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/adi_AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..e9447bbc3 --- /dev/null +++ b/diffs/adi_AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,18 @@ +## Raw diff + +```json +{ + "receiverAdaptersByChain": { + "1": { + "0x118DFD5418890c0332042ab05173Db4A2C1d283c": { + "from": true, + "to": null + }, + "0x3F006299eC88985c18E6e885EeA29A49eC579882": { + "from": null, + "to": true + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/adi_AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..90c427209 --- /dev/null +++ b/diffs/adi_AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,14 @@ +## Raw diff + +```json +{ + "receiverAdaptersByChain": { + "1": { + "0x7b62461a3570c6AC8a9f8330421576e417B71EE7": { + "from": true, + "to": null + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/adi_AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..f67469d0d --- /dev/null +++ b/diffs/adi_AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,70 @@ +## Raw diff + +```json +{ + "forwarderAdaptersByChain": { + "56": { + "0x6Abb61beb5848B476d026C4934E8a6415e2E75a8": { + "from": "0x118DFD5418890c0332042ab05173Db4A2C1d283c", + "to": null + }, + "0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1": { + "from": null, + "to": "0x3F006299eC88985c18E6e885EeA29A49eC579882" + } + }, + "100": { + "0x6Abb61beb5848B476d026C4934E8a6415e2E75a8": { + "from": "0x4A4c73d563395ad827511F70097d4Ef82E653805", + "to": null + }, + "0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1": { + "from": null, + "to": "0xA806DA549FcB2B4912a7dFFE4c1aA7A1ed0Bd5C9" + } + }, + "137": { + "0x6Abb61beb5848B476d026C4934E8a6415e2E75a8": { + "from": "0x3c25b96fF62D21E90556869272a277eE2E229747", + "to": null + }, + "0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1": { + "from": null, + "to": "0x3e72665008dC237bdd91C04C10782Ed1987a4019" + } + }, + "43114": { + "0x6Abb61beb5848B476d026C4934E8a6415e2E75a8": { + "from": "0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04", + "to": null + }, + "0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1": { + "from": null, + "to": "0x617332a777780F546261247F621051d0b98975Eb" + } + } + }, + "receiverAdaptersByChain": { + "137": { + "0x6Abb61beb5848B476d026C4934E8a6415e2E75a8": { + "from": true, + "to": null + }, + "0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1": { + "from": null, + "to": true + } + }, + "43114": { + "0x6Abb61beb5848B476d026C4934E8a6415e2E75a8": { + "from": true, + "to": null + }, + "0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1": { + "from": null, + "to": true + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/adi_AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..761269b6a --- /dev/null +++ b/diffs/adi_AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,18 @@ +## Raw diff + +```json +{ + "receiverAdaptersByChain": { + "1": { + "0x4A4c73d563395ad827511F70097d4Ef82E653805": { + "from": true, + "to": null + }, + "0xA806DA549FcB2B4912a7dFFE4c1aA7A1ed0Bd5C9": { + "from": null, + "to": true + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/adi_AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..286a9dcc5 --- /dev/null +++ b/diffs/adi_AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,14 @@ +## Raw diff + +```json +{ + "receiverAdaptersByChain": { + "1": { + "0x746c675dAB49Bcd5BB9Dc85161f2d7Eb435009bf": { + "from": true, + "to": null + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/adi_AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..f20b62454 --- /dev/null +++ b/diffs/adi_AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,14 @@ +## Raw diff + +```json +{ + "receiverAdaptersByChain": { + "1": { + "0x81d32B36380e6266e1BDd490eAC56cdB300afBe0": { + "from": true, + "to": null + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/adi_AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..d2944d375 --- /dev/null +++ b/diffs/adi_AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,30 @@ +## Raw diff + +```json +{ + "forwarderAdaptersByChain": { + "1": { + "0x3c25b96fF62D21E90556869272a277eE2E229747": { + "from": "0x6Abb61beb5848B476d026C4934E8a6415e2E75a8", + "to": null + }, + "0x3e72665008dC237bdd91C04C10782Ed1987a4019": { + "from": null, + "to": "0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1" + } + } + }, + "receiverAdaptersByChain": { + "1": { + "0x3c25b96fF62D21E90556869272a277eE2E229747": { + "from": true, + "to": null + }, + "0x3e72665008dC237bdd91C04C10782Ed1987a4019": { + "from": null, + "to": true + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/adi_AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md b/diffs/adi_AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md new file mode 100644 index 000000000..bd1f2e7f9 --- /dev/null +++ b/diffs/adi_AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320_before_adi_AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320_after.md @@ -0,0 +1,14 @@ +## Raw diff + +```json +{ + "receiverAdaptersByChain": { + "1": { + "0x118DFD5418890c0332042ab05173Db4A2C1d283c": { + "from": true, + "to": null + } + } + } +} +``` \ No newline at end of file diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..2a3c6e88a --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/SimpleReceiverAdapterUpdate.sol'; +import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleReceiverAdapterUpdate( + SimpleReceiverAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3Arbitrum.CROSS_CHAIN_CONTROLLER, + newAdapter: address(0), // no new adapter + adapterToRemove: 0x3829943c53F2d00e20B58475aF19716724bF90Ba + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..64b871ab3 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/test/ADITestBase.sol'; +import {GovernanceV3Arbitrum} from 'aave-address-book/GovernanceV3Arbitrum.sol'; +import {AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Test for AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320 internal payload; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('arbitrum'), 201314733); + payload = new AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3Arbitrum.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..970ac8eef --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; +import 'aave-helpers/adi/SimpleOneToManyAdapterUpdate.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleOneToManyAdapterUpdate( + SimpleOneToManyAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3Avalanche.CROSS_CHAIN_CONTROLLER, + newAdapter: 0x617332a777780F546261247F621051d0b98975Eb, + adapterToRemove: 0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04 + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } + + function getDestinationAdapters() + public + pure + override + returns (DestinationAdaptersInput[] memory) + { + DestinationAdaptersInput[] memory destinationAdapters = new DestinationAdaptersInput[](1); + + destinationAdapters[0].adapter = 0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1; + destinationAdapters[0].chainId = ChainIds.MAINNET; + + return destinationAdapters; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..92a68b469 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol'; +import {AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import 'aave-helpers/adi/test/ADITestBase.sol'; +import {AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Test for AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320 public payload; + function setUp() public { + vm.createSelectFork(vm.rpcUrl('avalanche'), 43150105); + payload = new AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + function getDestinationPayloadsByChain() + public + view + override + returns (DestinationPayload[] memory) + { + DestinationPayload[] memory destinationPayload = new DestinationPayload[](1); + destinationPayload[0] = DestinationPayload({ + chainId: ChainIds.MAINNET, + payloadCode: type(AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + }); + + return destinationPayload; + } + + function test_defaultTest() public { + defaultTest( + 'AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3Avalanche.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..5471a247f --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/SimpleOneToManyAdapterUpdate.sol'; +import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleOneToManyAdapterUpdate( + SimpleOneToManyAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3BNB.CROSS_CHAIN_CONTROLLER, + newAdapter: 0x3F006299eC88985c18E6e885EeA29A49eC579882, + adapterToRemove: 0x118DFD5418890c0332042ab05173Db4A2C1d283c + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..3bb3d3db3 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol'; +import {AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import 'aave-helpers/adi/test/ADITestBase.sol'; + +/** + * @dev Test for AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320 public payload; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('bnb'), 37137492); + payload = new AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + function test_defaultTest() public { + defaultTest( + 'AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3BNB.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..4a76e8f3f --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/SimpleReceiverAdapterUpdate.sol'; +import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleReceiverAdapterUpdate( + SimpleReceiverAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3Base.CROSS_CHAIN_CONTROLLER, + newAdapter: address(0), // no new adapter + adapterToRemove: 0x7b62461a3570c6AC8a9f8330421576e417B71EE7 + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..94594ec0f --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/test/ADITestBase.sol'; +import {GovernanceV3Base} from 'aave-address-book/GovernanceV3Base.sol'; +import {AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Test for AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320 internal payload; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('base'), 13202337); + payload = new AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3Base.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..7b1d99277 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/SimpleOneToManyAdapterUpdate.sol'; +import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleOneToManyAdapterUpdate( + SimpleOneToManyAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER, + newAdapter: 0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1, + adapterToRemove: 0x6Abb61beb5848B476d026C4934E8a6415e2E75a8 + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](2); + chains[0] = ChainIds.AVALANCHE; + chains[1] = ChainIds.POLYGON; + return chains; + } + + function getDestinationAdapters() + public + pure + override + returns (DestinationAdaptersInput[] memory) + { + DestinationAdaptersInput[] memory destinationAdapters = new DestinationAdaptersInput[](4); + + destinationAdapters[0].adapter = 0x617332a777780F546261247F621051d0b98975Eb; + destinationAdapters[0].chainId = ChainIds.AVALANCHE; + + destinationAdapters[1].adapter = 0x3e72665008dC237bdd91C04C10782Ed1987a4019; + destinationAdapters[1].chainId = ChainIds.POLYGON; + + destinationAdapters[2].adapter = 0x3F006299eC88985c18E6e885EeA29A49eC579882; + destinationAdapters[2].chainId = ChainIds.BNB; + + destinationAdapters[3].adapter = 0xA806DA549FcB2B4912a7dFFE4c1aA7A1ed0Bd5C9; + destinationAdapters[3].chainId = ChainIds.GNOSIS; + + return destinationAdapters; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..1b339b835 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; +import {AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import 'aave-helpers/adi/test/ADITestBase.sol'; +import {AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Test for AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320 public payload; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 19661654); + payload = new AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + function getDestinationPayloadsByChain() + public + view + override + returns (DestinationPayload[] memory) + { + DestinationPayload[] memory destinationPayload = new DestinationPayload[](4); + destinationPayload[0] = DestinationPayload({ + chainId: ChainIds.AVALANCHE, + payloadCode: type(AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + }); + destinationPayload[1] = DestinationPayload({ + chainId: ChainIds.POLYGON, + payloadCode: type(AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + }); + destinationPayload[2] = DestinationPayload({ + chainId: ChainIds.BNB, + payloadCode: type(AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + }); + destinationPayload[3] = DestinationPayload({ + chainId: ChainIds.GNOSIS, + payloadCode: type(AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + }); + + return destinationPayload; + } + + function test_defaultTest() public { + defaultTest( + 'AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..468dd76c3 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/SimpleOneToManyAdapterUpdate.sol'; +import {GovernanceV3Gnosis} from 'aave-address-book/GovernanceV3Gnosis.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleOneToManyAdapterUpdate( + SimpleOneToManyAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3Gnosis.CROSS_CHAIN_CONTROLLER, + newAdapter: 0xA806DA549FcB2B4912a7dFFE4c1aA7A1ed0Bd5C9, + adapterToRemove: 0x4A4c73d563395ad827511F70097d4Ef82E653805 + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..771ca6312 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/test/ADITestBase.sol'; +import {GovernanceV3Gnosis} from 'aave-address-book/GovernanceV3Gnosis.sol'; +import {AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Test for AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320 public payload; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('gnosis'), 33457580); + payload = new AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + function test_defaultTest() public { + defaultTest( + 'AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3Gnosis.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..2ed37d188 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/SimpleReceiverAdapterUpdate.sol'; +import {GovernanceV3Metis} from 'aave-address-book/GovernanceV3Metis.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleReceiverAdapterUpdate( + SimpleReceiverAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3Metis.CROSS_CHAIN_CONTROLLER, + newAdapter: address(0), // no new adapter + adapterToRemove: 0x746c675dAB49Bcd5BB9Dc85161f2d7Eb435009bf + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..0fa3ba171 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/test/ADITestBase.sol'; +import {GovernanceV3Metis} from 'aave-address-book/GovernanceV3Metis.sol'; +import {AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Test for AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320 internal payload; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('metis'), 16616814); + payload = new AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3Metis.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..77337a722 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/SimpleReceiverAdapterUpdate.sol'; +import {GovernanceV3Optimism} from 'aave-address-book/GovernanceV3Optimism.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleReceiverAdapterUpdate( + SimpleReceiverAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3Optimism.CROSS_CHAIN_CONTROLLER, + newAdapter: address(0), // no new adapter + adapterToRemove: 0x81d32B36380e6266e1BDd490eAC56cdB300afBe0 + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..72a05b17e --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/test/ADITestBase.sol'; +import {GovernanceV3Optimism} from 'aave-address-book/GovernanceV3Optimism.sol'; +import {AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Test for AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320 internal payload; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('optimism'), 118797852); + payload = new AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3Optimism.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..19a91a390 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/SimpleOneToManyAdapterUpdate.sol'; +import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleOneToManyAdapterUpdate( + SimpleOneToManyAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3Polygon.CROSS_CHAIN_CONTROLLER, + newAdapter: 0x3e72665008dC237bdd91C04C10782Ed1987a4019, + adapterToRemove: 0x3c25b96fF62D21E90556869272a277eE2E229747 + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } + + function getDestinationAdapters() + public + pure + override + returns (DestinationAdaptersInput[] memory) + { + DestinationAdaptersInput[] memory destinationAdapters = new DestinationAdaptersInput[](1); + + destinationAdapters[0].adapter = 0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1; + destinationAdapters[0].chainId = ChainIds.MAINNET; + + return destinationAdapters; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..acd300ad7 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/test/ADITestBase.sol'; +import {GovernanceV3Polygon} from 'aave-address-book/GovernanceV3Polygon.sol'; +import {AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Test for AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320 public payload; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('polygon'), 54882095); + payload = new AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + function getDestinationPayloadsByChain() + public + view + override + returns (DestinationPayload[] memory) + { + DestinationPayload[] memory destinationPayload = new DestinationPayload[](1); + destinationPayload[0] = DestinationPayload({ + chainId: ChainIds.MAINNET, + payloadCode: type(AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + }); + + return destinationPayload; + } + + function test_defaultTest() public { + defaultTest( + 'AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3Polygon.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.sol new file mode 100644 index 000000000..ca40f7383 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/SimpleReceiverAdapterUpdate.sol'; +import {GovernanceV3Scroll} from 'aave-address-book/GovernanceV3Scroll.sol'; +import {ChainIds} from 'aave-helpers/ChainIds.sol'; + +/** + * @title Hyperlane bridge adapter update to V3 + * @author BGD Labs @bgdlabs + * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31 + */ +contract AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320 is + SimpleReceiverAdapterUpdate( + SimpleReceiverAdapterUpdate.ConstructorInput({ + ccc: GovernanceV3Scroll.CROSS_CHAIN_CONTROLLER, + newAdapter: address(0), // no new adapter + adapterToRemove: 0x118DFD5418890c0332042ab05173Db4A2C1d283c + }) + ) +{ + function getChainsToReceive() public pure override returns (uint256[] memory) { + uint256[] memory chains = new uint256[](1); + chains[0] = ChainIds.MAINNET; + return chains; + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol new file mode 100644 index 000000000..b89bb0c64 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'aave-helpers/adi/test/ADITestBase.sol'; +import {GovernanceV3Scroll} from 'aave-address-book/GovernanceV3Scroll.sol'; +import {AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Test for AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320 + * command: make test-contract filter=AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320 + */ +contract AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320_Test is ADITestBase { + AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320 internal payload; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('scroll'), 4850650); + payload = new AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320', + GovernanceV3Scroll.CROSS_CHAIN_CONTROLLER, + address(payload), + true + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3.md b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3.md new file mode 100644 index 000000000..2acdf1000 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3.md @@ -0,0 +1,57 @@ +--- +title: "Hyperlane bridge adapter update to V3 and removal of old native bridge adapters" +author: "BGD Labs @bgdlabs" +discussions: "https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31" +--- + +## Simple Summary + +This proposal updates the bridge Hyperlane bridge adapters used on a.DI to connect Ethereum with Polygon, Avalanche, Binance and Gnosis to the new +Hyperlane V3 version. +Additionally, removes old native bridges on Optimism, Base, Arbitrum, Scroll and Metis, after verifying that the new active versions work properly. + +## Motivation + +The main motivation of this proposal is to bring the Hyperlane bridge adapters to the up to date version (V3). + +## Specification + +Updates the Hyperlane bridge adapters used to connect between networks to Hyperlane V3 and it also adds Adapter Name to the contracts +to make it easy to track off chain + +| Network | Hyperlane | +| --------- | ------------------------------------------------------------------------------------------------------------------------ | +| Ethereum | [0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1](https://etherscan.io/address/0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1) | +| Polygon | [0x3e72665008dC237bdd91C04C10782Ed1987a4019](https://polygonscan.com/address/0x3e72665008dC237bdd91C04C10782Ed1987a4019) | +| Avalanche | [0x617332a777780F546261247F621051d0b98975Eb](https://snowscan.xyz/address/0x617332a777780F546261247F621051d0b98975Eb) | +| Binance | [0x3F006299eC88985c18E6e885EeA29A49eC579882](https://bscscan.com/address/0x3F006299eC88985c18E6e885EeA29A49eC579882) | +| Gnosis | [0xA806DA549FcB2B4912a7dFFE4c1aA7A1ed0Bd5C9](https://bscscan.com/address/0xA806DA549FcB2B4912a7dFFE4c1aA7A1ed0Bd5C9) | + +To add the new forwarder adapters the method `function enableBridgeAdapters(ForwarderBridgeAdapterConfigInput[] memory bridgeAdapters) external` will be used, +and to remove the old forwarder adapters, the method `function disableBridgeAdapters(BridgeAdapterToDisable[] memory bridgeAdapters) external` will be called on each CrossChainController. + +To add the new receiver adapters the method `function allowReceiverBridgeAdapters(ReceiverBridgeAdapterConfigInput[] memory bridgeAdaptersInput) external` will be used, +and to remove the old receiver adapters, the method `function disallowReceiverBridgeAdapters(ReceiverBridgeAdapterConfigInput[] memory bridgeAdaptersInput) external` will be called on each CrossChainController. + +The old native receiver bridge adapters to remove are: + +| Network | Native adapters | +| -------- | --------------------------------------------------------------------------------------------------------------------------------- | +| Arbitrum | [0x3829943c53F2d00e20B58475aF19716724bF90Ba](https://arbiscan.io/address/0x3829943c53F2d00e20B58475aF19716724bF90Ba) | +| Base | [0x7b62461a3570c6AC8a9f8330421576e417B71EE7](https://basescan.org/address/0x7b62461a3570c6AC8a9f8330421576e417B71EE7) | +| Metis | [0x746c675dAB49Bcd5BB9Dc85161f2d7Eb435009bf](https://explorer.metis.io/address/0x746c675dAB49Bcd5BB9Dc85161f2d7Eb435009bf) | +| Optimism | [0x81d32B36380e6266e1BDd490eAC56cdB300afBe0](https://optimistic.etherscan.io//address/0x81d32B36380e6266e1BDd490eAC56cdB300afBe0) | +| Scroll | [0x118DFD5418890c0332042ab05173Db4A2C1d283c](https://scrollscan.com/address/0x118DFD5418890c0332042ab05173Db4A2C1d283c) | + +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/hyperlane), [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/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3BNB](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3BNB](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol) +- [Discussion](https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/31) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol new file mode 100644 index 000000000..165e9aa74 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol @@ -0,0 +1,328 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; +import {EthereumScript, PolygonScript, AvalancheScript, GnosisScript, BNBScript, ScrollScript, ArbitrumScript, OptimismScript, MetisScript, BaseScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; +import {AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.sol'; + +/** + * @dev Deploy Ethereum + * deploy-command: make deploy-ledger contract=src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployEthereum chain=mainnet + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/1/run-latest.json + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320).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/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployPolygon chain=polygon + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/137/run-latest.json + */ +contract DeployPolygon is PolygonScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320).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 Avalanche + * deploy-command: make deploy-ledger contract=src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployAvalanche chain=avalanche + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/43114/run-latest.json + */ +contract DeployAvalanche is AvalancheScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320).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/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployGnosis chain=gnosis + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/100/run-latest.json + */ +contract DeployGnosis is GnosisScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320).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 BNB + * deploy-command: make deploy-ledger contract=src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployBNB chain=bnb + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/56/run-latest.json + */ +contract DeployBNB is BNBScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320).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/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployScroll chain=scroll + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/534352/run-latest.json + */ +contract DeployScroll is ScrollScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320).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/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployArbitrum chain=arbitrum + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/42161/run-latest.json + */ +contract DeployArbitrum is ArbitrumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320).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/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployOptimism chain=optimism + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/10/run-latest.json + */ +contract DeployOptimism is OptimismScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320).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/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployMetis chain=metis + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/1088/run-latest.json + */ +contract DeployMetis is MetisScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320).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/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:DeployBase chain=base + * verify-command: npx catapulta-verify -b broadcast/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol/8453/run-latest.json + */ +contract DeployBase is BaseScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320).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/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3_20240320.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](10); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereum[0] = GovV3Helpers.buildAction( + type(AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](1); + actionsPolygon[0] = GovV3Helpers.buildAction( + type(AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[1] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsAvalanche = new IPayloadsControllerCore.ExecutionAction[](1); + actionsAvalanche[0] = GovV3Helpers.buildAction( + type(AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[2] = GovV3Helpers.buildAvalanchePayload(vm, actionsAvalanche); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsGnosis = new IPayloadsControllerCore.ExecutionAction[](1); + actionsGnosis[0] = GovV3Helpers.buildAction( + type(AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[3] = GovV3Helpers.buildGnosisPayload(vm, actionsGnosis); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsBNB = new IPayloadsControllerCore.ExecutionAction[](1); + actionsBNB[0] = GovV3Helpers.buildAction( + type(AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[4] = GovV3Helpers.buildBNBPayload(vm, actionsBNB); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsScroll = new IPayloadsControllerCore.ExecutionAction[](1); + actionsScroll[0] = GovV3Helpers.buildAction( + type(AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[5] = GovV3Helpers.buildScrollPayload(vm, actionsScroll); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsArbitrum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsArbitrum[0] = GovV3Helpers.buildAction( + type(AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[6] = GovV3Helpers.buildArbitrumPayload(vm, actionsArbitrum); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsOptimism = new IPayloadsControllerCore.ExecutionAction[](1); + actionsOptimism[0] = GovV3Helpers.buildAction( + type(AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[7] = GovV3Helpers.buildOptimismPayload(vm, actionsOptimism); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsMetis = new IPayloadsControllerCore.ExecutionAction[](1); + actionsMetis[0] = GovV3Helpers.buildAction( + type(AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[8] = GovV3Helpers.buildMetisPayload(vm, actionsMetis); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsBase = new IPayloadsControllerCore.ExecutionAction[](1); + actionsBase[0] = GovV3Helpers.buildAction( + type(AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode + ); + payloads[9] = GovV3Helpers.buildBasePayload(vm, actionsBase); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/HyperlaneBridgeAdapterUpdateToV3.md' + ) + ); + } +} diff --git a/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/config.ts b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/config.ts new file mode 100644 index 000000000..6965f3d20 --- /dev/null +++ b/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/config.ts @@ -0,0 +1,36 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + configFile: './src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/config.ts', + author: 'BGD Labs @bgdlabs', + pools: [ + 'AaveV3Ethereum', + 'AaveV3Polygon', + 'AaveV3Avalanche', + 'AaveV3Gnosis', + 'AaveV3BNB', + 'AaveV3Scroll', + 'AaveV3Arbitrum', + 'AaveV3Optimism', + 'AaveV3Metis', + 'AaveV3Base', + ], + title: 'Hyperlane bridge adapter update to V3', + shortName: 'HyperlaneBridgeAdapterUpdateToV3', + date: '20240320', + discussion: '', + snapshot: '', + }, + poolOptions: { + AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 19476776}}, + AaveV3Polygon: {configs: {OTHERS: {}}, cache: {blockNumber: 54882095}}, + AaveV3Avalanche: {configs: {OTHERS: {}}, cache: {blockNumber: 43150105}}, + AaveV3Gnosis: {configs: {OTHERS: {}}, cache: {blockNumber: 33027304}}, + AaveV3BNB: {configs: {OTHERS: {}}, cache: {blockNumber: 37137492}}, + AaveV3Scroll: {configs: {OTHERS: {}}, cache: {blockNumber: 4850650}}, + AaveV3Arbitrum: {configs: {OTHERS: {}}, cache: {blockNumber: 201314733}}, + AaveV3Optimism: {configs: {OTHERS: {}}, cache: {blockNumber: 118797852}}, + AaveV3Metis: {configs: {OTHERS: {}}, cache: {blockNumber: 16616814}}, + AaveV3Base: {configs: {OTHERS: {}}, cache: {blockNumber: 13202337}}, + }, +};