Prerequisites
- The TypeScript project, which provides
src/evm.ts. - A Base wallet holding USDC and ETH for gas.
Script
Save assrc/bridge-tokens.ts and run with npx tsx src/bridge-tokens.ts.
src/bridge-tokens.ts
Notes
- Wallets that support EIP-5792 batching can sign the
feeandmainsteps as one bundle;build.feeBatchnames the steps. Sequential signing, as above, is always correct. expectedOutAtomicon the build equals theamountOutAtomicyou were quoted.- A
quote_driftedorquote_expirederror on build means the price moved. Quote again.