From d7ee29f81afe4602fb873758f8f73d511485ee38 Mon Sep 17 00:00:00 2001 From: bitbeckers Date: Mon, 30 Sep 2024 02:14:09 +0200 Subject: [PATCH] fix: 5s polling testnet, 2.5s polling prd --- src/indexer/chainsauce.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/indexer/chainsauce.ts b/src/indexer/chainsauce.ts index b3ebb52..68b3d77 100644 --- a/src/indexer/chainsauce.ts +++ b/src/indexer/chainsauce.ts @@ -3,7 +3,11 @@ import SchemaRegistryAbi from "@/abis/schemaRegistry.js"; import HypercertMinterAbi from "@/abis/hypercertMinter.js"; import HypercertExchangeAbi from "@/abis/hypercertExchange.js"; import { processEvent } from "@/indexer/eventHandlers.js"; -import { localCachingDbUrl } from "@/utils/constants.js"; +import { + Environment, + environment, + localCachingDbUrl, +} from "@/utils/constants.js"; import { getContractEventsForChain } from "@/storage/getContractEventsForChain.js"; import EasAbi from "@/abis/eas.js"; import { getSupportedSchemas } from "@/storage/getSupportedSchemas.js"; @@ -58,6 +62,7 @@ export const getIndexer = async ({ id: chainId, maxBlockRange: 100000n, rpcClient: createHttpRpcClient({ url: rpcUrl }), + pollingInterval: environment === Environment.TEST ? 5000 : 2500, }, contracts: MyContracts, context: {