rocketh 0.10.10 → 0.10.12
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/CHANGELOG.md +12 -0
- package/dist/cli.cjs +5 -4
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +5 -4
- package/dist/cli.mjs.map +1 -1
- package/dist/{index-AgLCQD7y.cjs → index-CaeasYIO.cjs} +11 -7
- package/dist/index-CaeasYIO.cjs.map +1 -0
- package/dist/{index-DRZG9qM_.mjs → index-CruWNHof.mjs} +10 -6
- package/dist/index-CruWNHof.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/cli.ts +2 -0
- package/src/executor/index.ts +8 -5
- package/dist/index-AgLCQD7y.cjs.map +0 -1
- package/dist/index-DRZG9qM_.mjs.map +0 -1
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -18,6 +18,7 @@ program
|
|
|
18
18
|
.option('-d, --deployments <value>', 'folder where deployments are saved')
|
|
19
19
|
.option('--skip-gas-report', 'if set skip gas report')
|
|
20
20
|
.option('--skip-prompts', 'if set skip any prompts')
|
|
21
|
+
.option('--save-deployments', 'if set, save deployments')
|
|
21
22
|
.requiredOption('-n, --network <value>', 'network context to use')
|
|
22
23
|
.parse(process.argv);
|
|
23
24
|
|
|
@@ -30,4 +31,5 @@ loadAndExecuteDeployments({
|
|
|
30
31
|
logLevel: 1,
|
|
31
32
|
askBeforeProceeding: options.skipPrompts ? false : true,
|
|
32
33
|
reportGasUse: options.skipGasReport ? false : true,
|
|
34
|
+
saveDeployments: options.saveDeployments,
|
|
33
35
|
});
|
package/src/executor/index.ts
CHANGED
|
@@ -102,7 +102,7 @@ export function readConfig(options: ConfigOptions): Config {
|
|
|
102
102
|
if (options.network === 'localhost') {
|
|
103
103
|
nodeUrl = 'http://127.0.0.1:8545';
|
|
104
104
|
} else {
|
|
105
|
-
|
|
105
|
+
console.error(`network "${options.network}" is not configured. Please add it to the rocketh.json file`);
|
|
106
106
|
process.exit(1);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -114,7 +114,7 @@ export function readConfig(options: ConfigOptions): Config {
|
|
|
114
114
|
if (options.network === 'localhost') {
|
|
115
115
|
nodeUrl = 'http://127.0.0.1:8545';
|
|
116
116
|
} else {
|
|
117
|
-
|
|
117
|
+
console.error(`network "${options.network}" is not configured. Please add it to the rocketh.json file`);
|
|
118
118
|
process.exit(1);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -224,6 +224,7 @@ export async function executeDeployScripts<
|
|
|
224
224
|
});
|
|
225
225
|
|
|
226
226
|
let providedContext: ProvidedContext<Artifacts, NamedAccounts> | undefined = context;
|
|
227
|
+
const providedFromArguments = !!providedContext;
|
|
227
228
|
|
|
228
229
|
const scriptModuleByFilePath: {[filename: string]: DeployScriptModule<Artifacts, NamedAccounts, ArgumentsType>} = {};
|
|
229
230
|
const scriptPathBags: {[tag: string]: string[]} = {};
|
|
@@ -246,10 +247,12 @@ export async function executeDeployScripts<
|
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
249
|
scriptModuleByFilePath[scriptFilePath] = scriptModule;
|
|
249
|
-
if (
|
|
250
|
-
|
|
250
|
+
if (!providedFromArguments) {
|
|
251
|
+
if (providedContext && providedContext !== scriptModule.providedContext) {
|
|
252
|
+
throw new Error(`context between 2 scripts is different, please share the same across them`);
|
|
253
|
+
}
|
|
254
|
+
providedContext = scriptModule.providedContext as ProvidedContext<Artifacts, NamedAccounts>;
|
|
251
255
|
}
|
|
252
|
-
providedContext = scriptModule.providedContext as ProvidedContext<Artifacts, NamedAccounts>;
|
|
253
256
|
} catch (e) {
|
|
254
257
|
logger.error(`could not import ${filepath}`);
|
|
255
258
|
throw e;
|