Skip to content

Commit c3e0fcf

Browse files
committed
feat: faster indexing
1 parent 1add2db commit c3e0fcf

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

backend/ponder-env.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/// <reference types="ponder/virtual" />
22

3-
declare module "ponder:internal" {
4-
const config: typeof import("./ponder.config.ts");
5-
const schema: typeof import("./ponder.schema.ts");
3+
declare module 'ponder:internal' {
4+
const config: typeof import('./ponder.config.ts')
5+
const schema: typeof import('./ponder.schema.ts')
66
}
77

8-
declare module "ponder:schema" {
9-
export * from "./ponder.schema.ts";
8+
declare module 'ponder:schema' {
9+
export * from './ponder.schema.ts'
1010
}
1111

1212
// This file enables type checking and editor autocomplete for this Ponder project.

backend/ponder.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ const deployedAddresses = getAddresses()
1919
const usedChains = Object.keys(networks).reduce((usedChains, chainId) => {
2020
return {
2121
...usedChains,
22-
[networks[chainId].slug]: {
22+
[networks[chainId].slug!]: {
2323
id: Number(chainId),
24+
maxRequestsPerSecond: 500,
25+
pollingInterval: 100,
2426
rpc: networks[chainId].rpc[0],
2527
},
2628
}
@@ -271,14 +273,15 @@ const zkSyncChains: zkSyncChains = Object.keys(networks)
271273
export default createConfig({
272274
blocks: {
273275
RelayPoolSnapshot: {
274-
interval: 25,
275276
chain: vaultSnapshotChains,
277+
interval: 25,
276278
},
277279
VaultSnapshot: {
278-
interval: 25,
279280
chain: vaultSnapshotChains,
281+
interval: 25,
280282
},
281283
},
284+
chains: usedChains,
282285
contracts: {
283286
L1NativeTokenVault: {
284287
abi: ABIs.L1NativeTokenVault,
@@ -324,5 +327,5 @@ export default createConfig({
324327
connectionString: process.env.DATABASE_URL,
325328
kind: 'postgres',
326329
},
327-
chains: usedChains,
330+
ordering: 'multichain', // or "omnichain" — see below
328331
})

0 commit comments

Comments
 (0)