From 696a95376a37b05a56de6ef204b1652828d1c0b8 Mon Sep 17 00:00:00 2001 From: Evgeny Taktarov Date: Thu, 12 Sep 2024 22:29:40 +0700 Subject: [PATCH] fix: batch size --- config/groups/web3.ts | 2 +- pages/api/rpc.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/groups/web3.ts b/config/groups/web3.ts index ea3bbe8b5..85f00a9c3 100644 --- a/config/groups/web3.ts +++ b/config/groups/web3.ts @@ -5,7 +5,7 @@ export const PROVIDER_POLLING_INTERVAL = 12_000; // how long in ms to wait for RPC batching(multicall and provider) export const PROVIDER_BATCH_TIME = 150; // max batch -export const PROVIDER_MAX_BATCH = 10; +export const PROVIDER_MAX_BATCH = 20; // account for gas estimation // will always have >=0.001 ether, >=0.001 stETH, >=0.001 wstETH diff --git a/pages/api/rpc.ts b/pages/api/rpc.ts index 523f49ffe..807a67941 100644 --- a/pages/api/rpc.ts +++ b/pages/api/rpc.ts @@ -61,7 +61,7 @@ const rpc = rpcFactory({ 'net_version', ], allowedCallAddresses, - maxBatchCount: 10, + maxBatchCount: config.PROVIDER_MAX_BATCH, }); export default wrapNextRequest([