Skip to content

Commit

Permalink
Use block range
Browse files Browse the repository at this point in the history
  • Loading branch information
Inkvi committed Apr 26, 2024
1 parent f1bf7f2 commit bdc115b
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions ponder.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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,
},
},
},
Expand All @@ -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,
},
},
},
Expand Down

0 comments on commit bdc115b

Please sign in to comment.