From e78de8d63ea613ca00c810e2c54bc216f3a671a4 Mon Sep 17 00:00:00 2001 From: bronco Date: Fri, 25 Aug 2023 13:05:05 +0200 Subject: [PATCH] fix: increase multicall batch size --- balancer-js/src/lib/utils/multiCaller3.ts | 2 +- balancer-js/src/modules/sor/pool-data/onChainData3.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/balancer-js/src/lib/utils/multiCaller3.ts b/balancer-js/src/lib/utils/multiCaller3.ts index b6f28f660..3c592e566 100644 --- a/balancer-js/src/lib/utils/multiCaller3.ts +++ b/balancer-js/src/lib/utils/multiCaller3.ts @@ -35,7 +35,7 @@ export class Multicaller3 { async execute( from: Record = {}, - batchSize = 100 // Define the number of function calls in each batch + batchSize = 1024 // Define the number of function calls in each batch ): Promise> { const obj = from; const results = await this.executeMulticall(batchSize); diff --git a/balancer-js/src/modules/sor/pool-data/onChainData3.ts b/balancer-js/src/modules/sor/pool-data/onChainData3.ts index 5a0c4ce72..26924c79f 100644 --- a/balancer-js/src/modules/sor/pool-data/onChainData3.ts +++ b/balancer-js/src/modules/sor/pool-data/onChainData3.ts @@ -193,7 +193,7 @@ export const fetchOnChainPoolData = async ( poolTypeCalls(poolType)(id, address, multicaller); }); - const results = (await multicaller.execute({}, 100)) as { + const results = (await multicaller.execute({}, 1024)) as { [id: string]: OnchainData; };