diff --git a/diffs/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415_before_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415_after.md b/diffs/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415_before_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415_after.md new file mode 100644 index 000000000..1ebd2c0ce --- /dev/null +++ b/diffs/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415_before_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415_after.md @@ -0,0 +1,35 @@ +## Reserve changes + +### Reserves altered + +#### GNO ([0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb](https://gnosisscan.io/address/0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb)) + +| description | value before | value after | +| --- | --- | --- | +| debtCeiling | 1,000,000 $ | 2,000,000 $ | +| ltv | 31 % | 45 % | +| liquidationThreshold | 36 % | 50 % | + + +## Raw diff + +```json +{ + "reserves": { + "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb": { + "debtCeiling": { + "from": 100000000, + "to": 200000000 + }, + "liquidationThreshold": { + "from": 3600, + "to": 5000 + }, + "ltv": { + "from": 3100, + "to": 4500 + } + } + } +} +``` \ No newline at end of file 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/lib/aave-helpers b/lib/aave-helpers index 4241a87f9..a574110bf 160000 --- a/lib/aave-helpers +++ b/lib/aave-helpers @@ -1 +1 @@ -Subproject commit 4241a87f9ab921c6fef0c48d2dae2d4503be548c +Subproject commit a574110bf9b0f5a2c9efcd8cc66c8f05200baeb1 diff --git a/package.json b/package.json index 06b940307..12c758f99 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ "vitest": "^1.4.0" }, "dependencies": { - "@bgd-labs/aave-address-book": "^2.25.0", - "@bgd-labs/aave-cli": "0.9.3", + "@bgd-labs/aave-address-book": "^2.26.1", + "@bgd-labs/aave-cli": "0.12.0", "@bgd-labs/js-utils": "^1.3.0", "@inquirer/prompts": "^3.3.0", "@inquirer/testing": "^2.1.13", @@ -41,7 +41,7 @@ "husky": "^8.0.3", "lint-staged": "^15.2.2", "tsx": "^4.7.1", - "viem": "^2.8.16" + "viem": "^2.9.25" }, "lint-staged": { "*": "prettier --ignore-unknown --write" 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..46d433657 --- /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/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3BNB](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Base_HyperlaneBridgeAdapterUpdateToV3_20240320.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Polygon_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Gnosis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3BNB](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Scroll_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Arbitrum_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Optimism_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/src/20240320_Multi_HyperlaneBridgeAdapterUpdateToV3/AaveV3Metis_HyperlaneBridgeAdapterUpdateToV3_20240320.t.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/61e97df4b425f3d8a9107123da03e1daa6ee48bd/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}}, + }, +}; diff --git a/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.sol b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.sol new file mode 100644 index 000000000..2a9e0f1b6 --- /dev/null +++ b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol'; +import {AaveV3PayloadGnosis} from 'aave-helpers/v3-config-engine/AaveV3PayloadGnosis.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title Risk Parameter Updates GNO on V3 Gnosis + * @author Chaos Labs + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-gno-on-v3-gnosis/17340 + */ +contract AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415 is AaveV3PayloadGnosis { + function collateralsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.CollateralUpdate[] memory) + { + IAaveV3ConfigEngine.CollateralUpdate[] + memory collateralUpdate = new IAaveV3ConfigEngine.CollateralUpdate[](1); + + collateralUpdate[0] = IAaveV3ConfigEngine.CollateralUpdate({ + asset: AaveV3GnosisAssets.GNO_UNDERLYING, + ltv: 45_00, + liqThreshold: 50_00, + liqBonus: EngineFlags.KEEP_CURRENT, + debtCeiling: 2_000_000, + liqProtocolFee: EngineFlags.KEEP_CURRENT + }); + + return collateralUpdate; + } +} diff --git a/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.t.sol b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.t.sol new file mode 100644 index 000000000..74e1b9b40 --- /dev/null +++ b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.t.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Gnosis, AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415} from './AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.sol'; + +/** + * @dev Test for AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415 + * command: make test-contract filter=AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415 + */ +contract AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415_Test is ProtocolV3TestBase { + AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('gnosis'), 33455007); + proposal = new AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + (ReserveConfig[] memory allConfigsBefore, ReserveConfig[] memory allConfigsAfter) = defaultTest( + 'AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415', + AaveV3Gnosis.POOL, + address(proposal) + ); + + address[] memory assetsChanged = new address[](1); + assetsChanged[0] = AaveV3GnosisAssets.GNO_UNDERLYING; + + _noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged); + + ReserveConfig memory config = _findReserveConfig( + allConfigsAfter, + AaveV3GnosisAssets.GNO_UNDERLYING + ); + assertEq(config.ltv, 45_00); + assertEq(config.liquidationThreshold, 50_00); + assertEq(config.debtCeiling, 2_000_000_00); + } +} diff --git a/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis.md b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis.md new file mode 100644 index 000000000..5a5a6340d --- /dev/null +++ b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis.md @@ -0,0 +1,34 @@ +--- +title: "Risk Parameter Updates GNO on V3 Gnosis" +author: "Chaos Labs" +discussions: "https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-gno-on-v3-gnosis/17340" +--- + +## Simple Summary + +A proposal to update GNO’s liquidation threshold, LTV, and debt ceiling on V3 Gnosis. + +## Motivation + +GNO has an average market cap of $445M and a daily trading volume of $3M over the last 180 days. Over this same timeframe, the largest single-day drop was 9.11%, with a daily annualized volatility of 63.75% and a 30-day daily annualized volatility of 94.46%. + +GNO is currently listed with relatively conservative parameters: 36% LT and 31% LTV. We recommend an increase to 50% and 45%, respectively. Following observations at these levels and utilizing our simulation platform, these parameters may be further optimized. +Given current market conditions and utilizing our Isolation Mode Methodology we recommend doubling the debt ceiling to $2M. + +## Specification + +| Asset | Parameter | Current | Recommended | +| ----- | ------------ | ---------- | ----------- | +| GNO | LT | 36.00% | 50.00% | +| GNO | LTV | 31.00% | 45.00% | +| GNO | Debt Ceiling | $1,000,000 | $2,000,000 | + +## References + +- Implementation: [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/e3390f066abde30c4ea3c547e48b3f647d12e644/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.sol) +- Tests: [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/e3390f066abde30c4ea3c547e48b3f647d12e644/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.t.sol) +- [Discussion](https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-gno-on-v3-gnosis/17340) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis_20240415.s.sol b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis_20240415.s.sol new file mode 100644 index 000000000..5f0761f9f --- /dev/null +++ b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis_20240415.s.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; +import {EthereumScript, GnosisScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415} from './AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.sol'; + +/** + * @dev Deploy Gnosis + * deploy-command: make deploy-ledger contract=src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis_20240415.s.sol:DeployGnosis chain=gnosis + * verify-command: npx catapulta-verify -b broadcast/RiskParameterUpdatesGNOOnV3Gnosis_20240415.s.sol/100/run-latest.json + */ +contract DeployGnosis is GnosisScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415).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/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis_20240415.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsGnosis = new IPayloadsControllerCore.ExecutionAction[](1); + actionsGnosis[0] = GovV3Helpers.buildAction( + type(AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415).creationCode + ); + payloads[0] = GovV3Helpers.buildGnosisPayload(vm, actionsGnosis); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis.md' + ) + ); + } +} diff --git a/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/config.ts b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/config.ts new file mode 100644 index 000000000..260d648fc --- /dev/null +++ b/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/config.ts @@ -0,0 +1,30 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + pools: ['AaveV3Gnosis'], + title: 'Risk Parameter Updates GNO on V3 Gnosis', + shortName: 'RiskParameterUpdatesGNOOnV3Gnosis', + date: '20240415', + author: 'Chaos Labs', + discussion: + 'https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-gno-on-v3-gnosis/17340', + snapshot: '', + }, + poolOptions: { + AaveV3Gnosis: { + configs: { + COLLATERALS_UPDATE: [ + { + asset: 'GNO', + ltv: '45', + liqThreshold: '50', + liqBonus: '', + debtCeiling: '2000000', + liqProtocolFee: '', + }, + ], + }, + cache: {blockNumber: 33455007}, + }, + }, +}; diff --git a/yarn.lock b/yarn.lock index 99cabf650..401d2f296 100644 --- a/yarn.lock +++ b/yarn.lock @@ -34,22 +34,18 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@bgd-labs/aave-address-book@^2.24.1": - version "2.24.2" - resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.24.2.tgz#9e5c4b72db54bc4bf931dd69a7680fd5cdaa2966" - integrity sha512-2lz2R9OfXOq1aRqt1cMO/RbExgOHq4ueItvEVDI7bVl/iRxk8EDq5JonUZl0EUhjC+Xr+NgfehIOP6h3Qs1CIw== - -"@bgd-labs/aave-address-book@^2.25.0": - version "2.25.0" - resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.25.0.tgz#8fe37ee101f9a946483eb318cd04d79077b21a70" - integrity sha512-NMZf4xZKDQ+XXgZqWFtcEt0q45yh0NrGLmk/NDdC1ATE9EJ96UHu2E59t09dZyzyfsEDD3Tf2J4hF7UmMZPZug== - -"@bgd-labs/aave-cli@0.9.3": - version "0.9.3" - resolved "https://registry.yarnpkg.com/@bgd-labs/aave-cli/-/aave-cli-0.9.3.tgz#59dfc916954710230259efe70c44c8771dd8e24b" - integrity sha512-WPxj0OrZbLUEwgarelCkDsMcB9FZHpPPo5XAlvzot6Yy9ybSnY8LwMY44JgUiFteMSr/HD87ckPxhfvVk0GtEA== - dependencies: - "@bgd-labs/aave-address-book" "^2.24.1" +"@bgd-labs/aave-address-book@^2.25.1", "@bgd-labs/aave-address-book@^2.26.1": + version "2.26.1" + resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.26.1.tgz#f1238a1a0826c26a2dd4090c59755e9d1079457a" + integrity sha512-HkFgIZvZu8Kry+lXh+LuNcCHKf7sQQXjrxGHsh5AJgtdaOpiY76fFQUnZKIe3VaF84hABujB6QfKhNEaQxQIPw== + +"@bgd-labs/aave-cli@0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@bgd-labs/aave-cli/-/aave-cli-0.12.0.tgz#fa191cd9482de3424d6a587e9a76750638139351" + integrity sha512-enloPqeCMMh/I311PNshoGcvBwiy0PMJ0J1w9mhpNwf4pDAVBGMbWjZsi5/vglNQJ5VqrJw91MqWe6o8LeovfA== + dependencies: + "@bgd-labs/aave-address-book" "^2.25.1" + "@bgd-labs/aave-v3-governance-cache" "^0.0.13" "@bgd-labs/js-utils" "^1.3.0" "@commander-js/extra-typings" "^11.1.0" "@inquirer/prompts" "^3.3.2" @@ -62,9 +58,14 @@ ipfs-only-hash "^4.0.0" json-bigint "^1.0.0" object-hash "^3.0.0" - viem "^2.8.6" + viem "^2.9.20" zod "^3.22.4" +"@bgd-labs/aave-v3-governance-cache@^0.0.13": + version "0.0.13" + resolved "https://registry.yarnpkg.com/@bgd-labs/aave-v3-governance-cache/-/aave-v3-governance-cache-0.0.13.tgz#f63d0fe9b9f03b8605e2524b35a51aa9490ac2f4" + integrity sha512-kXezI2gN6IeFQHOO2cjbIrrHmos2QuGTCKnn7t2nQcQHJ35wNBCX9+AZymoqROd6fyIgz7qTpatj+0/K5ifhdg== + "@bgd-labs/js-utils@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@bgd-labs/js-utils/-/js-utils-1.3.0.tgz#0cb7649acf175c5127a5077f4a8168118a8966c2" @@ -2538,10 +2539,10 @@ varint@^6.0.0: resolved "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz" integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== -viem@^2.8.16, viem@^2.8.6: - version "2.8.16" - resolved "https://registry.yarnpkg.com/viem/-/viem-2.8.16.tgz#30370390a6f109657b57c1a01b2793c4056b4e95" - integrity sha512-J8tu1aP7TfI2HT/IEmyJ+n+WInrA/cuMuJtfgvYhYgHBobxhYGc2SojHm5lZBWcWgErN1Ld7VcKUwTmPh4ToQA== +viem@^2.9.20, viem@^2.9.25: + version "2.9.25" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.9.25.tgz#afcf320790e175b2afc83d29819f56cb50906f0d" + integrity sha512-W0QOXCsYQppnV89PQP0EnCvfZIEsDYqmpVakLPNrok4Q4B7651M3MV/sYifYcLWv3Mn4KUyMCUlVxlej6CfC/w== dependencies: "@adraffy/ens-normalize" "1.10.0" "@noble/curves" "1.2.0"