Draft ERC-8010

Pre-delegated Signature Verification

Verify EIP-7702 signatures before the delegation transaction is even mined. ERC-8010 wraps your signature with an authorization, letting verifiers simulate delegation atomically.

What is ERC-8010?

The Problem
EIP-7702 lets EOAs delegate to smart contracts. But what about messages signed before the delegation hits the chain? Standard ERC-1271 and ERC-6492 can't verify them.
The Solution
ERC-8010 defines a signature wrapper format that bundles an inner signature with the EIP-7702 authorization. A 32-byte MAGIC marker at the end lets verifiers detect it.
The Flow
Sign → Wrap → Verify off-chain (via simulated delegation) → Delegate on-chain → Verify again (via real delegation). Same signature, same result.

The ERC-8010 Wrapper Format

wrapped_signature = inner_signature || context || context_length || MAGIC

// MAGIC =
0x80108010801080108010801080108010
801080108010801080108010801080108010

// context = abi.encode(
//   authorization, // (chain_id, address, nonce, y_parity, r, s)
//   init_to,      // optional initializer
//   init_data     // optional init calldata
// )

Verification Paths

Pre-delegation
ERC-8010 Path
viem detects the MAGIC marker → extracts the authorization → simulates delegation via eth_call with authorization list → calls isValidSignature atomically.
Post-delegation
ERC-1271 Path
viem detects the delegation already exists on-chain (0xef0100...) → calls isValidSignature directly. No simulation needed.

Ready to see it in action?

Sign a message with the preset account, wrap it with ERC-8010, and verify — all in under a minute.

Start the Demo