Skip to content

Files

This branch is 536 commits ahead of, 1288 commits behind rsksmart/tokenbridge:master.

bridge

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 4, 2020
Dec 4, 2020
Dec 4, 2020
Dec 4, 2020
Nov 6, 2020
May 7, 2020
Nov 29, 2019
Nov 29, 2019
Jun 5, 2020
Nov 14, 2019
Dec 4, 2020
May 12, 2021
Mar 9, 2021
Jun 19, 2020
Feb 7, 2020
Dec 4, 2020

Token Bridge Contracts

Install dependencies

Don't use Node 14 as it has issues with truffle, use node 8, 10 or 12. Install node https://nodejs.org/es/ Then install dependencies

npm install

Install and run ganache

https://www.trufflesuite.com/ganache

Running test

npm run migrate
npm test
npm run lint
npm run coverage

Configure networks

Edit the truffle configuration file

module.exports = {
  // See <http://truffleframework.com/docs/advanced/configuration>
  // to customize your Truffle configuration!met
  networks: {
    development: {
      host: "127.0.0.1",
      port: 8545,
      network_id: "*" // Match any network id
    },
    rskregtest: {
      host: "127.0.0.1",
      port: 4444,
      network_id: "*" // Match any network id
    },
  }
};

Deploy contracts

Launch the local network

ganache-cli --verbose

Deploy using truffle to the desire network

truffle migrate --network <network>

Examples

truffle migrate --network development
truffle migrate --network rskregtest

This will also generate the json files for that network with the addresses of the deployed contracts that will be called by the federator.