ZeroDev v0.9.0 Migration Guide
Version 0.9.0 introduces a unified UserOperation API that replaces the previous transaction-based APIs. The new API supports both single and batch transactions with a consistent interface.
Breaking Changes
The following functions have been removed:
estimateTransactionGas → Use estimateUserOperationGas
canSponsorTransaction → Use canSponsorUserOperation
prepareUserOperationWithKernelClient → Use sendUserOperation
New Features
- Batch Transaction Support: Execute multiple operations atomically in a single UserOperation
- Unified API: Consistent interface for single and batch transactions
- Better Error Handling: More granular error types and messages
Migration Examples
Before (v0.8.x):
After (v0.9.0):
Key Changes:
- Renamed from
canSponsorTransaction to canSponsorUserOperation
transaction parameter → calls (array)
- Single transaction now wrapped in an array
Estimating Gas
Before (v0.8.x):
After (v0.9.0):
Key Changes:
- Renamed from
estimateTransactionGas to estimateUserOperationGas
transaction parameter → calls (array)
- Single transaction now wrapped in an array
Sending Transactions
Before (v0.8.x):
After (v0.9.0):
Key Changes:
- New unified
sendUserOperation function
- Simplifies the send flow: no need for manual kernel client preparation
- Returns complete receipt with
userOpHash and success status
Batch Transaction Support
The new API’s main advantage is native batch transaction support:
Benefits:
- Atomicity: All operations succeed or all fail together
- Cost Efficiency: Single validation per batch reduces gas fees
- Better UX: Users approve once for multiple operations
- Composability: Enable complex multi-step workflows (e.g., approve + swap)
Migration Checklist
Last modified on November 2, 2026