@@ -230,18 +230,12 @@ impl ConfigureEvmEnv for EthEvmConfig {
230
230
impl ConfigureEvm for EthEvmConfig {
231
231
type Evm < ' a , DB : Database + ' a , I : ' a > = EthEvm < ' a , I , DB > ;
232
232
233
- fn evm_with_env < DB : Database > (
234
- & self ,
235
- db : DB ,
236
- evm_env : EvmEnv ,
237
- tx : TxEnv ,
238
- ) -> Self :: Evm < ' _ , DB , ( ) > {
233
+ fn evm_with_env < DB : Database > ( & self , db : DB , evm_env : EvmEnv ) -> Self :: Evm < ' _ , DB , ( ) > {
239
234
EthEvm (
240
235
EvmBuilder :: default ( )
241
236
. with_db ( db)
242
237
. with_cfg_env_with_handler_cfg ( evm_env. cfg_env_with_handler_cfg )
243
238
. with_block_env ( evm_env. block_env )
244
- . with_tx_env ( tx)
245
239
. build ( ) ,
246
240
)
247
241
}
@@ -250,7 +244,6 @@ impl ConfigureEvm for EthEvmConfig {
250
244
& self ,
251
245
db : DB ,
252
246
evm_env : EvmEnv ,
253
- tx : TxEnv ,
254
247
inspector : I ,
255
248
) -> Self :: Evm < ' _ , DB , I >
256
249
where
@@ -263,7 +256,6 @@ impl ConfigureEvm for EthEvmConfig {
263
256
. with_external_context ( inspector)
264
257
. with_cfg_env_with_handler_cfg ( evm_env. cfg_env_with_handler_cfg )
265
258
. with_block_env ( evm_env. block_env )
266
- . with_tx_env ( tx)
267
259
. append_handler_register ( inspector_handle_register)
268
260
. build ( ) ,
269
261
)
@@ -319,7 +311,7 @@ mod tests {
319
311
320
312
let evm_env = EvmEnv :: default ( ) ;
321
313
322
- let evm = evm_config. evm_with_env ( db, evm_env. clone ( ) , Default :: default ( ) ) ;
314
+ let evm = evm_config. evm_with_env ( db, evm_env. clone ( ) ) ;
323
315
324
316
// Check that the EVM environment
325
317
assert_eq ! ( evm. context. evm. env. block, evm_env. block_env) ;
@@ -350,7 +342,7 @@ mod tests {
350
342
..Default :: default ( )
351
343
} ;
352
344
353
- let evm = evm_config. evm_with_env ( db, evm_env, Default :: default ( ) ) ;
345
+ let evm = evm_config. evm_with_env ( db, evm_env) ;
354
346
355
347
// Check that the EVM environment is initialized with the custom environment
356
348
assert_eq ! ( evm. context. evm. inner. env. cfg, cfg) ;
@@ -376,7 +368,6 @@ mod tests {
376
368
number : U256 :: from ( 42 ) ,
377
369
..Default :: default ( )
378
370
} ;
379
- let tx = TxEnv { gas_limit : 5_000_000 , gas_price : U256 :: from ( 50 ) , ..Default :: default ( ) } ;
380
371
381
372
let evm_env = EvmEnv {
382
373
cfg_env_with_handler_cfg : CfgEnvWithHandlerCfg {
@@ -386,11 +377,10 @@ mod tests {
386
377
block_env : block,
387
378
} ;
388
379
389
- let evm = evm_config. evm_with_env ( db, evm_env. clone ( ) , tx . clone ( ) ) ;
380
+ let evm = evm_config. evm_with_env ( db, evm_env. clone ( ) ) ;
390
381
391
382
// Verify that the block and transaction environments are set correctly
392
383
assert_eq ! ( evm. context. evm. env. block, evm_env. block_env) ;
393
- assert_eq ! ( evm. context. evm. env. tx, tx) ;
394
384
395
385
// Default spec ID
396
386
assert_eq ! ( evm. handler. spec_id( ) , SpecId :: LATEST ) ;
@@ -416,7 +406,7 @@ mod tests {
416
406
..Default :: default ( )
417
407
} ;
418
408
419
- let evm = evm_config. evm_with_env ( db, evm_env, Default :: default ( ) ) ;
409
+ let evm = evm_config. evm_with_env ( db, evm_env) ;
420
410
421
411
// Check that the spec ID is setup properly
422
412
assert_eq ! ( evm. handler. spec_id( ) , SpecId :: PETERSBURG ) ;
@@ -436,12 +426,7 @@ mod tests {
436
426
437
427
let evm_env = EvmEnv :: default ( ) ;
438
428
439
- let evm = evm_config. evm_with_env_and_inspector (
440
- db,
441
- evm_env. clone ( ) ,
442
- Default :: default ( ) ,
443
- NoOpInspector ,
444
- ) ;
429
+ let evm = evm_config. evm_with_env_and_inspector ( db, evm_env. clone ( ) , NoOpInspector ) ;
445
430
446
431
// Check that the EVM environment is set to default values
447
432
assert_eq ! ( evm. context. evm. env. block, evm_env. block_env) ;
@@ -461,7 +446,6 @@ mod tests {
461
446
462
447
let cfg_env = CfgEnv :: default ( ) . with_chain_id ( 111 ) ;
463
448
let block = BlockEnv :: default ( ) ;
464
- let tx = TxEnv :: default ( ) ;
465
449
let evm_env = EvmEnv {
466
450
cfg_env_with_handler_cfg : CfgEnvWithHandlerCfg {
467
451
cfg_env : cfg_env. clone ( ) ,
@@ -470,7 +454,7 @@ mod tests {
470
454
block_env : block,
471
455
} ;
472
456
473
- let evm = evm_config. evm_with_env_and_inspector ( db, evm_env, tx , NoOpInspector ) ;
457
+ let evm = evm_config. evm_with_env_and_inspector ( db, evm_env, NoOpInspector ) ;
474
458
475
459
// Check that the EVM environment is set with custom configuration
476
460
assert_eq ! ( evm. context. evm. env. cfg, cfg_env) ;
@@ -494,15 +478,12 @@ mod tests {
494
478
number : U256 :: from ( 42 ) ,
495
479
..Default :: default ( )
496
480
} ;
497
- let tx = TxEnv { gas_limit : 5_000_000 , gas_price : U256 :: from ( 50 ) , ..Default :: default ( ) } ;
498
481
let evm_env = EvmEnv { block_env : block, ..Default :: default ( ) } ;
499
482
500
- let evm =
501
- evm_config. evm_with_env_and_inspector ( db, evm_env. clone ( ) , tx. clone ( ) , NoOpInspector ) ;
483
+ let evm = evm_config. evm_with_env_and_inspector ( db, evm_env. clone ( ) , NoOpInspector ) ;
502
484
503
485
// Verify that the block and transaction environments are set correctly
504
486
assert_eq ! ( evm. context. evm. env. block, evm_env. block_env) ;
505
- assert_eq ! ( evm. context. evm. env. tx, tx) ;
506
487
assert_eq ! ( evm. context. external, NoOpInspector ) ;
507
488
assert_eq ! ( evm. handler. spec_id( ) , SpecId :: LATEST ) ;
508
489
@@ -525,12 +506,7 @@ mod tests {
525
506
..Default :: default ( )
526
507
} ;
527
508
528
- let evm = evm_config. evm_with_env_and_inspector (
529
- db,
530
- evm_env. clone ( ) ,
531
- Default :: default ( ) ,
532
- NoOpInspector ,
533
- ) ;
509
+ let evm = evm_config. evm_with_env_and_inspector ( db, evm_env. clone ( ) , NoOpInspector ) ;
534
510
535
511
// Check that the spec ID is set properly
536
512
assert_eq ! ( evm. handler. spec_id( ) , SpecId :: PETERSBURG ) ;
0 commit comments