rocketh 0.10.7 → 0.10.9
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 +86 -1342
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +96 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index-BJlVmvtt.cjs +1306 -0
- package/dist/index-BJlVmvtt.cjs.map +1 -0
- package/dist/{chunk-MEL67HDP.js → index-DOSnToHV.mjs} +107 -126
- package/dist/index-DOSnToHV.mjs.map +1 -0
- package/dist/index.cjs +33 -1349
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +927 -7
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +26 -17
- package/src/environment/utils/chains.ts +31 -1
- package/dist/chunk-MEL67HDP.js.map +0 -1
- package/dist/cli.d.cts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -72
- package/dist/cli.js.map +0 -1
- package/dist/index.d.cts +0 -463
- package/dist/index.js +0 -35
- package/dist/index.js.map +0 -1
- package/tsup.config.ts +0 -5
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { custom, createPublicClient, formatEther } from 'viem';
|
|
5
|
+
import { JSONRPCHTTPProvider } from 'eip-1193-jsonrpc-provider';
|
|
6
|
+
import { logs } from 'named-logs';
|
|
7
|
+
import { hookup, factory } from 'named-logs-console';
|
|
8
|
+
import chains from 'viem/chains';
|
|
9
|
+
import { FunctionFragment } from 'ethers';
|
|
10
|
+
import prompts from 'prompts';
|
|
11
|
+
|
|
12
|
+
var require$1 = (
|
|
13
|
+
true
|
|
14
|
+
? /* @__PURE__ */ createRequire(import.meta.url)
|
|
15
|
+
: require
|
|
16
|
+
);
|
|
8
17
|
|
|
9
|
-
// src/utils/fs.ts
|
|
10
|
-
import fs from "fs";
|
|
11
|
-
import path from "path";
|
|
12
18
|
function traverseMultipleDirectory(dirs) {
|
|
13
19
|
const filepaths = [];
|
|
14
20
|
for (const dir of dirs) {
|
|
@@ -20,7 +26,7 @@ function traverseMultipleDirectory(dirs) {
|
|
|
20
26
|
}
|
|
21
27
|
return filepaths;
|
|
22
28
|
}
|
|
23
|
-
|
|
29
|
+
const traverse = function(dir, result = [], topDir, filter) {
|
|
24
30
|
fs.readdirSync(dir).forEach((name) => {
|
|
25
31
|
const fPath = path.resolve(dir, name);
|
|
26
32
|
const stats = fs.statSync(fPath);
|
|
@@ -42,17 +48,6 @@ var traverse = function(dir, result = [], topDir, filter) {
|
|
|
42
48
|
return result;
|
|
43
49
|
};
|
|
44
50
|
|
|
45
|
-
// src/executor/index.ts
|
|
46
|
-
import path4 from "path";
|
|
47
|
-
import fs4 from "fs";
|
|
48
|
-
|
|
49
|
-
// src/environment/index.ts
|
|
50
|
-
import fs3 from "fs";
|
|
51
|
-
import { createPublicClient, custom } from "viem";
|
|
52
|
-
import { JSONRPCHTTPProvider } from "eip-1193-jsonrpc-provider";
|
|
53
|
-
import path3 from "path";
|
|
54
|
-
|
|
55
|
-
// src/utils/json.ts
|
|
56
51
|
function bnReplacer(k, v) {
|
|
57
52
|
if (typeof v === "bigint") {
|
|
58
53
|
return v.toString() + "n";
|
|
@@ -72,12 +67,9 @@ function stringToJSON(str) {
|
|
|
72
67
|
return JSON.parse(str, bnReviver);
|
|
73
68
|
}
|
|
74
69
|
|
|
75
|
-
// src/environment/deployments.ts
|
|
76
|
-
import path2 from "path";
|
|
77
|
-
import fs2 from "fs";
|
|
78
70
|
function loadDeployments(deploymentsPath, networkName, onlyABIAndAddress, expectedChain) {
|
|
79
71
|
const deploymentsFound = {};
|
|
80
|
-
const deployPath =
|
|
72
|
+
const deployPath = path.join(deploymentsPath, networkName);
|
|
81
73
|
let filesStats;
|
|
82
74
|
try {
|
|
83
75
|
filesStats = traverse(deployPath, void 0, void 0, (name) => !name.startsWith(".") && name !== "solcInputs");
|
|
@@ -87,13 +79,13 @@ function loadDeployments(deploymentsPath, networkName, onlyABIAndAddress, expect
|
|
|
87
79
|
let chainId;
|
|
88
80
|
let genesisHash;
|
|
89
81
|
if (filesStats.length > 0) {
|
|
90
|
-
const chainIdFilepath =
|
|
91
|
-
if (
|
|
92
|
-
chainId =
|
|
82
|
+
const chainIdFilepath = path.join(deployPath, ".chainId");
|
|
83
|
+
if (fs.existsSync(chainIdFilepath)) {
|
|
84
|
+
chainId = fs.readFileSync(chainIdFilepath, "utf-8").trim();
|
|
93
85
|
} else {
|
|
94
|
-
const chainFilepath =
|
|
95
|
-
if (
|
|
96
|
-
const chainSTR =
|
|
86
|
+
const chainFilepath = path.join(deployPath, ".chain");
|
|
87
|
+
if (fs.existsSync(chainFilepath)) {
|
|
88
|
+
const chainSTR = fs.readFileSync(chainFilepath, "utf-8");
|
|
97
89
|
const chainData = JSON.parse(chainSTR);
|
|
98
90
|
chainId = chainData.chainId;
|
|
99
91
|
genesisHash = chainData.genesisHash;
|
|
@@ -111,7 +103,7 @@ function loadDeployments(deploymentsPath, networkName, onlyABIAndAddress, expect
|
|
|
111
103
|
}
|
|
112
104
|
if (expectedChain.genesisHash && expectedChain.genesisHash !== genesisHash) {
|
|
113
105
|
if (expectedChain.deleteDeploymentsIfDifferentGenesisHash) {
|
|
114
|
-
|
|
106
|
+
fs.rmSync(deployPath, { recursive: true, force: true });
|
|
115
107
|
return { deployments: {} };
|
|
116
108
|
} else {
|
|
117
109
|
throw new Error(
|
|
@@ -135,8 +127,8 @@ function loadDeployments(deploymentsPath, networkName, onlyABIAndAddress, expect
|
|
|
135
127
|
});
|
|
136
128
|
for (const fileName of fileNames) {
|
|
137
129
|
if (fileName.substring(fileName.length - 5) === ".json") {
|
|
138
|
-
const deploymentFileName =
|
|
139
|
-
let deployment = JSON.parse(
|
|
130
|
+
const deploymentFileName = path.join(deployPath, fileName);
|
|
131
|
+
let deployment = JSON.parse(fs.readFileSync(deploymentFileName).toString());
|
|
140
132
|
if (onlyABIAndAddress) {
|
|
141
133
|
deployment = {
|
|
142
134
|
address: deployment.address,
|
|
@@ -151,20 +143,17 @@ function loadDeployments(deploymentsPath, networkName, onlyABIAndAddress, expect
|
|
|
151
143
|
return { deployments: deploymentsFound, chainId, genesisHash };
|
|
152
144
|
}
|
|
153
145
|
|
|
154
|
-
// src/internal/logging.ts
|
|
155
|
-
import { logs } from "named-logs";
|
|
156
|
-
import { hookup, factory as Logging } from "named-logs-console";
|
|
157
146
|
hookup();
|
|
158
147
|
function setLogLevel(level) {
|
|
159
|
-
|
|
160
|
-
if (
|
|
161
|
-
|
|
148
|
+
factory.level = level;
|
|
149
|
+
if (factory.level > 0) {
|
|
150
|
+
factory.enable();
|
|
162
151
|
} else {
|
|
163
|
-
|
|
152
|
+
factory.disable();
|
|
164
153
|
}
|
|
165
154
|
}
|
|
166
|
-
|
|
167
|
-
|
|
155
|
+
const logger = logs("rocketh");
|
|
156
|
+
const loggerProgressIndicator = {
|
|
168
157
|
start(msg) {
|
|
169
158
|
if (msg) {
|
|
170
159
|
console.log(msg);
|
|
@@ -187,7 +176,7 @@ var loggerProgressIndicator = {
|
|
|
187
176
|
return this;
|
|
188
177
|
}
|
|
189
178
|
};
|
|
190
|
-
|
|
179
|
+
const voidProgressIndicator = {
|
|
191
180
|
start() {
|
|
192
181
|
return this;
|
|
193
182
|
},
|
|
@@ -201,9 +190,9 @@ var voidProgressIndicator = {
|
|
|
201
190
|
return this;
|
|
202
191
|
}
|
|
203
192
|
};
|
|
204
|
-
|
|
193
|
+
let lastSpin = loggerProgressIndicator;
|
|
205
194
|
function spin(message) {
|
|
206
|
-
if (
|
|
195
|
+
if (factory.level > 0) {
|
|
207
196
|
lastSpin = lastSpin.start(message);
|
|
208
197
|
return lastSpin;
|
|
209
198
|
} else {
|
|
@@ -211,18 +200,42 @@ function spin(message) {
|
|
|
211
200
|
}
|
|
212
201
|
}
|
|
213
202
|
function log(message) {
|
|
214
|
-
if (
|
|
203
|
+
if (factory.level > 0) {
|
|
215
204
|
console.log(message);
|
|
216
205
|
}
|
|
217
206
|
}
|
|
218
207
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
208
|
+
const chainTypesByNames = {
|
|
209
|
+
base: "op-stack",
|
|
210
|
+
baseGoerli: "op-stack",
|
|
211
|
+
baseSepolia: "op-stack",
|
|
212
|
+
optimism: "op-stack",
|
|
213
|
+
optimismGoerli: "op-stack",
|
|
214
|
+
optimismSepolia: "op-stack",
|
|
215
|
+
pgn: "op-stack",
|
|
216
|
+
pgnTestnet: "op-stack",
|
|
217
|
+
zora: "op-stack",
|
|
218
|
+
zoraSepolia: "op-stack",
|
|
219
|
+
zoraTestnet: "op-stack",
|
|
220
|
+
ancient8: "op-stack",
|
|
221
|
+
ancient8Sepolia: "op-stack",
|
|
222
|
+
celoAlfajores: "celo",
|
|
223
|
+
celo: "celo",
|
|
224
|
+
zkSync: "zksync",
|
|
225
|
+
zkSyncTestnet: "zksync",
|
|
226
|
+
zkSyncSepoliaTestnet: "zksync"
|
|
227
|
+
};
|
|
228
|
+
const chainTypes = {};
|
|
229
|
+
const chainById = {};
|
|
230
|
+
const allChains = chains.default || chains;
|
|
223
231
|
for (const key of Object.keys(allChains)) {
|
|
224
232
|
const chain = allChains[key];
|
|
225
|
-
|
|
233
|
+
const chainId = chain.id.toString();
|
|
234
|
+
const specificChainType = chainTypesByNames[key];
|
|
235
|
+
if (specificChainType) {
|
|
236
|
+
chainTypes[chainId] = specificChainType;
|
|
237
|
+
}
|
|
238
|
+
chainById[chainId] = chain;
|
|
226
239
|
}
|
|
227
240
|
function getChain(id) {
|
|
228
241
|
const chain = chainById[id];
|
|
@@ -246,8 +259,6 @@ function getChain(id) {
|
|
|
246
259
|
return chain;
|
|
247
260
|
}
|
|
248
261
|
|
|
249
|
-
// src/environment/utils/artifacts.ts
|
|
250
|
-
import { FunctionFragment } from "ethers";
|
|
251
262
|
function deepEqual(obj1, obj2) {
|
|
252
263
|
function isObject(obj) {
|
|
253
264
|
if (typeof obj === "object" && obj != null) {
|
|
@@ -301,30 +312,23 @@ function mergeArtifacts(list) {
|
|
|
301
312
|
}
|
|
302
313
|
sigJSMap.set(selector, { index: i, routeName: listElem.name, functionName: element.name });
|
|
303
314
|
const exists = added.has(element.name);
|
|
304
|
-
if (exists) {
|
|
305
|
-
} else {
|
|
315
|
+
if (exists) ; else {
|
|
306
316
|
added.set(element.name, element);
|
|
307
317
|
mergedABI.push(element);
|
|
308
318
|
}
|
|
309
|
-
} else if (element.type === "constructor") {
|
|
310
|
-
} else if (element.type === "error") {
|
|
319
|
+
} else if (element.type === "constructor") ; else if (element.type === "error") {
|
|
311
320
|
const exists = added.has(element.name);
|
|
312
|
-
if (exists) {
|
|
313
|
-
} else {
|
|
321
|
+
if (exists) ; else {
|
|
314
322
|
added.set(element.name, element);
|
|
315
323
|
mergedABI.push(element);
|
|
316
324
|
}
|
|
317
325
|
} else if (element.type === "event") {
|
|
318
326
|
const exists = added.has(element.name);
|
|
319
|
-
if (exists) {
|
|
320
|
-
} else {
|
|
327
|
+
if (exists) ; else {
|
|
321
328
|
added.set(element.name, element);
|
|
322
329
|
mergedABI.push(element);
|
|
323
330
|
}
|
|
324
|
-
} else if (element.type === "fallback")
|
|
325
|
-
} else if (element.type === "receive") {
|
|
326
|
-
} else {
|
|
327
|
-
}
|
|
331
|
+
} else if (element.type === "fallback") ; else if (element.type === "receive") ; else ;
|
|
328
332
|
}
|
|
329
333
|
const devdoc = listElem.artifact.devdoc;
|
|
330
334
|
if (devdoc) {
|
|
@@ -364,18 +368,16 @@ function mergeArtifacts(list) {
|
|
|
364
368
|
};
|
|
365
369
|
}
|
|
366
370
|
|
|
367
|
-
|
|
368
|
-
var BaseProvider = class {
|
|
371
|
+
class BaseProvider {
|
|
369
372
|
constructor(provider) {
|
|
370
373
|
this.provider = provider;
|
|
371
374
|
}
|
|
372
375
|
request(args) {
|
|
373
376
|
return this._request(args);
|
|
374
377
|
}
|
|
375
|
-
}
|
|
378
|
+
}
|
|
376
379
|
|
|
377
|
-
|
|
378
|
-
var TransactionHashTracker = class extends BaseProvider {
|
|
380
|
+
class TransactionHashTracker extends BaseProvider {
|
|
379
381
|
constructor(provider) {
|
|
380
382
|
super(provider);
|
|
381
383
|
this.transactionHashes = [];
|
|
@@ -393,9 +395,8 @@ var TransactionHashTracker = class extends BaseProvider {
|
|
|
393
395
|
}
|
|
394
396
|
return response;
|
|
395
397
|
}
|
|
396
|
-
}
|
|
398
|
+
}
|
|
397
399
|
|
|
398
|
-
// src/environment/index.ts
|
|
399
400
|
globalThis.extensions = [];
|
|
400
401
|
function extendEnvironment(extension) {
|
|
401
402
|
globalThis.extensions.push(extension);
|
|
@@ -576,11 +577,11 @@ async function createEnvironment(config, providedContext) {
|
|
|
576
577
|
}
|
|
577
578
|
};
|
|
578
579
|
function ensureDeploymentFolder() {
|
|
579
|
-
const folderPath =
|
|
580
|
-
|
|
581
|
-
const chainFilepath =
|
|
582
|
-
if (!
|
|
583
|
-
|
|
580
|
+
const folderPath = path.join(config.deployments, context.network.name);
|
|
581
|
+
fs.mkdirSync(folderPath, { recursive: true });
|
|
582
|
+
const chainFilepath = path.join(folderPath, ".chain");
|
|
583
|
+
if (!fs.existsSync(chainFilepath)) {
|
|
584
|
+
fs.writeFileSync(chainFilepath, JSON.stringify({ chainId, genesisHash }));
|
|
584
585
|
}
|
|
585
586
|
return folderPath;
|
|
586
587
|
}
|
|
@@ -622,7 +623,7 @@ async function createEnvironment(config, providedContext) {
|
|
|
622
623
|
deployments[name] = deployment;
|
|
623
624
|
if (context.network.saveDeployments) {
|
|
624
625
|
const folderPath = ensureDeploymentFolder();
|
|
625
|
-
|
|
626
|
+
fs.writeFileSync(`${folderPath}/${name}.json`, JSONToString(deployment, 2));
|
|
626
627
|
}
|
|
627
628
|
return deployment;
|
|
628
629
|
}
|
|
@@ -631,10 +632,10 @@ async function createEnvironment(config, providedContext) {
|
|
|
631
632
|
return;
|
|
632
633
|
}
|
|
633
634
|
const folderPath = ensureDeploymentFolder();
|
|
634
|
-
const filepath =
|
|
635
|
+
const filepath = path.join(folderPath, ".pending_transactions.json");
|
|
635
636
|
let existingPendingTansactions;
|
|
636
637
|
try {
|
|
637
|
-
existingPendingTansactions = stringToJSON(
|
|
638
|
+
existingPendingTansactions = stringToJSON(fs.readFileSync(filepath, "utf-8"));
|
|
638
639
|
} catch {
|
|
639
640
|
existingPendingTansactions = [];
|
|
640
641
|
}
|
|
@@ -648,7 +649,7 @@ async function createEnvironment(config, providedContext) {
|
|
|
648
649
|
);
|
|
649
650
|
try {
|
|
650
651
|
await waitForDeploymentTransactionAndSave(pendingTransaction);
|
|
651
|
-
|
|
652
|
+
fs.writeFileSync(filepath, JSONToString(existingPendingTansactions, 2));
|
|
652
653
|
spinner.succeed();
|
|
653
654
|
} catch (e) {
|
|
654
655
|
spinner.fail();
|
|
@@ -658,7 +659,7 @@ async function createEnvironment(config, providedContext) {
|
|
|
658
659
|
const spinner = spin(`recovering execution's transaction ${pendingTransaction.transaction.hash}`);
|
|
659
660
|
try {
|
|
660
661
|
await waitForTransaction(pendingTransaction.transaction.hash);
|
|
661
|
-
|
|
662
|
+
fs.writeFileSync(filepath, JSONToString(existingPendingTansactions, 2));
|
|
662
663
|
spinner.succeed();
|
|
663
664
|
} catch (e) {
|
|
664
665
|
spinner.fail();
|
|
@@ -667,21 +668,21 @@ async function createEnvironment(config, providedContext) {
|
|
|
667
668
|
}
|
|
668
669
|
}
|
|
669
670
|
}
|
|
670
|
-
|
|
671
|
+
fs.rmSync(filepath);
|
|
671
672
|
}
|
|
672
673
|
}
|
|
673
674
|
async function savePendingTransaction(pendingTransaction) {
|
|
674
675
|
if (context.network.saveDeployments) {
|
|
675
676
|
const folderPath = ensureDeploymentFolder();
|
|
676
|
-
const filepath =
|
|
677
|
+
const filepath = path.join(folderPath, ".pending_transactions.json");
|
|
677
678
|
let existingPendinTransactions;
|
|
678
679
|
try {
|
|
679
|
-
existingPendinTransactions = stringToJSON(
|
|
680
|
+
existingPendinTransactions = stringToJSON(fs.readFileSync(filepath, "utf-8"));
|
|
680
681
|
} catch {
|
|
681
682
|
existingPendinTransactions = [];
|
|
682
683
|
}
|
|
683
684
|
existingPendinTransactions.push(pendingTransaction);
|
|
684
|
-
|
|
685
|
+
fs.writeFileSync(filepath, JSONToString(existingPendinTransactions, 2));
|
|
685
686
|
}
|
|
686
687
|
return deployments;
|
|
687
688
|
}
|
|
@@ -703,25 +704,25 @@ async function createEnvironment(config, providedContext) {
|
|
|
703
704
|
async function deleteTransaction(hash) {
|
|
704
705
|
if (context.network.saveDeployments) {
|
|
705
706
|
const folderPath = ensureDeploymentFolder();
|
|
706
|
-
const filepath =
|
|
707
|
+
const filepath = path.join(folderPath, ".pending_transactions.json");
|
|
707
708
|
let existingPendinTransactions;
|
|
708
709
|
try {
|
|
709
|
-
existingPendinTransactions = stringToJSON(
|
|
710
|
+
existingPendinTransactions = stringToJSON(fs.readFileSync(filepath, "utf-8"));
|
|
710
711
|
} catch {
|
|
711
712
|
existingPendinTransactions = [];
|
|
712
713
|
}
|
|
713
714
|
existingPendinTransactions = existingPendinTransactions.filter((v) => v.transaction.hash !== hash);
|
|
714
715
|
if (existingPendinTransactions.length === 0) {
|
|
715
|
-
|
|
716
|
+
fs.rmSync(filepath);
|
|
716
717
|
} else {
|
|
717
|
-
|
|
718
|
+
fs.writeFileSync(filepath, JSONToString(existingPendinTransactions, 2));
|
|
718
719
|
}
|
|
719
720
|
}
|
|
720
721
|
}
|
|
721
722
|
async function exportDeploymentsAsTypes() {
|
|
722
723
|
const folderPath = "./generated";
|
|
723
|
-
|
|
724
|
-
|
|
724
|
+
fs.mkdirSync(folderPath, { recursive: true });
|
|
725
|
+
fs.writeFileSync(`${folderPath}/deployments.ts`, `export default ${JSONToString(deployments, 2)} as const;`);
|
|
725
726
|
}
|
|
726
727
|
async function waitForTransaction(hash, info) {
|
|
727
728
|
const spinner = spin(
|
|
@@ -902,7 +903,6 @@ async function createEnvironment(config, providedContext) {
|
|
|
902
903
|
};
|
|
903
904
|
}
|
|
904
905
|
|
|
905
|
-
// src/utils/eth.ts
|
|
906
906
|
function avg(arr) {
|
|
907
907
|
const sum = arr.reduce((a, v) => a + v);
|
|
908
908
|
return sum / BigInt(arr.length);
|
|
@@ -965,11 +965,8 @@ async function getRoughGasPriceEstimate(provider, options) {
|
|
|
965
965
|
};
|
|
966
966
|
}
|
|
967
967
|
|
|
968
|
-
// src/executor/index.ts
|
|
969
|
-
import prompts from "prompts";
|
|
970
|
-
import { formatEther } from "viem";
|
|
971
968
|
if (!process.env["ROCKETH_SKIP_ESBUILD"]) {
|
|
972
|
-
|
|
969
|
+
require$1("esbuild-register/dist/node").register();
|
|
973
970
|
}
|
|
974
971
|
function execute(context, callback, options) {
|
|
975
972
|
const scriptModule = (env, args) => callback(env, args);
|
|
@@ -981,7 +978,7 @@ function execute(context, callback, options) {
|
|
|
981
978
|
function readConfig(options) {
|
|
982
979
|
let configFile;
|
|
983
980
|
try {
|
|
984
|
-
const configString =
|
|
981
|
+
const configString = fs.readFileSync("./rocketh.json", "utf-8");
|
|
985
982
|
configFile = JSON.parse(configString);
|
|
986
983
|
} catch {
|
|
987
984
|
}
|
|
@@ -1100,7 +1097,7 @@ async function executeDeployScripts(config, args) {
|
|
|
1100
1097
|
setLogLevel(typeof config.logLevel === "undefined" ? 0 : config.logLevel);
|
|
1101
1098
|
let filepaths;
|
|
1102
1099
|
filepaths = traverseMultipleDirectory([config.scripts]);
|
|
1103
|
-
filepaths = filepaths.filter((v) => !
|
|
1100
|
+
filepaths = filepaths.filter((v) => !path.basename(v).startsWith("_")).sort((a, b) => {
|
|
1104
1101
|
if (a < b) {
|
|
1105
1102
|
return -1;
|
|
1106
1103
|
}
|
|
@@ -1114,13 +1111,13 @@ async function executeDeployScripts(config, args) {
|
|
|
1114
1111
|
const scriptPathBags = {};
|
|
1115
1112
|
const scriptFilePaths = [];
|
|
1116
1113
|
for (const filepath of filepaths) {
|
|
1117
|
-
const scriptFilePath =
|
|
1114
|
+
const scriptFilePath = path.resolve(filepath);
|
|
1118
1115
|
let scriptModule;
|
|
1119
1116
|
try {
|
|
1120
|
-
if (
|
|
1121
|
-
delete
|
|
1117
|
+
if (require$1.cache) {
|
|
1118
|
+
delete require$1.cache[scriptFilePath];
|
|
1122
1119
|
}
|
|
1123
|
-
scriptModule =
|
|
1120
|
+
scriptModule = require$1(scriptFilePath);
|
|
1124
1121
|
if (scriptModule.default) {
|
|
1125
1122
|
scriptModule = scriptModule.default;
|
|
1126
1123
|
if (scriptModule.default) {
|
|
@@ -1242,8 +1239,8 @@ Do you want to proceed (note that gas price can change for each tx)`
|
|
|
1242
1239
|
}
|
|
1243
1240
|
}
|
|
1244
1241
|
for (const deployScript of scriptsToRun.concat(scriptsToRunAtTheEnd)) {
|
|
1245
|
-
const filename =
|
|
1246
|
-
|
|
1242
|
+
const filename = path.basename(deployScript.filePath);
|
|
1243
|
+
path.relative(".", deployScript.filePath);
|
|
1247
1244
|
let skip = false;
|
|
1248
1245
|
const spinner = spin(`- Executing ${filename}`);
|
|
1249
1246
|
if (deployScript.func.skip) {
|
|
@@ -1267,7 +1264,7 @@ Do you want to proceed (note that gas price can change for each tx)`
|
|
|
1267
1264
|
throw e;
|
|
1268
1265
|
}
|
|
1269
1266
|
if (result && typeof result === "boolean") {
|
|
1270
|
-
|
|
1267
|
+
config.deployments;
|
|
1271
1268
|
}
|
|
1272
1269
|
}
|
|
1273
1270
|
}
|
|
@@ -1287,21 +1284,5 @@ Do you want to proceed (note that gas price can change for each tx)`
|
|
|
1287
1284
|
return external;
|
|
1288
1285
|
}
|
|
1289
1286
|
|
|
1290
|
-
export {
|
|
1291
|
-
|
|
1292
|
-
chainById,
|
|
1293
|
-
getChain,
|
|
1294
|
-
mergeArtifacts,
|
|
1295
|
-
extendEnvironment,
|
|
1296
|
-
handleSignerProtocol,
|
|
1297
|
-
getGasPriceEstimate,
|
|
1298
|
-
getRoughGasPriceEstimate,
|
|
1299
|
-
execute,
|
|
1300
|
-
readConfig,
|
|
1301
|
-
readAndResolveConfig,
|
|
1302
|
-
resolveConfig,
|
|
1303
|
-
loadEnvironment,
|
|
1304
|
-
loadAndExecuteDeployments,
|
|
1305
|
-
executeDeployScripts
|
|
1306
|
-
};
|
|
1307
|
-
//# sourceMappingURL=chunk-MEL67HDP.js.map
|
|
1287
|
+
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
|