Skip to content

Commit e58af1c

Browse files
committed
refactor(tests): EIP-5656: Add gas-used check to tests
1 parent bb2a383 commit e58af1c

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests/cancun/eip5656_mcopy/test_mcopy_memory_expansion.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
Environment,
2121
StateTestFiller,
2222
Transaction,
23+
TransactionReceipt,
2324
)
2425
from ethereum_test_tools import Opcodes as Op
2526

@@ -107,11 +108,6 @@ def call_exact_cost(
107108
)
108109

109110

110-
@pytest.fixture
111-
def tx_max_fee_per_gas() -> int: # noqa: D103
112-
return 7
113-
114-
115111
@pytest.fixture
116112
def block_gas_limit() -> int: # noqa: D103
117113
return 100_000_000
@@ -139,16 +135,15 @@ def caller_address(pre: Alloc, callee_bytecode: bytes) -> Address: # noqa: D103
139135

140136

141137
@pytest.fixture
142-
def sender(pre: Alloc, tx_max_fee_per_gas: int, tx_gas_limit: int) -> Address: # noqa: D103
143-
return pre.fund_eoa(tx_max_fee_per_gas * tx_gas_limit)
138+
def sender(pre: Alloc) -> Address: # noqa: D103
139+
return pre.fund_eoa()
144140

145141

146142
@pytest.fixture
147143
def tx( # noqa: D103
148144
sender: Address,
149145
caller_address: Address,
150146
initial_memory: bytes,
151-
tx_max_fee_per_gas: int,
152147
tx_gas_limit: int,
153148
tx_access_list: List[AccessList],
154149
) -> Transaction:
@@ -158,8 +153,7 @@ def tx( # noqa: D103
158153
access_list=tx_access_list,
159154
data=initial_memory,
160155
gas_limit=tx_gas_limit,
161-
max_fee_per_gas=tx_max_fee_per_gas,
162-
max_priority_fee_per_gas=0,
156+
expected_receipt=TransactionReceipt(gas_used=tx_gas_limit),
163157
)
164158

165159

0 commit comments

Comments
 (0)