Execute.encodeBatchOfBatchesData
Encodes calls for the ERC-7821 execute
function with "batch of batches" mode.
Imports
Named
import { Execute } from 'ox/erc7821'
Examples
import { Execute } from 'ox/erc7821'
const data = Execute.encodeBatchOfBatchesData([
{
calls: [
{
data: '0xcafebabe',
to: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',
value: 1n,
}
]
},
{
calls: [
{
data: '0xdeadbeef',
to: '0xcafebabecafebabecafebabecafebabecafebabe',
value: 2n,
}
],
opData: '0xcafebabe',
}
])
Definition
function encodeBatchOfBatchesData(
batches: readonly Batch[],
): `0x${string}`
Source: src/erc7821/Execute.ts
Parameters
batches
- Type:
readonly Batch[]
batches.calls
- Type:
readonly Call[]
batches.opData
- Type:
0x${string}
- Optional
Return Type
The encoded data.
0x${string}