Standardizing ERC-4337 Account Execution Interface
We’d like community feedback on implementing a minimal smart contract account with standardized execution methods for ERC-4337 accounts. This proposal does not suggest any change on ERC-4337 but a separate ERC if needed.
Motivation
ERC-4337 abstracts account validation and execution by introducing userops and specifying how they should be validated. Different smart account standards (ERC 6900, 6551, 7579) specify their execution interface. ERC-4337 provides flexibility for account builders to design custom execution methods. It suggests a workflow but lacks a standardized execute() method or specific execution functionality, as intended.
Developers are creating different types of execution workflows using some combination of these methods, along with the ERC-4337 standard.
execute(target, value, calldata)
: This method enables the execution of a single transaction. It requires specifying the target address, value, and calldata.executeBatch(target[], value[], calldata[])
: This method supports the execution of a batch of transactions. It expects arrays of target addresses, values, and calldata.delegateExecute(target, calldata)
: This method facilitates transaction execution through delegate calls. It involves specifying the target address and calldata for delegate execution.
Problems
Not standardized, not compatible: Developers may use the same methods, but each team is naming them differently. If a provider names methods differently, their call data will differ from another provider with their execution method names. Developers using the account provider SDK can’t use another SDK to interact with the same account. They must use multiple SDKs to create the same features (execute), even if everything else remains identical except for the name difference.
Solution: Minimal Smart Contract Account Which Executes
Developers require a standardized interface defining the execution functionality of ERC-4337 accounts. We can use the same method names and create a standard for a minimal smart contract account. We propose naming execution methods as follows.
execute(target, value, calldata)
: This method enables the execution of a single transaction. It requires specifying the target address, value, and calldata.executeBatch(target[], value[], calldata[])
: This method supports the execution of a batch of transactions. It expects arrays of target addresses, values, and calldata.delegateExecute(target, calldata)
: This method facilitates transaction execution through delegate calls. It involves specifying the target address and calldata for delegate execution.