Bridged token PoC
This repository contains a PoC implementation of a bridged ERC20 token. The token is created on a
main network and can be converted to a native (e.g. ETH, AMB) token in a
The detailed documenation about this PoC and it's architecture is provided in Sidechannel+PoC+documentation.pdf.
Running the PoC
- Install dependencies using
- Start two blockchain networks (
npm run network
- Now, start the Dashboard using
npm run dashboard. By default the dashboard starts at localhost:8080
The Dashboard is a basic web application that allows you to create connections between networks and to deploy ERC20 tokens. Potentially sidechannel deployment can be handled by smart contracts in AMB-NET (see "Appendix A" in Sidechannel+PoC+documentation.pdf). The PoC simply uses the two launched networks.
- From the dashboard you can create the bridge, which will connect the two networks.
- Once the bridge is deployed, addresses of the bridge smart contracts will be shown.
- Open Oracle/Oracle.conf and enter the bridge smart contract addresses into the configuration file (the
Note that addresses of the two smart contracts may end up the same since the contracts are on different networks.
- Now, open a new terminal and launch the oracle using
npm run oracle. At this point the two networks are connected by a bridge through the oracle.
- Using the dashboard, You can create a bridged ERC20 token to test out the connection.
Once the token is deployed, addresses of token smart contracts will be shown.
Open Wallet/Wallet.conf and enter the bridge smart contract addresses into the configuration file (the
tokensection). This step is similar to step 6.
Now, open a new (third) terminal and launch the wallet web app using
npm run wallet. Note: it is necessary to open many terminals if you want to see log output from each process. Realistically, these components are meant to be deployed on separate servers. If you don't want to see log output, you can launch processes in the background e.g.
npm run wallet &
From the wallet you can transfer tokens between accounts in your sidechain and convert these tokens into tokens from the mainnet and back. (see Sidechannel+PoC+documentation.pdf for detailed usage scenarios)