EIP 7702 Implement SetCode transactions #2755
Open
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 listSetCode
authority lists#isValidDelegation
, and fetch the code of the delegated account.Notable Changes:
#loadAuthorities
and#addAuthority
operations for processingCextra
function when computing the cost of a call to also check if there is a delegation and if the delegated account is warm.TODO:
Need to implement delegation resolution inCALL*
/`operationsRun conformance tests