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.
- package/CHANGELOG.md +6 -0
- package/dist/cli.cjs +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/{index-BJlVmvtt.cjs → index-AgLCQD7y.cjs} +18 -10
- package/dist/index-AgLCQD7y.cjs.map +1 -0
- package/dist/{index-DOSnToHV.mjs → index-DRZG9qM_.mjs} +17 -9
- package/dist/index-DRZG9qM_.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -11
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/environment/index.ts +18 -8
- package/src/environment/types.ts +8 -6
- package/src/executor/index.ts +18 -9
- package/dist/index-BJlVmvtt.cjs.map +0 -1
- package/dist/index-DOSnToHV.mjs.map +0 -1
|
@@ -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
|
|
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
|
-
|
|
569
|
-
|
|
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-
|
|
1296
|
+
//# sourceMappingURL=index-DRZG9qM_.mjs.map
|