Step 8: Getting execution status

Once client has the quote ID, it can track the status of the cross-chain transaction.

The status can take one of the following values:

'PENDING' | // not yet begun processing but has been submitted
'IN_PROGRESS' | // processing the execution steps of the operation
'COMPLETED' | // all steps completed with success
'REFUNDED' | // target chain tx fails, user funds are returned
'FAILED'; // all steps failed

Here is an example of getting transaction status:

fetch(`https://be.onebalance.io/api/status/get-execution-status?quoteId=${quoteId}`, {
  headers: {
    "x-api-key": '<YOUR ONEBALANCE API KEY HERE>',
  },
})

In the example above - the quoteId variable corresponds to the id field on the quote object that was executed via the /execute-quote endpoint in the previous section.

For more details, see the implementation for getting the status here.

Conclusion

Congratulations, completing these steps you achieved the chain abstraction for the use case of your application.

Ready to set your dApp chain free? Contact us today using this link.

Last updated