@0xtorch/evm 0.0.124 → 0.0.125

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.
Files changed (36) hide show
  1. package/_cjs/chain/definitions/soneium.js +59 -0
  2. package/_cjs/chain/definitions/soneium.js.map +1 -0
  3. package/_cjs/chain/definitions/sonic.js +78 -0
  4. package/_cjs/chain/definitions/sonic.js.map +1 -0
  5. package/_cjs/chain/definitions/taiko.js +99 -0
  6. package/_cjs/chain/definitions/taiko.js.map +1 -0
  7. package/_cjs/chain/viemChains/soneium.js +55 -0
  8. package/_cjs/chain/viemChains/soneium.js.map +1 -0
  9. package/_cjs/chain/viemChains/sonic.js +30 -0
  10. package/_cjs/chain/viemChains/sonic.js.map +1 -0
  11. package/_esm/chain/definitions/soneium.js +54 -0
  12. package/_esm/chain/definitions/soneium.js.map +1 -0
  13. package/_esm/chain/definitions/sonic.js +73 -0
  14. package/_esm/chain/definitions/sonic.js.map +1 -0
  15. package/_esm/chain/definitions/taiko.js +106 -0
  16. package/_esm/chain/definitions/taiko.js.map +1 -0
  17. package/_esm/chain/viemChains/soneium.js +52 -0
  18. package/_esm/chain/viemChains/soneium.js.map +1 -0
  19. package/_esm/chain/viemChains/sonic.js +27 -0
  20. package/_esm/chain/viemChains/sonic.js.map +1 -0
  21. package/_types/chain/definitions/soneium.d.ts +16 -0
  22. package/_types/chain/definitions/soneium.d.ts.map +1 -0
  23. package/_types/chain/definitions/sonic.d.ts +18 -0
  24. package/_types/chain/definitions/sonic.d.ts.map +1 -0
  25. package/_types/chain/definitions/taiko.d.ts +18 -0
  26. package/_types/chain/definitions/taiko.d.ts.map +1 -0
  27. package/_types/chain/viemChains/soneium.d.ts +306 -0
  28. package/_types/chain/viemChains/soneium.d.ts.map +1 -0
  29. package/_types/chain/viemChains/sonic.d.ts +33 -0
  30. package/_types/chain/viemChains/sonic.d.ts.map +1 -0
  31. package/chain/definitions/soneium.ts +73 -0
  32. package/chain/definitions/sonic.ts +96 -0
  33. package/chain/definitions/taiko.ts +129 -0
  34. package/chain/viemChains/soneium.ts +53 -0
  35. package/chain/viemChains/sonic.ts +27 -0
  36. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ import { defineChain } from 'viem';
