Skip to content

Sync BEP2 and FRC20 Token Supply

Prerequisite

This FRC20 token is mirrored to a BEP2 token.

Motivation

For a FRC20 token which has been mirrored to BC, anyone can call the sync method to balance the total supply on BC and NC. Thus, the total supply among two Blockchains will remain the same.

What happens under the hood

  • Verify there is already mirrored
  • Check the total supply and token symbol is valid
  • Send a cross-chain package to modify a BEP2 token total supply on 5DAX Chain

After syncing, the total supply on BC and FC are the same.

Fee Table

Fee Name Pay in 5T
syncFee it's 0.002NT on mainnet now
relayFee it's 0.002NT on mainnet now

Both syncFee and relayFee can be changed by on-chain governance

To query syncFee from system contract;

  • Call Tokenmanager Contract with the latest ABI

  • Query syncFee function

Fee= result/1e18

To query relayFee from system contract;

  • Call TokenHub Contract with the latest ABI

  • Query getMiniRelayFee function

Fee= result/1e18

Mirror With MyEtherWallet

  • Call Tokenmanager Contract

Use the latest ABI

img

  • Select sync function and fill-in with your FRC20 address

The value here should be no less than syncFee+ relayFee.

Time stamp should be greater than unix_timestamp(now()). The difference should be between 120 and 86400. It's recommended to use unix_timestamp(now())+1000

img

All set!