ERC-7902 Account abstraction wallet feature extension (Wallet Capabilities for Account Abstraction)

Draft · Accounts & wallets · created 2025-03-01

Lets an app request, via EIP-5792 capabilities, that a wallet apply an expiration time limit, nonce key, paymaster sponsorship, atomic execution, recent root verification, and post-condition checks to an EIP-8141 frame transaction.

Why it is needed

EIP-8141 splits a transaction into multiple frames, and the wallet alone decides how many frames to create, what verification to do, who pays the gas, and what to check after execution. But some of these choices depend on information that only the app (dApp) has. An app may want to use different nonce keys for mutually independent transactions, may already know a specific root value used in an on-chain proof, may know a paymaster that will cover gas on its behalf along with that paymaster's data, and may know which calls must succeed together. Between a wallet and an app connected via EIP-5792, there is no standard way to convey these details, so the app has no choice but to rely on whatever the wallet decides arbitrarily, and does not get the guarantees it wants.

In depth

Call Dispatch

By default, the wallet decides which frame holds each call. A SENDER-mode frame wraps the call as is and has the sender account execute it directly, while a DEFAULT frame calls the account's execution function with calldata. For an account with neither code nor an EIP-7702 delegation, the EIP-8141 default code makes no call at all in a DEFAULT frame, so such accounts must use a SENDER frame. Whichever form is used, the wallet must preserve the order used in the request, and if atomicRequired is true, it must execute all calls atomically.

eip7702Auth

A capability that checks whether an account is delegated to the implementation specified by delegation (an address or a name the wallet knows). If the target differs, the wallet signs and submits a separate EIP-7702 set-code transaction first; this transaction is not included in atomicRequired's atomicity, and its logs are not reported as logs of the call. If account is an account the user has not connected, or an account whose code is not an EIP-7702 delegation designator, the wallet must reject the request.

validityTimeRange and recentRoots

validityTimeRange sets an expiration time limit by adding, as the transaction's first frame, an expiry_verify frame holding validUntil as an 8-byte big-endian integer. recentRoots bundles sourceId, slot, root tuples into a single recent_root_verify frame, and each slot must be lower than the current slot and within RECENT_ROOT_USABLE_WINDOW. If both are present, expiry_verify comes first, followed by recent_root_verify.

keyedNonce

Specifies the nonce key from EIP-8250. nonceKeys may contain up to 16 entries, must be in strictly increasing order, and is rejected if empty. All selected keys must share a single sequence number; if nonceSeq is omitted, the wallet reads and uses the current sequence, and if 0xffffffffffffffff is given, it becomes single-use, meaning those keys cannot be used again after the transaction. The state gas incurred when using a new key must be included in the fee estimate.

paymasterFrame

In the static form, the app directly supplies paymaster, data, and executionGasLimit, while in the service form, the wallet uses url and context to call frame_getPaymasterData (stub data) and frame_getPaymasterSignature (final signature) in two separate calls. The pay frame must come after the sender verification frame, with mode VERIFY and flags APPROVE_PAYMENT (0x1), and the paymaster signature is added as a separate entry in the transaction's signatures list. This capability cannot be marked optional, and the wallet must not send a transaction without a pay frame.

atomicFramesBatch and callFrame

atomicFramesBatch groups adjacent calls that share the same id using ATOMIC_BATCH_FLAG so that they all succeed or all roll back together. This capability cannot be used together with a request where atomicRequired is true. callFrame directly specifies an individual call's frame as SENDER or DEFAULT. For DEFAULT, value must be 0 and to must be the sender account itself, and if the wallet cannot build the requested frame, it must reject the request regardless of whether the capability is optional.

outcomeAssertions and frame order

outcomeAssertions appends an ASSERT frame after the calls, in the manner defined by the format name (assertionsFormat). The wallet must reject an unsupported format, and cannot drop or reorder requested frames. The overall frame order is fixed as [expiry_verify] [recent_root_verify] [deploy] <sender verification> [pay] <call frames> [ASSERT frames], and the request is rejected if it exceeds MAX_FRAMES.

Call status computation and proposal status

wallet_getCallsStatus aggregates the per-frame status (1 success, 0 failure, 2 skipped) to assign the batch status. It is 200 if all call frames are included and there is no ASSERT failure, 500 if no calls were included at all or an ASSERT fails, and 600 if only some are included. This proposal is in Draft status, meaning it is still a draft whose specification may change or stall.

Things to watch out for

Original ERC · ← ERCs