TransferoSwiss / brz-token-bridge

BRZ token bridge to cross the BRZ token between Ethereum, Binance Smart Chain and RSK

Home Page:https://testnet.bridge.brztoken.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

brz-token-bridge

The token bridge provides the logic for transfer BRZ token between blockchains.

Tech process:

  • An account call the function receiveTokens in blockchain A sending tokens.
  • An external monitor follow the event CrossRequest.
  • Wait N confirmations of a receiveTokens's transaction.
  • The external monitor calls the function acceptTransfer to send tokens to the destination's account.

Bridge.sol documentation

  • See docs folder

Deployed contracts

Using locally

npm install

Running tests

Execute on terminal 1:

ganache-cli -i 5777 -e 10000

Execute on terminal 2:

truffle test

.ENV

Check .env.example

Deploy process

  1. Deploy Bridge.sol
  2. tokenAddress: BRZ token address
  3. Constructor setFeePercentageBridge: 10
  4. Constructor: setGasAcceptTransfer: 100000
  5. AddBlockchains
    • BinanceSmartChainTestnet
    • EthereumRinkeby
    • RSKTestnet
    • SolanaDevnet
  6. Add monitor address
  7. Add admin address
  8. setQuoteETH_BRZ for Ethereum in other blockchains

The files located in migrations folder do all steps described before.

Rinkeby

BRZ Token

0x420412E765BFa6d85aaaC94b4f7b708C89be2e2B

truffle migrate --network rinkeby

Verify source code on Etherscan

truffle run verify Bridge@address --network rinkeby

BSC Testnet

BRZ Token

0x5f974f5e28a8ed3d2576c99333ca9e730edf04de

truffle migrate --network bscTestnet

Verify source code on BSCscan

truffle run verify Bridge@address --network bscTestnet

RSK Testnet

BRZ Token 0xe355c280131dfaf18bf1c3648aee3c396db6b5fd

truffle migrate --network rskTestnet

About

BRZ token bridge to cross the BRZ token between Ethereum, Binance Smart Chain and RSK

https://testnet.bridge.brztoken.io/

License:MIT License


Languages

Language:Solidity 64.1%Language:JavaScript 35.9%Language:Shell 0.0%