From 4a9442bf4ded2ef3735eba4dd4ef7a0558463f3e Mon Sep 17 00:00:00 2001 From: Jono Prest Date: Thu, 26 Mar 2026 16:38:58 +0000 Subject: [PATCH 1/2] Fix broken doctests in README.md Mark the Quick Start example as `no_run` (compiles but doesn't execute, since it requires network access) and the network snippets as `ignore` (contains placeholder `...` syntax that isn't valid Rust). Co-authored-by: claude https://claude.ai/code/session_01R4SPHryLoDodD8HJg3YaLh --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 55974e5..e0fba2a 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ export ENVIO_API_TOKEN="your-token-here" Query ERC-20 Transfer events from USDC on Ethereum mainnet: -```rust +```rust,no_run use hypersync_client::{Client, net_types::{Query, LogFilter, LogField}, StreamConfig}; #[tokio::main] @@ -108,7 +108,7 @@ See the [examples directory](./examples) for more usage patterns including walle Change the `chain_id` (or use `url`) to connect to any supported network: -```rust +```rust,ignore // Arbitrum Client::builder().chain_id(42161).api_token(...).build()?; From 162204d61e47b713a468a66f5610696fb1cf9d5f Mon Sep 17 00:00:00 2001 From: Jono Prest Date: Thu, 26 Mar 2026 16:41:42 +0000 Subject: [PATCH 2/2] Make network examples snippet real compiling code Replace placeholder `(...)` syntax with proper imports and env var usage so the doctest compiles. Uses `no_run` since it needs network. Co-authored-by: claude https://claude.ai/code/session_01R4SPHryLoDodD8HJg3YaLh --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e0fba2a..413dfc5 100644 --- a/README.md +++ b/README.md @@ -108,15 +108,22 @@ See the [examples directory](./examples) for more usage patterns including walle Change the `chain_id` (or use `url`) to connect to any supported network: -```rust,ignore +```rust,no_run +use hypersync_client::Client; + +# fn main() -> anyhow::Result<()> { +let api_token = std::env::var("ENVIO_API_TOKEN")?; + // Arbitrum -Client::builder().chain_id(42161).api_token(...).build()?; +Client::builder().chain_id(42161).api_token(&api_token).build()?; // Base -Client::builder().chain_id(8453).api_token(...).build()?; +Client::builder().chain_id(8453).api_token(&api_token).build()?; // Or use the URL directly -Client::builder().url("https://eth.hypersync.xyz").api_token(...).build()?; +Client::builder().url("https://eth.hypersync.xyz").api_token(&api_token).build()?; +# Ok(()) +# } ``` See the full list of [supported networks and URLs](https://docs.envio.dev/docs/HyperSync/hypersync-supported-networks).