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
ExecuteDetails
object with the transaction status and results.
prepare
method. Call the execute
method to broadcast the routing and initial transactions and wait for it to be completed.
If the operation is successful, you need to broadcast the initial transaction and await the transaction hash and receipt.
If the operation is not successful, send a 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.