Send Parallel Transactions
Tempo enables concurrent transaction execution through its expiring nonce system. Unlike traditional sequential nonces that require transactions to be processed one at a time, expiring nonces allow multiple transactions to be submitted simultaneously without nonce conflicts. Each transaction uses an independent nonce that automatically expires after a set time window, enabling true parallel execution.
Demo
By the end of this guide you will understand how to send parallel payments using expiring nonces under-the-hood.
Send Parallel Payments
demoSteps
Set up Wagmi & integrate accounts
Ensure that you have set up your project with Wagmi and integrated accounts by following either of the guides:
Send concurrent transactions with nonce keys
To send multiple transactions in parallel, simply batch them together. Expiring nonces are attached to each transaction automatically.
import { } from 'wagmi/tempo'
import { } from 'viem'
const = '0x20c0000000000000000000000000000000000001'
const { : } = ..()
// Send both transfers in parallel.
const [, ] = await .([
.mutate({
: ('100', 6),
: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8',
: ,
}),
.mutate({
: ('50', 6),
: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
: ,
}),
])
.('Transaction 1:', .transactionHash)
.('Transaction 2:', .transactionHash) Learning Resources
Learn more about expiring nonces that power concurrent transactions.
Learn more about Tempo Transactions and their properties.