@rhinestone/shared-configs 1.0.1 → 1.0.3
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.
- package/dist/configs/chains.json +323 -0
- package/dist/configs/providers.json +43 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/package.json +9 -5
- package/configs/chains.json +0 -323
- package/configs/providers.json +0 -43
- package/index.ts +0 -80
|
@@ -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
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -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
package/package.json
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/shared-configs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Reusable configuration files for Rhinestone services",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rhinestone",
|
|
7
7
|
"url": "https://rhinestone.dev"
|
|
8
8
|
},
|
|
9
|
-
"module": "index.
|
|
9
|
+
"module": "dist/index.js",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"files": [
|
|
12
|
-
"
|
|
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",
|
package/configs/chains.json
DELETED
|
@@ -1,323 +0,0 @@
|
|
|
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
|
-
}
|
package/configs/providers.json
DELETED
|
@@ -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,80 +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
|
-
approvalSlot: number | null
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
interface ChainEntry {
|
|
48
|
-
name: string
|
|
49
|
-
tokens: TokenEntry[]
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
interface ChainRegistry {
|
|
53
|
-
[chainId: string]: ChainEntry
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
type ProviderName = 'DRPC' | 'Alchemy' | 'local-rpc'
|
|
57
|
-
|
|
58
|
-
type ProviderRegistry = Record<
|
|
59
|
-
ProviderName,
|
|
60
|
-
{
|
|
61
|
-
url_template: string
|
|
62
|
-
chain_mapping: Partial<Record<SupportedChain, string>>
|
|
63
|
-
}
|
|
64
|
-
>
|
|
65
|
-
|
|
66
|
-
const chains: ChainRegistry = chainRegistry as ChainRegistry
|
|
67
|
-
const providers: ProviderRegistry = providerRegistry as ProviderRegistry
|
|
68
|
-
|
|
69
|
-
export { chains, providers }
|
|
70
|
-
export type {
|
|
71
|
-
ChainEntry,
|
|
72
|
-
ChainRegistry,
|
|
73
|
-
ProviderRegistry,
|
|
74
|
-
ProviderName,
|
|
75
|
-
SupportedMainnet,
|
|
76
|
-
SupportedTestnet,
|
|
77
|
-
SupportedChain,
|
|
78
|
-
SupportedOPStackMainnet,
|
|
79
|
-
SupportedOPStackTestnet,
|
|
80
|
-
}
|