@@ -100,20 +100,24 @@ impl EthNamespace {
100100 _block : Option < BlockNumber > ,
101101 state_override : Option < StateOverride > ,
102102 ) -> Result < U256 , Web3Error > {
103+ tracing:: info!( "Estimating gas for request: {:?}" , request) ;
103104 let mut request_with_gas_per_pubdata_overridden = request;
104105 self . state
105106 . set_nonce_for_call_request ( & mut request_with_gas_per_pubdata_overridden)
106107 . await ?;
107108
108109 if let Some ( eip712_meta) = & mut request_with_gas_per_pubdata_overridden. eip712_meta {
110+ tracing:: info!( "Request has eip712 metadata" ) ;
109111 if eip712_meta. gas_per_pubdata == U256 :: zero ( ) {
112+ tracing:: info!( "But its gas per pubdata is zero" ) ;
110113 eip712_meta. gas_per_pubdata = DEFAULT_L2_TX_GAS_PER_PUBDATA_BYTE . into ( ) ;
111114 }
112115 }
113116
114117 let is_eip712 = request_with_gas_per_pubdata_overridden
115118 . eip712_meta
116119 . is_some ( ) ;
120+ tracing:: info!( "Is EIP712? {is_eip712}" ) ;
117121 let mut connection = self . state . acquire_connection ( ) . await ?;
118122 let block_args = BlockArgs :: pending ( & mut connection) . await ?;
119123 drop ( connection) ;
@@ -122,6 +126,7 @@ impl EthNamespace {
122126 self . state . api_config . max_tx_size ,
123127 block_args. use_evm_emulator ( ) ,
124128 ) ?;
129+ tracing:: info!( "Converted to L2 transaction {tx:?}" ) ;
125130
126131 // The user may not include the proper transaction type during the estimation of
127132 // the gas fee. However, it is needed for the bootloader checks to pass properly.
@@ -132,6 +137,7 @@ impl EthNamespace {
132137 // When we're estimating fee, we are trying to deduce values related to fee, so we should
133138 // not consider provided ones.
134139 let gas_price = self . state . tx_sender . gas_price ( ) . await ?;
140+ tracing:: info!( "Using gas price {gas_price}" ) ;
135141 tx. common_data . fee . max_fee_per_gas = gas_price. into ( ) ;
136142 tx. common_data . fee . max_priority_fee_per_gas = tx. common_data . fee . max_fee_per_gas ;
137143
@@ -153,6 +159,7 @@ impl EthNamespace {
153159 search_kind,
154160 )
155161 . await ?;
162+ tracing:: info!( "Final fee {fee:?}" ) ;
156163 Ok ( fee. gas_limit )
157164 }
158165
0 commit comments