Skip to content

Commit f5cfc66

Browse files
committed
feat(tests): Deposit contract log with no topics
1 parent c3e5260 commit f5cfc66

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Test fixtures for use by clients are available for each release on the [Github r
2424

2525
- 🐞 Fix BALs opcode OOG test vectors by updating the Amsterdam commit hash in specs and validating appropriately on the testing side ([#2293](https://github.com/ethereum/execution-spec-tests/pull/2293)).
2626
- ✨ Fix test vector for BALs SSTORE with OOG by pointing to updated specs; add new boundary conditions cases for SSTORE w/ OOG ([#2297](https://github.com/ethereum/execution-spec-tests/pull/2297)).
27+
- ✨ Expand EIP-6110 modified contract tests, where the extra event log has no topics at all ([#1693](https://github.com/ethereum/execution-specs/pull/1693))
2728

2829
## [v5.3.0](https://github.com/ethereum/execution-spec-tests/releases/tag/v5.3.0) - 2025-10-09
2930

tests/prague/eip6110_deposits/test_modified_contract.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@
8989
),
9090
],
9191
)
92+
@pytest.mark.parametrize("extra_event_type", ["transfer_log", "no_topics"])
9293
def test_extra_logs(
9394
blockchain_test: BlockchainTestFiller,
9495
pre: Alloc,
9596
include_deposit_event: bool,
97+
extra_event_type: str,
9698
) -> None:
9799
"""
98100
Test deposit contract emitting more log event types than the ones in
@@ -127,16 +129,23 @@ def test_extra_logs(
127129
# "0x0000000000000000000000006885e36bfcb68cb383dfe90023a462c03bcb2ae5",
128130
# "0x00000000000000000000000080b5dc88c98e528bf9cb4b7f0f076ac41da24651"]
129131

130-
bytecode = Op.LOG3(
132+
if extra_event_type == "no_topics":
133+
# Log with no topics
134+
bytecode = Op.LOG0(
135+
0,
136+
32,
137+
)
138+
else:
131139
# ERC-20 token transfer log ERC-20 token transfers are LOG3, since the
132140
# topic, the sender, and receiver are all topics (the sender and
133141
# receiver are `indexed` in the solidity event)
134-
0,
135-
32,
136-
0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF,
137-
0x000000000000000000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
138-
0x000000000000000000000000BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
139-
)
142+
bytecode = Op.LOG3(
143+
0,
144+
32,
145+
0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF,
146+
0x000000000000000000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
147+
0x000000000000000000000000BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
148+
)
140149

141150
requests = Requests()
142151

0 commit comments

Comments
 (0)