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

[SC-184] Use XChainHelpers instead of custom forwarders #6

Merged
merged 9 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ This repository contains infrastructure necessary to process cross-chain executi
The codebase uses [Foundry](https://github.com/foundry-rs/foundry) as the development framework. In order to run tests, deploy contracts, or perform other operations, use standard [Foundry](https://github.com/foundry-rs/foundry) commands.

## ⚙️ Components
### 🔊 Forwarders
Forwarders are contracts on the host domain, where the governance of the protocol resides. <br>These contracts abstract away all complexity of using a bridge and facilitate seamless message passing between domains. <br>Host domain admin uses forwarders to trigger payload executions on a bridged domain instances of the protocol.
### 🚦 Executors
Executors serve as admins of the bridged domain instances of the protocol. <br>They are responsible for storying the queue of proposals passed from the host domain governance and their execution. <br> They manage bridged domain protocol instance using standard payload pattern.
## ✍️ Architecture Diagram
![Architecture Diagram](/diagram.png)
## 🤝 Contribution Guidelines
In order to add governance relay infrastructure for a new domain, perform the following steps:
1. Go to [XChain Helpers](https://github.com/marsfoundation/xchain-helpers) repository and add a proper domain helper abstracting away the process of passing messages between host domain and your bridged domain.
2. Add proper `CrosschainForwarder` to the `/src/forwarders` directory and proper `BridgeExecutor` to the `/src/executors` directory. Follow currently used naming convention.
3. If there are any dependencies required, copy them into `/src/dependencies/<YOUR_DOMAIN_NAME>` directory.
4. Add a new test file for your domain to the `/test` directory. Inherit `CrosschainTestBase` and add tests specific to your domain to the test suite. All of the tests have to pass. Follow linting and naming convention used in other test files.
5. Use proper labeling for your open PR (always set adequate priority and status)
6. Get an approving review from at least one of three designated reviewers - **@hexonaut**, **@lucas-manuel** or **@barrutko**
7. Enjoy governance messages being passed through the bridge to your domain! 🎉
1. Go to [XChain Helpers](https://github.com/marsfoundation/xchain-helpers) repository and add:
1. A domain helper abstracting away the process of passing messages between host domain and your bridged domain.
2. A helper function to the XChainForwarders library abstracting away host domain interactions with the bridge.
2. Add `BridgeExecutor` to the `/src/executors` directory. Follow currently used naming convention.
3. Add a new test file for your domain to the `/test` directory. Inherit `CrosschainTestBase` and add tests specific to your domain to the test suite. All of the tests have to pass. Follow linting and naming convention used in other test files.
4. Use proper labeling for your open PR (always set adequate priority and status)
5. Get an approving review from at least one of three designated reviewers - **@hexonaut**, **@lucas-manuel** or **@barrutko**
6. Enjoy governance messages being passed through the bridge to your domain! 🎉
Binary file modified diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/forge-std
Submodule forge-std updated 1 files
+1 −1 package.json
2 changes: 1 addition & 1 deletion lib/xchain-helpers
29 changes: 0 additions & 29 deletions src/dependencies/arbitrum/AddressAliasHelper.sol

This file was deleted.

103 changes: 0 additions & 103 deletions src/dependencies/arbitrum/interfaces/IBridge.sol

This file was deleted.

15 changes: 0 additions & 15 deletions src/dependencies/arbitrum/interfaces/IDelayedMessageProvider.sol

This file was deleted.

14 changes: 0 additions & 14 deletions src/dependencies/arbitrum/interfaces/IGasRefunder.sol

This file was deleted.

153 changes: 0 additions & 153 deletions src/dependencies/arbitrum/interfaces/IInbox.sol

This file was deleted.

10 changes: 0 additions & 10 deletions src/dependencies/arbitrum/interfaces/IOwnable.sol

This file was deleted.

Loading