4.1 Overview

DAppChain incorporates three primary parts for cross-chain interplay: MainChain gateway contract, Oracle service, and Aspect-chain gateway contract.

Oracle listens to the messages from the main-chain gateway contract and the side-chain gateway contract, and realizes the interactive communication between the main-chains and side-chains. When greater than 2/three of the oracle nodes confirmed an cross-chain transaction, the transaction may be thought of to be legitimate.

Cross-chain interplay may be labeled as three primary sort: TRC20/TRC721 contract mapping, asset deposit, and asset withdraw.

4.2 TRC20/TRC721 contract mapping

Asset proprietor have to set off TRC20/TRC721 mapping operate to approve entry for the asset emigrate to side-chain. The asset may be mapping to side-chain robotically, and nobody have to deploy by themselves.

Steps:

  1. Deployer ought to personal(deployed) an TRC20/TRC721 contract on main-chain.
  2. Asset Deployer ought to set off mapping operate in gateway contract for owned TRC20/TRC721 contract. Gateway contract will verified the possession. If verified, an deploy occasion can be occasion.
  3. Oracle catches the deploy occasion.
  4. Oracle set off side-chain gateway contract to create TRON customary side-chain TRC20/TRC721 contract, and do a cross-chain mapping.

4.three Deposit

Person makes use of deposit operate in gateway contract for asset migration to side-chain goal.

Steps:

  1. When migrate TRC20/TRC721 token, consumer have to set off an approve operate in TRC20/TRC721 contract on main-chain.
  2. Person triggers deposit operate in MainChain gateway contract.
  3. Oracle catches deposit occasion.
  4. Oracle name operate in SideChain gateway for asset migration.
  5. For TRC20/TRC7212 token, side-chain will mint certain quantity of token within the mapped contract, whereas TRX/TRC10 token can be added instantly on consumer account.

4.Four Withdraw

Person makes use of withdraw operate in gateway contract for asset migration to main-chain goal.

Steps:

  1. When migrate TRC20/TRC721 token, consumer have to set off an approve operate in TRC20/TRC721 contract on side-chain. Gateway contract would name TRC20/TRC721 contract instantly on account of our customization.
  2. Oracle catches the withdraw occasion.
  3. Person calls the withdraw operate on main-chain.
  4. MainChain gateway contract calls TRC20/TRC721 contract for withdraw operation, whereas TRX/TRC10 would have the ability to ship on to consumer account.

Supply hyperlink

bitcoinBitcoin
$
10,678.32
$
10,678.32
1.52%
ethereumEthereum
$
174.84
$
174.84
0.6%
rippleXRP
$
0.255492
$
0.255492
0.73%
bitcoin-cashBitcoin Cash
$
294.97
$
294.97
1.01%
litecoinLitecoin
$
66.41
$
66.41
0.35%
tetherTether
$
1.00
$
1.00
0.13%
binancecoinBinance Coin
$
22.40
$
22.40
3.89%
eosEOS
$
3.28
$
3.28
0.36%
bitcoin-cash-svBitcoin SV
$
131.79
$
131.79
0.58%
cardanoCardano
$
0.044229
$
0.044229
1.65%