UNPKG

@zerodev/sdk

Version:

A utility library for working with ERC-4337

12 lines (10 loc) 382 B
import { encodeFunctionData } from "viem" import { KernelExecuteAbi } from "../../abi/KernelAccountAbi.js" import type { CallArgs } from "../types.js" export const encodeExecuteSingleCall = (args: CallArgs) => { return encodeFunctionData({ abi: KernelExecuteAbi, functionName: "execute", args: [args.to, args.value || 0n, args.data || "0x", 0] }) }