Skip to content

Instantly share code, notes, and snippets.

@QEDK
Created June 23, 2025 13:42
Show Gist options
  • Save QEDK/94c561ebe59d19bb17f4f7dee7d8aca3 to your computer and use it in GitHub Desktop.
Save QEDK/94c561ebe59d19bb17f4f7dee7d8aca3 to your computer and use it in GitHub Desktop.
let client = reqwest::Client::builder()
.pool_idle_timeout(Duration::from_secs(90))
.pool_max_idle_per_host(10)
.timeout(Duration::from_secs(30))
.connect_timeout(Duration::from_secs(10))
.tcp_keepalive(Duration::from_secs(60))
.tcp_nodelay(true)
.build()
.expect("Failed to create HTTP client");
let http_client = RpcClient::builder()
.transport(Http::with_client(client, rpc_url), false);
let provider = ProviderBuilder::new()
.connect_client(http_client);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment