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.
txs.approveBody
, approve to Owlto smart contract.(will be null if the allowance is enough)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
The hash you request is not found, maybe the user failed to send the txs.transferBody or there is a delay.
The hash you request is found, but the bridge process is still ongoing, you should try again later.
The hash you request is found, but the bridge process failed due to reasons like value out of range.
Last updated