ERC-7821: Minimal Batch Executor Interface

Motivation

With the advent of EIP-7702, it is possible for Externally Owned Account (EOA) to perform atomic batched executions.

We anticipate that there will be multiple EIP-7702 delegation accounts from multiple vendors. To enable frontends to be able to detect and prepare a batched transaction that works across multiple vendors, we will need a standardized interface for batched executions.

In the absence of such a standard, the vendors may choose to create their own proprietary implementations, causing ecosystem fragmentation.

This standard propose a minimal batch execution interface that is easily implementable, extensible, and performant. It also includes a signalling function for tell frontends that the account supports the standard.

Reference Implementation

A optimized implementation is available in Solady.

The ERC proposal has a more readable implementation.

1 Like

Actually, concatenation is the most extensible and performant batch ABI.

2 Likes

Hi @Vectorized,

I like the minimal approach of the ERC, and I believe it can be a default minimal batch execution interface not only for EOAs via ERC-7702 but also for other ERC-4337 accounts.

For example, a simple ERC-4337 account may implement ERC-7821 instead of the IAccountExecute interface. I see it was recently changed to allow msg.sender to be the entrypoint, which is great.

Some concrete feedback

  • ERC-7579 dropped the requirement for ERC-165 so I don’t think ERC-7821 needs to be explicit about it
  • The standard is not clear whether replacing address(0) with address(this) is mandatory. I would say it’s a “MAY” but feel free to correct me.

Opening a PR with this feedback if you think makes sense

Created a small PR #829 to fix reference implementation