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
Przemyslaw Rzad 40fef06503
Update bridge-ui (#39)
* Renamed bridge-ui to ui, removed submodule

* Re-added submodules. Pointing at 2.2.0

* Updated workspace name.

* Removed package-lock.json.

* Updated ui contracts to 2.3.0-rc0, installed node modules.

* Added linting to ui

* Integrated UI lint, test and build into CI.

* Added readme for merging.

* Consistent eslint module

* Included plugins in dev dependencies.

* Changed eslint version.

* Add yarn.lock

* Update deprecated node api.

* Remove travis badge and config in ui

* Update link to oracle in ui dependencies.

* Remove duplicated gitter.

* Remove unimplemented coverage and dependencies badges.

* Update links in step 5 and 6 in UI

* Cosmetic.
2019-05-15 14:23:29 +02:00
.circleci Update bridge-ui (#39) 2019-05-15 14:23:29 +02:00
audit/peppersec Update the token-bridge sub-repo (#19) 2019-05-07 16:52:44 +02:00
deployment Update deployment readmes (#42) 2019-05-15 09:55:52 +02:00
monitor Update bridge-ui (#39) 2019-05-15 14:23:29 +02:00
oracle Update bridge-ui (#39) 2019-05-15 14:23:29 +02:00
oracle-e2e Extract oracle/e2e (#45) 2019-05-15 13:51:21 +02:00
ui Update bridge-ui (#39) 2019-05-15 14:23:29 +02:00
.gitignore Moved gitignore to main folder. 2019-05-06 15:15:42 +02:00
.gitmodules Update bridge-ui (#39) 2019-05-15 14:23:29 +02:00
CODE_OF_CONDUCT.md Update the token-bridge sub-repo (#19) 2019-05-07 16:52:44 +02:00
CONTRIBUTING.md Update the token-bridge sub-repo (#19) 2019-05-07 16:52:44 +02:00
LICENSE Update the token-bridge sub-repo (#19) 2019-05-07 16:52:44 +02:00
package.json Update bridge-ui (#39) 2019-05-15 14:23:29 +02:00
README.md Update bridge-ui (#39) 2019-05-15 14:23:29 +02:00
yarn.lock Update bridge-ui (#39) 2019-05-15 14:23:29 +02:00

CircleCI Gitter License: LGPL v3.0

Tokenbridge

Welcome to the POA Token Bridge monorepository!

Please note that this repository as a work in progress.

Overview

The POA Token Bridge 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 Token Bridge 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.
UI DApp interface to transfer tokens and coins between chains.
Monitor Tool for checking balances and unprocessed events in bridged networks.
Deployment Ansible playbooks for deploying cross-chain bridges.

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

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 three operational modes:

  • Native-to-ERC20 Coins on a Home network can be converted to ERC20-compatible tokens on a Foreign network. Coins are locked on the Home side and the corresponding amount of ERC20 tokens are minted on the Foreign side. When the operation is reversed, tokens are burnt on the Foreign side and unlocked in the Home network. More Information: POA-to-POA20 Bridge
  • ERC20-to-ERC20 ERC20-compatible tokens on the Foreign network are locked and minted as ERC20-compatible tokens (ERC677 tokens) on the Home network. When transferred from Home to Foreign, they are burnt on the Home side and unlocked in the Foreign network. This can be considered a form of atomic swap when a user swaps the token "X" in network "A" to the token "Y" in network "B". More Information: ERC20-to-ERC20
  • 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

Building, running, linting & tests

To install dependencies:

yarn install

To build all projects:

yarn run build

Running linter for all JS projects:

yarn lint

Running linter for all Ansible playbooks:

yarn ansible-lint

Running tests for all projects:

yarn test

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

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