rocketh 0.15.0-testing.12 → 0.15.0-testing.14

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/src/types.ts CHANGED
@@ -158,7 +158,7 @@ export type ChainInfo = {
158
158
  /** Flag for test networks */
159
159
  testnet?: boolean | undefined;
160
160
 
161
- chainType: 'zksync' | 'op-stack' | 'celo' | 'default';
161
+ chainType?: 'zksync' | 'op-stack' | 'celo' | 'default';
162
162
 
163
163
  genesisHash?: string;
164
164
 
@@ -223,31 +223,31 @@ export type DeterministicDeploymentInfo =
223
223
  };
224
224
 
225
225
  export type ChainUserConfig = {
226
- rpcUrl?: string;
227
- tags?: string[];
228
- deterministicDeployment?: DeterministicDeploymentInfo;
229
- info?: ChainInfo;
230
- pollingInterval?: number;
231
- properties?: Record<string, JSONTypePlusBigInt>;
226
+ readonly rpcUrl?: string;
227
+ readonly tags?: readonly string[];
228
+ readonly deterministicDeployment?: DeterministicDeploymentInfo;
229
+ readonly info?: ChainInfo;
230
+ readonly pollingInterval?: number;
231
+ readonly properties?: Record<string, JSONTypePlusBigInt>;
232
232
  };
233
233
 
234
234
  export type ChainConfig = {
235
- rpcUrl: string;
236
- tags: string[];
237
- deterministicDeployment: DeterministicDeploymentInfo;
238
- info: ChainInfo;
239
- pollingInterval: number;
240
- properties: Record<string, JSONTypePlusBigInt>;
235
+ readonly rpcUrl: string;
236
+ readonly tags: readonly string[];
237
+ readonly deterministicDeployment: DeterministicDeploymentInfo;
238
+ readonly info: ChainInfo;
239
+ readonly pollingInterval: number;
240
+ readonly properties: Record<string, JSONTypePlusBigInt>;
241
241
  };
242
242
 
243
- export type DeploymentTargetConfig = {
244
- chainId: number;
245
- scripts?: string | string[];
246
- overrides: Omit<ChainUserConfig, 'info'>;
243
+ export type DeploymentEnvironmentConfig = {
244
+ readonly chain?: string | number;
245
+ readonly scripts?: string | readonly string[];
246
+ readonly overrides: Omit<ChainUserConfig, 'info'>;
247
247
  };
248
248
 
249
249
  export type Chains = {
250
- [idOrName: number | string]: ChainUserConfig;
250
+ readonly [idOrName: number | string]: ChainUserConfig;
251
251
  };
252
252
 
253
253
  export type SignerProtocolFunction = (protocolString: string) => Promise<Signer>;
@@ -259,27 +259,27 @@ export type UserConfig<
259
259
  NamedAccounts extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
260
260
  Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData
261
261
  > = {
262
- targets?: {[name: string]: DeploymentTargetConfig};
263
- chains?: Chains;
264
- deployments?: string;
265
- scripts?: string | string[];
266
- accounts?: NamedAccounts;
267
- data?: Data;
268
- signerProtocols?: Record<string, SignerProtocolFunction>;
269
- defaultPollingInterval?: number;
262
+ readonly environments?: {readonly [name: string]: DeploymentEnvironmentConfig};
263
+ readonly chains?: Chains;
264
+ readonly deployments?: string;
265
+ readonly scripts?: string | readonly string[];
266
+ readonly accounts?: NamedAccounts;
267
+ readonly data?: Data;
268
+ readonly signerProtocols?: Record<string, SignerProtocolFunction>;
269
+ readonly defaultPollingInterval?: number;
270
270
  };
271
271
 
272
272
  export type ResolvedUserConfig<
273
273
  NamedAccounts extends UnresolvedUnknownNamedAccounts = UnresolvedUnknownNamedAccounts,
274
274
  Data extends UnresolvedNetworkSpecificData = UnresolvedNetworkSpecificData
275
275
  > = UserConfig & {
276
- deployments: string;
277
- scripts: string[];
278
- defaultPollingInterval: number;
276
+ readonly deployments: string;
277
+ readonly scripts: readonly string[];
278
+ readonly defaultPollingInterval: number;
279
279
  };
280
280
 
281
281
  export type ExecutionParams<Extra extends Record<string, unknown> = Record<string, unknown>> = {
282
- target?: string | {fork: string};
282
+ environment?: string | {fork: string};
283
283
  tags?: string[];
284
284
  saveDeployments?: boolean;
285
285
  askBeforeProceeding?: boolean;
@@ -504,7 +504,7 @@ export type ResolvedNamedSigners<T extends UnknownNamedAccounts> = {
504
504
  export type UnknownDeploymentsAcrossNetworks = Record<string, UnknownDeployments>;
505
505
 
506
506
  export type ResolvedExecutionParams<Extra extends Record<string, unknown> = Record<string, unknown>> = {
507
- readonly target: {
507
+ readonly environment: {
508
508
  readonly name: string;
509
509
  readonly tags: readonly string[];
510
510
  readonly fork?: boolean;
@@ -528,7 +528,9 @@ export interface Environment<
528
528
  Deployments extends UnknownDeployments = UnknownDeployments,
529
529
  Extra extends Record<string, unknown> = Record<string, unknown>
530
530
  > {
531
- readonly name: string;
531
+ readonly environmentName: string;
532
+ readonly config: ResolvedUserConfig<NamedAccounts, Data>;
533
+ readonly executionParameters: ResolvedExecutionParams<Extra>;
532
534
  readonly tags: {readonly [tag: string]: boolean};
533
535
  readonly network: {
534
536
  readonly chain: Chain;