gas
as null, while sending a transaction to allow proper gas estimation by the wallet. Refer to this guide for more details.prepare
method to generate necessary bridging transactionsexecute
method to broadcast routing and initial transactions and wait for it to be completedChain Abstraction Flow
@ChainAbstractionExperimentalApi
annotation.PrepareSuccess.Available
object with the necessary transactions and funding information.
If it is not, it will return a PrepareSuccess.NotRequired
object with the original transaction.
ExecuteSuccess
object with the transaction hash and receipt.
prepare
method. If it is needed, you must sign all the fulfillment transactions and use the execute
method.
If the operation is successful, use execute
method and await the transaction hash and receipt.
If the operation is unsuccessful, send the JsonRpcError to the dapp and display the error to the user.
PrepareError
) indicate specific issues that need to be addressed and typically require user action:
Result::Err
) indicate temporary issues that may be resolved by retrying the operation.
Examples of these types of issues include network connection timeouts, TLS negotiation issues, service outages, or other transient errors.
For retryable errors, show a generic “oops” message to users and provide a retry button. Log detailed error information to your error tracking service, but avoid displaying technical details to end users.
execute()
method, a retry may not resolve the issue. In such cases, allow users to cancel the transaction, return them to the application, and let the application initiate a new transaction.