rocketh 0.15.0-testing.6 → 0.15.0-testing.8

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 (56) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cli.js.map +1 -1
  3. package/dist/environment/deployments.d.ts +1 -1
  4. package/dist/environment/deployments.d.ts.map +1 -1
  5. package/dist/environment/index.d.ts +2 -6
  6. package/dist/environment/index.d.ts.map +1 -1
  7. package/dist/environment/index.js +27 -51
  8. package/dist/environment/index.js.map +1 -1
  9. package/dist/environment/types.d.ts +33 -77
  10. package/dist/environment/types.d.ts.map +1 -1
  11. package/dist/environment/utils/artifacts.d.ts +1 -1
  12. package/dist/environment/utils/artifacts.d.ts.map +1 -1
  13. package/dist/environment/utils/chains.d.ts +3 -4
  14. package/dist/environment/utils/chains.d.ts.map +1 -1
  15. package/dist/environment/utils/chains.js +92 -27
  16. package/dist/environment/utils/chains.js.map +1 -1
  17. package/dist/executor/index.d.ts +13 -84
  18. package/dist/executor/index.d.ts.map +1 -1
  19. package/dist/executor/index.js +147 -238
  20. package/dist/executor/index.js.map +1 -1
  21. package/dist/executor/setup.test.d.ts +3 -3
  22. package/dist/executor/setup.test.d.ts.map +1 -1
  23. package/dist/executor/setup.test.js +1 -1
  24. package/dist/executor/setup.test.js.map +1 -1
  25. package/dist/executor/types.d.ts +92 -0
  26. package/dist/executor/types.d.ts.map +1 -1
  27. package/dist/index.d.ts +5 -6
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +5 -6
  30. package/dist/index.js.map +1 -1
  31. package/dist/types.d.ts +469 -0
  32. package/dist/types.d.ts.map +1 -0
  33. package/dist/types.js +2 -0
  34. package/dist/types.js.map +1 -0
  35. package/dist/utils/extensions.d.ts +1 -2
  36. package/dist/utils/extensions.d.ts.map +1 -1
  37. package/dist/utils/extensions.test.d.ts +2 -2
  38. package/dist/utils/extensions.test.d.ts.map +1 -1
  39. package/dist/utils/fs.d.ts +1 -1
  40. package/dist/utils/fs.d.ts.map +1 -1
  41. package/dist/utils/fs.js.map +1 -1
  42. package/package.json +3 -3
  43. package/src/cli.ts +2 -2
  44. package/src/environment/deployments.ts +1 -1
  45. package/src/environment/index.ts +33 -62
  46. package/src/environment/utils/artifacts.ts +1 -1
  47. package/src/environment/utils/chains.ts +119 -30
  48. package/src/executor/index.ts +208 -365
  49. package/src/executor/setup.test.ts +2 -2
  50. package/src/index.ts +13 -6
  51. package/src/types.ts +597 -0
  52. package/src/utils/extensions.test.ts +1 -1
  53. package/src/utils/extensions.ts +2 -2
  54. package/src/utils/fs.ts +1 -1
  55. package/src/environment/types.ts +0 -385
  56. package/src/executor/types.ts +0 -176
