Skip to content

Commit

Permalink
EIP-7702: add more text
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Dec 18, 2024
1 parent 66d9d5f commit 75ddab6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EIPS/eip-7702.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ At the start of executing the transaction, after incrementing the sender's nonce
3. `authority = ecrecover(keccak(MAGIC || rlp([auth_chain_id, address, nonce])), y_parity, r, s]`
* 3a. The `s` value must be less than or equal to `secp256k1n/2`, as specified in [EIP-2](./eip-2.md).
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.
5. Verify the code of the `authority` account is either empty or already delegated.
6. Verify the nonce of `authority` is equal to `nonce`. In case `authority` does not exist in the trie, verify that `nonce` is equal to `0`.
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.
* 8a. As a special case, if `address` is `0x0000000000000000000000000000000000000000` do not write the designation. Clear the account's code and reset the account's code hash to the empty hash `0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470`.
9. Increase the nonce of `authority` by one.
9. Increase the nonce of the `authority` account 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 75ddab6

Please sign in to comment.