Skip to content

Commit

Permalink
fix: fixed tests. Added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sendra committed Jan 22, 2024
1 parent 0f7ba40 commit 6587215
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
2 changes: 2 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ base = "${RPC_BASE}"
zkevm = "${RPC_ZKEVM}"
gnosis = "${RPC_GNOSIS}"
bnb = "${RPC_BNB}"
scroll="${RPC_SCROLL}"

[etherscan]
mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chainId=1 }
Expand All @@ -36,5 +37,6 @@ base = { key="${ETHERSCAN_API_KEY_BASE}", chainId=8453 }
zkevm = { key="${ETHERSCAN_API_KEY_ZKEVM}", chainId=1101 }
gnosis = { key="${ETHERSCAN_API_KEY_GNOSIS}", chainId=100 }
bnb = { key="${ETHERSCAN_API_KEY_BNB}", chainId=56 }
scroll={key="${ETHERSCAN_API_KEY_SCROLL}",chainId=534352}

# See more config options https://github.com/gakonst/foundry/tree/master/config
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,28 @@ contract AaveV3Ethereum_RegisterADIScrollAdapter_20240122_Test is ProtocolV3Test
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
address scroll_adapter_ethereum = proposal.SCROLL_ADAPTER_ETHEREUM();
address scroll_adapter_scroll = proposal.SCROLL_ADAPTER_SCROLL();

executePayload(vm, address(proposal));

ICrossChainForwarder.ChainIdBridgeConfig[] memory ethConfig = ICrossChainForwarder(
GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER
).getForwarderBridgeAdaptersByChain(ChainIds.SCROLL);

assertEq(ethConfig.length, 1);
assertEq(ethConfig[0].destinationBridgeAdapter, proposal.SCROLL_ADAPTER_SCROLL());
assertEq(ethConfig[0].currentChainBridgeAdapter, proposal.SCROLL_ADAPTER_ETHEREUM());
assertEq(ethConfig[0].destinationBridgeAdapter, scroll_adapter_scroll);
assertEq(ethConfig[0].currentChainBridgeAdapter, scroll_adapter_ethereum);

vm.selectFork(scrollFork);
address[] memory scrollConfig = ICrossChainReceiver(GovernanceV3Scroll.CROSS_CHAIN_CONTROLLER)
.getReceiverBridgeAdaptersByChain(ChainIds.MAINNET);

assertEq(scrollConfig.length, 1);
assertEq(scrollConfig[0], proposal.SCROLL_ADAPTER_ETHEREUM());
assertEq(scrollConfig[0], scroll_adapter_scroll);

assertEq(
IBaseAdapter(proposal.SCROLL_ADAPTER_SCROLL()).getTrustedRemoteByChainId(ChainIds.MAINNET),
IBaseAdapter(scroll_adapter_scroll).getTrustedRemoteByChainId(ChainIds.MAINNET),
GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Register a.DI Scroll adapter"
author: "BGD Labs @bgdlabs"
discussions: ""
discussions: "https://governance.aave.com/t/arfc-aave-v3-deployment-on-scroll-mainnet/16126/"
---

## Simple Summary
Expand All @@ -10,16 +10,18 @@ Proposal to register the scroll adapter on Ethereum a.DI

## Motivation

For the Aave DAO to have control of the Aave Protocol deployed in the Scroll network, the Scroll
For the Aave DAO to have control of the Aave Protocol deployed in the Scroll network, a Scroll adapter needs to be
registered in the Ethereum a.DI that is configured for the communication with the Scroll network a.DI.

## Specification

The proposal registers a pre-deployed Scroll adapter (with the necessary configurations to communicate with the Scroll a.DI) on the Ethereum a.DI.

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240122_AaveV3Ethereum_RegisterADIScrollAdapter/AaveV3Ethereum_RegisterADIScrollAdapter_20240122.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240122_AaveV3Ethereum_RegisterADIScrollAdapter/AaveV3Ethereum_RegisterADIScrollAdapter_20240122.t.sol)
- [Snapshot](TODO)
- [Discussion](TODO)
- [Discussion](https://governance.aave.com/t/arfc-aave-v3-deployment-on-scroll-mainnet/16126/)

## Copyright

Expand Down

0 comments on commit 6587215

Please sign in to comment.