Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 798fe01

Browse files
committed
refactor: remove manual chunking, use multicall batching
1 parent c006b5d commit 798fe01

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

  • src/strategies/xaqua-vaults-treasury

src/strategies/xaqua-vaults-treasury/index.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { multicall } from '../../utils';
44
export const author = 'pepperati224';
55
export const version = '0.1.0';
66

7-
8-
97
export async function strategy(
108
space,
119
network,
@@ -30,22 +28,14 @@ export async function strategy(
3028
callData.push([options.treasury, 'usersAllocation', [address]]);
3129
}
3230

33-
const response: any[] = await multicall(
34-
network,
35-
provider,
36-
abi,
37-
callData,
38-
{
31+
const response: any[] = await multicall(network, provider, abi, callData, {
3932
blockTag
40-
}
41-
);
42-
33+
});
4334
// Aggregate scores
4435
const scores: Record<string, number> = {};
4536

4637
for (let i = 0; i < addresses.length; i++) {
4738
const address = addresses[i];
48-
4939
const vault1Res = response[i * 3];
5040
const vault2Res = response[i * 3 + 1];
5141
const treasuryRes = response[i * 3 + 2];

0 commit comments

Comments
 (0)