Mirror BEP2 and BEP20 Token

Prerequisite

This BEP20 token is not bond to any BEP2 token

Motivation

Anyone can call the mirror method to issue a BEP2 token automatically and bind them.

What happens under the hood

  • Verify there is no pending mirror request
  • Check the total supply and token symbol is valid
  • Send a cross-chain package to issue a BEP2 token on Binance Chain
  • The newly created BEP2 token is locked until token holder send cross-chain transfer

After binding, all liquid circulation is on BSC.

Fee Table

Fee Name Pay in BNB
mirrorFee it's 10 BNB on mainnet now
relayFee it's 0.002BNB on mainnet now

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

To query mirrorFee from system contract;

  • Call Tokenmanager Contract with the latest ABI

  • Query mirrorFee 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 mirror function and fill-in with your BEP20 address

The value here should be no less than mirrorFee+ 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!

img

Query BEP2 Token Symbol

You can query BEP2 Token symbol from tokenhub contract.

Use the latest ABI

Select getBoundBep2Symbol function

Then, you can see the token symbol in the result.

img