DAppChain comprises three fundamental elements for cross-chain interplay: MainChain gateway contract, Oracle service, and Facet-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 could be thought-about to be legitimate.

Cross-chain interplay could be categorized as three fundamental sort: TRC20/TRC721 contract mapping, asset deposit, and asset withdraw.

Asset proprietor have to set off TRC20/TRC721 mapping perform to approve entry for the asset emigrate to side-chain. The asset could be mapping to side-chain routinely, 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 perform in gateway contract for owned TRC20/TRC721 contract. Gateway contract will verified the possession. If verified, an deploy occasion shall be occasion.
  3. Oracle catches the deploy occasion.
  4. Oracle set off side-chain gateway contract to create TRON normal side-chain TRC20/TRC721 contract, and do a cross-chain mapping.

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

Steps:

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

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

Steps:

  1. When migrate TRC20/TRC721 token, consumer have to set off an approve perform 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. Consumer calls the withdraw perform 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%