EIP 7702 Implement SetCode transactions #2755
Draft
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.
Add EIP-7702 SetCode Transaction Type Implementation
Adding support for a new transaction type that can include signed authorizations from various accounts. Each authorization lets you set a special code (
0xEF0100 || address
) for said authorized account, which points to another account/SC. Later, whenever anyone interacts with the authorized account, instead of just sending funds, the system runs the contract code that was pointed to (address
).Changes include:
Key Components:
SetCode
transaction type with prefix0x04
SetCodeTx
data structure with authorization listNotable Changes:
#loadAuthorities
and#addAuthority
operations for processingTODO:
CALL*
/EXTCODECOPY
/EXTCODESIZE
/CODECOPY
/CODESIZE
operations