Engine v2.1.25: Transaction Batching & Atomic Operations
We're excited to introduce powerful new batching capabilities in Engine v2.1.25, enabling you to execute multiple operations atomically and efficiently read from multiple contracts in a single call.
New Features
1. Atomic Transaction Batching
New Endpoint: /backend-wallet/{chainId}/send-transaction-batch-atomic
Send multiple transactions that will be executed together in a single atomic operation. Perfect for operations that need to happen in a specific order, like token approvals followed by transfers. Check out the API Reference for more details.
Key Benefits:
- Guaranteed order of execution
- All transactions succeed or fail together
- Single queue ID for tracking the entire batch
- Compatible with all smart account setups:
- Smart backend wallets (no additional headers needed)
- Regular backend wallets using
x-smart-account-address
header
Usage Example:
Difference from Previous Write Endpoint:
- Previous: Each transaction got its own queue ID, executed independently
- New: Single queue ID for entire batch, guaranteed atomic execution
2. Contract Read Batching
New Endpoint: /contract/{chainId}/read-batch
Execute multiple read operations across different contracts in a single call, with guaranteed consistency of data from the same block. Check out the API Reference for more details.
Key Benefits:
- All reads executed in the same block
- Reduced RPC calls using multicall3
- Perfect for getting related data across contracts
- Consistent state snapshot across all reads
Usage Example:
Transaction Status Updates
The transaction status object now includes a batchOperations
field that provides details about all operations in an atomic batch. This field will be null for non-batch transactions:
thirdweb Engine is an open-source server for your app to read, write, and deploy contracts at production scale. Self-host for free or get a cloud-hosted Engine for $99/month.