A Tempo transaction can carry several calls that execute atomically, so either every call takes effect or none does. This lets you pay several recipients, or approve and spend a token, in one transaction with one fee. A plain viem sendTransaction takes a single to, data, and value, so batches go through sendTempoTransaction from @dynamic-labs-sdk/tempo/waas.
Send a batch
Pass the calls in calls. Each call takes an optional to, data, and value, and the SDK validates the address, the hex data, and the bigint value before it signs anything.
sendTempoTransaction resolves with the hash once the signed transaction is submitted, so the example waits for the receipt on the client from getTempoPublicClient to confirm inclusion.
A batch needs at least one call. An empty calls array, or a call with a malformed address, data, or value, throws TempoTransactionValidationError before the wallet signs.
How gas is estimated
The SDK estimates each call on its own, adds the estimates together, adds a 30% buffer, and never goes below 300,000 gas. If you pass gas, the SDK uses the larger of your value and its own estimate, so gas can raise the limit but cannot lower it.
Because every call is estimated separately, a call that only succeeds after an earlier call in the same batch cannot be estimated on its own. An example is a call that spends an allowance an earlier call grants. For a batch of several calls, or when you pass gas, the SDK counts 300,000 gas for a call whose estimate fails. A single call sent without gas throws the estimation error instead, so the failure is reported rather than signed over.
If a batch depends on state that earlier calls create, pass a gas value that covers the whole batch. The SDK still raises it to its own estimate when that is higher.
Last modified on October 15, 2026