Skip to content

Commit

Permalink
fix: Updated with new helpers usage and diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
sendra committed Apr 15, 2024
1 parent 9633e61 commit cc68388
Show file tree
Hide file tree
Showing 18 changed files with 334 additions and 617 deletions.
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,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,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
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol';
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
Expand All @@ -12,11 +12,11 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol';
* - Discussion: TODO
*/
contract AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320 is
BaseAdaptersUpdatePayload(
BaseAdaptersUpdatePayload.ConstructorInput({
SimpleOneToManyAdapterUpdate(
SimpleOneToManyAdapterUpdate.ConstructorInput({
ccc: GovernanceV3Avalanche.CROSS_CHAIN_CONTROLLER,
hlNewAdapter: 0x617332a777780F546261247F621051d0b98975Eb,
hlAdapterToRemove: 0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04
newAdapter: 0x617332a777780F546261247F621051d0b98975Eb,
adapterToRemove: 0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04
})
)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,41 @@ pragma solidity ^0.8.0;

import {GovernanceV3Avalanche} from 'aave-address-book/GovernanceV3Avalanche.sol';
import {AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320} from './AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320.sol';
import './BaseTest.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 BaseTest {
constructor()
BaseTest(
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,
type(AaveV3Avalanche_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode,
'avalanche',
43150105
)
{}
address(payload),
true
);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {BaseAdaptersUpdatePayload, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol';
import 'aave-helpers/adi/SimpleOneToManyAdapterUpdate.sol';
import {GovernanceV3BNB} from 'aave-address-book/GovernanceV3BNB.sol';
import {ChainIds} from 'aave-helpers/ChainIds.sol';

Expand All @@ -12,11 +12,11 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol';
* - Discussion: TODO
*/
contract AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320 is
BaseAdaptersUpdatePayload(
BaseAdaptersUpdatePayload.ConstructorInput({
SimpleOneToManyAdapterUpdate(
SimpleOneToManyAdapterUpdate.ConstructorInput({
ccc: GovernanceV3BNB.CROSS_CHAIN_CONTROLLER,
hlNewAdapter: 0x3F006299eC88985c18E6e885EeA29A49eC579882,
hlAdapterToRemove: 0x118DFD5418890c0332042ab05173Db4A2C1d283c
newAdapter: 0x3F006299eC88985c18E6e885EeA29A49eC579882,
adapterToRemove: 0x118DFD5418890c0332042ab05173Db4A2C1d283c
})
)
{
Expand All @@ -25,13 +25,4 @@ contract AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320 is
chains[0] = ChainIds.MAINNET;
return chains;
}

function getForwarderBridgeAdaptersToRemove()
public
pure
override
returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory)
{
return new ICrossChainForwarder.BridgeAdapterToDisable[](0);
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './BaseTest.sol';
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 BaseTest {
constructor()
BaseTest(
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,
type(AaveV3BNB_HyperlaneBridgeAdapterUpdateToV3_20240320).creationCode,
'bnb',
37137492
)
{}
address(payload),
true
);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {BaseAdaptersUpdatePayload} from './BaseAdaptersUpdatePayload.sol';
import 'aave-helpers/adi/SimpleOneToManyAdapterUpdate.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {ChainIds} from 'aave-helpers/ChainIds.sol';

Expand All @@ -12,11 +12,11 @@ import {ChainIds} from 'aave-helpers/ChainIds.sol';
* - Discussion: TODO
*/
contract AaveV3Ethereum_HyperlaneBridgeAdapterUpdateToV3_20240320 is
BaseAdaptersUpdatePayload(
BaseAdaptersUpdatePayload.ConstructorInput({
SimpleOneToManyAdapterUpdate(
SimpleOneToManyAdapterUpdate.ConstructorInput({
ccc: GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER,
hlNewAdapter: 0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1,
hlAdapterToRemove: 0x6Abb61beb5848B476d026C4934E8a6415e2E75a8
newAdapter: 0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1,
adapterToRemove: 0x6Abb61beb5848B476d026C4934E8a6415e2E75a8
})
)
{
Expand Down
Loading

0 comments on commit cc68388

Please sign in to comment.