Mono repository of Token Bridge (Oracle, Deployment, Monitor). TokenBridge is an interoperability solution between EVM-based networks for assets/data cross chain transfers
Go to file
Alexander Kolotov c92f80c484
Merge the develop branch to the master branch, preparation to v3.0.0-rc1
This merge contains the following set of changes:
  * [Monitor, Improvement] Add statistics about used AMB information requests (#577)
  * [ALM, Improvement] Add safe-execute button in ALM (#580), closes #573, closes #551
  * [Oracle, Improvement] Improve confirm-relay feature (#582), closes #569
  * [Monitor, Fix] Prune print of long error messages about missing file (#579), closes #578
  * [Oracle, Fix] Use safe approach for eth_getLogs requests (#581)
  * [Oracle, Fix] Fix logging in gas price service (#583), closes #552
  * [Oracle, Fix] Fix oracle error patterns and oracle e2e tests (#585)
  * [Common, Other] Fix dependencies versions and update example.yml (#566)
  * [Common, Other] Upload services logs in e2e and ultimate tests (#568)
  * [Oracle, Other] added example of emergency shutdown controller contract (#572)
  * [Oracle, Other] Refactor oracle configuration (#584)
2021-07-10 10:10:22 +03:00
.github/workflows Fix oracle error patterns and oracle e2e tests (#585) 2021-07-08 16:42:56 +03:00
alm Add safe-execute button in ALM (#580) 2021-06-18 09:43:18 +03:00
alm-e2e Improve confirm-relay feature (#582) 2021-07-07 16:21:01 +03:00
audit Final version of the FT OB contract security audit report by ChainSecurity (#559) 2021-05-04 07:25:02 -06:00
burner-wallet-plugin Allow cors in monitor server (#472) 2020-10-12 21:16:41 +03:00
commons Fix logging in gas price service (#583) 2021-07-05 13:50:18 +03:00
contracts@004d466a3d Update the contract's submodule to the release 6.0.0-rc0 (#562) 2021-05-08 09:50:46 -06:00
deployment Refactor oracle configuration (#584) 2021-07-08 09:38:55 +03:00
deployment-e2e Fix dependencies versions and update example.yml (#566) 2021-05-10 14:36:57 -06:00
e2e-commons Refactor oracle configuration (#584) 2021-07-08 09:38:55 +03:00
monitor Fix logging in gas price service (#583) 2021-07-05 13:50:18 +03:00
monitor-e2e Upload services logs in e2e and ultimate tests (#568) 2021-05-15 10:29:20 -06:00
oracle Fix oracle error patterns and oracle e2e tests (#585) 2021-07-08 16:42:56 +03:00
oracle-e2e Fix oracle error patterns and oracle e2e tests (#585) 2021-07-08 16:42:56 +03:00
parity Oracle watcher for AMB async calls (#509) 2021-05-09 07:34:19 -06:00
.coveralls.yml Added Coveralls for UI (#59) 2019-05-22 16:09:02 +02:00
.dockerignore Cache fetched events in monitor (#482) 2020-11-04 14:24:42 +03:00
.editorconfig Move .editorconfig to root dir. 2019-05-22 16:33:28 +02:00
.eslintignore Add ALM new styles (#373) 2020-06-26 18:47:45 +03:00
.eslintrc Configured Prettier (#60) 2019-05-22 16:31:09 +02:00
.gitignore ALM manual signatures execution (#471) 2020-11-26 00:22:21 +03:00
.gitmodules Updated links to new repo with tokenbridge contracts (#226) 2019-11-05 15:53:47 +03:00
.nvmrc Update the contract's submodule to the release 6.0.0-rc0 (#562) 2021-05-08 09:50:46 -06:00
.prettierrc Extend line width to 120 (#174) 2019-08-01 15:10:22 +02:00
CODE_OF_CONDUCT.md Update the token-bridge sub-repo (#19) 2019-05-07 16:52:44 +02:00
CONFIGURATION.md Oracle watcher for AMB async calls (#509) 2021-05-09 07:34:19 -06:00
CONTRIBUTING.md Update the token-bridge sub-repo (#19) 2019-05-07 16:52:44 +02:00
Dockerfile.e2e Update the contract's submodule to the release 6.0.0-rc0 (#562) 2021-05-08 09:50:46 -06:00
LICENSE Update the token-bridge sub-repo (#19) 2019-05-07 16:52:44 +02:00
package.json Remove UI from monorepo (#553) 2021-04-16 03:31:12 -06:00
README.md Update the contract's submodule to the release 6.0.0-rc0 (#562) 2021-05-08 09:50:46 -06:00
yarn.lock Fix dependencies versions and update example.yml (#566) 2021-05-10 14:36:57 -06:00

tokenbridge Gitter License: LGPL v3.0

Tokenbridge

Welcome to the POA TokenBridge monorepository!

Please note that this repository as a work in progress.

Overview

The POA TokenBridge allows users to transfer assets between two chains in the Ethereum ecosystem. It is composed of several elements which are contained within this monorepository.

For a complete picture of the POA TokenBridge functionality, it is useful to explore each subrepository.

Structure

Sub-repositories maintained within this monorepo are listed below.

Sub-repository Description
Oracle Oracle responsible for listening to bridge related events and authorizing asset transfers.
Monitor Tool for checking balances and unprocessed events in bridged networks.
Deployment Ansible playbooks for deploying cross-chain bridges.
Oracle-E2E End to end tests for the Oracle
Monitor-E2E End to end tests for the Monitor
Deployment-E2E End to end tests for the Deployment
Commons Interfaces, constants and utilities shared between the sub-repositories
E2E-Commons Common utilities and configuration used in end to end tests
ALM DApp interface tool for AMB Live Monitoring
Burner-wallet-plugin TokenBridge Burner Wallet 2 Plugin

Additionally there are Smart Contracts used to manage bridge validators, collect signatures, and confirm asset relay and disposal.

Available deployments

Launched by POA Launched by 3rd parties
POA20 Bridge Ocean TokenBridge
xDai Bridge Thunder bridge
WETC Bridge Volta TokenBridge & DAI bridge to Volta Chain
Artis Brige
Tenda bridge & xDai-to-Tenda bridge

Network Definitions

Bridging occurs between two networks.

  • Home - or Native - is a network with fast and inexpensive operations. All bridge operations to collect validator confirmations are performed on this side of the bridge.

  • Foreign can be any chain; generally it refers to the Ethereum mainnet.

Operational Modes

The POA TokenBridge provides four operational modes:

  • ERC20-to-Native: Pre-existing tokens in the Foreign network are locked and coins are minted in the Home network. In this mode, the Home network consensus engine invokes Parity's Block Reward contract to mint coins per the bridge contract request. More Information: xDai Chain
  • Arbitrary-Message: Transfer arbitrary data between two networks as so the data could be interpreted as an arbitrary contract method invocation.

Initializing the monorepository

Clone the repository:

git clone https://github.com/poanetwork/tokenbridge

If there is no need to build docker images for the TokenBridge components (oracle, monitor), initialize submodules, install dependencies, compile the Smart Contracts:

yarn initialize

Then refer to the corresponding README files to get information about particular TokenBridge component.

Linting

Running linter for all JS projects:

yarn lint

Tests

Running tests for all projects:

yarn test

Additionally there are end-to-end tests for Oracle and Monitor.

For details on building, running and developing please refer to respective READMEs in sub-repositories.

Building, running and deploying

Please refer to the instructions in sub-directories. Configuration details are available here.

Contributing

See the CONTRIBUTING document for contribution, testing and pull request protocol.

License

This project is licensed under the GNU Lesser General Public License v3.0. See the LICENSE file for details.

References