---
eip: 8000
label: ERC-8000
title: Operator contract for non delegated EOAs
status: Draft
type: Standards Track
category: ERC
created: 2025-07-02
requires: 1153, 2771
official: https://eips.ethereum.org/EIPS/eip-8000
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8000.md
canonical: https://eips.huatuo.xyz/eip-8000/
lang: en
tldr: A draft pattern for a shared Operator contract that lets plain EOAs batch several contract calls in one transaction, while compatible target contracts still see the EOA, not the Operator, as the sender.
tags: [batching, eoa, wallets, ux, erc]
---

# ERC-8000: Operator contract for non delegated EOAs

> Allowing operating batch executions on behalf of non delegated EOAs

**TL;DR:** A draft pattern for a shared Operator contract that lets plain EOAs batch several contract calls in one transaction, while compatible target contracts still see the EOA, not the Operator, as the sender.

## What problem does it solve?

A classic UX pain on Ethereum is the two-step `approve` then `deposit` (or `transferFrom`) flow: two transactions, two confirmations, two fees. [EIP-7702](/eip-7702/) solves this by letting an EOA attach smart-account code and batch calls, but not every user wants delegated code on their account.

ERC-8000 offers a lighter option for EOAs that stay "plain". The EOA sends one transaction to a standard **Operator** contract, which performs a list of calls. Target contracts that opt in (the **Operated** pattern) ask the Operator who the real caller is, so balances and permissions are attributed to the EOA.

## How it works

**Operator** (ideally one shared singleton) exposes:

- `execute(Call[] calls)` runs each `{target, value, callData}` in order, reverts if any call fails, returns all return data, and checks that `msg.value` equals the sum of values.
- `onBehalfOf()` returns the original `msg.sender` while a batch is running, and reverts outside one.

The reference implementation stores the sender in **transient storage** ([EIP-1153](/eip-1153/)) for the duration of `execute`, clears it afterwards, and guards `execute` against reentrancy.

**Operated** targets override `_msgSender()`: if `msg.sender` is the trusted Operator, use `operator.onBehalfOf()`; otherwise use `msg.sender`. This mirrors the `_msgSender()` approach from [ERC-2771](/eip-2771/) meta-transactions, so contracts already written against OpenZeppelin `Context` need little change.

## Sample code

An opt-in target contract and a batched call (Solidity, adapted from the spec):

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.29;

import {Context} from "@openzeppelin/contracts/utils/Context.sol";

interface IOperator {
    struct Call { address target; uint256 value; bytes callData; }
    function execute(Call[] calldata calls) external payable returns (bytes[] memory);
    function onBehalfOf() external view returns (address);
}

abstract contract Operated is Context {
    IOperator public immutable operator;
    constructor(address operator_) { operator = IOperator(operator_); }

    function _msgSender() internal view virtual override returns (address) {
        if (msg.sender == address(operator)) return operator.onBehalfOf();
        return msg.sender;
    }
}
```

From the EOA, one transaction can call several Operated contracts; each sees the EOA as the sender (ethers v6):

```ts
import { Contract, Interface } from "ethers";

const vault = new Interface(["function withdraw(address token, uint256 amount)"]);
const staking = new Interface(["function claim()"]);

const operator = new Contract(OPERATOR, [
  "function execute((address target,uint256 value,bytes callData)[] calls) payable returns (bytes[])",
], signer);

// Both targets extend Operated, so they attribute the calls to signer.address.
await operator.execute([
  { target: VAULT,   value: 0n, callData: vault.encodeFunctionData("withdraw", [TOKEN, amount]) },
  { target: STAKING, value: 0n, callData: staking.encodeFunctionData("claim") },
]);
```

## Things to know

- **Status: Draft.**
- Only contracts that implement the Operated logic work. A plain ERC-20 `approve` sent through the Operator sets an allowance **for the Operator**, not for the EOA, because standard ERC-20s see the Operator as `msg.sender`. Batching truly removes the approve step only when the token side is also Operator-aware.
- Every Operated contract fully trusts its Operator; a malicious or buggy Operator could act as any user. Use a single audited, immutable deployment.
- Reentrancy protection on `execute` is mandatory, otherwise a callback could overwrite the stored sender.


---

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