Skip to main content

Batched execution

Pali smart accounts support batched execution through wallet_sendCalls. This lets the user approve multiple calls with one wallet review and one smart-account authorization. Depending on the active validator, that authorization may be a passkey proof, an ECDSA signature, or a composite policy.

Pali wallet_sendCalls smart-account batch review with decoded calldata
Pali reviews the full smart-account batch and decodes common token calls before one smart-account authorization.

Example: approve and transferFrom

const result = await window.ethereum.request({
method: 'wallet_sendCalls',
params: [
{
version: '2.0.0',
from: smartAccount,
chainId: '0x39',
atomicRequired: true,
calls: [
{
to: erc20Token,
value: '0x0',
data: erc20Interface.encodeFunctionData('approve', [
spender,
amount,
]),
},
{
to: spender,
value: '0x0',
data: spenderInterface.encodeFunctionData('transferFrom', [
smartAccount,
recipient,
amount,
]),
},
],
},
],
});

Atomic UX

When atomicRequired is true, the user should approve or reject the full batch. Pali's smart-account path prepares all selected calls as a single account execution. Dapps should not ask users to approve partial batches when the business logic requires all-or-nothing behavior.

Gas payment

The current Pali flow submits smart-account executions with a wallet gas payer. Dapps should plan for wallet-paid gas instead of presenting the flow as gasless.

Unsupported call type

Smart-account wallet_sendCalls does not support contract deployment calls expressed as empty target transactions. Deploy contracts separately or use a target contract call.

One approval executes the whole batch atomically.