File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/ethereum_spec_tools/evm_tools/t8n Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -132,14 +132,24 @@ def block_environment(self) -> Any:
132
132
Create the environment for the transaction. The keyword
133
133
arguments are adjusted according to the fork.
134
134
"""
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
+
135
145
kw_arguments = {
136
146
"block_hashes" : self .env .block_hashes ,
137
147
"coinbase" : self .env .coinbase ,
138
148
"number" : self .env .block_number ,
139
149
"time" : self .env .block_timestamp ,
140
- "state" : self .alloc .state ,
141
150
"block_gas_limit" : self .env .block_gas_limit ,
142
151
"chain_id" : self .chain_id ,
152
+ ** state_or_oracle ,
143
153
}
144
154
145
155
if self .fork .is_after_fork ("ethereum.london" ):
You can’t perform that action at this time.
0 commit comments