Skip to content

Commit 3fc79fd

Browse files
committed
chore: Remove duplicate sender fixtures; opting for global sender`
1 parent d03452a commit 3fc79fd

File tree

14 files changed

+5
-90
lines changed

14 files changed

+5
-90
lines changed

tests/cancun/eip4844_blobs/test_excess_blob_gas_fork_transition.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ def pre_fork_blobs_per_block(fork: Fork) -> int:
4747
return 0
4848

4949

50-
@pytest.fixture
51-
def sender(pre: Alloc) -> EOA:
52-
"""Sender account."""
53-
return pre.fund_eoa()
54-
55-
5650
@pytest.fixture
5751
def pre_fork_blocks(
5852
pre_fork_blobs_per_block: int,

tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,6 @@ def precompile_caller_address(
189189
)
190190

191191

192-
@pytest.fixture
193-
def sender(pre: Alloc) -> EOA:
194-
"""Return sender account."""
195-
return pre.fund_eoa()
196-
197-
198192
@pytest.fixture
199193
def tx(
200194
precompile_caller_address: Address,

tests/cancun/eip5656_mcopy/test_mcopy_memory_expansion.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ def caller_address(pre: Alloc, callee_bytecode: bytes) -> Address: # noqa: D103
140140
return pre.deploy_contract(code=callee_bytecode)
141141

142142

143-
@pytest.fixture
144-
def sender(pre: Alloc) -> Address: # noqa: D103
145-
return pre.fund_eoa()
146-
147-
148143
@pytest.fixture
149144
def tx( # noqa: D103
150145
sender: Address,

tests/cancun/eip6780_selfdestruct/conftest.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@
22

33
import pytest
44

5-
from ethereum_test_tools import EOA, Address, Alloc, Environment
6-
7-
8-
@pytest.fixture
9-
def sender(pre: Alloc) -> EOA:
10-
"""EOA that will be used to send transactions."""
11-
return pre.fund_eoa()
5+
from ethereum_test_tools import Address, Alloc, Environment
126

137

148
@pytest.fixture

tests/cancun/eip6780_selfdestruct/test_selfdestruct.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,6 @@ def selfdestruct_code(
134134
return selfdestruct_code_preset(sendall_recipient_addresses=sendall_recipient_addresses)
135135

136136

137-
@pytest.fixture
138-
def sender(pre: Alloc) -> EOA:
139-
"""EOA that will be used to send transactions."""
140-
return pre.fund_eoa()
141-
142-
143137
@pytest.mark.parametrize("create_opcode", [Op.CREATE, Op.CREATE2])
144138
@pytest.mark.parametrize(
145139
"call_times,sendall_recipient_addresses",

tests/osaka/eip7934_block_rlp_limit/conftest.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import pytest
44

55
from ethereum_test_tools import (
6-
EOA,
76
Address,
87
Alloc,
98
)
@@ -23,12 +22,6 @@ def env() -> Environment:
2322
return Environment(gas_limit=100_000_000)
2423

2524

26-
@pytest.fixture
27-
def sender(pre: Alloc) -> EOA:
28-
"""Funded EOA fixture used for sending transactions."""
29-
return pre.fund_eoa()
30-
31-
3225
@pytest.fixture
3326
def contract_recipient(pre: Alloc) -> Address:
3427
"""Deploy a simple contract that can receive large calldata."""

tests/osaka/eip7951_p256verify_precompiles/conftest.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,6 @@ def call_contract_address(pre: Alloc, call_contract_code: Bytecode) -> Address:
118118
return pre.deploy_contract(call_contract_code)
119119

120120

121-
@pytest.fixture
122-
def sender(pre: Alloc) -> EOA:
123-
"""Sender of the transaction."""
124-
return pre.fund_eoa()
125-
126-
127121
@pytest.fixture
128122
def post(call_contract_address: Address, call_contract_post_storage: Storage):
129123
"""Test expected post outcome."""

tests/prague/eip7623_increase_calldata_cost/conftest.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
from .helpers import DataTestType, find_floor_cost_threshold
2525

2626

27-
@pytest.fixture
28-
def sender(pre: Alloc) -> EOA:
29-
"""Create the sender account."""
30-
return pre.fund_eoa()
31-
32-
3327
@pytest.fixture
3428
def to(
3529
request: pytest.FixtureRequest,

tests/prague/eip7702_set_code_tx/test_calls.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import pytest
77

88
from ethereum_test_tools import (
9-
EOA,
109
Account,
1110
Address,
1211
Alloc,
@@ -53,12 +52,6 @@ def __str__(self) -> str:
5352
return f"{self.name}"
5453

5554

56-
@pytest.fixture
57-
def sender(pre: Alloc) -> EOA:
58-
"""Sender of the transaction."""
59-
return pre.fund_eoa()
60-
61-
6255
@pytest.fixture
6356
def target_address(pre: Alloc, target_account_type: TargetAccountType) -> Address:
6457
"""Target address of the call depending on required type of account."""

tests/shanghai/eip3651_warm_coinbase/conftest.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from ethereum_test_tools import EOA, Alloc, Environment
5+
from ethereum_test_tools import Alloc, Environment
66

77

88
@pytest.fixture
@@ -15,9 +15,3 @@ def env() -> Environment:
1515
def post() -> Alloc:
1616
"""Post state fixture."""
1717
return Alloc()
18-
19-
20-
@pytest.fixture
21-
def sender(pre: Alloc) -> EOA:
22-
"""Funded EOA used for sending transactions."""
23-
return pre.fund_eoa()

0 commit comments

Comments
 (0)