Skip to content

Commit

Permalink
chore: repalce blockchain client
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-aranha-cw committed Feb 4, 2025
1 parent ec44812 commit cf8086c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/infra/blockchain_client/blockchain_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use tokio::sync::RwLock;
use tokio::sync::RwLockReadGuard;

use crate::alias::EthersBytes;
use crate::alias::EthersTransaction;
use crate::alias::AlloyTransaction;
use crate::alias::JsonValue;
use crate::eth::primitives::Address;
use crate::eth::primitives::BlockNumber;
Expand Down Expand Up @@ -170,12 +170,12 @@ impl BlockchainClient {
}

/// Fetches a transaction by hash.
pub async fn fetch_transaction(&self, tx_hash: Hash) -> anyhow::Result<Option<EthersTransaction>> {
pub async fn fetch_transaction(&self, tx_hash: Hash) -> anyhow::Result<Option<AlloyTransaction>> {
tracing::debug!(%tx_hash, "fetching transaction");

let hash = to_json_value(tx_hash);

let result = self.http.request::<Option<EthersTransaction>, _>("eth_getTransactionByHash", [hash]).await;
let result = self.http.request::<Option<AlloyTransaction>, _>("eth_getTransactionByHash", [hash]).await;

match result {
Ok(tx) => Ok(tx),
Expand Down

0 comments on commit cf8086c

Please sign in to comment.