Skip to content

Commit

Permalink
Update EIP-7702: 8905 copy
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
lightclient authored Oct 8, 2024
1 parent 5070adf commit 6d04bc1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions EIPS/eip-7702.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ The [EIP-2718](./eip-2718.md) `ReceiptPayload` for this transaction is `rlp([sta
At the start of executing the transaction, after incrementing the sender's nonce, for each `[chain_id, address, nonce, y_parity, r, s]` tuple do the following:

1. Verify the chain id is either 0 or the chain's current ID.
2. `authority = ecrecover(keccak(MAGIC || rlp([chain_id, address, nonce])), y_parity, r, s])`
3. Add `authority` to `accessed_addresses` (as defined in [EIP-2929](./eip-2929.md).)
4. Verify the code of `authority` is either empty or already delegated.
5. Verify the nonce of `authority` is equal to `nonce`.
6. Add `PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST` gas to the global refund counter if `authority` exists in the trie.
7. Set the code of `authority` to be `0xef0100 || address`. This is a delegation designation.
8. Increase the nonce of `authority` by one.
2. Verify the `nonce` is less than `2**64 - 1`.
3. `authority = ecrecover(keccak(MAGIC || rlp([chain_id, address, nonce])), y_parity, r, s]`
4. Add `authority` to `accessed_addresses` (as defined in [EIP-2929](./eip-2929.md).)
5. Verify the code of `authority` is either empty or already delegated.
6. Verify the nonce of `authority` is equal to `nonce`.
7. Add `PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST` gas to the global refund counter if `authority` exists in the trie.
8. Set the code of `authority` to be `0xef0100 || address`. This is a delegation designation.
9. Increase the nonce of `authority` by one.

If any of the above steps fail, immediately stop processing that tuple and continue to the next tuple in the list. It will in the case of multiple tuples for the same authority, set the code using the address in the last valid occurrence.

Expand Down

0 comments on commit 6d04bc1

Please sign in to comment.