Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prague: update chain_id in 7702 set code txs to u256 #1057

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)):
gurukamath marked this conversation as resolved.
Show resolved Hide resolved
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
Loading