4️⃣Check Status
Checking Transaction Status
After signing the transaction by the user and receiving transaction hash, you could periodically call Rango check-status API to track the transaction status. In Rango, each swap step could have 3 different states: running
, failed
and success
. You only need to keep checking the status until you find out whether the transaction failed or succeeded.
Here's a sample request for the check-status API, along with the corresponding response it receives:
And in response you get:
Output Token
When your transaction status is marked as successful, it indicates that the bridge or swap process has been successfully completed, and the user has received the intended DESIRED_OUTPUT
token as part of the output.
In the context of a cross-chain swap, the process combines up to three transactions ([dex]+bridge+[dex])
into a single transaction. Consequently, several scenarios could arise if a user ends up receiving a token that differs from their initial expectation. These cases encompass:
REVERTED_TO_INPUT
If user transaction reverted on first dex step, transaction will be reverted on the blockchain and user will receive back the input token.MIDDLE_ASSET_IN_SRC
If the dex step succeeded but the bridge step failed because of slippage or lack of liquidity or ...MIDDLE_ASSET_IN_DEST
If the [dex]+bridge step succeeded but, the last dex step failed because of slippage.
Bridge Data
Currently this section is only filled for EVM-to-EVM
routes which contains both data of inbound and outbound transactions/tokens.
Explorer URL
This field contains the list of the URLs for this route which contains swap transaction for an on-chain route and inbound/outbound transaction for a cross-chain route.
Diagnosis URL
If a transaction becomes stuck within a bridge, requiring user intervention to initiate a refund through the bridge's user interface, we offer a diagnosis URL. This URL directs the user to a guide detailing the steps they need to take in order to successfully refund their tokens.
Last updated