Batched Transactions on EVM: Execute Multiple Operations
What are batched transactions?
What are batched transactions?
Batched transactions combine multiple blockchain operations into a single transaction. Instead of submitting separate transactions (each with its own gas cost and confirmation), you execute everything atomically in one go.Batching is enabled by smart contract wallets (account abstraction).
Why should I batch transactions?
Why should I batch transactions?
Gas savings example:
How do I batch transactions with Biconomy?
How do I batch transactions with Biconomy?
Using AbstractJS SDK with MEE:
MEE (Modular Execution Environment) provides all the batching capabilities of ERC-4337 bundlers and paymasters, plus cross-chain orchestration. Use MEE instead of configuring bundlers and paymasters separately.
What operations can I batch together?
What operations can I batch together?
You can batch any combination of EVM operations:Common batching patterns:
Example: Multi-token transfer
How does atomic execution work?
How does atomic execution work?
Atomic execution means all operations succeed or all fail. There’s no partial state.Why this matters:Biconomy ensures atomicity:
Can I batch operations that depend on each other?
Can I batch operations that depend on each other?
Yes! Use runtime values to reference outputs from earlier operations:The
runtime.outputOf(0) is resolved at execution time with the actual value from the first operation.What's the maximum batch size?
What's the maximum batch size?
Batch size is limited by:
- Block gas limit: Total gas must fit in a block
- Bundler limits: Typically 5-10M gas per UserOperation
- Practical limits: More operations = higher failure risk
Best practices:
How do I estimate gas for batched transactions?
How do I estimate gas for batched transactions?
How do I handle failures in batches?
How do I handle failures in batches?
Default behavior: Atomic revertFor non-critical operations, use conditional execution:Pre-validate operations:
Can I batch across multiple chains?
Can I batch across multiple chains?
Yes! Cross-chain batching is possible with Biconomy’s orchestration:See Multi-Chain Execution for details.
What are real-world batching examples?
What are real-world batching examples?
Example 1: DeFi Yield OptimizationExample 2: NFT Marketplace ListingExample 3: Payroll Distribution
Learn more
Multi-Chain Execution
Batch across multiple chains
Onchain Orchestration
Coordinate complex workflows