FIPs: Add draft for EIP-7702 (Set Code for EOAs) #1209
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
EIP-7702 defines a new EIP-2718 transaction type (
0x04) that includes anauthorization_list. Each authorization is a signed tuple from an EOA (the "authority") designating a smart contract (the "delegate") to execute on its behalf.This FIP adapts EIP-7702 to the FEVM architecture. The implementation introduces a new method,
ApplyAndCall, in the EVM actor. This method atomically processes the authorization list—validating signatures, updating the delegation mapping, and incrementing authority nonces—and then executes the outer transaction call. The FEVM interpreter is updated to recognize these delegations: when aCALLtargets a delegated EOA, the interpreter executes the delegate's code within the authority's context. This implementation ensures that delegation mappings and nonce increments persist even if the outer transaction call reverts, adhering to the EIP's specified atomicity model.Discussion: #1143