11use crate :: {
2+ Pnt ,
23 ctx:: RpcCtx ,
34 eth:: { CallErrorData , EthError } ,
45 interest:: { FilterOutput , InterestKind } ,
56 receipts:: build_signet_receipt,
67 util:: { await_jh_option, await_jh_option_response, response_tri} ,
7- Pnt ,
88} ;
99use ajj:: { HandlerCtx , ResponsePayload } ;
1010use alloy:: {
1111 consensus:: { BlockHeader , TxEnvelope } ,
1212 eips:: {
13- eip2718:: { Decodable2718 , Encodable2718 } ,
1413 BlockId , BlockNumberOrTag ,
14+ eip2718:: { Decodable2718 , Encodable2718 } ,
1515 } ,
1616 network:: Ethereum ,
17- primitives:: { Address , B256 , U256 , U64 } ,
17+ primitives:: { Address , B256 , U64 , U256 } ,
1818 rpc:: types:: {
19- pubsub:: SubscriptionKind , state:: StateOverride , BlockOverrides , Filter , TransactionRequest ,
19+ BlockOverrides , Filter , TransactionRequest , pubsub:: SubscriptionKind , state:: StateOverride ,
2020 } ,
2121} ;
2222use reth:: {
@@ -29,7 +29,7 @@ use reth_rpc_eth_api::{RpcBlock, RpcHeader, RpcReceipt, RpcTransaction};
2929use serde:: Deserialize ;
3030use signet_evm:: EvmErrored ;
3131use std:: borrow:: Cow ;
32- use tracing:: { debug , trace_span , Instrument } ;
32+ use tracing:: { Instrument , debug , trace_span } ;
3333use trevm:: revm:: context:: result:: ExecutionResult ;
3434
3535/// Args for `eth_estimateGas` and `eth_call`.
@@ -405,7 +405,7 @@ where
405405/// - If the gas is below `MIN_TRANSACTION_GAS`, set it to `None`
406406/// - If the gas is above the `rpc_gas_cap`, set it to the `rpc_gas_cap`
407407/// - Otherwise, do nothing
408- fn normalize_gas_stateless ( request : & mut TransactionRequest , max_gas : u64 ) {
408+ const fn normalize_gas_stateless ( request : & mut TransactionRequest , max_gas : u64 ) {
409409 match request. gas {
410410 Some ( ..trevm:: MIN_TRANSACTION_GAS ) => request. gas = None ,
411411 Some ( val) if val > max_gas => request. gas = Some ( max_gas) ,
@@ -443,7 +443,7 @@ where
443443 return ResponsePayload :: internal_error_with_message_and_obj (
444444 "error while loading block cfg" . into ( ) ,
445445 e. to_string ( ) . into ( ) ,
446- )
446+ ) ;
447447 }
448448 } ;
449449
@@ -550,7 +550,7 @@ where
550550 return ResponsePayload :: internal_error_with_message_and_obj (
551551 "error while loading block cfg" . into ( ) ,
552552 e. to_string ( ) . into ( ) ,
553- )
553+ ) ;
554554 }
555555 } ;
556556
@@ -599,13 +599,13 @@ where
599599 Signet : Pnt ,
600600{
601601 let task = async move {
602- let ( block , suggested) = tokio:: try_join!(
603- ctx. signet( ) . raw_block ( BlockId :: latest( ) ) ,
602+ let ( header , suggested) = tokio:: try_join!(
603+ ctx. signet( ) . raw_header ( BlockId :: latest( ) ) ,
604604 ctx. signet( ) . gas_oracle( ) . suggest_tip_cap( ) ,
605605 )
606606 . map_err ( |e| e. to_string ( ) ) ?;
607607
608- let base_fee = block . and_then ( |b| b . 1 . header ( ) . base_fee_per_gas ( ) ) . unwrap_or_default ( ) ;
608+ let base_fee = header . and_then ( |h| h . 1 . base_fee_per_gas ( ) ) . unwrap_or_default ( ) ;
609609 Ok ( suggested + U256 :: from ( base_fee) )
610610 } ;
611611
0 commit comments