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.
- See docs folder
-
BSC Testnet 0xFB551A40571510b0693950521385611cBf202328
-
Ethereum Rinkeby 0x9Ec6733aAd19cCfBecc821635e745F79f35470dF
-
RSK Testnet 0x65E895a0688E243f5e5FC681C26Ae6A7616e2921
npm install
Execute on terminal 1:
ganache-cli -i 5777 -e 10000
Execute on terminal 2:
truffle test
Check .env.example
- Deploy Bridge.sol
- tokenAddress: BRZ token address
- Constructor setFeePercentageBridge: 10
- Constructor: setGasAcceptTransfer: 100000
- AddBlockchains
- BinanceSmartChainTestnet
- EthereumRinkeby
- RSKTestnet
- SolanaDevnet
- Add monitor address
- Add admin address
- setQuoteETH_BRZ for Ethereum in other blockchains
The files located in migrations
folder do all steps described before.
BRZ Token
0x420412E765BFa6d85aaaC94b4f7b708C89be2e2B
truffle migrate --network rinkeby
Verify source code on Etherscan
truffle run verify Bridge@address --network rinkeby
BRZ Token
0x5f974f5e28a8ed3d2576c99333ca9e730edf04de
truffle migrate --network bscTestnet
Verify source code on BSCscan
truffle run verify Bridge@address --network bscTestnet
BRZ Token 0xe355c280131dfaf18bf1c3648aee3c396db6b5fd
truffle migrate --network rskTestnet