@rhinestone/shared-configs 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,323 @@
1
+ {
2
+ "1": {
3
+ "name": "Ethereum",
4
+ "tokens": [
5
+ {
6
+ "symbol": "ETH",
7
+ "address": "0x0000000000000000000000000000000000000000",
8
+ "decimals": 18,
9
+ "balanceSlot": null,
10
+ "approvalSlot": null
11
+ },
12
+ {
13
+ "symbol": "USDC",
14
+ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
15
+ "decimals": 6,
16
+ "balanceSlot": 9,
17
+ "approvalSlot": 10
18
+ },
19
+ {
20
+ "symbol": "USDT",
21
+ "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
22
+ "decimals": 6,
23
+ "balanceSlot": 2,
24
+ "approvalSlot": 5
25
+ },
26
+ {
27
+ "symbol": "WETH",
28
+ "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
29
+ "decimals": 18,
30
+ "balanceSlot": 3,
31
+ "approvalSlot": 4
32
+ }
33
+ ]
34
+ },
35
+ "10": {
36
+ "name": "Optimism",
37
+ "tokens": [
38
+ {
39
+ "symbol": "ETH",
40
+ "address": "0x0000000000000000000000000000000000000000",
41
+ "decimals": 18,
42
+ "balanceSlot": null,
43
+ "approvalSlot": null
44
+ },
45
+ {
46
+ "symbol": "USDC",
47
+ "address": "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
48
+ "decimals": 6,
49
+ "balanceSlot": 9,
50
+ "approvalSlot": 10
51
+ },
52
+ {
53
+ "symbol": "USDT",
54
+ "address": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",
55
+ "decimals": 6,
56
+ "balanceSlot": 0,
57
+ "approvalSlot": 1
58
+ },
59
+ {
60
+ "symbol": "WETH",
61
+ "address": "0x4200000000000000000000000000000000000006",
62
+ "decimals": 18,
63
+ "balanceSlot": 3,
64
+ "approvalSlot": 4
65
+ }
66
+ ]
67
+ },
68
+ "8453": {
69
+ "name": "Base",
70
+ "tokens": [
71
+ {
72
+ "symbol": "ETH",
73
+ "address": "0x0000000000000000000000000000000000000000",
74
+ "decimals": 18,
75
+ "balanceSlot": null,
76
+ "approvalSlot": null
77
+ },
78
+ {
79
+ "symbol": "USDC",
80
+ "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
81
+ "decimals": 6,
82
+ "balanceSlot": 9,
83
+ "approvalSlot": 10
84
+ },
85
+ {
86
+ "symbol": "USDT",
87
+ "address": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2",
88
+ "decimals": 6,
89
+ "balanceSlot": 51,
90
+ "approvalSlot": 1
91
+ },
92
+ {
93
+ "symbol": "WETH",
94
+ "address": "0x4200000000000000000000000000000000000006",
95
+ "decimals": 18,
96
+ "balanceSlot": 3,
97
+ "approvalSlot": 4
98
+ }
99
+ ]
100
+ },
101
+ "42161": {
102
+ "name": "Arbitrum",
103
+ "tokens": [
104
+ {
105
+ "symbol": "ETH",
106
+ "address": "0x0000000000000000000000000000000000000000",
107
+ "decimals": 18,
108
+ "balanceSlot": null,
109
+ "approvalSlot": null
110
+ },
111
+ {
112
+ "symbol": "USDC",
113
+ "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
114
+ "decimals": 6,
115
+ "balanceSlot": 9,
116
+ "approvalSlot": 10
117
+ },
118
+ {
119
+ "symbol": "USDT",
120
+ "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
121
+ "decimals": 6,
122
+ "balanceSlot": 51,
123
+ "approvalSlot": 52
124
+ },
125
+ {
126
+ "symbol": "WETH",
127
+ "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
128
+ "decimals": 18,
129
+ "balanceSlot": 51,
130
+ "approvalSlot": 52
131
+ }
132
+ ]
133
+ },
134
+ "137": {
135
+ "name": "Polygon",
136
+ "tokens": [
137
+ {
138
+ "symbol": "USDC",
139
+ "address": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
140
+ "decimals": 6,
141
+ "balanceSlot": 9,
142
+ "approvalSlot": 10
143
+ },
144
+ {
145
+ "symbol": "USDT",
146
+ "address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
147
+ "decimals": 6,
148
+ "balanceSlot": 0,
149
+ "approvalSlot": 1
150
+ },
151
+ {
152
+ "symbol": "WETH",
153
+ "address": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
154
+ "decimals": 18,
155
+ "balanceSlot": 3,
156
+ "approvalSlot": 1
157
+ }
158
+ ]
159
+ },
160
+ "324": {
161
+ "name": "ZkSync Era",
162
+ "tokens": [
163
+ {
164
+ "symbol": "ETH",
165
+ "address": "0x0000000000000000000000000000000000000000",
166
+ "decimals": 18,
167
+ "balanceSlot": null,
168
+ "approvalSlot": null
169
+ },
170
+ {
171
+ "symbol": "USDC",
172
+ "address": "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",
173
+ "decimals": 6,
174
+ "balanceSlot": 9,
175
+ "approvalSlot": 10
176
+ },
177
+ {
178
+ "symbol": "USDT",
179
+ "address": "0x493257fD37EDB34451f62EDf8D2a0C418852bA4C",
180
+ "decimals": 6,
181
+ "balanceSlot": 2,
182
+ "approvalSlot": 52
183
+ },
184
+ {
185
+ "symbol": "WETH",
186
+ "address": "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",
187
+ "decimals": 18,
188
+ "balanceSlot": 3,
189
+ "approvalSlot": 4
190
+ }
191
+ ]
192
+ },
193
+ "1868": {
194
+ "name": "Soneium",
195
+ "tokens": [
196
+ {
197
+ "symbol": "ETH",
198
+ "address": "0x0000000000000000000000000000000000000000",
199
+ "decimals": 18,
200
+ "balanceSlot": null,
201
+ "approvalSlot": null
202
+ },
203
+ {
204
+ "symbol": "USDC",
205
+ "address": "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369",
206
+ "decimals": 6,
207
+ "balanceSlot": 9,
208
+ "approvalSlot": 10
209
+ },
210
+ {
211
+ "symbol": "WETH",
212
+ "address": "0x4200000000000000000000000000000000000006",
213
+ "decimals": 18,
214
+ "balanceSlot": 3,
215
+ "approvalSlot": 4
216
+ }
217
+ ]
218
+ },
219
+ "84532": {
220
+ "name": "Base-sepolia",
221
+ "tokens": [
222
+ {
223
+ "symbol": "ETH",
224
+ "address": "0x0000000000000000000000000000000000000000",
225
+ "decimals": 18,
226
+ "balanceSlot": null,
227
+ "approvalSlot": null
228
+ },
229
+ {
230
+ "symbol": "USDC",
231
+ "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
232
+ "decimals": 6,
233
+ "balanceSlot": 9,
234
+ "approvalSlot": 10
235
+ },
236
+ {
237
+ "symbol": "WETH",
238
+ "address": "0x4200000000000000000000000000000000000006",
239
+ "decimals": 18,
240
+ "balanceSlot": 3,
241
+ "approvalSlot": 4
242
+ }
243
+ ]
244
+ },
245
+ "421614": {
246
+ "name": "Arbitrum-sepolia",
247
+ "tokens": [
248
+ {
249
+ "symbol": "ETH",
250
+ "address": "0x0000000000000000000000000000000000000000",
251
+ "decimals": 18,
252
+ "balanceSlot": null,
253
+ "approvalSlot": null
254
+ },
255
+ {
256
+ "symbol": "USDC",
257
+ "address": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
258
+ "decimals": 6,
259
+ "balanceSlot": 9,
260
+ "approvalSlot": 10
261
+ },
262
+ {
263
+ "symbol": "WETH",
264
+ "address": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",
265
+ "decimals": 18,
266
+ "balanceSlot": 51,
267
+ "approvalSlot": 52
268
+ }
269
+ ]
270
+ },
271
+ "11155111": {
272
+ "name": "Ethereum-sepolia",
273
+ "tokens": [
274
+ {
275
+ "symbol": "ETH",
276
+ "address": "0x0000000000000000000000000000000000000000",
277
+ "decimals": 18,
278
+ "balanceSlot": null,
279
+ "approvalSlot": null
280
+ },
281
+ {
282
+ "symbol": "USDC",
283
+ "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
284
+ "decimals": 6,
285
+ "balanceSlot": 9,
286
+ "approvalSlot": 10
287
+ },
288
+ {
289
+ "symbol": "WETH",
290
+ "address": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",
291
+ "decimals": 18,
292
+ "balanceSlot": 3,
293
+ "approvalSlot": 4
294
+ }
295
+ ]
296
+ },
297
+ "11155420": {
298
+ "name": "Optimism-sepolia",
299
+ "tokens": [
300
+ {
301
+ "symbol": "ETH",
302
+ "address": "0x0000000000000000000000000000000000000000",
303
+ "decimals": 18,
304
+ "balanceSlot": null,
305
+ "approvalSlot": null
306
+ },
307
+ {
308
+ "symbol": "USDC",
309
+ "address": "0x5fd84259d66Cd46123540766Be93DFE6D43130D7",
310
+ "decimals": 6,
311
+ "balanceSlot": 9,
312
+ "approvalSlot": 10
313
+ },
314
+ {
315
+ "symbol": "WETH",
316
+ "address": "0x4200000000000000000000000000000000000006",
317
+ "decimals": 18,
318
+ "balanceSlot": 3,
319
+ "approvalSlot": 4
320
+ }
321
+ ]
322
+ }
323
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "DRPC": {
3
+ "url_template": "https://lb.drpc.org/ogrpc?network={{chain_param}}&dkey=${DRPC_API_KEY}",
4
+ "chain_mapping": {
5
+ "1": "ethereum",
6
+ "10": "optimism",
7
+ "137": "polygon",
8
+ "324": "zksync",
9
+ "8453": "base",
10
+ "42161": "arbitrum",
11
+ "1868": "soneium",
12
+ "84532": "base-sepolia",
13
+ "421614": "arbitrum-sepolia",
14
+ "11155111": "sepolia",
15
+ "11155420": "optimism-sepolia"
16
+ }
17
+ },
18
+ "Alchemy": {
19
+ "url_template": "https://{{chain_param}}.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
20
+ "chain_mapping": {
21
+ "1": "eth-mainnet",
22
+ "10": "opt-mainnet",
23
+ "1868": "soneium-mainnet",
24
+ "11155111": "eth-sepolia",
25
+ "11155420": "opt-sepolia",
26
+ "84532": "base-sepolia",
27
+ "421614": "arb-sepolia",
28
+ "137": "polygon-mainnet",
29
+ "324": "zksync-mainnet",
30
+ "8453": "base-mainnet",
31
+ "42161": "arb-mainnet"
32
+ }
33
+ },
34
+ "local-rpc": {
35
+ "url_template": "http://localhost:{{chain_param}}",
36
+ "chain_mapping": {
37
+ "1": "30001",
38
+ "42161": "30002",
39
+ "8453": "30003",
40
+ "137": "30004"
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,31 @@
1
+ import type { Address } from 'viem';
2
+ import type { arbitrum, arbitrumSepolia, base, baseSepolia, mainnet, optimism, optimismSepolia, polygon, sepolia, soneium, zksync } from 'viem/chains';
3
+ type SupportedTestnet = typeof sepolia.id | typeof baseSepolia.id | typeof arbitrumSepolia.id | typeof optimismSepolia.id;
4
+ type SupportedMainnet = typeof mainnet.id | typeof base.id | typeof arbitrum.id | typeof optimism.id | typeof polygon.id | typeof zksync.id | typeof soneium.id;
5
+ type SupportedOPStackMainnet = typeof optimism.id | typeof base.id | typeof soneium.id;
6
+ type SupportedOPStackTestnet = typeof optimismSepolia.id | typeof baseSepolia.id;
7
+ type SupportedChain = SupportedMainnet | SupportedTestnet;
8
+ interface TokenEntry {
9
+ symbol: string;
10
+ address: Address;
11
+ decimals: number;
12
+ balanceSlot: number | null;
13
+ approvalSlot: number | null;
14
+ }
15
+ interface ChainEntry {
16
+ name: string;
17
+ tokens: TokenEntry[];
18
+ }
19
+ interface ChainRegistry {
20
+ [chainId: string]: ChainEntry;
21
+ }
22
+ type ProviderName = 'DRPC' | 'Alchemy' | 'local-rpc';
23
+ type ProviderRegistry = Record<ProviderName, {
24
+ url_template: string;
25
+ chain_mapping: Partial<Record<SupportedChain, string>>;
26
+ }>;
27
+ declare const chains: ChainRegistry;
28
+ declare const providers: ProviderRegistry;
29
+ export { chains, providers };
30
+ export type { ChainEntry, ChainRegistry, ProviderRegistry, ProviderName, SupportedMainnet, SupportedTestnet, SupportedChain, SupportedOPStackMainnet, SupportedOPStackTestnet, };
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,WAAW,EACX,OAAO,EACP,QAAQ,EACR,eAAe,EACf,OAAO,EACP,OAAO,EACP,OAAO,EACP,MAAM,EACP,MAAM,aAAa,CAAA;AAKpB,KAAK,gBAAgB,GACjB,OAAO,OAAO,CAAC,EAAE,GACjB,OAAO,WAAW,CAAC,EAAE,GACrB,OAAO,eAAe,CAAC,EAAE,GACzB,OAAO,eAAe,CAAC,EAAE,CAAA;AAC7B,KAAK,gBAAgB,GACjB,OAAO,OAAO,CAAC,EAAE,GACjB,OAAO,IAAI,CAAC,EAAE,GACd,OAAO,QAAQ,CAAC,EAAE,GAClB,OAAO,QAAQ,CAAC,EAAE,GAClB,OAAO,OAAO,CAAC,EAAE,GACjB,OAAO,MAAM,CAAC,EAAE,GAChB,OAAO,OAAO,CAAC,EAAE,CAAA;AACrB,KAAK,uBAAuB,GACxB,OAAO,QAAQ,CAAC,EAAE,GAClB,OAAO,IAAI,CAAC,EAAE,GACd,OAAO,OAAO,CAAC,EAAE,CAAA;AACrB,KAAK,uBAAuB,GAAG,OAAO,eAAe,CAAC,EAAE,GAAG,OAAO,WAAW,CAAC,EAAE,CAAA;AAChF,KAAK,cAAc,GAAG,gBAAgB,GAAG,gBAAgB,CAAA;AAEzD,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,EAAE,CAAA;CACrB;AAED,UAAU,aAAa;IACrB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAAA;CAC9B;AAED,KAAK,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,CAAA;AAEpD,KAAK,gBAAgB,GAAG,MAAM,CAC5B,YAAY,EACZ;IACE,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAA;CACvD,CACF,CAAA;AAED,QAAA,MAAM,MAAM,EAAE,aAA8C,CAAA;AAC5D,QAAA,MAAM,SAAS,EAAE,gBAAuD,CAAA;AAExE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;AAC5B,YAAY,EACV,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,uBAAuB,GACxB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import chainRegistry from './configs/chains.json' with { type: 'json' };
2
+ import providerRegistry from './configs/providers.json' with { type: 'json' };
3
+ const chains = chainRegistry;
4
+ const providers = providerRegistry;
5
+ export { chains, providers };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/shared-configs",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Reusable configuration files for Rhinestone services",
5
5
  "author": {
6
6
  "name": "Rhinestone",
@@ -9,12 +9,16 @@
9
9
  "module": "index.ts",
10
10
  "type": "module",
11
11
  "files": [
12
- "index.ts",
13
- "configs"
12
+ "dist"
14
13
  ],
14
+ "scripts": {
15
+ "clean": "rimraf dist",
16
+ "build": "bun run clean && tsc"
17
+ },
15
18
  "devDependencies": {
16
19
  "@biomejs/biome": "^2.1.4",
17
- "@types/bun": "latest"
20
+ "@types/bun": "latest",
21
+ "rimraf": "^6.0.1"
18
22
  },
19
23
  "peerDependencies": {
20
24
  "typescript": "^5",
@@ -1,288 +0,0 @@
1
- {
2
- "1": {
3
- "name": "Ethereum",
4
- "tokens": [
5
- {
6
- "symbol": "ETH",
7
- "address": "0x0000000000000000000000000000000000000000",
8
- "decimals": 18,
9
- "balanceSlot": null
10
- },
11
- {
12
- "symbol": "USDC",
13
- "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
14
- "decimals": 6,
15
- "balanceSlot": 9
16
- },
17
- {
18
- "symbol": "USDT",
19
- "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
20
- "decimals": 6,
21
- "balanceSlot": 2
22
- },
23
- {
24
- "symbol": "WETH",
25
- "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
26
- "decimals": 18,
27
- "balanceSlot": 3
28
- }
29
- ]
30
- },
31
- "10": {
32
- "name": "Optimism",
33
- "tokens": [
34
- {
35
- "symbol": "ETH",
36
- "address": "0x0000000000000000000000000000000000000000",
37
- "decimals": 18,
38
- "balanceSlot": null
39
- },
40
- {
41
- "symbol": "USDC",
42
- "address": "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
43
- "decimals": 6,
44
- "balanceSlot": 9
45
- },
46
- {
47
- "symbol": "USDT",
48
- "address": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",
49
- "decimals": 6,
50
- "balanceSlot": 0
51
- },
52
- {
53
- "symbol": "WETH",
54
- "address": "0x4200000000000000000000000000000000000006",
55
- "decimals": 18,
56
- "balanceSlot": 3
57
- }
58
- ]
59
- },
60
- "8453": {
61
- "name": "Base",
62
- "tokens": [
63
- {
64
- "symbol": "ETH",
65
- "address": "0x0000000000000000000000000000000000000000",
66
- "decimals": 18,
67
- "balanceSlot": null
68
- },
69
- {
70
- "symbol": "USDC",
71
- "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
72
- "decimals": 6,
73
- "balanceSlot": 9
74
- },
75
- {
76
- "symbol": "USDT",
77
- "address": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2",
78
- "decimals": 6,
79
- "balanceSlot": 51
80
- },
81
- {
82
- "symbol": "WETH",
83
- "address": "0x4200000000000000000000000000000000000006",
84
- "decimals": 18,
85
- "balanceSlot": 3
86
- }
87
- ]
88
- },
89
- "42161": {
90
- "name": "Arbitrum",
91
- "tokens": [
92
- {
93
- "symbol": "ETH",
94
- "address": "0x0000000000000000000000000000000000000000",
95
- "decimals": 18,
96
- "balanceSlot": null
97
- },
98
- {
99
- "symbol": "USDC",
100
- "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
101
- "decimals": 6,
102
- "balanceSlot": 9
103
- },
104
- {
105
- "symbol": "USDT",
106
- "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
107
- "decimals": 6,
108
- "balanceSlot": 51
109
- },
110
- {
111
- "symbol": "WETH",
112
- "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
113
- "decimals": 18,
114
- "balanceSlot": 51
115
- }
116
- ]
117
- },
118
- "137": {
119
- "name": "Polygon",
120
- "tokens": [
121
- {
122
- "symbol": "USDC",
123
- "address": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
124
- "decimals": 6,
125
- "balanceSlot": 9
126
- },
127
- {
128
- "symbol": "USDT",
129
- "address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
130
- "decimals": 6,
131
- "balanceSlot": 0
132
- },
133
- {
134
- "symbol": "WETH",
135
- "address": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
136
- "decimals": 18,
137
- "balanceSlot": 3
138
- }
139
- ]
140
- },
141
- "324": {
142
- "name": "ZkSync Era",
143
- "tokens": [
144
- {
145
- "symbol": "ETH",
146
- "address": "0x0000000000000000000000000000000000000000",
147
- "decimals": 18,
148
- "balanceSlot": null
149
- },
150
- {
151
- "symbol": "USDC",
152
- "address": "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",
153
- "decimals": 6,
154
- "balanceSlot": 9
155
- },
156
- {
157
- "symbol": "USDT",
158
- "address": "0x493257fD37EDB34451f62EDf8D2a0C418852bA4C",
159
- "decimals": 6,
160
- "balanceSlot": 2
161
- },
162
- {
163
- "symbol": "WETH",
164
- "address": "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",
165
- "decimals": 18,
166
- "balanceSlot": 3
167
- }
168
- ]
169
- },
170
- "1868": {
171
- "name": "Soneium",
172
- "tokens": [
173
- {
174
- "symbol": "ETH",
175
- "address": "0x0000000000000000000000000000000000000000",
176
- "decimals": 18,
177
- "balanceSlot": null,
178
- "approvalSlot": null
179
- },
180
- {
181
- "symbol": "USDC",
182
- "address": "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369",
183
- "decimals": 6,
184
- "balanceSlot": 9,
185
- "approvalSlot": 10
186
- },
187
- {
188
- "symbol": "WETH",
189
- "address": "0x4200000000000000000000000000000000000006",
190
- "decimals": 18,
191
- "balanceSlot": 3,
192
- "approvalSlot": 4
193
- }
194
- ]
195
- },
196
- "84532": {
197
- "name": "Base-sepolia",
198
- "tokens": [
199
- {
200
- "symbol": "ETH",
201
- "address": "0x0000000000000000000000000000000000000000",
202
- "decimals": 18,
203
- "balanceSlot": null
204
- },
205
- {
206
- "symbol": "USDC",
207
- "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
208
- "decimals": 6,
209
- "balanceSlot": 9
210
- },
211
- {
212
- "symbol": "WETH",
213
- "address": "0x4200000000000000000000000000000000000006",
214
- "decimals": 18,
215
- "balanceSlot": 3
216
- }
217
- ]
218
- },
219
- "421614": {
220
- "name": "Arbitrum-sepolia",
221
- "tokens": [
222
- {
223
- "symbol": "ETH",
224
- "address": "0x0000000000000000000000000000000000000000",
225
- "decimals": 18,
226
- "balanceSlot": null
227
- },
228
- {
229
- "symbol": "USDC",
230
- "address": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
231
- "decimals": 6,
232
- "balanceSlot": 9
233
- },
234
- {
235
- "symbol": "WETH",
236
- "address": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",
237
- "decimals": 18,
238
- "balanceSlot": 51
239
- }
240
- ]
241
- },
242
- "11155111": {
243
- "name": "Ethereum-sepolia",
244
- "tokens": [
245
- {
246
- "symbol": "ETH",
247
- "address": "0x0000000000000000000000000000000000000000",
248
- "decimals": 18,
249
- "balanceSlot": null
250
- },
251
- {
252
- "symbol": "USDC",
253
- "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
254
- "decimals": 6,
255
- "balanceSlot": 9
256
- },
257
- {
258
- "symbol": "WETH",
259
- "address": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",
260
- "decimals": 18,
261
- "balanceSlot": 3
262
- }
263
- ]
264
- },
265
- "11155420": {
266
- "name": "Optimism-sepolia",
267
- "tokens": [
268
- {
269
- "symbol": "ETH",
270
- "address": "0x0000000000000000000000000000000000000000",
271
- "decimals": 18,
272
- "balanceSlot": null
273
- },
274
- {
275
- "symbol": "USDC",
276
- "address": "0x5fd84259d66Cd46123540766Be93DFE6D43130D7",
277
- "decimals": 6,
278
- "balanceSlot": 9
279
- },
280
- {
281
- "symbol": "WETH",
282
- "address": "0x4200000000000000000000000000000000000006",
283
- "decimals": 18,
284
- "balanceSlot": 3
285
- }
286
- ]
287
- }
288
- }
@@ -1,43 +0,0 @@
1
- {
2
- "DRPC": {
3
- "url_template": "https://lb.drpc.org/ogrpc?network={{chain_param}}&dkey=${DRPC_API_KEY}",
4
- "chain_mapping": {
5
- "1": "ethereum",
6
- "10": "optimism",
7
- "137": "polygon",
8
- "324": "zksync",
9
- "8453": "base",
10
- "42161": "arbitrum",
11
- "1868": "soneium",
12
- "84532": "base-sepolia",
13
- "421614": "arbitrum-sepolia",
14
- "11155111": "sepolia",
15
- "11155420": "optimism-sepolia"
16
- }
17
- },
18
- "Alchemy": {
19
- "url_template": "https://{{chain_param}}.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
20
- "chain_mapping": {
21
- "1": "eth-mainnet",
22
- "10": "opt-mainnet",
23
- "1868": "soneium-mainnet",
24
- "11155111": "eth-sepolia",
25
- "11155420": "opt-sepolia",
26
- "84532": "base-sepolia",
27
- "421614": "arb-sepolia",
28
- "137": "polygon-mainnet",
29
- "324": "zksync-mainnet",
30
- "8453": "base-mainnet",
31
- "42161": "arb-mainnet"
32
- }
33
- },
34
- "local-rpc": {
35
- "url_template": "http://localhost:{{chain_param}}",
36
- "chain_mapping": {
37
- "1": "30001",
38
- "42161": "30002",
39
- "8453": "30003",
40
- "137": "30004"
41
- }
42
- }
43
- }
package/index.ts DELETED
@@ -1,79 +0,0 @@
1
- import type { Address } from 'viem'
2
- import type {
3
- arbitrum,
4
- arbitrumSepolia,
5
- base,
6
- baseSepolia,
7
- mainnet,
8
- optimism,
9
- optimismSepolia,
10
- polygon,
11
- sepolia,
12
- soneium,
13
- zksync,
14
- } from 'viem/chains'
15
-
16
- import chainRegistry from './configs/chains.json'
17
- import providerRegistry from './configs/providers.json'
18
-
19
- type SupportedTestnet =
20
- | typeof sepolia.id
21
- | typeof baseSepolia.id
22
- | typeof arbitrumSepolia.id
23
- | typeof optimismSepolia.id
24
- type SupportedMainnet =
25
- | typeof mainnet.id
26
- | typeof base.id
27
- | typeof arbitrum.id
28
- | typeof optimism.id
29
- | typeof polygon.id
30
- | typeof zksync.id
31
- | typeof soneium.id
32
- type SupportedOPStackMainnet =
33
- | typeof optimism.id
34
- | typeof base.id
35
- | typeof soneium.id
36
- type SupportedOPStackTestnet = typeof optimismSepolia.id | typeof baseSepolia.id
37
- type SupportedChain = SupportedMainnet | SupportedTestnet
38
-
39
- interface TokenEntry {
40
- symbol: string
41
- address: Address
42
- decimals: number
43
- balanceSlot: number | null
44
- }
45
-
46
- interface ChainEntry {
47
- name: string
48
- tokens: TokenEntry[]
49
- }
50
-
51
- interface ChainRegistry {
52
- [chainId: string]: ChainEntry
53
- }
54
-
55
- type ProviderName = 'DRPC' | 'Alchemy' | 'local-rpc'
56
-
57
- type ProviderRegistry = Record<
58
- ProviderName,
59
- {
60
- url_template: string
61
- chain_mapping: Partial<Record<SupportedChain, string>>
62
- }
63
- >
64
-
65
- const chains: ChainRegistry = chainRegistry as ChainRegistry
66
- const providers: ProviderRegistry = providerRegistry as ProviderRegistry
67
-
68
- export { chains, providers }
69
- export type {
70
- ChainEntry,
71
- ChainRegistry,
72
- ProviderRegistry,
73
- ProviderName,
74
- SupportedMainnet,
75
- SupportedTestnet,
76
- SupportedChain,
77
- SupportedOPStackMainnet,
78
- SupportedOPStackTestnet,
79
- }