Skip to content

Commit dad13e5

Browse files
committed
fix: static tests broke due to rebase
1 parent 7fa8b9c commit dad13e5

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

packages/testing/src/execution_testing/forks/forks/forks.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def _base_gas_costs(
111111
"""
112112
Return dataclass with the defined gas costs constants for genesis.
113113
"""
114+
del block_number, timestamp
114115
return GasCosts(
115116
GAS_JUMPDEST=1,
116117
GAS_BASE=2,
@@ -2871,13 +2872,17 @@ def header_bal_hash_required(cls) -> bool:
28712872
return True
28722873

28732874
@classmethod
2874-
def gas_costs(cls) -> GasCosts:
2875+
def _base_gas_costs(
2876+
cls, *, block_number: int = 0, timestamp: int = 0
2877+
) -> GasCosts:
28752878
"""
28762879
On Amsterdam, the cost per block access list item is introduced
28772880
in EIP-7928.
28782881
"""
28792882
return replace(
2880-
super(Amsterdam, cls).gas_costs(),
2883+
super(Amsterdam, cls)._base_gas_costs(
2884+
block_number=block_number, timestamp=timestamp
2885+
),
28812886
GAS_BLOCK_ACCESS_LIST_ITEM=2000,
28822887
)
28832888

packages/testing/src/execution_testing/forks/transition_base_fork.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import Any, Callable, ClassVar, Dict, Type
44

5-
from .base_fork import BaseFork
5+
from .base_fork import BaseFork, GasCosts
66

77

88
class TransitionBaseMetaClass(type):
@@ -108,6 +108,17 @@ def ruleset(cls) -> Dict[str, int]:
108108
"""
109109
raise Exception("Not implemented")
110110

111+
@classmethod
112+
def gas_costs(
113+
cls, *, block_number: int = 0, timestamp: int = 0
114+
) -> GasCosts:
115+
"""
116+
Return Gas Costs for the active fork.
117+
"""
118+
return cls.fork_at(
119+
block_number=block_number, timestamp=timestamp
120+
).gas_costs(block_number=block_number, timestamp=timestamp)
121+
111122

112123
def transition_fork(
113124
to_fork: Type[BaseFork],

0 commit comments

Comments
 (0)