After getting a quote and handling any required approvals, you need to execute the actual transfer transaction. This page covers chain verification, gas handling, signing, and broadcasting.
The Transaction Request
The quote response includes a ready-to-use transactionRequest object:
Pre-Execution Checklist
Before sending the transaction:
Step 1: Verify Chain
Ensure the wallet is on the correct chain before sending:
JavaScript (viem)
Python (web3.py)
Step 2: Estimate Gas (Optional)
The quote includes a gasLimit, but you can re-estimate for accuracy:
The quote’s gasLimit is usually accurate. Only re-estimate if you need precise gas costs or are optimizing for gas efficiency.
Step 3: Build the Transaction
Convert the quote’s transaction request into a sendable transaction:
JavaScript (viem)
Gas Price Options
You can use the quote’s suggested gas price or fetch current prices:
Step 4: Sign and Send
JavaScript (viem)
Python (web3.py)
Step 5: Handle the Result
After execution, save the transaction hash for status polling:
Complete Execution Flow
Error Handling
Common Execution Errors
Retry Logic
Gas Optimization Tips
- Use EIP-1559 where supported - More predictable gas costs
- Don’t over-estimate gas - Quote’s gasLimit is usually accurate
- Check gas prices - High gas times may make transfers expensive
- Consider L2s - Arbitrum, Optimism, Base have much lower gas costs
Related Pages