rocketh 0.10.9 → 0.10.10

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.
@@ -459,6 +459,7 @@ async function createEnvironment(config, providedContext) {
459
459
  saveDeployments = config.saveDeployments;
460
460
  }
461
461
  const resolvedAccounts = {};
462
+ const allRemoteAccounts = await provider.request({ method: "eth_accounts" });
462
463
  const accountCache = {};
463
464
  async function getAccount(name, accounts, accountDef) {
464
465
  if (accountCache[name]) {
@@ -466,8 +467,7 @@ async function createEnvironment(config, providedContext) {
466
467
  }
467
468
  let account;
468
469
  if (typeof accountDef === "number") {
469
- const accounts2 = await provider.request({ method: "eth_accounts" });
470
- const accountPerIndex = accounts2[accountDef];
470
+ const accountPerIndex = allRemoteAccounts[accountDef];
471
471
  if (accountPerIndex) {
472
472
  accountCache[name] = account = {
473
473
  type: "remote",
@@ -562,11 +562,19 @@ async function createEnvironment(config, providedContext) {
562
562
  addressSigners[address] = namedSigner;
563
563
  namedSigners[name] = namedSigner;
564
564
  }
565
+ const unnamedAccounts = allRemoteAccounts.filter((v) => !addressSigners[v]);
566
+ for (const account of unnamedAccounts) {
567
+ addressSigners[account] = {
568
+ type: "remote",
569
+ signer: provider
570
+ };
571
+ }
565
572
  const perliminaryEnvironment = {
566
573
  config,
567
574
  deployments,
568
- accounts: namedAccounts,
569
- signers: namedSigners,
575
+ namedAccounts,
576
+ namedSigners,
577
+ unnamedAccounts,
570
578
  addressSigners,
571
579
  artifacts: context.artifacts,
572
580
  network: {
@@ -1089,11 +1097,11 @@ async function loadEnvironment(options, context) {
1089
1097
  const { external, internal } = await createEnvironment(resolvedConfig, context);
1090
1098
  return external;
1091
1099
  }
1092
- async function loadAndExecuteDeployments(options, args) {
1100
+ async function loadAndExecuteDeployments(options, context, args) {
1093
1101
  const resolvedConfig = readAndResolveConfig(options);
1094
- return executeDeployScripts(resolvedConfig, args);
1102
+ return executeDeployScripts(resolvedConfig, context, args);
1095
1103
  }
1096
- async function executeDeployScripts(config, args) {
1104
+ async function executeDeployScripts(config, context, args) {
1097
1105
  setLogLevel(typeof config.logLevel === "undefined" ? 0 : config.logLevel);
1098
1106
  let filepaths;
1099
1107
  filepaths = traverseMultipleDirectory([config.scripts]);
@@ -1106,7 +1114,7 @@ async function executeDeployScripts(config, args) {
1106
1114
  }
1107
1115
  return 0;
1108
1116
  });
1109
- let providedContext;
1117
+ let providedContext = context;
1110
1118
  const scriptModuleByFilePath = {};
1111
1119
  const scriptPathBags = {};
1112
1120
  const scriptFilePaths = [];
@@ -1285,4 +1293,4 @@ Do you want to proceed (note that gas price can change for each tx)`
1285
1293
  }
1286
1294
 
1287
1295
  export { execute as a, readAndResolveConfig as b, resolveConfig as c, loadEnvironment as d, extendEnvironment as e, loadAndExecuteDeployments as f, executeDeployScripts as g, handleSignerProtocol as h, chainTypes as i, chainById as j, getChain as k, loadDeployments as l, mergeArtifacts as m, getGasPriceEstimate as n, getRoughGasPriceEstimate as o, readConfig as r };
1288
- //# sourceMappingURL=index-DOSnToHV.mjs.map
1296
+ //# sourceMappingURL=index-DRZG9qM_.mjs.map