Skip to content

Commit

Permalink
Merge pull request #1057 from danceratopz/eip-7702-chain_id-u256
Browse files Browse the repository at this point in the history
prague: update `chain_id` in 7702 set code txs to u256
  • Loading branch information
gurukamath authored Dec 19, 2024
2 parents b0005fb + febb397 commit dfa792d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ethereum/prague/fork_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Authorization:
The authorization for a set code transaction.
"""

chain_id: U64
chain_id: U256
address: Address
nonce: U64
y_parity: U8
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/prague/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def set_delegation(message: Message, env: Environment) -> U256:
"""
refund_counter = U256(0)
for auth in message.authorizations:
if auth.chain_id not in (env.chain_id, U64(0)):
if auth.chain_id not in (env.chain_id, U256(0)):
continue

if auth.nonce >= U64.MAX_VALUE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def json_to_authorizations(self) -> Any:
for sublist in self.raw["authorizationList"]:
authorizations.append(
self.fork.Authorization(
chain_id=hex_to_u64(sublist.get("chainId")),
chain_id=hex_to_u256(sublist.get("chainId")),
nonce=hex_to_u64(sublist.get("nonce")),
address=self.fork.hex_to_address(sublist.get("address")),
y_parity=hex_to_u8(sublist.get("v")),
Expand Down

0 comments on commit dfa792d

Please sign in to comment.