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
package/CHANGELOG.md
CHANGED
package/dist/cli.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var ldenv = require('ldenv');
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-AgLCQD7y.cjs');
|
|
6
6
|
require('node:path');
|
|
7
7
|
require('node:fs');
|
|
8
8
|
require('ethers');
|
|
@@ -16,7 +16,7 @@ require('viem/chains');
|
|
|
16
16
|
require('prompts');
|
|
17
17
|
|
|
18
18
|
var name = "rocketh";
|
|
19
|
-
var version = "0.10.
|
|
19
|
+
var version = "0.10.9";
|
|
20
20
|
var description = "deploy smart contract on ethereum-compatible networks";
|
|
21
21
|
var publishConfig = {
|
|
22
22
|
access: "public"
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { loadEnv } from 'ldenv';
|
|
2
|
-
import { f as loadAndExecuteDeployments } from './index-
|
|
2
|
+
import { f as loadAndExecuteDeployments } from './index-DRZG9qM_.mjs';
|
|
3
3
|
import 'node:path';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'ethers';
|
|
@@ -13,7 +13,7 @@ import 'viem/chains';
|
|
|
13
13
|
import 'prompts';
|
|
14
14
|
|
|
15
15
|
var name = "rocketh";
|
|
16
|
-
var version = "0.10.
|
|
16
|
+
var version = "0.10.9";
|
|
17
17
|
var description = "deploy smart contract on ethereum-compatible networks";
|
|
18
18
|
var publishConfig = {
|
|
19
19
|
access: "public"
|
|
@@ -14,7 +14,7 @@ var prompts = require('prompts');
|
|
|
14
14
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
15
15
|
var require$1 = (
|
|
16
16
|
false
|
|
17
|
-
? /* @__PURE__ */ module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index-
|
|
17
|
+
? /* @__PURE__ */ module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index-AgLCQD7y.cjs', document.baseURI).href)))
|
|
18
18
|
: require
|
|
19
19
|
);
|
|
20
20
|
|
|
@@ -462,6 +462,7 @@ async function createEnvironment(config, providedContext) {
|
|
|
462
462
|
saveDeployments = config.saveDeployments;
|
|
463
463
|
}
|
|
464
464
|
const resolvedAccounts = {};
|
|
465
|
+
const allRemoteAccounts = await provider.request({ method: "eth_accounts" });
|
|
465
466
|
const accountCache = {};
|
|
466
467
|
async function getAccount(name, accounts, accountDef) {
|
|
467
468
|
if (accountCache[name]) {
|
|
@@ -469,8 +470,7 @@ async function createEnvironment(config, providedContext) {
|
|
|
469
470
|
}
|
|
470
471
|
let account;
|
|
471
472
|
if (typeof accountDef === "number") {
|
|
472
|
-
const
|
|
473
|
-
const accountPerIndex = accounts2[accountDef];
|
|
473
|
+
const accountPerIndex = allRemoteAccounts[accountDef];
|
|
474
474
|
if (accountPerIndex) {
|
|
475
475
|
accountCache[name] = account = {
|
|
476
476
|
type: "remote",
|
|
@@ -565,11 +565,19 @@ async function createEnvironment(config, providedContext) {
|
|
|
565
565
|
addressSigners[address] = namedSigner;
|
|
566
566
|
namedSigners[name] = namedSigner;
|
|
567
567
|
}
|
|
568
|
+
const unnamedAccounts = allRemoteAccounts.filter((v) => !addressSigners[v]);
|
|
569
|
+
for (const account of unnamedAccounts) {
|
|
570
|
+
addressSigners[account] = {
|
|
571
|
+
type: "remote",
|
|
572
|
+
signer: provider
|
|
573
|
+
};
|
|
574
|
+
}
|
|
568
575
|
const perliminaryEnvironment = {
|
|
569
576
|
config,
|
|
570
577
|
deployments,
|
|
571
|
-
|
|
572
|
-
|
|
578
|
+
namedAccounts,
|
|
579
|
+
namedSigners,
|
|
580
|
+
unnamedAccounts,
|
|
573
581
|
addressSigners,
|
|
574
582
|
artifacts: context.artifacts,
|
|
575
583
|
network: {
|
|
@@ -1092,11 +1100,11 @@ async function loadEnvironment(options, context) {
|
|
|
1092
1100
|
const { external, internal } = await createEnvironment(resolvedConfig, context);
|
|
1093
1101
|
return external;
|
|
1094
1102
|
}
|
|
1095
|
-
async function loadAndExecuteDeployments(options, args) {
|
|
1103
|
+
async function loadAndExecuteDeployments(options, context, args) {
|
|
1096
1104
|
const resolvedConfig = readAndResolveConfig(options);
|
|
1097
|
-
return executeDeployScripts(resolvedConfig, args);
|
|
1105
|
+
return executeDeployScripts(resolvedConfig, context, args);
|
|
1098
1106
|
}
|
|
1099
|
-
async function executeDeployScripts(config, args) {
|
|
1107
|
+
async function executeDeployScripts(config, context, args) {
|
|
1100
1108
|
setLogLevel(typeof config.logLevel === "undefined" ? 0 : config.logLevel);
|
|
1101
1109
|
let filepaths;
|
|
1102
1110
|
filepaths = traverseMultipleDirectory([config.scripts]);
|
|
@@ -1109,7 +1117,7 @@ async function executeDeployScripts(config, args) {
|
|
|
1109
1117
|
}
|
|
1110
1118
|
return 0;
|
|
1111
1119
|
});
|
|
1112
|
-
let providedContext;
|
|
1120
|
+
let providedContext = context;
|
|
1113
1121
|
const scriptModuleByFilePath = {};
|
|
1114
1122
|
const scriptPathBags = {};
|
|
1115
1123
|
const scriptFilePaths = [];
|
|
@@ -1303,4 +1311,4 @@ exports.mergeArtifacts = mergeArtifacts;
|
|
|
1303
1311
|
exports.readAndResolveConfig = readAndResolveConfig;
|
|
1304
1312
|
exports.readConfig = readConfig;
|
|
1305
1313
|
exports.resolveConfig = resolveConfig;
|
|
1306
|
-
//# sourceMappingURL=index-
|
|
1314
|
+
//# sourceMappingURL=index-AgLCQD7y.cjs.map
|