@@ -1,385 +0,0 @@
1
- import type {Abi, AbiConstructor, AbiError, AbiEvent, AbiFallback, AbiFunction, AbiReceive, Narrow} from 'abitype';
2
- import {
3
- EIP1193Account,
4
- EIP1193DATA,
5
- EIP1193ProviderWithoutEvents,
6
- EIP1193QUANTITY,
7
- EIP1193SignerProvider,
8
- EIP1193TransactionReceipt,
9
- EIP1193WalletProvider,
10
- } from 'eip-1193';
11
- import type {Address, Chain, DeployContractParameters} from 'viem';
12
- import {
13
- DeterministicDeploymentInfo,
14
- type Create2DeterministicDeploymentInfo,
15
- type Create3DeterministicDeploymentInfo,
16
- } from '../executor/index.js';
17
- import {ProgressIndicator} from '../internal/logging.js';
18
- import {TransactionHashTracker} from './providers/TransactionHashTracker.js';
19
- import {SignerProtocolFunction} from './index.js';
20
- import {ChainInfo} from '../executor/types.js';
21
-
22
- export type {Abi, AbiConstructor, AbiError, AbiEvent, AbiFallback, AbiFunction, AbiReceive};
23
- export type Libraries = {readonly [libraryName: string]: EIP1193Account};
24
-
25
- export type GasEstimate = 'infinite' | `${number}`;
26
- export type CreationGasEstimate = {
27
- readonly codeDepositCost: GasEstimate;
28
- readonly executionCost: GasEstimate;
29
- readonly totalCost: GasEstimate;
30
- };
31
-
32
- export type GasEstimates = {
33
- readonly creation?: CreationGasEstimate;
34
- readonly external?: {
35
- readonly [signature: string]: GasEstimate;
36
- };
37
- readonly internal?: {
38
- readonly [signature: string]: GasEstimate;
39
- };
40
- };
41
-
42
- export type Storage = {
43
- readonly astId: number;
44
- readonly contract: string; // canonical name <path>:<name>
45
- readonly label: string; // variable name
46
- readonly offset: number;
47
- readonly slot: `${number}`; // slot bytes32
48
- readonly type: string; // "t_mapping(t_uint256,t_struct(Cell)12382_storage)"
49
- };
50
- export type TypeDef = {
51
- readonly encoding: 'inplace' | string; // TODO
52
- readonly label: 'address' | 'byte24' | string; // TODO
53
- readonly numberOfBytes: `${number}`;
54
- readonly key?: string; // ref to another typedef
55
- readonly value?: string;
56
- readonly members?: readonly Storage[];
57
- };
58
-
59
- export type DevEventDoc = {
60
- readonly details?: string;
61
- readonly params?: {readonly [name: string]: string};
62
- };
63
-
64
- export type DevErrorDoc = {
65
- readonly details?: string; // TODO check if it can exists
66
- readonly params?: {readonly [name: string]: string};
67
- };
68
-
69
- export type DevMethodDoc = {
70
- readonly details?: string; // TODO check if it can exists
71
- readonly params?: {readonly [name: string]: string};
72
- readonly returns?: {
73
- readonly [key: string | `_${number}`]: string; // description
74
- };
75
- };
76
-
77
- export type NoticeUserDoc = {
78
- readonly notice?: string;
79
- };
80
-
81
- export type DevDoc = {
82
- readonly events?: {
83
- [signature: string]: DevEventDoc;
84
- };
85
- readonly errors?: {
86
- [signature: string]: readonly DevErrorDoc[];
87
- };
88
- readonly methods: {
89
- [signature: string]: DevMethodDoc;
90
- };
91
- readonly kind?: 'dev';
92
- readonly version?: number;
93
- readonly title?: string;
94
- readonly author?: string;
95
- };
96
-
97
- export type UserDoc = {
98
- readonly events?: {
99
- readonly [signature: string]: NoticeUserDoc;
100
- };
101
- readonly errors?: {
102
- readonly [signature: string]: readonly NoticeUserDoc[];
103
- };
104
- readonly kind?: 'user';
105
- readonly methods: {
106
- readonly [signature: string]: NoticeUserDoc;
107
- };
108
- readonly version?: number;
109
- readonly notice?: string;
110
- };
111
-
112
- export type JSONTypePlusBigInt =
113
- | bigint
114
- | string
115
- | number
116
- | boolean
117
- | null
118
- | JSONTypePlusBigInt[]
119
- | {[key: string]: JSONTypePlusBigInt};
120
- export type LinkedData = Record<string, JSONTypePlusBigInt>;
121
-
122
- export type StorageLayout = {
123
- readonly storage: readonly Storage[];
124
- readonly types: {
125
- readonly [name: string]: TypeDef;
126
- } | null;
127
- };
128
-
129
- export type MinimalDeployment<TAbi extends Abi = Abi> = {
130
- readonly address: EIP1193Account;
131
- readonly abi: Narrow<TAbi>;
132
- };
133
-
134
- export type Deployment<TAbi extends Abi> = MinimalDeployment<TAbi> & {
135
- readonly bytecode: EIP1193DATA;
136
- readonly argsData: EIP1193DATA;
137
- readonly metadata: string;
138
-
139
- readonly transaction?: {
140
- readonly hash: EIP1193DATA;
141
- readonly origin?: EIP1193Account;
142
- readonly nonce?: EIP1193DATA;
143
- };
144
- readonly receipt?: {
145
- blockHash: EIP1193DATA;
146
- blockNumber: EIP1193QUANTITY;
147
- transactionIndex: EIP1193QUANTITY;
148
- };
149
- readonly numDeployments?: number;
150
- readonly libraries?: Libraries;
151
- readonly linkedData?: LinkedData;
152
- readonly deployedBytecode?: EIP1193DATA;
153
- readonly linkReferences?: any; // TODO
154
- readonly deployedLinkReferences?: any; // TODO
155
- readonly contractName?: string;
156
- readonly sourceName?: string; // relative path
157
- readonly devdoc?: DevDoc;
158
- readonly evm?: {
159
- readonly gasEstimates?: GasEstimates | null;
160
- } & any;
161
- readonly storageLayout?: StorageLayout;
162
- readonly userdoc?: UserDoc;
163
- } & Record<string, unknown>;
164
-
165
- export type Artifact<TAbi extends Abi = Abi> = {
166
- readonly abi: TAbi;
167
- readonly bytecode: EIP1193DATA;
168
- readonly metadata: string;
169
- readonly deployedBytecode?: EIP1193DATA;
170
- readonly linkReferences?: any; // TODO
171
- readonly deployedLinkReferences?: any; // TODO
172
- readonly contractName?: string;
173
- readonly sourceName?: string; // relative path
174
- readonly devdoc?: DevDoc;
175
- readonly evm?: {
176
- readonly gasEstimates?: GasEstimates | null;
177
- } & any;
178
- readonly storageLayout?: StorageLayout;
179
- readonly userdoc?: UserDoc;
180
- };
181
-
182
- export type AccountDefinition = EIP1193Account | string | number;
183
-
184
- export type AccountType =
185
- | AccountDefinition
186
- | {
187
- [networkOrChainId: string | number]: AccountDefinition;
188
- };
189
-
190
- export type ResolvedAccount = {
191
- address: EIP1193Account;
192
- } & Signer;
193
-
194
- export type UnknownDeployments = Record<string, Deployment<Abi>>;
195
- export type UnknownNamedAccounts = {
196
- [name: string]: EIP1193Account;
197
- };
198
-
199
- export type UnresolvedUnknownNamedAccounts = {
200
- [name: string]: AccountType;
201
- };
202
-
203
- export type ResolvedNamedAccounts<T extends UnresolvedUnknownNamedAccounts> = {
204
- [Property in keyof T]: EIP1193Account;
205
- };
206
-
207
- export type DataType<T> = {
208
- [networkOrChainId: string | number]: T;
209
- };
210
-
211
- export type UnknownData = {
212
- [name: string]: unknown;
213
- };
214
-
215
- export type UnresolvedNetworkSpecificData = {
216
- [name: string]: DataType<unknown>;
217
- };
218
-
219
- export type ResolvedNetworkSpecificData<T extends UnresolvedNetworkSpecificData> = {
220
- [Property in keyof T]: T[Property] extends DataType<infer U> ? U : never;
221
- };
222
-
223
- export type Signer =
224
- | {type: 'signerOnly'; signer: EIP1193SignerProvider}
225
- | {type: 'remote'; signer: EIP1193ProviderWithoutEvents}
226
- | {type: 'wallet'; signer: EIP1193WalletProvider};
227
-
228
- export type ResolvedNamedSigners<T extends UnknownNamedAccounts> = {
229
- [Property in keyof T]: Signer;
230
- };
231
-
232
- export type UnknownDeploymentsAcrossNetworks = Record<string, UnknownDeployments>;
233
-
234
- type TargetConfigBase = {
235
- name: string;
236
- tags: string[];
237
- fork?: boolean;
238
- deterministicDeployment?: DeterministicDeploymentInfo;
239
- scripts?: string | string[];
240
- chainInfo: ChainInfo;
241
- pollingInterval?: number;
242
- };
243
- type TargetConfigForJSONRPC = TargetConfigBase & {
244
- nodeUrl: string;
245
- };
246
-
247
- type TargetConfigForEIP1193Provider = TargetConfigBase & {
248
- provider: EIP1193ProviderWithoutEvents;
249
- };
250
-
251
- export type TargetConfig = TargetConfigForJSONRPC | TargetConfigForEIP1193Provider;
252
-
253
- type ResolvedTargetConfigBase = {
254
- name: string;
255
- tags: string[];
256
- fork?: boolean;
257
- deterministicDeployment: DeterministicDeploymentInfo;
258
- chainInfo: ChainInfo;
259
- pollingInterval: number;
260
- };
261
- type ResolvedTargetConfigForJSONRPC = ResolvedTargetConfigBase & {
262
- nodeUrl: string;
263
- };
264
-
265
- type ResolvedTargetConfigForEIP1193Provider = ResolvedTargetConfigBase & {
266
- provider: EIP1193ProviderWithoutEvents;
267
- };
268
-
269
- export type ResolvedTargetConfig = ResolvedTargetConfigForJSONRPC | ResolvedTargetConfigForEIP1193Provider;
270
-
271
- export type Config<
272
- AccountsType extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
273
- Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData
274
- > = {
275
- target: TargetConfig;
276
- targetTags?: string[];
277
- scripts?: string | string[];
278
- deployments?: string;
279
- saveDeployments?: boolean;
280
-
281
- tags?: string[];
282
- askBeforeProceeding?: boolean;
283
- reportGasUse?: boolean;
284
-
285
- logLevel?: number;
286
- // TODO
287
- gasPricing?: {};
288
- accounts?: AccountsType;
289
-
290
- data?: Data;
291
- signerProtocols?: Record<string, SignerProtocolFunction>;
292
- extra?: Record<string, unknown>;
293
- defaultPollingInterval?: number;
294
- };
295
-
296
- export type ResolvedConfig<
297
- AccountsType extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
298
- Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData
299
- > = Omit<Config, 'target'> & {
300
- deployments: string;
301
- scripts: string[];
302
- tags: string[];
303
- target: ResolvedTargetConfig;
304
- saveDeployments?: boolean;
305
- askBeforeProceeding?: boolean;
306
- reportGasUse?: boolean;
307
- accounts: AccountsType;
308
- data: Data;
309
- signerProtocols: Record<string, SignerProtocolFunction>;
310
- extra: Record<string, unknown>;
311
- defaultPollingInterval: number;
312
- };
313
-
314
- export interface Environment<
315
- NamedAccounts extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
316
- Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData,
317
- Deployments extends UnknownDeployments = UnknownDeployments,
318
- Extra extends Record<string, unknown> = Record<string, unknown>
319
- > {
320
- config: ResolvedConfig;
321
- network: {
322
- chain: Chain;
323
- name: string;
324
- tags: {[tag: string]: boolean};
325
- provider: TransactionHashTracker;
326
- };
327
- deployments: Deployments;
328
- namedAccounts: ResolvedNamedAccounts<NamedAccounts>;
329
- data: ResolvedNetworkSpecificData<Data>;
330
- namedSigners: ResolvedNamedSigners<ResolvedNamedAccounts<NamedAccounts>>;
331
- unnamedAccounts: EIP1193Account[];
332
- // unnamedSigners: {type: 'remote'; signer: EIP1193ProviderWithoutEvents}[];
333
- addressSigners: {[name: `0x${string}`]: Signer};
334
- save<TAbi extends Abi = Abi>(
335
- name: string,
336
- deployment: Deployment<TAbi>,
337
- options?: {doNotCountAsNewDeployment?: boolean}
338
- ): Promise<Deployment<TAbi>>;
339
- savePendingDeployment<TAbi extends Abi = Abi>(pendingDeployment: PendingDeployment<TAbi>): Promise<Deployment<TAbi>>;
340
- savePendingExecution(pendingExecution: PendingExecution): Promise<EIP1193TransactionReceipt>;
341
- get<TAbi extends Abi>(name: string): Deployment<TAbi>;
342
- getOrNull<TAbi extends Abi>(name: string): Deployment<TAbi> | null;
343
- fromAddressToNamedABI<TAbi extends Abi>(address: Address): {mergedABI: TAbi; names: string[]};
344
- fromAddressToNamedABIOrNull<TAbi extends Abi>(address: Address): {mergedABI: TAbi; names: string[]} | null;
345
- showMessage(message: string): void;
346
- showProgress(message?: string): ProgressIndicator;
347
-
348
- hasMigrationBeenDone(id: string): boolean;
349
- extra?: Extra;
350
- }
351
-
352
- export type DeploymentConstruction<TAbi extends Abi> = Omit<
353
- DeployContractParameters<TAbi>,
354
- 'bytecode' | 'account' | 'abi' | 'chain'
355
- > & {account: string | EIP1193Account; artifact: Artifact<TAbi>};
356
-
357
- export type PartialDeployment<TAbi extends Abi = Abi> = Artifact<TAbi> & {
358
- argsData: EIP1193DATA;
359
- libraries?: Libraries;
360
- linkedData?: LinkedData;
361
- };
362
-
363
- export type PendingDeployment<TAbi extends Abi = Abi> = {
364
- type: 'deployment';
365
- name?: string;
366
- transaction: {
367
- hash: `0x${string}`;
368
- nonce?: `0x${string}`;
369
- origin?: `0x${string}`;
370
- };
371
- partialDeployment: PartialDeployment<TAbi>;
372
- expectedAddress?: `0x${string}`; // TODO we could make that a event specification so we can get address from factory event
373
- };
374
-
375
- export type PendingExecution = {
376
- type: 'execution';
377
- description?: string;
378
- transaction: {
379
- hash: `0x${string}`;
380
- nonce?: `0x${string}`;
381
- origin?: `0x${string}`;
382
- };
383
- };
384
-
385
- export type PendingTransaction = PendingDeployment | PendingExecution;
@@ -1,176 +0,0 @@
1
- import {Address} from 'abitype';
2
- import type {
3
- Environment,
4
- JSONTypePlusBigInt,
5
- UnknownDeployments,
6
- UnresolvedNetworkSpecificData,
7
- UnresolvedUnknownNamedAccounts,
8
- } from '../environment/types.js';
9
-
10
- export type DeployScriptFunction<
11
- NamedAccounts extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
12
- Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData,
13
- ArgumentsTypes = undefined,
14
- Deployments extends UnknownDeployments = UnknownDeployments,
15
- Extra extends Record<string, unknown> = Record<string, unknown>
16
- > = (env: Environment<NamedAccounts, Data, Deployments, Extra>, args?: ArgumentsTypes) => Promise<void | boolean>;
17
-
18
- export interface DeployScriptModule<
19
- NamedAccounts extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
20
- Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData,
21
- ArgumentsTypes = undefined,
22
- Deployments extends UnknownDeployments = UnknownDeployments,
23
- Extra extends Record<string, unknown> = Record<string, unknown>
24
- > {
25
- (env: Environment<NamedAccounts, Data, Deployments, Extra>, args?: ArgumentsTypes): Promise<void | boolean>;
26
- tags?: string[];
27
- dependencies?: string[];
28
- runAtTheEnd?: boolean;
29
- id?: string;
30
- }
31
-
32
- export type ScriptCallback<
33
- NamedAccounts extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
34
- Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData,
35
- Deployments extends UnknownDeployments = UnknownDeployments,
36
- Extra extends Record<string, unknown> = Record<string, unknown>
37
- > = (env: Environment<NamedAccounts, Data, Deployments, Extra>) => Promise<void>;
38
-
39
- /**
40
- * Utility type to extract the return value from a higher-order function
41
- * For functions of type (firstParam: T) => (...args: any[]) => V or (firstParam: T) => V
42
- */
43
- export type ExtractReturnFunction<T> = T extends (first: any) => infer Return ? Return : never;
44
-
45
- /**
46
- * Utility type to transform an object of higher-order functions by extracting their return types
47
- * This handles both regular functions and getter functions
48
- */
49
- export type CurriedFunctions<T> = {
50
- [K in keyof T]: ExtractReturnFunction<T[K]>;
51
- };
52
-
53
- /**
54
- * Type for the enhanced environment proxy that includes both the original environment
55
- * and the curried functions
56
- */
57
- export type EnhancedEnvironment<
58
- NamedAccounts extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
59
- Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData,
60
- Deployments extends UnknownDeployments = UnknownDeployments,
61
- Extensions extends Record<
62
- string,
63
- (env: Environment<NamedAccounts, Data, Deployments>, ...args: any[]) => any
64
- > = Record<string, (env: Environment<NamedAccounts, Data, Deployments>, ...args: any[]) => any>,
65
- Extra extends Record<string, unknown> = Record<string, unknown>
66
- > = Environment<NamedAccounts, Data, Deployments, Extra> & CurriedFunctions<Extensions>;
67
-
68
- /**
69
- * Type for a deploy script function that receives an enhanced environment
70
- */
71
- export type EnhancedDeployScriptFunction<
72
- NamedAccounts extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
73
- Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData,
74
- ArgumentsTypes = undefined,
75
- Deployments extends UnknownDeployments = UnknownDeployments,
76
- Functions extends Record<
77
- string,
78
- (env: Environment<NamedAccounts, Data, Deployments>, ...args: any[]) => any
79
- > = Record<string, (env: Environment<NamedAccounts, Data, Deployments>, ...args: any[]) => any>,
80
- Extra extends Record<string, unknown> = Record<string, unknown>
81
- > = (
82
- env: EnhancedEnvironment<NamedAccounts, Data, Deployments, Functions, Extra>,
83
- args?: ArgumentsTypes
84
- ) => Promise<void | boolean>;
85
-
86
- type ChainBlockExplorer = {
87
- name: string;
88
- url: string;
89
- apiUrl?: string | undefined;
90
- };
91
- type ChainContract = {
92
- address: Address;
93
- blockCreated?: number | undefined;
94
- };
95
-
96
- type ChainNativeCurrency = {
97
- name: string;
98
- /** 2-6 characters long */
99
- symbol: string;
100
- decimals: number;
101
- };
102
-
103
- type ChainRpcUrls = {
104
- http: readonly string[];
105
- webSocket?: readonly string[] | undefined;
106
- };
107
-
108
- /**
109
- * @description Combines members of an intersection into a readable type.
110
- *
111
- * @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg}
112
- * @example
113
- * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>
114
- * => { a: string, b: string, c: number, d: bigint }
115
- */
116
- type Prettify<T> = {
117
- [K in keyof T]: T[K];
118
- } & {};
119
-
120
- export type ChainInfo = {
121
- /** ID in number form */
122
- id: number;
123
- /** Human-readable name */
124
- name: string;
125
- /** Collection of block explorers */
126
- blockExplorers?:
127
- | {
128
- [key: string]: ChainBlockExplorer;
129
- default: ChainBlockExplorer;
130
- }
131
- | undefined;
132
- /** Collection of contracts */
133
- contracts?:
134
- | Prettify<
135
- {
136
- [key: string]: ChainContract | {[sourceId: number]: ChainContract | undefined} | undefined;
137
- } & {
138
- ensRegistry?: ChainContract | undefined;
139
- ensUniversalResolver?: ChainContract | undefined;
140
- multicall3?: ChainContract | undefined;
141
- }
142
- >
143
- | undefined;
144
- /** Currency used by chain */
145
- nativeCurrency: ChainNativeCurrency;
146
- /** Collection of RPC endpoints */
147
- rpcUrls: {
148
- [key: string]: ChainRpcUrls;
149
- default: ChainRpcUrls;
150
- };
151
- /** Source Chain ID (ie. the L1 chain) */
152
- sourceId?: number | undefined;
153
- /** Flag for test networks */
154
- testnet?: boolean | undefined;
155
-
156
- chainType: 'zksync' | 'op-stack' | 'celo' | 'default';
157
-
158
- genesisHash?: string;
159
-
160
- properties?: Record<string, JSONTypePlusBigInt>;
161
-
162
- // this will bring in the following when reconstructed from the data above
163
-
164
- // /** Custom chain data. */
165
- // custom?: any;
166
-
167
- // /**
168
- // * Modifies how chain data structures (ie. Blocks, Transactions, etc)
169
- // * are formatted & typed.
170
- // */
171
- // formatters?: any | undefined;
172
- // /** Modifies how data (ie. Transactions) is serialized. */
173
- // serializers?: any | undefined;
174
- // /** Modifies how fees are derived. */
175
- // fees?: any | undefined;
176
- };