Method options

Execute Options

const result = await sdk.executeQuote(quote, {
  signer,                    // Required: ChainSigner adapter
  recipient: '0x...',        // Optional: override recipient (default: signer address)
  autoRecover: true,         // Auto-handle recovery on failure
  onStatusChange: (s) => {}, // Status callback during polling

  // Gas overrides (optional)
  gasLimit: 500000n,
  gasPrice: 1000000000n,           // Legacy transactions
  maxFeePerGas: 2000000000n,       // EIP-1559
  maxPriorityFeePerGas: 100000000n,
  nonce: 42,
});

Tracking Options

// Track CrossCurve transaction by requestId
const status = await sdk.trackTransaction(result.requestId);

// Track external bridge by tx hash
const status = await sdk.trackTransaction(txHash, {
  provider: 'rubic',           // 'rubic' | 'bungee'
  bridgeId: result.bridgeId,   // For Rubic routes
  chainId: 42161,              // Source chain
});

Recovery

CrossCurve routes support three recovery types when transactions fail:

Type
Trigger
Action

Emergency

Destination chain emergency state

Withdraw funds on source chain

Retry

Delivery failed, retry available

Re-attempt destination delivery

Inconsistency

Price deviation detected

Re-route with new quote

With autoRecover: true, recovery is handled automatically. For manual recovery:

Error Handling

Last updated