Manual tokens transfer (No UI)

How to transfer tokens manually through the BSC-xDai OmniBridge

The OmniBridge is a decentralized application. Tokens can be transferred through the extension without using a dedicated UI.

Manual token transfers through the OmniBridge extension require that each step is performed properly. Funds may be lost if not performed properly. Proceed at your own risk.

BSC -> xDai: Transfer from the Binance Smart Chain to the xDai Chain.

The instructions below uses MyEtherWallet to interaction with the token contract. This is due to currently limitations of BscScan where some token contracts cannot be verified and interaction is not possible. One could find more convenient ways to interact with the token contracts.

1. Login to MyEtherWallet. If MetaMask is used to login, the Binance Smart Chain must be added to MetaMask first.

2. Choose "Interact with Contract" in the main menu

3. Enter:

  • Token Contract Address (Wrapped BNB is used in the example) in the Binance Smart Chain

  • Copy and paste the following ABI JSON to the form

  • Press "Continue".

[
  {
    "constant":false,
    "inputs":[
      {
        "name":"spender",
        "type":"address"
      },
      {
        "name":"value",
        "type":"uint256"
      }
    ],
    "name":"approve",
    "outputs":[
      {
        "name":"",
        "type":"bool"
      }
    ],
    "payable":false,
    "stateMutability":"nonpayable",
    "type":"function"
  }
]

4. Choose the approve method from the dropdown list and fill in the following:

5. Go to the BscScan site to access the OmniBridge mediator on the Binance Smart Chain and go to "Write as Proxy" tab: https://bscscan.com/address/0xF0b456250DC9990662a6F25808cC74A6d1131Ea9#writeProxyContract.

6. Connect your Web3 wallet to the BscScan app, this will allow you to interact with the contract.

7. Scroll down to the relayTokens method and fill the token contract address and value which is going to be sent through the bridge (this must be the same or less than the value specified in the approve method). Press the "Write" button and confirm the transaction in your web3 wallet. Wait for the transaction inclusion into the blockchain.

8. Press to the "View your transaction" button to get the hash of the transaction. Reference this hash in the AMB Live Monitoring (ALM) app to find the bridging process status.

9. Press the link in the "Executed by" section of ALM to refer to the transaction in BlockScout that causes token transfer finalization (3 minutes ago in the example below).

In the "Tokens Transfers" tab in BlockScout you can see the amount of tokens transferred through the bridge and token receiver.

The origin of the token will determine the operation mentioned. Token Origin:

  • Binance Smart Chain: Token Minting

  • xDai Chain: Token Transfer

10. Press the token symbol to get the address of the bridged token and add to your wallet if necessary.

xDai -> BSC: Transfer from the xDai Chain to the Binance Smart Chain

The token transfer process from the xDai chain to the Binance Smart Chain requires a user to send transactions on both chains. That is why the xDai native tokens and BNB native tokens are required to pay gas fees for these transactions.

1. Choose the xDai chain in MetaMask. If it is not configured in MetaMask follow these instructions to set it up.

2. Use the BlockScout site to find the token you want to bridge.

3. Go to the "Write Proxy" tab on the token contract page. Connect your web3 wallet to BlockScout.

4. Scroll down to the "approve" method and fill data in the form where "spender" is the OmniBridge mediator contract 0x59447362798334d3485c64D1e4870Fde2DDC0d75 and "value" is the amount of tokens to transfer through the bridge. The value is specified in Wei and must be within the limits on the bridge operations. Press the "Write" button and confirm the transaction in your wallet. Wait until the transaction is included in a block.

5. Switch to the OmniBridge mediator in BlockScout and go to the "Write as Proxy" tab: https://blockscout.com/xdai/mainnet/address/0x59447362798334d3485c64D1e4870Fde2DDC0d75/write-proxy

6. Scroll to the relayTokens method and fill the token contract address and value to be sent through the bridge (it must be the same or lesser than the value specified in the approve method). Press the "Write" button, confirm the transaction in your wallet. Wait for the transaction inclusion into the blockchain.

7. When the Success modal window appears press the transaction link to get the tx hash. Reference this hash on the AMB Live Monitoring (ALM) app to find the bridging process status.

8. Switch the chain to the Binance Smart Chain in MetaMask and press the "Execute" button to finalize the token transfer. This action collects the Arbitrary Message Bridge oracles confirmations and delivers them to BSC. BNB native tokens are required to pay for gas fees to finalize this transfer.

The transfer finalization can be performed without ALM by collecting and delivering the oracles' confirmations manually.

MetaMask will show a high gas estimate for this transaction. In most cases the final gas consumption will be significantly lower. Please refer to the OmniBridge UI FAQ to learn more. Although the FAQ is for the OmniBridge between Ethereum Mainnet and the xDai chain the reason why MetaMask provides higher gas usage estimate is the same.

As soon as the submitted transaction is included in the block the "Executed by" section of ALM will contain the link to the token transfer transaction.

9. Press the link in the "Executed by" section to see transfer details.

10. Press the token name to get the address of the bridged token and add it to your BSC wallet.

Last updated