All bridges integrated into the LI.FI Diamond contract follow the same basic pattern. To add a new integration follow these steps.
- Clone this repository
- Run
yarn install
- Run
yarn codegen facet
and follow the prompts
This will create all the required files to add a new bridge integration. The structure will look like this.
├── config
│ └── foobar.json # This is the config file for the bridge
├── docs
│ └── FoobarFacet.md # This is the documentation for the bridge
├── script
│ ├── deploy
│ │ ├── facets
│ │ │ ├── DeployFoobarFacet.s.sol # This is the deployment script for the bridge
│ │ │ └── UpdateFoobarFacet.s.sol # This is the script that adds the bridge to the Diamond
├── src
│ ├── Facets
│ │ └── FoobarFacet.sol # This is the bridge contract
├── test
│ └── solidity
│ └── Facets
│ └── FoobarFacet.t.sol # This is the test for the bridge
- Implement the bridge logic as required, add any tests and configuration
- Note any contract-specific deployment requirements and add them to
script/deploy/resources/deployRequirements.json
- Submit a PR to this repository