Q&A

How do I know which tokens can be bridged between selected chains?

You can simply called the bridge.getAllPairInfos() function.(get_all_pair_infos HTTP API)

It will return a list of pairs for each supported tokens can be bridged.

What does build tx do?

The bridge.getBuildTx() function(get_build_tx HTTP API) will return all the transactions needed when bridging.

For example, if you bridge USDC from Base to Scroll, it will return two transactions in the txs field.

  1. txs.approveBody, approve to Owlto smart contract.(will be null if the allowance is enough)

  2. txs.transferBody, transfer the USDC token to Owlto smart contract on Base chain.

The transactions are in ETH JSON format and are ready to be sent by library like "Ethers".

Why getReceipt () returns error?

The bridge.getReceipt() function(get_receipt HTTP API) will return the status of the bridge process.

When it return non zero code, there are typically three cases

  1. The hash you request is not found, maybe the user failed to send the txs.transferBody or there is a delay.

  2. The hash you request is found, but the bridge process is still ongoing, you should try again later.

  3. The hash you request is found, but the bridge process failed due to reasons like value out of range.

Last updated