Execute.encodeData
Encodes calls for the ERC-7821 execute
function.
Imports
Named
import { Execute } from 'ox/erc7821'
Examples
import { Execute } from 'ox/erc7821'
const data = Execute.encodeData([
{
data: '0xcafebabe',
to: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',
value: 1n,
}
])
Definition
function encodeData(
calls: readonly Call[],
options?: encodeData.Options,
): `0x${string}`
Source: src/erc7821/Execute.ts
Parameters
calls
- Type:
readonly Call[]
The calls to encode.
options
- Type:
encodeData.Options
- Optional
The options.
options.opData
- Type:
0x${string}
- Optional
Return Type
The encoded data.
0x${string}