@@ -215,7 +215,7 @@ pub trait EthCall: EstimateCall + Call + LoadPendingBlock + LoadBlock + FullEthA
215215 overrides : EvmOverrides ,
216216 ) -> impl Future < Output = Result < Bytes , Self :: Error > > + Send {
217217 async move {
218- let ( res, _env ) =
218+ let res =
219219 self . transact_call_at ( request, block_number. unwrap_or_default ( ) , overrides) . await ?;
220220
221221 ensure_success ( res. result )
@@ -288,7 +288,7 @@ pub trait EthCall: EstimateCall + Call + LoadPendingBlock + LoadBlock + FullEthA
288288 let block_transactions = block. transactions_recovered ( ) . take ( num_txs) ;
289289 for tx in block_transactions {
290290 let tx_env = RpcNodeCore :: evm_config ( & this) . tx_env ( tx) ;
291- let ( res, _ ) = this. transact ( & mut db, evm_env. clone ( ) , tx_env) ?;
291+ let res = this. transact ( & mut db, evm_env. clone ( ) , tx_env) ?;
292292 db. commit ( res. state ) ;
293293 }
294294 }
@@ -313,7 +313,7 @@ pub trait EthCall: EstimateCall + Call + LoadPendingBlock + LoadBlock + FullEthA
313313
314314 let ( current_evm_env, prepared_tx) =
315315 this. prepare_call_env ( evm_env. clone ( ) , tx, & mut db, overrides) ?;
316- let ( res, _ ) = this. transact ( & mut db, current_evm_env, prepared_tx) ?;
316+ let res = this. transact ( & mut db, current_evm_env, prepared_tx) ?;
317317
318318 match ensure_success :: < _ , Self :: Error > ( res. result ) {
319319 Ok ( output) => {
@@ -426,11 +426,11 @@ pub trait EthCall: EstimateCall + Call + LoadPendingBlock + LoadBlock + FullEthA
426426 } ;
427427
428428 // transact again to get the exact gas used
429- let ( result, ( _, tx_env) ) = self . transact ( & mut db, evm_env, tx_env) ?;
429+ let gas_limit = tx_env. gas_limit ( ) ;
430+ let result = self . transact ( & mut db, evm_env, tx_env) ?;
430431 let res = match result. result {
431432 ExecutionResult :: Halt { reason, gas_used } => {
432- let error =
433- Some ( Self :: Error :: from_evm_halt ( reason, tx_env. gas_limit ( ) ) . to_string ( ) ) ;
433+ let error = Some ( Self :: Error :: from_evm_halt ( reason, gas_limit) . to_string ( ) ) ;
434434 AccessListResult { access_list, gas_used : U256 :: from ( gas_used) , error }
435435 }
436436 ExecutionResult :: Revert { output, gas_used } => {
@@ -477,61 +477,47 @@ pub trait Call:
477477
478478 /// Executes the `TxEnv` against the given [Database] without committing state
479479 /// changes.
480- #[ expect( clippy:: type_complexity) ]
481480 fn transact < DB > (
482481 & self ,
483482 db : DB ,
484483 evm_env : EvmEnvFor < Self :: Evm > ,
485484 tx_env : TxEnvFor < Self :: Evm > ,
486- ) -> Result <
487- ( ResultAndState < HaltReasonFor < Self :: Evm > > , ( EvmEnvFor < Self :: Evm > , TxEnvFor < Self :: Evm > ) ) ,
488- Self :: Error ,
489- >
485+ ) -> Result < ResultAndState < HaltReasonFor < Self :: Evm > > , Self :: Error >
490486 where
491487 DB : Database < Error = ProviderError > ,
492488 {
493- let mut evm = self . evm_config ( ) . evm_with_env ( db, evm_env. clone ( ) ) ;
494- let res = evm. transact ( tx_env. clone ( ) ) . map_err ( Self :: Error :: from_evm_err) ?;
489+ let mut evm = self . evm_config ( ) . evm_with_env ( db, evm_env) ;
490+ let res = evm. transact ( tx_env) . map_err ( Self :: Error :: from_evm_err) ?;
495491
496- Ok ( ( res, ( evm_env , tx_env ) ) )
492+ Ok ( res)
497493 }
498494
499495 /// Executes the [`EvmEnv`] against the given [Database] without committing state
500496 /// changes.
501- #[ expect( clippy:: type_complexity) ]
502497 fn transact_with_inspector < DB , I > (
503498 & self ,
504499 db : DB ,
505500 evm_env : EvmEnvFor < Self :: Evm > ,
506501 tx_env : TxEnvFor < Self :: Evm > ,
507502 inspector : I ,
508- ) -> Result <
509- ( ResultAndState < HaltReasonFor < Self :: Evm > > , ( EvmEnvFor < Self :: Evm > , TxEnvFor < Self :: Evm > ) ) ,
510- Self :: Error ,
511- >
503+ ) -> Result < ResultAndState < HaltReasonFor < Self :: Evm > > , Self :: Error >
512504 where
513505 DB : Database < Error = ProviderError > ,
514506 I : InspectorFor < Self :: Evm , DB > ,
515507 {
516- let mut evm = self . evm_config ( ) . evm_with_env_and_inspector ( db, evm_env. clone ( ) , inspector) ;
517- let res = evm. transact ( tx_env. clone ( ) ) . map_err ( Self :: Error :: from_evm_err) ?;
508+ let mut evm = self . evm_config ( ) . evm_with_env_and_inspector ( db, evm_env, inspector) ;
509+ let res = evm. transact ( tx_env) . map_err ( Self :: Error :: from_evm_err) ?;
518510
519- Ok ( ( res, ( evm_env , tx_env ) ) )
511+ Ok ( res)
520512 }
521513
522514 /// Executes the call request at the given [`BlockId`].
523- #[ expect( clippy:: type_complexity) ]
524515 fn transact_call_at (
525516 & self ,
526517 request : TransactionRequest ,
527518 at : BlockId ,
528519 overrides : EvmOverrides ,
529- ) -> impl Future <
530- Output = Result <
531- ( ResultAndState < HaltReasonFor < Self :: Evm > > , ( EvmEnvFor < Self :: Evm > , TxEnvFor < Self :: Evm > ) ) ,
532- Self :: Error ,
533- > ,
534- > + Send
520+ ) -> impl Future < Output = Result < ResultAndState < HaltReasonFor < Self :: Evm > > , Self :: Error > > + Send
535521 where
536522 Self : LoadPendingBlock ,
537523 {
@@ -655,7 +641,7 @@ pub trait Call:
655641
656642 let tx_env = RpcNodeCore :: evm_config ( & this) . tx_env ( tx) ;
657643
658- let ( res, _ ) = this. transact ( & mut db, evm_env, tx_env) ?;
644+ let res = this. transact ( & mut db, evm_env, tx_env) ?;
659645 f ( tx_info, res, db)
660646 } )
661647 . await
0 commit comments