---
eip: 8410
label: ERC-8410
title: Portable Execution Plan Artifact
status: Draft
type: Standards Track
category: ERC
created: 2026-09-04
requires: 155, 712
official: https://eips.ethereum.org/EIPS/eip-8410
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8410.md
canonical: https://eips.huatuo.xyz/eip-8410/
lang: en
tldr: A JSON format for transaction plans plus a small, hash-checked reference to them, so an AI agent can hand a prepared swap or batch from a tool to a wallet without copying calldata through the model.
tags: [erc, wallet, ai-agents, json, batching]
---

# ERC-8410: Portable Execution Plan Artifact

> Verifiable references for passing execution plans from agent tools to wallets without relaying calldata

**TL;DR:** A JSON format for transaction plans plus a small, hash-checked reference to them, so an AI agent can hand a prepared swap or batch from a tool to a wallet without copying calldata through the model.

## What problem does it solve?

When an AI agent prepares a swap with one tool and executes it with a wallet tool, the calldata usually passes through the model: it is read as input tokens and written back out as output tokens. That is slow and costly for large or multi-step transactions, and every copy is a chance for the bytes to be truncated or altered.

ERC-8410 lets the preparing tool (the **producer**) store an **execution plan** and give the agent only a short **artifact reference**: a URL, the exact byte length and a keccak256 digest. The agent passes the reference along; the wallet (the **consumer**) fetches the plan itself, checks length and hash, then validates, simulates and asks the user to authorize it. The agent's description of the plan never counts as authorization.

## How it works

- **Execution plan.** A strict JSON document (unknown members rejected): `schema_version: "1"`, `chain_id` (decimal string), matching `caip2_chain_id`, one `sender`, and 1–4096 `ordered_steps`. Each step has a 1-based `step`, a display-only `kind` (`execution`, `approval`, `allowance_cleanup`, `signature_dependent_execution`, `other`) and a `transaction` (`chain_id`, `from`, `to`, `data`, `value`, optional advisory `gas`). Contract creation is not supported.
- **Capabilities.** `required_capabilities` may include `atomic_batch`: all steps in one transaction that reverts as a whole (for example through an [EIP-7702](/eip-7702/) batch executor). A wallet that cannot honour a listed capability must reject the plan. Without it, steps run one by one, each waiting for the previous to succeed.
- **Plan digest.** keccak256 of a fixed, non-alphabetical JSON projection (schema version, chain id, sender, steps with their kind and transaction fields, no gas). Wallets should show and log it with the approval.
- **Artifact reference.** `{ kind: "artifact_reference", artifact_type, url, bytes, integrity: { algorithm: "keccak256", value } }`. `https`, `data:` and optional local `file` URLs are allowed, with strict fetch rules: default port, public IPs only, no redirects, no cookies, size caps and timeouts.
- **Signatures too.** The same reference can point to a request to sign one [EIP-712](/eip-712/) message, a separate, optional document type.
- Plans map to [EIP-5792](/eip-5792/) `wallet_sendCalls` with a documented conversion table.

## Sample code

An artifact reference as the agent would relay it (values are placeholders):

```json
{
  "kind": "artifact_reference",
  "artifact_type": "execution_plan",
  "url": "https://producer.example/plans/abc123.json",
  "bytes": 1834,
  "integrity": { "algorithm": "keccak256", "value": "0x<64 hex digits>" }
}
```

Wallet-side verification and plan digest (TypeScript, ethers v6):

```ts
import { keccak256, toUtf8Bytes } from "ethers";

async function fetchPlan(ref: any) {
  const res = await fetch(ref.url, { redirect: "error", credentials: "omit" });
  const body = new Uint8Array(await res.arrayBuffer());
  if (body.length !== ref.bytes) throw new Error("length mismatch");
  if (keccak256(body) !== ref.integrity.value.toLowerCase()) throw new Error("digest mismatch");
  return JSON.parse(new TextDecoder().decode(body));
}

function planDigest(p: any): string {
  // member order is normative; JSON.stringify keeps insertion order, no whitespace
  const canon = {
    schema_version: p.schema_version,
    chain_id: p.chain_id,
    sender: p.sender.toLowerCase(),
    ordered_steps: p.ordered_steps.map((s: any) => ({
      step: s.step,
      kind: s.kind,
      transaction: {
        chain_id: s.transaction.chain_id,
        from: s.transaction.from.toLowerCase(),
        to: s.transaction.to.toLowerCase(),
        data: s.transaction.data.toLowerCase(),
        value: s.transaction.value,
      },
    })),
  };
  return keccak256(toUtf8Bytes(JSON.stringify(canon)));
}
```

(A production fetcher must also enforce the spec's public-IP check, size limits and timeouts.)

## Things to know

- Status: **Draft**.
- Neither digest authenticates the producer or means the user consented; plans are untrusted input that the wallet must validate and simulate itself, ideally re-simulating right before signing.
- The plan digest deliberately excludes `gas`, `required_capabilities` and `extensions`; equal digests do not mean identical execution requirements.
- Fetching caller-supplied URLs is a server-side request forgery risk; the spec requires checking resolved IPs and forbids redirects.
- Using an EIP-7702 delegation for batching leaves that delegation in place after the transaction, so its continuing authority must be considered.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8410
