@@ -2,7 +2,8 @@ use candid::Principal;
22use did:: block:: { BlockResult , ExeResult } ;
33use did:: error:: Result ;
44use did:: {
5- BasicAccount , Block , BlockNumber , Bytes , Transaction , TransactionReceipt , H160 , H256 , U256 ,
5+ BasicAccount , Block , BlockNumber , Bytes , EstimateGasRequest , Transaction , TransactionReceipt ,
6+ H160 , H256 , U256 ,
67} ;
78use ic_canister_client:: { CanisterClient , CanisterClientResult } ;
89
@@ -329,29 +330,15 @@ impl<C: CanisterClient> EvmCanisterClient<C> {
329330 ///
330331 /// # Arguments
331332 ///
332- /// * `from` - The address of the caller
333- /// * `to` - The address of the contract to call
334- /// * `gas_limit` - The gas limit for the call
335- /// * `value` - The value to send to the contract
336- /// * `input` - The data to send to the contract
337- ///
333+ /// * `request` - The request to estimate the gas for the call
338334 /// # Returns
339335 ///
340336 /// The estimated gas for the call
341337 pub async fn eth_estimate_gas (
342338 & self ,
343- from : H160 ,
344- to : Option < H160 > ,
345- gas_limit : u64 ,
346- value : U256 ,
347- input : Bytes ,
339+ request : EstimateGasRequest ,
348340 ) -> CanisterClientResult < EvmResult < U256 > > {
349- self . client
350- . query (
351- "eth_estimate_gas" ,
352- ( from, to, gas_limit, value, gas_limit, input) ,
353- )
354- . await
341+ self . client . query ( "eth_estimate_gas" , ( request, ) ) . await
355342 }
356343
357344 /// Get the transaction count at a given block hash
@@ -468,6 +455,19 @@ impl<C: CanisterClient> EvmCanisterClient<C> {
468455 . await
469456 }
470457
458+ /// Updates the runtime configuration of the logger with a new filter in the same form as the `RUST_LOG`
459+ /// environment variable.
460+ /// Example of valid filters:
461+ /// - info
462+ /// - debug,crate1::mod1=error,crate1::mod2,crate2=debug
463+ ///
464+ /// # Arguments
465+ ///
466+ /// * `filter` - The new filter.
467+ pub async fn set_logger_filter ( & self , filter : & str ) -> CanisterClientResult < Result < ( ) > > {
468+ self . client . update ( "set_logger_filter" , ( filter, ) ) . await
469+ }
470+
471471 /// Disable or enable the EVM. This function requires admin permissions.
472472 ///
473473 /// # Arguments
0 commit comments