From 671550e60993f9af3cf593e704cd739d502e4a0b Mon Sep 17 00:00:00 2001 From: Theo Butler Date: Thu, 18 Jul 2024 08:51:53 -0400 Subject: [PATCH] chore: update thegraph-core --- Cargo.lock | 5 ++--- Cargo.toml | 4 ++-- src/main.rs | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f287e48..7902358 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3950,16 +3950,15 @@ dependencies = [ [[package]] name = "thegraph-core" -version = "0.4.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aafbdb88afae23b3813cc2ea02340f4f628673df17ac7a44deb65f95f3f2a1a" +checksum = "beaeffb434bc359006ba96553f2e8db2d1fedd37da988d3c89041fce0bd1fd10" dependencies = [ "alloy-primitives", "alloy-sol-types", "bs58", "ethers-core", "indoc", - "lazy_static", "reqwest 0.12.5", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index a82e54b..3a59c2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,13 +15,13 @@ rdkafka = { version = "0.36.0", features = [ "gssapi", "tracing", ] } -reqwest = { version = "0.12.4" } +reqwest = { version = "0.12.5" } reqwest_old = { package = "reqwest", version = "0.11.27" } serde = { version = "1.0.190", features = ["derive"] } serde_json = { version = "1.0.108", features = ["raw_value"] } serde_with = "3.4.0" snmalloc-rs = "0.3.4" -thegraph-core = { version = "0.4.1", features = ["subgraph-client"] } +thegraph-core = { version = "0.5.6", features = ["subgraph-client"] } tokio = { version = "1.32.0", default-features = false, features = [ "macros", "rt-multi-thread", diff --git a/src/main.rs b/src/main.rs index 804d08d..9ffcfd4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ use ethers::{ use serde::Deserialize; use serde_with::serde_as; use thegraph_core::{ - client::Client as SubgraphClient, + client::{Client as SubgraphClient, PaginatedQueryError}, types::{alloy_primitives::Address, alloy_sol_types::SolValue}, }; use tokio::time::{interval, MissedTickBehavior}; @@ -326,7 +326,7 @@ async fn escrow_accounts( .into_iter() .map(|a| (a.receiver.id, a.balance)) .collect()), - Err(err) if err == "empty response" => Ok(Default::default()), + Err(PaginatedQueryError::EmptyResponse) => Ok(Default::default()), Err(err) => Err(anyhow!(err)), } }