This project includes both frontend and contracts. To begin, install dependencies:
- Node.js v18.14.1 or latest stable. We recommend using nvm to install.
- PNPM v8.6.6 or latest stable
- Docker v20.0.21 or latest stable
- Docker Compose v2.15.1 or latest stable
- Rust v1.74.1 or latest
stable
- Forc v0.60.0 with latest toolchain
- Visit the Fuel Bridge repo and fork the project.
- Then clone your forked copy to your local machine and get to work.
git clone https://github.com/FuelLabs/fuel-bridge.git
cd fuel-bridge
pnpm install
In this step, we are going to;
- launch a local
fuel node
and a localethereum node
;
pnpm node:up
To stop the nodes, run:
pnpm node:stop
To clean the nodes, run:
pnpm node:clean
This section has a brief description of each directory. More details can be found inside each package, by clicking on the links.
- packages/fungible-token The contract that bridges ECR20 tokens into Fuel using the message bridge;
- packages/message-predicates The predicates that receive the data from the base layer into Fuel;
- packages/solidity-contracts The Fuel Solidity contracts architecture for state and message bridging;
- packages/integration-tests Integration tests for the Fuel Messaging Bridge;
- docker Docker configuration with L1 and Fuel Core working together.
To make life easier we added as many useful scripts as possible to our package.json. These are some of the most used during development:
pnpm <command name>
Script | Description |
---|---|
build |
Run all build commands generating the artifacts needed to run tests or deploy packages. |
test |
Run all the tests from all the packages |
node:up |
Run the local network with fuel-core and the ethereum node . |
node:clean |
Stop and remove all development containers that are running locally. |
node:stop |
Stop all containers without removing data |
Other scripts can be found in package.json.
The command below runs a script that starts the nodes, waits for them to be available and then executes the tests.
pnpm test