rocketh 0.10.10 → 0.10.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rocketh",
3
- "version": "0.10.10",
3
+ "version": "0.10.11",
4
4
  "description": "deploy smart contract on ethereum-compatible networks",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -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 (providedContext && providedContext !== scriptModule.providedContext) {
250
- throw new Error(`context between 2 scripts is different, please share the same across them`);
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;