Skip to content

Commit

Permalink
EIP-7702: renamed to 'unchained'
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Dec 18, 2024
1 parent ebfb8b0 commit 66d9d5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions EIPS/eip-7702.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ We introduce a new [EIP-2718](./eip-2718.md) transaction, "set code transaction"
```
rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, destination, value, data, access_list, authorization_list, signature_y_parity, signature_r, signature_s])
authorization_list = [[all_chains, address, nonce, y_parity, r, s], ...]
authorization_list = [[unchained, address, nonce, y_parity, r, s], ...]
```

The transaction fields `chain_id`, `nonce`, `max_priority_fee_per_gas`, `max_fee_per_gas`, `gas_limit`, `destination`, `value`, `data`, and `access_list` follow the same semantics as [EIP-4844](./eip-4844.md). *Note, this means a null destination is not valid.*

`authorization_list` is a list of tuples that store the address to code which the signer desires to execute in the context of their EOA. The transaction is considered invalid if the length of `authorization_list` is zero. It is also considered invalid when any field in an authorization tuple exceeds the following bounds:

```python
assert auth.all_chains == 0 || auth.all_chains == 1
assert auth.unchained == 0 || auth.unchained == 1
assert auth.nonce < 2**64
assert len(auth.address) == 20
assert auth.y_parity < 2**8
Expand All @@ -64,8 +64,8 @@ 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. Establish signed-over chain ID of the authorization.
* 1a. If `all_chains` is zero, set `auth_chain_id` to the transaction `chain_id` (which must equal the executing chain's ID).
* 1b. If `all_chains` is one, set `auth_chain_id` to zero.
* 1a. If `unchained` is zero, set `auth_chain_id` to the transaction `chain_id` (which must equal the executing chain's ID).
* 1b. If `unchained` is one, set `auth_chain_id` to zero.
2. Verify the `nonce` is less than `2**64 - 1`.
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).
Expand Down

0 comments on commit 66d9d5f

Please sign in to comment.