Skip to content

Commit 203076a

Browse files
committed
fix(tests): EIP-8037: ported static
1 parent cc4ef07 commit 203076a

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

tests/ported_static/stInitCodeTest/test_call_recursive_contract.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Alloc,
1414
Bytes,
1515
Environment,
16+
Fork,
1617
StateTestFiller,
1718
Transaction,
1819
)
@@ -30,6 +31,7 @@
3031
def test_call_recursive_contract(
3132
state_test: StateTestFiller,
3233
pre: Alloc,
34+
fork: Fork,
3335
) -> None:
3436
"""Test_call_recursive_contract."""
3537
coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA)
@@ -44,10 +46,10 @@ def test_call_recursive_contract(
4446
timestamp=1000,
4547
prev_randao=0x20000,
4648
base_fee_per_gas=10,
47-
gas_limit=100000000,
49+
gas_limit=100_000_000,
4850
)
4951

50-
pre[sender] = Account(balance=0x989680)
52+
pre[sender] = Account(balance=10_000_000_000)
5153
# Source: lll
5254
# {[[ 2 ]](ADDRESS)(CODECOPY 0 0 32)(CREATE 0 0 32)}
5355
contract_0 = pre.deploy_contract( # noqa: F841
@@ -56,14 +58,17 @@ def test_call_recursive_contract(
5658
+ Op.CREATE(value=0x0, offset=0x0, size=0x20)
5759
+ Op.STOP,
5860
nonce=40,
59-
address=Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87), # noqa: E501
61+
address=contract_0, # noqa: E501
6062
)
6163

64+
gas_limit = 400_000
65+
if fork.is_eip_enabled(8037):
66+
gas_limit = 20_000_000
6267
tx = Transaction(
6368
sender=sender,
6469
to=contract_0,
6570
data=Bytes("00"),
66-
gas_limit=400000,
71+
gas_limit=gas_limit,
6772
value=1,
6873
)
6974

0 commit comments

Comments
 (0)