Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update Hyperlane and remove old native bridges #259

Merged
merged 23 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3ed6487
feat: Update CrossChainController implementation and CCIP adapters
sendra Mar 13, 2024
d20ab9d
fix: added some internal test methods
sendra Mar 13, 2024
ee8f5ab
Feat/ccip update templating (#255)
sendra Mar 18, 2024
3e46047
Update src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/Upda…
sendra Mar 20, 2024
5f86a74
Update src/20240313_Multi_UpdateADIImplementationAndCCIPAdapters/Upda…
sendra Mar 20, 2024
96b6e9f
Merge branch 'main' of github.com:bgd-labs/aave-proposals-v3 into fea…
sendra Mar 20, 2024
76a69f0
feat: Update Hyperlane bridge adapter to V3
sendra Mar 20, 2024
afa345a
fix: fixed compilation errors
sendra Mar 20, 2024
59241ee
fix: added reference to code diffs
sendra Mar 21, 2024
2e27974
fix: linting
sendra Mar 21, 2024
bd24073
Merge branch 'main' of github.com:bgd-labs/aave-proposals-v3 into fea…
sendra Mar 21, 2024
f6925ac
fix: ran lint fix
sendra Mar 21, 2024
5fcc82e
Merge branch 'feat/update-ccc-ccip' of github.com:bgd-labs/aave-propo…
sendra Mar 21, 2024
e8ac6bb
fix: fixed tests
sendra Mar 21, 2024
fdeacde
fix: solved conflicts
sendra Mar 22, 2024
acb9e68
fix: dont remove forwarders if there is no need
sendra Mar 25, 2024
9633e61
Merge branch 'main' of github.com:bgd-labs/aave-proposals-v3 into fea…
sendra Apr 15, 2024
9d7e01a
Fix/hyperlane use new helpers and remove old native adapters (#294)
sendra Apr 16, 2024
badd39f
fix: update helpers
sendra Apr 16, 2024
cc19b5d
fix: updated title with removal
sendra Apr 16, 2024
49a0082
Merge branch 'main' of github.com:bgd-labs/aave-proposals-v3 into fea…
sendra Apr 18, 2024
220483c
fix: updated readme with more information
sendra Apr 18, 2024
165546b
fix: added discussion link
sendra Apr 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Raw diff

```json
{
"receiverAdaptersByChain": {
"1": {
"0x3829943c53F2d00e20B58475aF19716724bF90Ba": {
"from": true,
"to": null
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Raw diff

```json
{
"receiverAdaptersByChain": {
"1": {
"0x118DFD5418890c0332042ab05173Db4A2C1d283c": {
"from": true,
"to": null
},
"0x3F006299eC88985c18E6e885EeA29A49eC579882": {
"from": null,
"to": true
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Raw diff

```json
{
"receiverAdaptersByChain": {
"1": {
"0x7b62461a3570c6AC8a9f8330421576e417B71EE7": {
"from": true,
"to": null
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Raw diff

```json
{
"receiverAdaptersByChain": {
"1": {
"0x4A4c73d563395ad827511F70097d4Ef82E653805": {
"from": true,
"to": null
},
"0xA806DA549FcB2B4912a7dFFE4c1aA7A1ed0Bd5C9": {
"from": null,
"to": true
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Raw diff

```json
{
"receiverAdaptersByChain": {
"1": {
"0x746c675dAB49Bcd5BB9Dc85161f2d7Eb435009bf": {
"from": true,
"to": null
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Raw diff

```json
{
"receiverAdaptersByChain": {
"1": {
"0x81d32B36380e6266e1BDd490eAC56cdB300afBe0": {
"from": true,
"to": null
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Raw diff

```json
{
"receiverAdaptersByChain": {
"1": {
"0x118DFD5418890c0332042ab05173Db4A2C1d283c": {
"from": true,
"to": null
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
@@ -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
);
}
}
Original file line number Diff line number Diff line change
@@ -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;
}
}
Loading
Loading