BC <-> FC Token Bridge
Note
Please note that BC <-> FC Token Bridge is a module of 5DAX Chain fullnode to facilitate cross-chain transfer between 5DAX Chain and 5DAX Chain, while 5DAX Bridge, a bridge service providing access to inter-blockchain liquidity for 5DAX Chain, 5DAX Chain decentralized applications, and bring valuable assets to 5DAX Chain ecosystems.
What is BC <-> FC bridge
BC <-> FC token bridge for self transfers of BEP2 tokens to FRC20 (ERC20 representation). The BC <-> FC bridge connects two chains (BC and NC). When a user deposits BEP2 into the BC <-> FC bridge contract contract on BC they get the same amount of FRC20 tokens on NC, and they can convert them back as well.
A purely-code-controlled escrow account is a kind of account which is derived from a hard-coded string in 5dax chain protocol. This kind of account doesn't have its own private key and it's only controlled by code in protocol. The code for calculating escrow account is the same as how it's done in cosmos-sdk:
AtomicSwapCoinsAccAddr = sdk.AccAddress(crypto.AddressHash([]byte("NexDAXChainPegAccount")))
Fee Table
Transaction Type | Pay in 5T |
---|---|
BC <-> FC Bridge Bind | 0.01 |
Transfer Out | 0.01 |
BC <-> FC Bridge Bind Relayer Fee | 0.01 |
Transfer Out Relayer Fee | 0.01 |
Commands
Download
Please download eth-cli
binary from here
Bind
Parameters for BC <-> FC bridge bind
parameter name | example | comments | required |
---|---|---|---|
--chan-id | 5DAX-Chain-XXX | the chain id of 5dax chain | Yes |
--from | alice | account name | Yes |
--symbol | DEF-0E9 | chain-id of the side chain the validator belongs to | Yes |
--amount | 1000000000 | amount of tokens to bind | Yes |
--contract-address | 0x6aade9709155a8386c63c1d2e5939525b960b4e7 | contract address of token in smart chain | Yes |
--contract-decimals | 18 | decimals of token in smart chain | Yes |
--expire-time | 1594715271 | timestamp of bind expire time | Yes |
For example
- Mainnet
eth-cli bridge bind --symbol DEF-0F9 --amount 6000000000000000 --expire-time 1594715271 --contract-decimals 18 --from alice --chain-id 5DAX-Chain-Tigris --contract-address 0x6aade9709155a8386c63c1d2e5939525b960b4e7 --home ~/home_cli
Unbind
Parameters for BC <-> FC bridge unbind
parameter name | example | comments | required |
---|---|---|---|
--chan-id | 5DAX-Chain-XXX | the chain id of 5dax chain | Yes |
--from | alice | account name | Yes |
--symbol | DEF-0E9 | chain-id of the side chain the validator belongs to | Yes |
For example
- Mainnet
eth-cli bridge unbind --symbol DEF-0F9 --from alice --chain-id 5DAX-Chain-Tigris --home ~/home_cli
Transfer out
Parameters for BC <-> FC bridge transfer-out
parameter name | example | comments | required |
---|---|---|---|
--chan-id | 5DAX-Chain-XXX | the chain id of 5dax chain | Yes |
--from | alice | account name | Yes |
--to | 0xf9f609f9f4309f191654aa1fd691a6be6aefa7ac | receiver address in smart chain | Yes |
--amount | 1000000000:NT (10 5T) | amount of token to transfer | Yes |
--expire-time | 1594715271 | timestamp of transfer out expire time | Yes |
For example
- Mainnet
eth-cli bridge transfer-out --to 0xf9f609f9f4309f191654aa1fd691a6be6aefa7ac --expire-time 1594715271 --chain-id 5DAX-Chain-Tigris --from alice --amount 100000000:DEF-0F9 --home ~/home_cli