diff --git a/crates/client/rpc/src/events/mod.rs b/crates/client/rpc/src/events/mod.rs index 409967117..2140f645f 100644 --- a/crates/client/rpc/src/events/mod.rs +++ b/crates/client/rpc/src/events/mod.rs @@ -1,7 +1,7 @@ use deoxys_runtime::opaque::DBlockT; +use jsonrpsee::core::RpcResult; use mc_sync::l2::get_pending_block; use mp_block::DeoxysBlock; -use jsonrpsee::core::RpcResult; use mp_felt::Felt252Wrapper; use mp_hashers::HasherT; use pallet_starknet_runtime_api::{ConvertTransactionRuntimeApi, StarknetRuntimeApi}; @@ -89,7 +89,7 @@ where Felt252Wrapper::try_from(h) .map(|f| f.0) .map_err(|e| { - error!("'{e}'"); + log::error!("'{e}'"); StarknetRpcApiError::InternalServerError }) .unwrap() @@ -116,12 +116,12 @@ where fn get_block_by_number(&self, block_number: u64) -> Result { let substrate_block_hash = self.substrate_block_hash_from_starknet_block(BlockId::Number(block_number)).map_err(|e| { - error!("'{e}'"); + log::error!("'{e}'"); StarknetRpcApiError::BlockNotFound })?; let starknet_block = get_block_by_block_hash(self.client.as_ref(), substrate_block_hash).map_err(|e| { - error!("'{e}'"); + log::error!("'{e}'"); StarknetRpcApiError::BlockNotFound })?; Ok(starknet_block) @@ -130,12 +130,12 @@ where fn get_block_by_hash(&self, block_hash: FieldElement) -> Result { let substrate_block_hash = self.substrate_block_hash_from_starknet_block(BlockId::Hash(block_hash)).map_err(|e| { - error!("'{e}'"); + log::error!("'{e}'"); StarknetRpcApiError::BlockNotFound })?; let starknet_block = get_block_by_block_hash(self.client.as_ref(), substrate_block_hash).map_err(|e| { - error!("'{e}'"); + log::error!("'{e}'"); StarknetRpcApiError::BlockNotFound })?; Ok(starknet_block) @@ -145,7 +145,7 @@ where if block_tag == BlockTag::Latest { self.get_block_by_number( self.substrate_block_number_from_starknet_block(BlockId::Tag(BlockTag::Latest)).map_err(|e| { - error!("'{e}'"); + log::error!("'{e}'"); StarknetRpcApiError::BlockNotFound })?, ) diff --git a/crates/client/rpc/src/methods/read/get_events.rs b/crates/client/rpc/src/methods/read/get_events.rs index 40cc437cf..39fa63566 100644 --- a/crates/client/rpc/src/methods/read/get_events.rs +++ b/crates/client/rpc/src/methods/read/get_events.rs @@ -176,14 +176,14 @@ where H: HasherT + Send + Sync + 'static, { let latest = starknet.substrate_block_number_from_starknet_block(BlockId::Tag(BlockTag::Latest)).map_err(|e| { - error!("'{e}'"); + log::error!("'{e}'"); StarknetRpcApiError::BlockNotFound })?; let from = if from_block == Some(BlockId::Tag(BlockTag::Pending)) { latest + 1 } else { starknet.substrate_block_number_from_starknet_block(from_block.unwrap_or(BlockId::Number(0))).map_err(|e| { - error!("'{e}'"); + log::error!("'{e}'"); StarknetRpcApiError::BlockNotFound })? }; @@ -191,7 +191,7 @@ where latest + 1 } else { starknet.substrate_block_number_from_starknet_block(from_block.unwrap_or(BlockId::Number(0))).map_err(|e| { - error!("'{e}'"); + log::error!("'{e}'"); StarknetRpcApiError::BlockNotFound })? };