Skip to content

Commit 72df534

Browse files
committed
temp: hack
1 parent d12c5d4 commit 72df534

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/ethereum_spec_tools/evm_tools/t8n/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,24 @@ def block_environment(self) -> Any:
132132
Create the environment for the transaction. The keyword
133133
arguments are adjusted according to the fork.
134134
"""
135+
# Handle oracle vs state for different forks
136+
# TODO: Hack imo
137+
if self.fork.is_after_fork("ethereum.osaka"):
138+
from ethereum.state_oracle import MemoryMerkleOracle
139+
140+
oracle = MemoryMerkleOracle(self.alloc.state)
141+
state_or_oracle = {"oracle": oracle}
142+
else:
143+
state_or_oracle = {"state": self.alloc.state}
144+
135145
kw_arguments = {
136146
"block_hashes": self.env.block_hashes,
137147
"coinbase": self.env.coinbase,
138148
"number": self.env.block_number,
139149
"time": self.env.block_timestamp,
140-
"state": self.alloc.state,
141150
"block_gas_limit": self.env.block_gas_limit,
142151
"chain_id": self.chain_id,
152+
**state_or_oracle,
143153
}
144154

145155
if self.fork.is_after_fork("ethereum.london"):

0 commit comments

Comments
 (0)