diff --git a/ponder.config.ts b/ponder.config.ts index 802ac23..55b054d 100644 --- a/ponder.config.ts +++ b/ponder.config.ts @@ -24,23 +24,25 @@ function mustInt(val?: string) { return parseInt(val); } +let RANGE = parseInt(process.env.RANGE ?? "100000"); + export default createConfig({ networks: { base: { chainId: 84532, transport: http(process.env.PONDER_RPC_URL_84532), - pollingInterval: 5_000, + pollingInterval: 2_000, }, optimism: { chainId: 11155420, transport: http(process.env.PONDER_RPC_URL_11155420), - pollingInterval: 5_000, - }, - molten: { - chainId: 49483, - transport: http(process.env.PONDER_RPC_URL_49483), - pollingInterval: 5_000, + pollingInterval: 2_000, }, + // molten: { + // chainId: 49483, + // transport: http(process.env.PONDER_RPC_URL_49483), + // pollingInterval: 2_000, + // }, }, contracts: { sim: { @@ -49,10 +51,12 @@ export default createConfig({ base: { address: mustAddress(process.env.DISPATCHER_ADDRESS_BASE_SIMCLIENT), startBlock: mustInt(process.env.DISPATCHER_ADDRESS_BASE_SIMCLIENT_START_BLOCK), + endBlock: mustInt(process.env.DISPATCHER_ADDRESS_BASE_SIMCLIENT_START_BLOCK) + RANGE, }, optimism: { address: mustAddress(process.env.DISPATCHER_ADDRESS_OPTIMISM_SIMCLIENT), startBlock: mustInt(process.env.DISPATCHER_ADDRESS_OPTIMISM_SIMCLIENT_START_BLOCK), + endBlock: mustInt(process.env.DISPATCHER_ADDRESS_OPTIMISM_SIMCLIENT_START_BLOCK)+RANGE, }, }, }, @@ -62,10 +66,12 @@ export default createConfig({ base: { address: mustAddress(process.env.DISPATCHER_ADDRESS_BASE), startBlock: mustInt(process.env.DISPATCHER_ADDRESS_BASE_START_BLOCK), + endBlock: mustInt(process.env.DISPATCHER_ADDRESS_BASE_START_BLOCK)+RANGE, }, optimism: { address: mustAddress(process.env.DISPATCHER_ADDRESS_OPTIMISM), startBlock: mustInt(process.env.DISPATCHER_ADDRESS_OPTIMISM_START_BLOCK), + endBlock: mustInt(process.env.DISPATCHER_ADDRESS_OPTIMISM_START_BLOCK)+RANGE, }, }, },