2
+ export const sonic = /*#__PURE__*/ defineChain({
3
+ id: 146,
4
+ name: 'Sonic',
5
+ nativeCurrency: {
6
+ decimals: 18,
7
+ name: 'Sonic',
8
+ symbol: 'S',
9
+ },
10
+ rpcUrls: {
11
+ default: { http: ['https://rpc.soniclabs.com'] },
12
+ },
13
+ blockExplorers: {
14
+ default: {
15
+ name: 'Sonic Explorer',
16
+ url: 'https://sonicscan.org/',
17
+ },
18
+ },
19
+ contracts: {
20
+ multicall3: {
21
+ address: '0xca11bde05977b3631167028862be2a173976ca11',
22
+ blockCreated: 60,
23
+ },
24
+ },
25
+ testnet: false,
26
+ });
27
+ //# sourceMappingURL=sonic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sonic.js","sourceRoot":"","sources":["../../../chain/viemChains/sonic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAElC,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,WAAW,CAAC;IAC7C,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,GAAG;KACZ;IACD,OAAO,EAAE;QACP,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,2BAA2B,CAAC,EAAE;KACjD;IACD,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,gBAAgB;YACtB,GAAG,EAAE,wBAAwB;SAC9B;KACF;IACD,SAAS,EAAE;QACT,UAAU,EAAE;YACV,OAAO,EAAE,4CAA4C;YACrD,YAAY,EAAE,EAAE;SACjB;KACF;IACD,OAAO,EAAE,KAAK;CACf,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { type Client } from '../../client';
2
+ import type { Explorer } from '../../explorer';
3
+ import type { Chain } from '../types/chain';
4
+ import type { HttpRpc } from '../types/rpc';
5
+ type CreateSoneiumChainParameters = {
6
+ client: Client;
7
+ explorer: Explorer;
8
+ };
9
+ export declare const createSoneiumChain: ({ explorerProxyUrl: proxyUrl, }: {
10
+ explorerProxyUrl?: string;
11
+ }) => Chain;
12
+ export declare const createSoneiumChainCustom: ({ client, explorer, }: CreateSoneiumChainParameters) => Chain;
13
+ export declare const soneiumHttpRpcs: HttpRpc[];
14
+ export declare const soneiumWebsocketRpcUrls: readonly string[];
15
+ export {};
16
+ //# sourceMappingURL=soneium.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"soneium.d.ts","sourceRoot":"","sources":["../../../chain/definitions/soneium.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAG3C,KAAK,4BAA4B,GAAG;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,kBAAkB,oCAE5B;IACD,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,KAAG,KAYA,CAAA;AAEJ,eAAO,MAAM,wBAAwB,0BAGlC,4BAA4B,KAAG,KAkBhC,CAAA;AAEF,eAAO,MAAM,eAAe,EAAE,OAAO,EAgBpC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAAO,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { type Client } from '../../client';
2
+ import type { Explorer } from '../../explorer';
3
+ import type { Chain } from '../types/chain';
4
+ import type { HttpRpc } from '../types/rpc';
5
+ export declare const createSonicChain: ({ explorerApiKey: apiKey, explorerProxyUrl: proxyUrl, explorerPageSize: pageSize, }: {
6
+ explorerApiKey?: string;
7
+ explorerProxyUrl?: string;
8
+ explorerPageSize?: number;
9
+ }) => Chain;
10
+ type CreateSonicChainParameters = {
11
+ client: Client;
12
+ explorer: Explorer;
13
+ };
14
+ export declare const createSonicChainCustom: ({ client, explorer, }: CreateSonicChainParameters) => Chain;
15
+ export declare const sonicHttpRpcs: HttpRpc[];
16
+ export declare const sonicWebsocketRpcUrls: readonly string[];
17
+ export {};
18
+ //# sourceMappingURL=sonic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sonic.d.ts","sourceRoot":"","sources":["../../../chain/definitions/sonic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAG3C,eAAO,MAAM,gBAAgB,wFAI1B;IACD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,UAcG,CAAA;AAEJ,KAAK,0BAA0B,GAAG;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,sBAAsB,0BAGhC,0BAA0B,KAAG,KA2B9B,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,OAAO,EAqBlC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAIlD,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { type Client } from '../../client';
2
+ import type { Explorer } from '../../explorer';
3
+ import type { Chain } from '../types/chain';
4
+ import type { HttpRpc } from '../types/rpc';
5
+ export declare const createTaikoChain: ({ explorerApiKey: apiKey, explorerProxyUrl: proxyUrl, explorerPageSize: pageSize, }: {
6
+ explorerApiKey?: string;
7
+ explorerProxyUrl?: string;
8
+ explorerPageSize?: number;
9
+ }) => Chain;
10
+ type CreateTaikoChainParameters = {
11
+ client: Client;
12
+ explorer: Explorer;
13
+ };
14
+ export declare const createTaikoChainCustom: ({ client, explorer, }: CreateTaikoChainParameters) => Chain;
15
+ export declare const taikoHttpRpcs: HttpRpc[];
16
+ export declare const taikoWebsocketRpcUrls: readonly string[];
17
+ export {};
18
+ //# sourceMappingURL=taiko.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiko.d.ts","sourceRoot":"","sources":["../../../chain/definitions/taiko.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,eAAO,MAAM,gBAAgB,wFAI1B;IACD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,UAcG,CAAA;AAEJ,KAAK,0BAA0B,GAAG;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,sBAAsB,0BAGhC,0BAA0B,KAAG,KAkB9B,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,OAAO,EA+DlC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAGlD,CAAA"}
@@ -0,0 +1,306 @@
1
+ export declare const soneium: {
2
+ blockExplorers: {
3
+ readonly default: {
4
+ readonly name: "Blockscout";
5
+ readonly url: "https://soneium.blockscout.com";
6
+ readonly apiUrl: "https://soneium.blockscout.com/api";
7
+ };
8
+ };
9
+ contracts: {
10
+ readonly disputeGameFactory: {
11
+ readonly 1: {
12
+ readonly address: "0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0";
13
+ };
14
+ };
15
+ readonly l2OutputOracle: {
16
+ readonly 1: {
17
+ readonly address: "0x0000000000000000000000000000000000000000";
18
+ };
19
+ };
20
+ readonly portal: {
21
+ readonly 1: {
22
+ readonly address: "0x88e529a6ccd302c948689cd5156c83d4614fae92";
23
+ readonly blockCreated: 7061266;
24
+ };
25
+ };
26
+ readonly l1StandardBridge: {
27
+ readonly 1: {
28
+ readonly address: "0xeb9bf100225c214efc3e7c651ebbadcf85177607";
29
+ readonly blockCreated: 7061266;
30
+ };
31
+ };
32
+ readonly multicall3: {
33
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
34
+ readonly blockCreated: 1;
35
+ };
36
+ readonly gasPriceOracle: {
37
+ readonly address: "0x420000000000000000000000000000000000000F";
38
+ };
39
+ readonly l1Block: {
40
+ readonly address: "0x4200000000000000000000000000000000000015";
41
+ };
42
+ readonly l2CrossDomainMessenger: {
43
+ readonly address: "0x4200000000000000000000000000000000000007";
44
+ };
45
+ readonly l2Erc721Bridge: {
46
+ readonly address: "0x4200000000000000000000000000000000000014";
47
+ };
48
+ readonly l2StandardBridge: {
49
+ readonly address: "0x4200000000000000000000000000000000000010";
50
+ };
51
+ readonly l2ToL1MessagePasser: {
52
+ readonly address: "0x4200000000000000000000000000000000000016";
53
+ };
54
+ };
55
+ id: 1868;
56
+ name: "Soneium Mainnet";
57
+ nativeCurrency: {
58
+ readonly name: "Ether";
59
+ readonly symbol: "ETH";
60
+ readonly decimals: 18;
61
+ };
62
+ rpcUrls: {
63
+ readonly default: {
64
+ readonly http: readonly ["https://rpc.soneium.org"];
65
+ };
66
+ };
67
+ sourceId: 1;
68
+ testnet?: boolean | undefined;
69
+ custom?: Record<string, unknown> | undefined;
70
+ fees?: import("viem").ChainFees<undefined> | undefined;
71
+ readonly formatters: {
72
+ readonly block: {
73
+ exclude: [] | undefined;
74
+ format: (args: import("viem/op-stack").OpStackRpcBlock) => {
75
+ baseFeePerGas: bigint | null;
76
+ blobGasUsed: bigint;
77
+ difficulty: bigint;
78
+ excessBlobGas: bigint;
79
+ extraData: import("viem").Hex;
80
+ gasLimit: bigint;
81
+ gasUsed: bigint;
82
+ hash: `0x${string}` | null;
83
+ logsBloom: `0x${string}` | null;
84
+ miner: `0x${string}`;
85
+ mixHash: import("viem").Hash;
86
+ nonce: `0x${string}` | null;
87
+ number: bigint | null;
88
+ parentBeaconBlockRoot?: import("viem").Hex | undefined;
89
+ parentHash: import("viem").Hash;
90
+ receiptsRoot: import("viem").Hex;
91
+ sealFields: import("viem").Hex[];
92
+ sha3Uncles: import("viem").Hash;
93
+ size: bigint;
94
+ stateRoot: import("viem").Hash;
95
+ timestamp: bigint;
96
+ totalDifficulty: bigint | null;
97
+ transactions: `0x${string}`[] | import("viem/op-stack").OpStackTransaction<boolean>[];
98
+ transactionsRoot: import("viem").Hash;
99
+ uncles: import("viem").Hash[];
100
+ withdrawals?: import("viem").Withdrawal[] | undefined;
101
+ withdrawalsRoot?: import("viem").Hex | undefined;
102
+ } & {};
103
+ type: "block";
104
+ };
105
+ readonly transaction: {
106
+ exclude: [] | undefined;
107
+ format: (args: import("viem/op-stack").OpStackRpcTransaction) => ({
108
+ blockHash: `0x${string}` | null;
109
+ blockNumber: bigint | null;
110
+ from: `0x${string}`;
111
+ gas: bigint;
112
+ hash: import("viem").Hash;
113
+ input: import("viem").Hex;
114
+ nonce: number;
115
+ r: import("viem").Hex;
116
+ s: import("viem").Hex;
117
+ to: `0x${string}` | null;
118
+ transactionIndex: number | null;
119
+ typeHex: import("viem").Hex | null;
120
+ v: bigint;
121
+ value: bigint;
122
+ yParity: number;
123
+ gasPrice?: undefined;
124
+ maxFeePerBlobGas?: undefined;
125
+ maxFeePerGas: bigint;
126
+ maxPriorityFeePerGas: bigint;
127
+ isSystemTx?: boolean;
128
+ mint?: bigint | undefined;
129
+ sourceHash: import("viem").Hex;
130
+ type: "deposit";
131
+ } | {
132
+ r: import("viem").Hex;
133
+ s: import("viem").Hex;
134
+ v: bigint;
135
+ to: `0x${string}` | null;
136
+ from: `0x${string}`;
137
+ gas: bigint;
138
+ nonce: number;
139
+ value: bigint;
140
+ blockHash: `0x${string}` | null;
141
+ blockNumber: bigint | null;
142
+ hash: import("viem").Hash;
143
+ input: import("viem").Hex;
144
+ transactionIndex: number | null;
145
+ typeHex: import("viem").Hex | null;
146
+ accessList?: undefined;
147
+ authorizationList?: undefined;
148
+ blobVersionedHashes?: undefined;
149
+ chainId?: number | undefined;
150
+ yParity?: undefined;
151
+ type: "legacy";
152
+ gasPrice: bigint;
153
+ maxFeePerBlobGas?: undefined;
154
+ maxFeePerGas?: undefined;
155
+ maxPriorityFeePerGas?: undefined;
156
+ isSystemTx?: undefined;
157
+ mint?: undefined;
158
+ sourceHash?: undefined;
159
+ } | {
160
+ blockHash: `0x${string}` | null;
161
+ blockNumber: bigint | null;
162
+ from: `0x${string}`;
163
+ gas: bigint;
164
+ hash: import("viem").Hash;
165
+ input: import("viem").Hex;
166
+ nonce: number;
167
+ r: import("viem").Hex;
168
+ s: import("viem").Hex;
169
+ to: `0x${string}` | null;
170
+ transactionIndex: number | null;
171
+ typeHex: import("viem").Hex | null;
172
+ v: bigint;
173
+ value: bigint;
174
+ yParity: number;
175
+ accessList: import("viem").AccessList;
176
+ authorizationList?: undefined;
177
+ blobVersionedHashes?: undefined;
178
+ chainId: number;
179
+ type: "eip2930";
180
+ gasPrice: bigint;
181
+ maxFeePerBlobGas?: undefined;
182
+ maxFeePerGas?: undefined;
183
+ maxPriorityFeePerGas?: undefined;
184
+ isSystemTx?: undefined;
185
+ mint?: undefined;
186
+ sourceHash?: undefined;
187
+ } | {
188
+ blockHash: `0x${string}` | null;
189
+ blockNumber: bigint | null;
190
+ from: `0x${string}`;
191
+ gas: bigint;
192
+ hash: import("viem").Hash;
193
+ input: import("viem").Hex;
194
+ nonce: number;
195
+ r: import("viem").Hex;
196
+ s: import("viem").Hex;
197
+ to: `0x${string}` | null;
198
+ transactionIndex: number | null;
199
+ typeHex: import("viem").Hex | null;
200
+ v: bigint;
201
+ value: bigint;
202
+ yParity: number;
203
+ accessList: import("viem").AccessList;
204
+ authorizationList?: undefined;
205
+ blobVersionedHashes?: undefined;
206
+ chainId: number;
207
+ type: "eip1559";
208
+ gasPrice?: undefined;
209
+ maxFeePerBlobGas?: undefined;
210
+ maxFeePerGas: bigint;
211
+ maxPriorityFeePerGas: bigint;
212
+ isSystemTx?: undefined;
213
+ mint?: undefined;
214
+ sourceHash?: undefined;
215
+ } | {
216
+ blockHash: `0x${string}` | null;
217
+ blockNumber: bigint | null;
218
+ from: `0x${string}`;
219
+ gas: bigint;
220
+ hash: import("viem").Hash;
221
+ input: import("viem").Hex;
222
+ nonce: number;
223
+ r: import("viem").Hex;
224
+ s: import("viem").Hex;
225
+ to: `0x${string}` | null;
226
+ transactionIndex: number | null;
227
+ typeHex: import("viem").Hex | null;
228
+ v: bigint;
229
+ value: bigint;
230
+ yParity: number;
231
+ accessList: import("viem").AccessList;
232
+ authorizationList?: undefined;
233
+ blobVersionedHashes: readonly import("viem").Hex[];
234
+ chainId: number;
235
+ type: "eip4844";
236
+ gasPrice?: undefined;
237
+ maxFeePerBlobGas: bigint;
238
+ maxFeePerGas: bigint;
239
+ maxPriorityFeePerGas: bigint;
240
+ isSystemTx?: undefined;
241
+ mint?: undefined;
242
+ sourceHash?: undefined;
243
+ } | {
244
+ blockHash: `0x${string}` | null;
245
+ blockNumber: bigint | null;
246
+ from: `0x${string}`;
247
+ gas: bigint;
248
+ hash: import("viem").Hash;
249
+ input: import("viem").Hex;
250
+ nonce: number;
251
+ r: import("viem").Hex;
252
+ s: import("viem").Hex;
253
+ to: `0x${string}` | null;
254
+ transactionIndex: number | null;
255
+ typeHex: import("viem").Hex | null;
256
+ v: bigint;
257
+ value: bigint;
258
+ yParity: number;
259
+ accessList: import("viem").AccessList;
260
+ authorizationList: import("viem/experimental").SignedAuthorizationList;
261
+ blobVersionedHashes?: undefined;
262
+ chainId: number;
263
+ type: "eip7702";
264
+ gasPrice?: undefined;
265
+ maxFeePerBlobGas?: undefined;
266
+ maxFeePerGas: bigint;
267
+ maxPriorityFeePerGas: bigint;
268
+ isSystemTx?: undefined;
269
+ mint?: undefined;
270
+ sourceHash?: undefined;
271
+ }) & {};
272
+ type: "transaction";
273
+ };
274
+ readonly transactionReceipt: {
275
+ exclude: [] | undefined;
276
+ format: (args: import("viem/op-stack").OpStackRpcTransactionReceipt) => {
277
+ blobGasPrice?: bigint | undefined;
278
+ blobGasUsed?: bigint | undefined;
279
+ blockHash: import("viem").Hash;
280
+ blockNumber: bigint;
281
+ contractAddress: `0x${string}` | null | undefined;
282
+ cumulativeGasUsed: bigint;
283
+ effectiveGasPrice: bigint;
284
+ from: `0x${string}`;
285
+ gasUsed: bigint;
286
+ logs: import("viem").Log<bigint, number, false>[];
287
+ logsBloom: import("viem").Hex;
288
+ root?: import("viem").Hash | undefined;
289
+ status: "success" | "reverted";
290
+ to: `0x${string}` | null;
291
+ transactionHash: import("viem").Hash;
292
+ transactionIndex: number;
293
+ type: import("viem").TransactionType;
294
+ l1GasPrice: bigint | null;
295
+ l1GasUsed: bigint | null;
296
+ l1Fee: bigint | null;
297
+ l1FeeScalar: number | null;
298
+ } & {};
299
+ type: "transactionReceipt";
300
+ };
301
+ };
302
+ readonly serializers: {
303
+ readonly transaction: typeof import("viem/op-stack").serializeTransaction;
304
+ };
305
+ };
306
+ //# sourceMappingURL=soneium.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"soneium.d.ts","sourceRoot":"","sources":["../../../chain/viemChains/soneium.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAgCX,eAAY;;;;;kCAUH,MAAa;;;;;;gCAM0I,MAAa;;;qCAAiI,CAAC,SAAS,MAAa;mCAAsD,MAAa;qCAA6C,MAAa;mCAA0C,MAAa;mCAA4C,MAAa;;kCAAwE,MAAa;;;uDAAkJ,eAAY;yCAA0E,MAAa;+BAAuC,MAAa;2BAAqC,CAAC,SAAS,MAAa;+BAA2D,CAAC,SAAS,MAAa;;;;;;kCAAoL,eAAY;;;;;6BAAuO,MAAa;8BAAsC,MAAa;;0BAAgE,MAAa;0BAAiC,MAAa;;;gCAA8I,MAAa;;;;wBAAiI,CAAC;gCAA6C,CAAC;;;0BAA2H,CAAC;oBAA+B,CAAC;mCAAyD,MAAa;;;0BAAoF,MAAa;0BAAiC,MAAa;;;;;;;;;6BAA8V,MAAa;8BAAsC,MAAa;;gCAAwF,MAAa;0BAAwC,CAAC;iCAA8C,CAAC;mCAAgD,CAAC;uBAAoC,CAAC;uBAA6C,CAAC;;;gCAA+G,CAAC;4BAAyC,CAAC;oCAAiD,CAAC;0BAAuC,CAAC;oBAAiC,CAAC;0BAAuC,CAAC;;;;;;6BAAuO,MAAa;8BAAsC,MAAa;;0BAAgE,MAAa;0BAAiC,MAAa;;;gCAA8I,MAAa;;;;mCAA4I,MAAa;iCAA+C,CAAC;mCAAgD,CAAC;;;;gCAAiJ,CAAC;4BAAyC,CAAC;oCAAiD,CAAC;0BAAuC,CAAC;oBAAiC,CAAC;0BAAuC,CAAC;;;;;;6BAAuO,MAAa;8BAAsC,MAAa;;0BAAgE,MAAa;0BAAiC,MAAa;;;gCAA8I,MAAa;;;;mCAA4I,MAAa;iCAA+C,CAAC;mCAAgD,CAAC;;;wBAAuG,CAAC;gCAA6C,CAAC;;;0BAA2H,CAAC;oBAAiC,CAAC;0BAAuC,CAAC;;;;;;6BAAuO,MAAa;8BAAsC,MAAa;;0BAAgE,MAAa;0BAAiC,MAAa;;;gCAA8I,MAAa;;;;mCAA4I,MAAa;iCAA+C,CAAC;qDAAkE,MAAa;;;wBAAmG,CAAC;;;;0BAAqK,CAAC;oBAAiC,CAAC;0BAAuC,CAAC;;;;;;6BAAuO,MAAa;8BAAsC,MAAa;;0BAAgE,MAAa;0BAAiC,MAAa;;;gCAA8I,MAAa;;;;mCAA4I,MAAa;0CAAwD,mBAA0B;mCAA8D,CAAC;;;wBAAuG,CAAC;gCAA6C,CAAC;;;0BAA2H,CAAC;oBAAiC,CAAC;0BAAuC,CAAC;;;;;;kCAA4L,eAAY;4BAAiE,CAAC;2BAAiD,CAAC;kCAAwD,MAAa;;;;;;;6BAAiU,MAAa;kCAAkE,MAAa;oBAA2B,CAAC,SAAS,MAAa;;;wCAAkK,MAAa;;6BAA+E,MAAa;;;;;;;;;;4CAAgV,eAAkB;;CADn9S,CAAA"}
@@ -0,0 +1,33 @@
1
+ export declare const sonic: {
2
+ blockExplorers: {
3
+ readonly default: {
4
+ readonly name: "Sonic Explorer";
5
+ readonly url: "https://sonicscan.org/";
6
+ };
7
+ };
8
+ contracts: {
9
+ readonly multicall3: {
10
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
11
+ readonly blockCreated: 60;
12
+ };
13
+ };
14
+ id: 146;
15
+ name: "Sonic";
16
+ nativeCurrency: {
17
+ readonly decimals: 18;
18
+ readonly name: "Sonic";
19
+ readonly symbol: "S";
20
+ };
21
+ rpcUrls: {
22
+ readonly default: {
23
+ readonly http: readonly ["https://rpc.soniclabs.com"];
24
+ };
25
+ };
26
+ sourceId?: number | undefined;
27
+ testnet: false;
28
+ custom?: Record<string, unknown> | undefined;
29
+ fees?: import("viem").ChainFees<undefined> | undefined;
30
+ formatters?: undefined;
31
+ serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
32
+ };
33
+ //# sourceMappingURL=sonic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sonic.d.ts","sourceRoot":"","sources":["../../../chain/viemChains/sonic.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBhB,CAAA"}
@@ -0,0 +1,73 @@
1
+ import { ethereum } from '@0xtorch/core'
2
+ import { type Client, createClient } from '../../client'
3
+ import type { Explorer } from '../../explorer'
4
+ import { createBlockscout } from '../../explorer'
5
+ import type { Chain } from '../types/chain'
6
+ import type { HttpRpc } from '../types/rpc'
7
+ import { soneium } from '../viemChains/soneium'
8
+
9
+ type CreateSoneiumChainParameters = {
10
+ client: Client
11
+ explorer: Explorer
12
+ }
13
+
14
+ export const createSoneiumChain = ({
15
+ explorerProxyUrl: proxyUrl,
16
+ }: {
17
+ explorerProxyUrl?: string
18
+ }): Chain =>
19
+ createSoneiumChainCustom({
20
+ client: createClient({
21
+ chain: soneium,
22
+ httpRpcs: soneiumHttpRpcs,
23
+ }),
24
+ explorer: createBlockscout({
25
+ name: 'Soneium Network explorer',
26
+ baseUrl: 'https://soneium.blockscout.com',
27
+ apiBaseUrl: 'https://soneium.blockscout.com/api',
28
+ proxyUrl,
29
+ }),
30
+ })
31
+
32
+ export const createSoneiumChainCustom = ({
33
+ client,
34
+ explorer,
35
+ }: CreateSoneiumChainParameters): Chain => ({
36
+ id: 1868,
37
+ network: 'soneium',
38
+ name: 'Soneium',
39
+ nativeToken: {
40
+ name: 'Ethereum',
41
+ symbol: 'ETH',
42
+ decimals: 18,
43
+ currency: ethereum,
44
+ },
45
+ wrappedTokenAddresses: new Set([
46
+ '0x4200000000000000000000000000000000000006',
47
+ ]),
48
+ explorer,
49
+ client,
50
+ blockTime: 2000,
51
+ coingeckoId: 'soneium',
52
+ defillamaId: undefined,
53
+ })
54
+
55
+ export const soneiumHttpRpcs: HttpRpc[] = [
56
+ {
57
+ url: 'https://rpc.soneium.org',
58
+ getLogsIsUsable: true,
59
+ getLogsMaxBlockRange: 10_000n,
60
+ },
61
+ {
62
+ url: 'https://soneium.gateway.tenderly.co',
63
+ getLogsIsUsable: true,
64
+ getLogsMaxBlockRange: 10_000n,
65
+ },
66
+ {
67
+ url: 'https://1868.rpc.thirdweb.com',
68
+ getLogsIsUsable: true,
69
+ getLogsMaxBlockRange: 10_000n,
70
+ },
71
+ ]
72
+
73
+ export const soneiumWebsocketRpcUrls: readonly string[] = []
@@ -0,0 +1,96 @@
1
+ import { type Client, createClient } from '../../client'
2
+ import type { Explorer } from '../../explorer'
3
+ import { createEtherscan } from '../../explorer'
4
+ import type { Chain } from '../types/chain'
5
+ import type { HttpRpc } from '../types/rpc'
6
+ import { sonic } from '../viemChains/sonic'
7
+
8
+ export const createSonicChain = ({
9
+ explorerApiKey: apiKey,
10
+ explorerProxyUrl: proxyUrl,
11
+ explorerPageSize: pageSize,
12
+ }: {
13
+ explorerApiKey?: string
14
+ explorerProxyUrl?: string
15
+ explorerPageSize?: number
16
+ }) =>
17
+ createSonicChainCustom({
18
+ client: createClient({
19
+ chain: sonic,
20
+ httpRpcs: sonicHttpRpcs,
21
+ }),
22
+ explorer: createEtherscan({
23
+ name: 'SonicScan',
24
+ baseUrl: 'https://sonicscan.org',
25
+ apiBaseUrl: 'https://api.sonicscan.org/api',
26
+ apiKey,
27
+ proxyUrl,
28
+ pageSize,
29
+ }),
30
+ })
31
+
32
+ type CreateSonicChainParameters = {
33
+ client: Client
34
+ explorer: Explorer
35
+ }
36
+
37
+ export const createSonicChainCustom = ({
38
+ client,
39
+ explorer,
40
+ }: CreateSonicChainParameters): Chain => ({
41
+ id: 146,
42
+ network: 'sonic',
43
+ name: 'Sonic',
44
+ nativeToken: {
45
+ name: 'Sonic',
46
+ symbol: 'S',
47
+ decimals: 18,
48
+ currency: {
49
+ type: 'CryptoCurrency',
50
+ id: 'sonic-3',
51
+ name: 'Sonic',
52
+ symbol: 'S',
53
+ market: {
54
+ coingeckoId: 'sonic-3',
55
+ },
56
+ updatedAt: 0,
57
+ },
58
+ },
59
+ wrappedTokenAddresses: new Set([
60
+ '0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38',
61
+ ]),
62
+ explorer,
63
+ client,
64
+ blockTime: undefined,
65
+ coingeckoId: 'sonic',
66
+ defillamaId: 'sonic',
67
+ })
68
+
69
+ export const sonicHttpRpcs: HttpRpc[] = [
70
+ {
71
+ url: 'https://rpc.soniclabs.com',
72
+ getLogsIsUsable: true,
73
+ getLogsMaxBlockRange: 10_000n,
74
+ },
75
+ {
76
+ url: 'https://sonic.drpc.org',
77
+ getLogsIsUsable: true,
78
+ getLogsMaxBlockRange: 10_000n,
79
+ },
80
+ {
81
+ url: 'https://rpc.ankr.com/sonic_mainnet',
82
+ getLogsIsUsable: true,
83
+ getLogsMaxBlockRange: 10_000n,
84
+ },
85
+ {
86
+ url: 'https://sonic.gateway.tenderly.co',
87
+ getLogsIsUsable: true,
88
+ getLogsMaxBlockRange: 10_000n,
89
+ },
90
+ ]
91
+
92
+ export const sonicWebsocketRpcUrls: readonly string[] = [
93
+ 'wss://sonic.drpc.org',
94
+ 'wss://rpc.ankr.com/sonic_mainnet/ws',
95
+ 'wss://sonic.callstaticrpc.com',
96
+ ]