Skip to content

Commit

Permalink
zkevm can only do 195 calls in a multicall
Browse files Browse the repository at this point in the history
  • Loading branch information
franzns committed Jan 31, 2024
1 parent 582e492 commit 16374eb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/pool/lib/pool-on-chain-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class PoolOnChainDataService {
},
});

const state = await fetchOnChainPoolState(filteredPools, 1024);
const state = await fetchOnChainPoolState(filteredPools, networkContext.chain === 'ZKEVM' ? 190 : 1024);

const operations = [];
for (const pool of filteredPools) {
Expand Down Expand Up @@ -98,9 +98,13 @@ export class PoolOnChainDataService {
const gyroPools = filteredPools.filter((pool) => pool.type.includes('GYRO'));

const tokenPrices = await this.tokenService.getTokenPrices();
const onchainResults = await fetchOnChainPoolData(filteredPools, this.options.vaultAddress, 1024);
const onchainResults = await fetchOnChainPoolData(
filteredPools,
this.options.vaultAddress,
networkContext.chain === 'ZKEVM' ? 190 : 1024,
);
const gyroFees = await (this.options.gyroConfig
? fetchOnChainGyroFees(gyroPools, this.options.gyroConfig, 1024)
? fetchOnChainGyroFees(gyroPools, this.options.gyroConfig, networkContext.chain === 'ZKEVM' ? 190 : 1024)
: Promise.resolve({} as { [address: string]: string }));

const operations = [];
Expand Down

0 comments on commit 16374eb

Please sign in to comment.