30
30
TransactionReceipt ,
31
31
TransactionTraces ,
32
32
TransitionToolCLIInput ,
33
- TransitionToolConfig ,
34
33
TransitionToolContext ,
35
34
TransitionToolInput ,
36
35
TransitionToolOutput ,
@@ -77,6 +76,7 @@ class TransitionTool(EthereumCLI):
77
76
supports_opcode_count : ClassVar [bool ] = False
78
77
79
78
supports_xdist : ClassVar [bool ] = True
79
+ supports_blob_params : ClassVar [bool ] = False
80
80
81
81
@abstractmethod
82
82
def __init__ (
@@ -176,6 +176,16 @@ def fork_name(self) -> str:
176
176
timestamp = self .env .timestamp ,
177
177
)
178
178
179
+ @property
180
+ def blob_params (self ) -> Any :
181
+ """Return the blob parameters for the current fork."""
182
+ if self .blob_schedule :
183
+ fork_name = self .fork .fork_at (
184
+ block_number = self .env .number , timestamp = self .env .timestamp
185
+ ).name ()
186
+ return self .blob_schedule [fork_name ]
187
+ return None
188
+
179
189
def __post_init__ (self ):
180
190
"""Modify the reward if the environment number is 0."""
181
191
if self .env .number == 0 :
@@ -195,11 +205,7 @@ def to_cli_input(self) -> TransitionToolCLIInput:
195
205
alloc = self .alloc ,
196
206
txs = self .txs ,
197
207
env = self .env ,
198
- config = TransitionToolConfig (
199
- blob_schedule = self .blob_schedule or BlobSchedule (),
200
- chain_id = self .chain_id ,
201
- network = self .fork ,
202
- ),
208
+ blob_params = self .blob_params ,
203
209
)
204
210
205
211
def get_request_data (self ) -> TransitionToolRequest :
@@ -252,8 +258,6 @@ def _evaluate_filesystem(
252
258
input_paths ["env" ],
253
259
"--input.txs" ,
254
260
input_paths ["txs" ],
255
- "--input.config" ,
256
- input_paths ["config" ],
257
261
"--output.basedir" ,
258
262
temp_dir .name ,
259
263
"--output.result" ,
@@ -274,6 +278,13 @@ def _evaluate_filesystem(
274
278
"opcodes.json" ,
275
279
]
276
280
)
281
+ if self .supports_blob_params and input_paths .get ("blobParams" ):
282
+ args .extend (
283
+ [
284
+ "--input.blobParams" ,
285
+ input_paths ["blobParams" ],
286
+ ]
287
+ )
277
288
278
289
if self .trace :
279
290
args .append ("--trace" )
0 commit comments