Skip to content

webb-tools/orbit

Repository files navigation

🛰️ 🕸️ Webb Orbit 🕸️ 🛰️

🚀 A Set of EVM Testnet(s)

CI License Apache 2.0 Twitter Telegram Discord

📖 Table of Contents

Table of Contents

Getting Started 🎉

Webb Orbit is a set of Isolated EVM Testnets used for our internal testing and development. Internally it runs a geth instance with a few tweaks to make it more suitable for our needs.

As of now, we have these testnets running:

Testnet Chain Id Currency symbol RPC Explorer
Athena 3884533461 ETH https://athena-testnet.webb.tools https://athena-explorer.webb.tools
Hermes 3884533462 ETH https://hermes-testnet.webb.tools https://hermes-explorer.webb.tools
Demeter 3884533463 ETH https://demeter-testnet.webb.tools https://demeter-explorer.webb.tools

Need help adding these networks to your wallet like MetaMask? Read Here

Prerequisites

Installation 💻

Usage

Quick Start ⚡

After installing the prerequisites, you can run the following command to start the testnet:

cp .env.example .env
# Fetch the zk fixtures
./scripts/fetch-fixtures.sh

Open the .env file in your editor and change what it is needed, usually they are the first section of the file.

Once done you can run the following command:

source .env # This will load the environment variables
./scripts/setup-orbit.sh # This will setup the orbit chains for you

Next, simply run the following command to start the chains:

docker compose up

You can now access the deployed chains, locally under http://localhost:${PORT} where $PORT depends on the chain, for example Athena chain is running under $ATHENA_CHAIN_PORT port, revisit your .env file to get your configured ports.

Deploy Block Explorers

To deploy the Block Explorers locally too, or on the server, you need to include the explorers.yml file, run the following:

docker compose -f docker-compose.yml -f explorers.yml up -d

This will deploy the block explorer for each chain, which you can access on localhost http://localhost:${PORT}where the $PORT here depends on which chain's explorer you are trying to visit, for example Athena chain explorer running under http://localhost:${ATHENA_CHAIN_EXPLORER_PORT}.

Deploying the smart contracts

To deploy the smart contracts, you can run the following command:

cd deploy && yarn

As a quick overview of all options you can run the following command:

yarn deploy --help

You should see something like the following:

Options:
Options:
  --help                      Show help                                [boolean]
  --version                   Show version number                      [boolean]
  --wethAddress               The address of the WETH contract          [string]
  --deployWeth                Whether to deploy WETH   [boolean] [default: true]
  --webbTokenName             The name of the webb token
                                        [string] [default: "Webb Wrapped Ether"]
  --webbTokenSymbol           The symbol of the webb token
                                                  [string] [default: "webbWETH"]
  --allowWrappingNativeToken  Whether to allow wrapping native tokens into webb
                              tokens                   [boolean] [default: true]
  --governor                  The Signature Bridge governor. Could be ETH addres
                              s, Uncompressed or Compressed Public Key  [string]
  --governorNonce             The nonce of the governor    [number] [default: 0]
  --deployMulticall3          Whether to deploy Multicall3 contract
                                                       [boolean] [default: true]
  --includeTangleEVM          Include tangle EVM chain[boolean] [default: false]

And here is an example of deploying a local bridge named webbWETH Bridge.

yarn deploy --deployWeth --allowWrappingNativeToken=false --webbTokenName webbWETH --webbTokenSymbol webbWETH

This will deploy the smart contracts to the testnets.

Transfer the Ownership of Existing Signature Bridge

There is a sub-command for transferring the ownership of the Bridge after the deployment.

yarn deploy transfer-ownership --contractAddress <CONTRACT> --governor <ADDRESS> --governorNonce 0

Deploying on Tangle Network

If you want to utilize the Tangle Network and the DKG as a governor for the deployed bridge, you will need to configure the following:

  • Whitelists ChainIds
  • Set Resource Ids

These steps could be done manually or using the following command:

yarn tangle --help

You should see something like the following:

Options:
  --help                 Show help                                     [boolean]
  --version              Show version number                           [boolean]
  --wsEndpoint           The endpoint of the node
                                       [string] [default: "ws://127.0.0.1:9944"]
  --resourceIds          The resource ids                  [array] [default: []]

And here is an example of how you can use it:

yarn tangle --resourceIds 0x00000000000064ba293e654992a94f304b00e3ceb8fd0f7aa77301000000138a --resourceIds 0x00000000000064ba293e654992a94f304b00e3ceb8fd0f7aa773010000001389 --resourceIds 0x00000000000064ba293e654992a94f304b00e3ceb8fd0f7aa77301000000138b

This command will automatically do the above steps for you.

Deploy with Docker ☄️

You can also deploy the testnets to a remote server using Docker. To do so, you can use the following command:

docker compose up -d

Running with a Local Relayer

The Deployment script also generates orbit.toml file that could be used with the webb relayer if you have it locally, you can also use it to connect to the running chains by running the following command:

webb-relayer -vvv --tmp -c ./config

Running Webb Faucet

To run Webb faucet backend locally, you need first to edit config/Rocket.toml file's twitter section and then run the following command:

docker compose -f faucet.yml up -d

Cleanup

To clean up everything and start over, you can executed the following commands:

docker compose down -v

sudo rm -rf {logs,data}

Deploying Smart Contracts

For the already deployed smart contracts on the testnets, refer to the DEPLOYMENTS.md file.

otherwise, the process of deploying smart contracts on the deployed chains is the same as locally.

Contributing

Interested in contributing to the Webb? Thank you so much for your interest! We are always appreciative for contributions from the open-source community!

If you have a contribution in mind, please check out our Contribution Guide for information on how to do so. We are excited for your first contribution!

License

Licensed under Apache 2.0 license.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache 2.0 license, shall be licensed as above, without any additional terms or conditions.