@@ -30,7 +30,7 @@ use signet_evm::EvmErrored;
3030use signet_node_types:: Pnt ;
3131use std:: borrow:: Cow ;
3232use tracing:: { Instrument , debug, trace_span} ;
33- use trevm:: revm:: context:: result:: ExecutionResult ;
33+ use trevm:: { EstimationResult , MIN_TRANSACTION_GAS , revm:: context:: result:: ExecutionResult } ;
3434
3535/// Args for `eth_estimateGas` and `eth_call`.
3636#[ derive( Debug , Deserialize ) ]
@@ -407,7 +407,7 @@ where
407407/// - Otherwise, do nothing
408408const fn normalize_gas_stateless ( request : & mut TransactionRequest , max_gas : u64 ) {
409409 match request. gas {
410- Some ( ..trevm :: MIN_TRANSACTION_GAS ) => request. gas = None ,
410+ Some ( ..MIN_TRANSACTION_GAS ) => request. gas = None ,
411411 Some ( val) if val > max_gas => request. gas = Some ( max_gas) ,
412412 _ => { }
413413 }
@@ -568,16 +568,14 @@ where
568568 let ( estimate, _) = response_tri ! ( trevm. estimate_gas( ) . map_err( EvmErrored :: into_error) ) ;
569569
570570 match estimate {
571- trevm:: EstimationResult :: Success { limit, .. } => {
572- ResponsePayload :: Success ( U64 :: from ( limit) )
573- }
574- trevm:: EstimationResult :: Revert { reason, .. } => {
571+ EstimationResult :: Success { limit, .. } => ResponsePayload :: Success ( U64 :: from ( limit) ) ,
572+ EstimationResult :: Revert { reason, .. } => {
575573 ResponsePayload :: internal_error_with_message_and_obj (
576574 "execution reverted" . into ( ) ,
577575 reason. clone ( ) . into ( ) ,
578576 )
579577 }
580- trevm :: EstimationResult :: Halt { reason, .. } => {
578+ EstimationResult :: Halt { reason, .. } => {
581579 ResponsePayload :: internal_error_with_message_and_obj (
582580 "execution halted" . into ( ) ,
583581 format ! ( "{reason:?}" ) . into ( ) ,
0 commit comments