-
Notifications
You must be signed in to change notification settings - Fork 0
/
ponder.config.ts
108 lines (104 loc) · 2.64 KB
/
ponder.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import { createConfig, loadBalance, rateLimit } from "@ponder/core";
import { parseAbiItem } from "abitype";
import { http, webSocket } from "viem";
import { SiloAbi } from "./abis/SiloAbi";
import { SiloFactoryAbi } from "./abis/SiloFactoryAbi";
import { arbitrum, base, mainnet, optimism } from "viem/chains";
const siloFactoryEvent = parseAbiItem(
"event NewSiloCreated(address indexed silo, address indexed asset, uint128 version)",
);
const START_BLOCKS = {
[mainnet.id]: 20_367_992,
[optimism.id]: 120_480_601,
// [arbitrum.id]: 51_894_508,
[arbitrum.id]: 86_265_292,
[base.id]: 16_262_586,
} as const;
export default createConfig({
database: {
kind: "postgres",
schema: "indexing_data",
},
networks: {
mainnet: {
chainId: mainnet.id,
maxRequestsPerSecond: 500,
transport: http(process.env.PONDER_RPC_URL_MAINNET),
},
optimism: {
chainId: optimism.id,
maxRequestsPerSecond: 500,
transport: http(process.env.PONDER_RPC_URL_OPTIMISM),
},
arbitrum: {
chainId: arbitrum.id,
maxRequestsPerSecond: 500,
transport: http(process.env.PONDER_RPC_URL_ARBITRUM),
},
base: {
chainId: base.id,
maxRequestsPerSecond: 500,
transport: http(process.env.PONDER_RPC_URL_BASE),
},
},
contracts: {
SiloFactory: {
abi: SiloFactoryAbi,
network: {
mainnet: {
address: "0xB7d391192080674281bAAB8B3083154a5f64cd0a",
startBlock: START_BLOCKS[mainnet.id],
},
optimism: {
address: "0x6B14c4450a29Dd9562c20259eBFF67a577b540b9",
startBlock: START_BLOCKS[optimism.id],
},
arbitrum: {
address: "0x4166487056A922D784b073d4d928a516B074b719",
startBlock: START_BLOCKS[arbitrum.id],
},
base: {
address: "0x408822E4E8682413666809b0655161093cd36f2b",
startBlock: START_BLOCKS[base.id],
},
},
},
Silo: {
abi: SiloAbi,
network: {
mainnet: {
factory: {
address: "0xB7d391192080674281bAAB8B3083154a5f64cd0a",
event: siloFactoryEvent,
parameter: "silo",
},
startBlock: START_BLOCKS[mainnet.id],
},
optimism: {
factory: {
address: "0x6B14c4450a29Dd9562c20259eBFF67a577b540b9",
event: siloFactoryEvent,
parameter: "silo",
},
startBlock: START_BLOCKS[optimism.id],
},
arbitrum: {
factory: {
address: "0x4166487056A922D784b073d4d928a516B074b719",
event: siloFactoryEvent,
parameter: "silo",
},
startBlock: START_BLOCKS[arbitrum.id],
},
base: {
factory: {
address: "0x408822E4E8682413666809b0655161093cd36f2b",
event: siloFactoryEvent,
parameter: "silo",
},
startBlock: START_BLOCKS[base.id],
},
},
},
},
});