Skip to content

Commit 74e6f50

Browse files
committed
fix: configurable logs page size
1 parent f4d2574 commit 74e6f50

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/config/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class Config extends ConfigClass {
4242
startBlock,
4343
chainId: Number(chainId),
4444
network,
45-
logsPageSize: PAGE_SIZE[network],
45+
logsPageSize: schema.logsPageSize || PAGE_SIZE[network],
4646
});
4747
}
4848

src/config/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const envConfigMapping: Record<keyof ConfigSchema, string | string[]> = {
1111
deployPartialLiquidatorContracts: "DEPLOY_PARTIAL_LIQUIDATOR",
1212
deployBatchLiquidatorContracts: "DEPLOY_BATCH_LIQUIDATOR",
1313
ethProviderRpcs: "JSON_RPC_PROVIDERS",
14+
logsPageSize: "LOGS_PAGE_SIZE",
1415
hfThreshold: "HF_TRESHOLD",
1516
restakingWorkaround: "RESTAKING_WORKAROUND",
1617
minBalance: "MIN_BALANCE",

src/config/schema.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ export const ConfigSchema = z.object({
4646
ethProviderRpcs: stringArrayLike
4747
.optional()
4848
.pipe(z.array(z.string().url()).min(1)),
49+
/**
50+
* Page size in blocks for eth_getLogs, default to some network-specific value
51+
*/
52+
logsPageSize: bigintLike.optional(),
4953
/**
5054
* Private key used to send liquidation transactions
5155
*/

0 commit comments

Comments
 (0)