@gearbox-protocol/deploy-tools 4.2.0-next.1 → 4.2.0-next.2
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/dist/index.mjs +362 -439
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -952,8 +952,8 @@ var require_command = __commonJS({
|
|
|
952
952
|
"../../node_modules/commander/lib/command.js"(exports2) {
|
|
953
953
|
var EventEmitter2 = __require("events").EventEmitter;
|
|
954
954
|
var childProcess = __require("child_process");
|
|
955
|
-
var
|
|
956
|
-
var
|
|
955
|
+
var path8 = __require("path");
|
|
956
|
+
var fs2 = __require("fs");
|
|
957
957
|
var process3 = __require("process");
|
|
958
958
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
959
959
|
var { CommanderError: CommanderError2 } = require_error();
|
|
@@ -1785,12 +1785,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1785
1785
|
let launchWithNode = false;
|
|
1786
1786
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
1787
1787
|
function findFile(baseDir, baseName) {
|
|
1788
|
-
const localBin =
|
|
1789
|
-
if (
|
|
1788
|
+
const localBin = path8.resolve(baseDir, baseName);
|
|
1789
|
+
if (fs2.existsSync(localBin))
|
|
1790
1790
|
return localBin;
|
|
1791
|
-
if (sourceExt.includes(
|
|
1791
|
+
if (sourceExt.includes(path8.extname(baseName)))
|
|
1792
1792
|
return void 0;
|
|
1793
|
-
const foundExt = sourceExt.find((ext) =>
|
|
1793
|
+
const foundExt = sourceExt.find((ext) => fs2.existsSync(`${localBin}${ext}`));
|
|
1794
1794
|
if (foundExt)
|
|
1795
1795
|
return `${localBin}${foundExt}`;
|
|
1796
1796
|
return void 0;
|
|
@@ -1802,23 +1802,23 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1802
1802
|
if (this._scriptPath) {
|
|
1803
1803
|
let resolvedScriptPath;
|
|
1804
1804
|
try {
|
|
1805
|
-
resolvedScriptPath =
|
|
1805
|
+
resolvedScriptPath = fs2.realpathSync(this._scriptPath);
|
|
1806
1806
|
} catch (err) {
|
|
1807
1807
|
resolvedScriptPath = this._scriptPath;
|
|
1808
1808
|
}
|
|
1809
|
-
executableDir =
|
|
1809
|
+
executableDir = path8.resolve(path8.dirname(resolvedScriptPath), executableDir);
|
|
1810
1810
|
}
|
|
1811
1811
|
if (executableDir) {
|
|
1812
1812
|
let localFile = findFile(executableDir, executableFile);
|
|
1813
1813
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
1814
|
-
const legacyName =
|
|
1814
|
+
const legacyName = path8.basename(this._scriptPath, path8.extname(this._scriptPath));
|
|
1815
1815
|
if (legacyName !== this._name) {
|
|
1816
1816
|
localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
1819
1819
|
executableFile = localFile || executableFile;
|
|
1820
1820
|
}
|
|
1821
|
-
launchWithNode = sourceExt.includes(
|
|
1821
|
+
launchWithNode = sourceExt.includes(path8.extname(executableFile));
|
|
1822
1822
|
let proc;
|
|
1823
1823
|
if (process3.platform !== "win32") {
|
|
1824
1824
|
if (launchWithNode) {
|
|
@@ -2620,7 +2620,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2620
2620
|
* @return {Command}
|
|
2621
2621
|
*/
|
|
2622
2622
|
nameFromFilename(filename) {
|
|
2623
|
-
this._name =
|
|
2623
|
+
this._name = path8.basename(filename, path8.extname(filename));
|
|
2624
2624
|
return this;
|
|
2625
2625
|
}
|
|
2626
2626
|
/**
|
|
@@ -2634,10 +2634,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2634
2634
|
* @param {string} [path]
|
|
2635
2635
|
* @return {string|null|Command}
|
|
2636
2636
|
*/
|
|
2637
|
-
executableDir(
|
|
2638
|
-
if (
|
|
2637
|
+
executableDir(path9) {
|
|
2638
|
+
if (path9 === void 0)
|
|
2639
2639
|
return this._executableDir;
|
|
2640
|
-
this._executableDir =
|
|
2640
|
+
this._executableDir = path9;
|
|
2641
2641
|
return this;
|
|
2642
2642
|
}
|
|
2643
2643
|
/**
|
|
@@ -2953,8 +2953,8 @@ var require_constants = __commonJS({
|
|
|
2953
2953
|
// ../../node_modules/node-gyp-build/node-gyp-build.js
|
|
2954
2954
|
var require_node_gyp_build = __commonJS({
|
|
2955
2955
|
"../../node_modules/node-gyp-build/node-gyp-build.js"(exports2, module2) {
|
|
2956
|
-
var
|
|
2957
|
-
var
|
|
2956
|
+
var fs2 = __require("fs");
|
|
2957
|
+
var path8 = __require("path");
|
|
2958
2958
|
var os2 = __require("os");
|
|
2959
2959
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
2960
2960
|
var vars = process.config && process.config.variables || {};
|
|
@@ -2971,25 +2971,25 @@ var require_node_gyp_build = __commonJS({
|
|
|
2971
2971
|
return runtimeRequire(load.resolve(dir));
|
|
2972
2972
|
}
|
|
2973
2973
|
load.resolve = load.path = function(dir) {
|
|
2974
|
-
dir =
|
|
2974
|
+
dir = path8.resolve(dir || ".");
|
|
2975
2975
|
try {
|
|
2976
|
-
var name = runtimeRequire(
|
|
2976
|
+
var name = runtimeRequire(path8.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
|
|
2977
2977
|
if (process.env[name + "_PREBUILD"])
|
|
2978
2978
|
dir = process.env[name + "_PREBUILD"];
|
|
2979
2979
|
} catch (err) {
|
|
2980
2980
|
}
|
|
2981
2981
|
if (!prebuildsOnly) {
|
|
2982
|
-
var release = getFirst(
|
|
2982
|
+
var release = getFirst(path8.join(dir, "build/Release"), matchBuild);
|
|
2983
2983
|
if (release)
|
|
2984
2984
|
return release;
|
|
2985
|
-
var debug = getFirst(
|
|
2985
|
+
var debug = getFirst(path8.join(dir, "build/Debug"), matchBuild);
|
|
2986
2986
|
if (debug)
|
|
2987
2987
|
return debug;
|
|
2988
2988
|
}
|
|
2989
2989
|
var prebuild = resolve2(dir);
|
|
2990
2990
|
if (prebuild)
|
|
2991
2991
|
return prebuild;
|
|
2992
|
-
var nearby = resolve2(
|
|
2992
|
+
var nearby = resolve2(path8.dirname(process.execPath));
|
|
2993
2993
|
if (nearby)
|
|
2994
2994
|
return nearby;
|
|
2995
2995
|
var target = [
|
|
@@ -3007,28 +3007,28 @@ var require_node_gyp_build = __commonJS({
|
|
|
3007
3007
|
].filter(Boolean).join(" ");
|
|
3008
3008
|
throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
|
|
3009
3009
|
function resolve2(dir2) {
|
|
3010
|
-
var tuples = readdirSync(
|
|
3010
|
+
var tuples = readdirSync(path8.join(dir2, "prebuilds")).map(parseTuple);
|
|
3011
3011
|
var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
3012
3012
|
if (!tuple)
|
|
3013
3013
|
return;
|
|
3014
|
-
var prebuilds =
|
|
3014
|
+
var prebuilds = path8.join(dir2, "prebuilds", tuple.name);
|
|
3015
3015
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
3016
3016
|
var candidates = parsed.filter(matchTags(runtime, abi));
|
|
3017
3017
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
3018
3018
|
if (winner)
|
|
3019
|
-
return
|
|
3019
|
+
return path8.join(prebuilds, winner.file);
|
|
3020
3020
|
}
|
|
3021
3021
|
};
|
|
3022
3022
|
function readdirSync(dir) {
|
|
3023
3023
|
try {
|
|
3024
|
-
return
|
|
3024
|
+
return fs2.readdirSync(dir);
|
|
3025
3025
|
} catch (err) {
|
|
3026
3026
|
return [];
|
|
3027
3027
|
}
|
|
3028
3028
|
}
|
|
3029
3029
|
function getFirst(dir, filter2) {
|
|
3030
3030
|
var files = readdirSync(dir).filter(filter2);
|
|
3031
|
-
return files[0] &&
|
|
3031
|
+
return files[0] && path8.join(dir, files[0]);
|
|
3032
3032
|
}
|
|
3033
3033
|
function matchBuild(name) {
|
|
3034
3034
|
return /\.node$/.test(name);
|
|
@@ -3130,7 +3130,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
3130
3130
|
return typeof window !== "undefined" && window.process && window.process.type === "renderer";
|
|
3131
3131
|
}
|
|
3132
3132
|
function isAlpine(platform2) {
|
|
3133
|
-
return platform2 === "linux" &&
|
|
3133
|
+
return platform2 === "linux" && fs2.existsSync("/etc/alpine-release");
|
|
3134
3134
|
}
|
|
3135
3135
|
load.parseTags = parseTags;
|
|
3136
3136
|
load.matchTags = matchTags;
|
|
@@ -13427,12 +13427,12 @@ var require_abstract_coder = __commonJS({
|
|
|
13427
13427
|
var logger2 = new logger_1.Logger(_version_1.version);
|
|
13428
13428
|
function checkResultErrors3(result) {
|
|
13429
13429
|
var errors = [];
|
|
13430
|
-
var checkErrors = function(
|
|
13430
|
+
var checkErrors = function(path8, object2) {
|
|
13431
13431
|
if (!Array.isArray(object2)) {
|
|
13432
13432
|
return;
|
|
13433
13433
|
}
|
|
13434
13434
|
for (var key in object2) {
|
|
13435
|
-
var childPath =
|
|
13435
|
+
var childPath = path8.slice();
|
|
13436
13436
|
childPath.push(key);
|
|
13437
13437
|
try {
|
|
13438
13438
|
checkErrors(childPath, object2[key]);
|
|
@@ -37150,9 +37150,9 @@ var require_lib45 = __commonJS({
|
|
|
37150
37150
|
if (index > 4294967295) {
|
|
37151
37151
|
throw new Error("invalid index - " + String(index));
|
|
37152
37152
|
}
|
|
37153
|
-
var
|
|
37154
|
-
if (
|
|
37155
|
-
|
|
37153
|
+
var path8 = this.path;
|
|
37154
|
+
if (path8) {
|
|
37155
|
+
path8 += "/" + (index & ~HardenedBit);
|
|
37156
37156
|
}
|
|
37157
37157
|
var data = new Uint8Array(37);
|
|
37158
37158
|
if (index & HardenedBit) {
|
|
@@ -37160,8 +37160,8 @@ var require_lib45 = __commonJS({
|
|
|
37160
37160
|
throw new Error("cannot derive child of neutered node");
|
|
37161
37161
|
}
|
|
37162
37162
|
data.set((0, bytes_1.arrayify)(this.privateKey), 1);
|
|
37163
|
-
if (
|
|
37164
|
-
|
|
37163
|
+
if (path8) {
|
|
37164
|
+
path8 += "'";
|
|
37165
37165
|
}
|
|
37166
37166
|
} else {
|
|
37167
37167
|
data.set((0, bytes_1.arrayify)(this.publicKey));
|
|
@@ -37180,21 +37180,21 @@ var require_lib45 = __commonJS({
|
|
|
37180
37180
|
var ek = new signing_key_1.SigningKey((0, bytes_1.hexlify)(IL));
|
|
37181
37181
|
Ki = ek._addPoint(this.publicKey);
|
|
37182
37182
|
}
|
|
37183
|
-
var mnemonicOrPath =
|
|
37183
|
+
var mnemonicOrPath = path8;
|
|
37184
37184
|
var srcMnemonic = this.mnemonic;
|
|
37185
37185
|
if (srcMnemonic) {
|
|
37186
37186
|
mnemonicOrPath = Object.freeze({
|
|
37187
37187
|
phrase: srcMnemonic.phrase,
|
|
37188
|
-
path:
|
|
37188
|
+
path: path8,
|
|
37189
37189
|
locale: srcMnemonic.locale || "en"
|
|
37190
37190
|
});
|
|
37191
37191
|
}
|
|
37192
37192
|
return new HDNode2(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath);
|
|
37193
37193
|
};
|
|
37194
|
-
HDNode2.prototype.derivePath = function(
|
|
37195
|
-
var components =
|
|
37194
|
+
HDNode2.prototype.derivePath = function(path8) {
|
|
37195
|
+
var components = path8.split("/");
|
|
37196
37196
|
if (components.length === 0 || components[0] === "m" && this.depth !== 0) {
|
|
37197
|
-
throw new Error("invalid path - " +
|
|
37197
|
+
throw new Error("invalid path - " + path8);
|
|
37198
37198
|
}
|
|
37199
37199
|
if (components[0] === "m") {
|
|
37200
37200
|
components.shift();
|
|
@@ -37998,9 +37998,9 @@ var require_utils4 = __commonJS({
|
|
|
37998
37998
|
return (0, bytes_1.arrayify)(password);
|
|
37999
37999
|
}
|
|
38000
38000
|
exports2.getPassword = getPassword;
|
|
38001
|
-
function searchPath(object2,
|
|
38001
|
+
function searchPath(object2, path8) {
|
|
38002
38002
|
var currentChild = object2;
|
|
38003
|
-
var comps =
|
|
38003
|
+
var comps = path8.toLowerCase().split("/");
|
|
38004
38004
|
for (var i = 0; i < comps.length; i++) {
|
|
38005
38005
|
var matchingChild = null;
|
|
38006
38006
|
for (var key in currentChild) {
|
|
@@ -38847,12 +38847,12 @@ var require_keystore = __commonJS({
|
|
|
38847
38847
|
var mnemonicIv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "x-ethers/mnemonicCounter"));
|
|
38848
38848
|
var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);
|
|
38849
38849
|
var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);
|
|
38850
|
-
var
|
|
38850
|
+
var path8 = (0, utils_1.searchPath)(data, "x-ethers/path") || hdnode_1.defaultPath;
|
|
38851
38851
|
var locale = (0, utils_1.searchPath)(data, "x-ethers/locale") || "en";
|
|
38852
38852
|
var entropy = (0, bytes_1.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext));
|
|
38853
38853
|
try {
|
|
38854
38854
|
var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, locale);
|
|
38855
|
-
var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(
|
|
38855
|
+
var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path8);
|
|
38856
38856
|
if (node.privateKey != account.privateKey) {
|
|
38857
38857
|
throw new Error("mnemonic mismatch");
|
|
38858
38858
|
}
|
|
@@ -38962,12 +38962,12 @@ var require_keystore = __commonJS({
|
|
|
38962
38962
|
var privateKey = (0, bytes_1.arrayify)(account.privateKey);
|
|
38963
38963
|
var passwordBytes = (0, utils_1.getPassword)(password);
|
|
38964
38964
|
var entropy = null;
|
|
38965
|
-
var
|
|
38965
|
+
var path8 = null;
|
|
38966
38966
|
var locale = null;
|
|
38967
38967
|
if (hasMnemonic(account)) {
|
|
38968
38968
|
var srcMnemonic = account.mnemonic;
|
|
38969
38969
|
entropy = (0, bytes_1.arrayify)((0, hdnode_1.mnemonicToEntropy)(srcMnemonic.phrase, srcMnemonic.locale || "en"));
|
|
38970
|
-
|
|
38970
|
+
path8 = srcMnemonic.path || hdnode_1.defaultPath;
|
|
38971
38971
|
locale = srcMnemonic.locale || "en";
|
|
38972
38972
|
}
|
|
38973
38973
|
var client = options.client;
|
|
@@ -39053,7 +39053,7 @@ var require_keystore = __commonJS({
|
|
|
39053
39053
|
gethFilename: "UTC--" + timestamp + "--" + data.address,
|
|
39054
39054
|
mnemonicCounter: (0, bytes_1.hexlify)(mnemonicIv).substring(2),
|
|
39055
39055
|
mnemonicCiphertext: (0, bytes_1.hexlify)(mnemonicCiphertext).substring(2),
|
|
39056
|
-
path:
|
|
39056
|
+
path: path8,
|
|
39057
39057
|
locale,
|
|
39058
39058
|
version: "0.1"
|
|
39059
39059
|
};
|
|
@@ -39453,11 +39453,11 @@ var require_lib48 = __commonJS({
|
|
|
39453
39453
|
Wallet2.fromEncryptedJsonSync = function(json, password) {
|
|
39454
39454
|
return new Wallet2((0, json_wallets_1.decryptJsonWalletSync)(json, password));
|
|
39455
39455
|
};
|
|
39456
|
-
Wallet2.fromMnemonic = function(mnemonic,
|
|
39457
|
-
if (!
|
|
39458
|
-
|
|
39456
|
+
Wallet2.fromMnemonic = function(mnemonic, path8, wordlist) {
|
|
39457
|
+
if (!path8) {
|
|
39458
|
+
path8 = hdnode_1.defaultPath;
|
|
39459
39459
|
}
|
|
39460
|
-
return new Wallet2(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(
|
|
39460
|
+
return new Wallet2(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path8));
|
|
39461
39461
|
};
|
|
39462
39462
|
return Wallet2;
|
|
39463
39463
|
}(abstract_signer_1.Signer)
|
|
@@ -56886,13 +56886,13 @@ var require_ipc_provider = __commonJS({
|
|
|
56886
56886
|
/** @class */
|
|
56887
56887
|
function(_super) {
|
|
56888
56888
|
__extends2(IpcProvider2, _super);
|
|
56889
|
-
function IpcProvider2(
|
|
56889
|
+
function IpcProvider2(path8, network) {
|
|
56890
56890
|
var _this = this;
|
|
56891
|
-
if (
|
|
56891
|
+
if (path8 == null) {
|
|
56892
56892
|
logger2.throwError("missing path", logger_1.Logger.errors.MISSING_ARGUMENT, { arg: "path" });
|
|
56893
56893
|
}
|
|
56894
|
-
_this = _super.call(this, "ipc://" +
|
|
56895
|
-
(0, properties_1.defineReadOnly)(_this, "path",
|
|
56894
|
+
_this = _super.call(this, "ipc://" + path8, network) || this;
|
|
56895
|
+
(0, properties_1.defineReadOnly)(_this, "path", path8);
|
|
56896
56896
|
return _this;
|
|
56897
56897
|
}
|
|
56898
56898
|
IpcProvider2.prototype.send = function(method, params) {
|
|
@@ -57537,21 +57537,21 @@ var require_web3_provider = __commonJS({
|
|
|
57537
57537
|
if (provider == null) {
|
|
57538
57538
|
logger2.throwArgumentError("missing provider", "provider", provider);
|
|
57539
57539
|
}
|
|
57540
|
-
var
|
|
57540
|
+
var path8 = null;
|
|
57541
57541
|
var jsonRpcFetchFunc = null;
|
|
57542
57542
|
var subprovider = null;
|
|
57543
57543
|
if (typeof provider === "function") {
|
|
57544
|
-
|
|
57544
|
+
path8 = "unknown:";
|
|
57545
57545
|
jsonRpcFetchFunc = provider;
|
|
57546
57546
|
} else {
|
|
57547
|
-
|
|
57548
|
-
if (!
|
|
57549
|
-
|
|
57547
|
+
path8 = provider.host || provider.path || "";
|
|
57548
|
+
if (!path8 && provider.isMetaMask) {
|
|
57549
|
+
path8 = "metamask";
|
|
57550
57550
|
}
|
|
57551
57551
|
subprovider = provider;
|
|
57552
57552
|
if (provider.request) {
|
|
57553
|
-
if (
|
|
57554
|
-
|
|
57553
|
+
if (path8 === "") {
|
|
57554
|
+
path8 = "eip-1193:";
|
|
57555
57555
|
}
|
|
57556
57556
|
jsonRpcFetchFunc = buildEip1193Fetcher(provider);
|
|
57557
57557
|
} else if (provider.sendAsync) {
|
|
@@ -57561,11 +57561,11 @@ var require_web3_provider = __commonJS({
|
|
|
57561
57561
|
} else {
|
|
57562
57562
|
logger2.throwArgumentError("unsupported provider", "provider", provider);
|
|
57563
57563
|
}
|
|
57564
|
-
if (!
|
|
57565
|
-
|
|
57564
|
+
if (!path8) {
|
|
57565
|
+
path8 = "unknown:";
|
|
57566
57566
|
}
|
|
57567
57567
|
}
|
|
57568
|
-
_this = _super.call(this,
|
|
57568
|
+
_this = _super.call(this, path8, network) || this;
|
|
57569
57569
|
(0, properties_1.defineReadOnly)(_this, "jsonRpcFetchFunc", jsonRpcFetchFunc);
|
|
57570
57570
|
(0, properties_1.defineReadOnly)(_this, "provider", subprovider);
|
|
57571
57571
|
return _this;
|
|
@@ -64888,12 +64888,12 @@ var require_abstract_coder2 = __commonJS({
|
|
|
64888
64888
|
var logger2 = new logger_1.Logger(_version_1.version);
|
|
64889
64889
|
function checkResultErrors3(result) {
|
|
64890
64890
|
var errors = [];
|
|
64891
|
-
var checkErrors = function(
|
|
64891
|
+
var checkErrors = function(path8, object2) {
|
|
64892
64892
|
if (!Array.isArray(object2)) {
|
|
64893
64893
|
return;
|
|
64894
64894
|
}
|
|
64895
64895
|
for (var key in object2) {
|
|
64896
|
-
var childPath =
|
|
64896
|
+
var childPath = path8.slice();
|
|
64897
64897
|
childPath.push(key);
|
|
64898
64898
|
try {
|
|
64899
64899
|
checkErrors(childPath, object2[key]);
|
|
@@ -81656,9 +81656,9 @@ var require_lib144 = __commonJS({
|
|
|
81656
81656
|
if (index > 4294967295) {
|
|
81657
81657
|
throw new Error("invalid index - " + String(index));
|
|
81658
81658
|
}
|
|
81659
|
-
var
|
|
81660
|
-
if (
|
|
81661
|
-
|
|
81659
|
+
var path8 = this.path;
|
|
81660
|
+
if (path8) {
|
|
81661
|
+
path8 += "/" + (index & ~HardenedBit);
|
|
81662
81662
|
}
|
|
81663
81663
|
var data = new Uint8Array(37);
|
|
81664
81664
|
if (index & HardenedBit) {
|
|
@@ -81666,8 +81666,8 @@ var require_lib144 = __commonJS({
|
|
|
81666
81666
|
throw new Error("cannot derive child of neutered node");
|
|
81667
81667
|
}
|
|
81668
81668
|
data.set((0, bytes_1.arrayify)(this.privateKey), 1);
|
|
81669
|
-
if (
|
|
81670
|
-
|
|
81669
|
+
if (path8) {
|
|
81670
|
+
path8 += "'";
|
|
81671
81671
|
}
|
|
81672
81672
|
} else {
|
|
81673
81673
|
data.set((0, bytes_1.arrayify)(this.publicKey));
|
|
@@ -81686,21 +81686,21 @@ var require_lib144 = __commonJS({
|
|
|
81686
81686
|
var ek = new signing_key_1.SigningKey((0, bytes_1.hexlify)(IL));
|
|
81687
81687
|
Ki = ek._addPoint(this.publicKey);
|
|
81688
81688
|
}
|
|
81689
|
-
var mnemonicOrPath =
|
|
81689
|
+
var mnemonicOrPath = path8;
|
|
81690
81690
|
var srcMnemonic = this.mnemonic;
|
|
81691
81691
|
if (srcMnemonic) {
|
|
81692
81692
|
mnemonicOrPath = Object.freeze({
|
|
81693
81693
|
phrase: srcMnemonic.phrase,
|
|
81694
|
-
path:
|
|
81694
|
+
path: path8,
|
|
81695
81695
|
locale: srcMnemonic.locale || "en"
|
|
81696
81696
|
});
|
|
81697
81697
|
}
|
|
81698
81698
|
return new HDNode2(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath);
|
|
81699
81699
|
};
|
|
81700
|
-
HDNode2.prototype.derivePath = function(
|
|
81701
|
-
var components =
|
|
81700
|
+
HDNode2.prototype.derivePath = function(path8) {
|
|
81701
|
+
var components = path8.split("/");
|
|
81702
81702
|
if (components.length === 0 || components[0] === "m" && this.depth !== 0) {
|
|
81703
|
-
throw new Error("invalid path - " +
|
|
81703
|
+
throw new Error("invalid path - " + path8);
|
|
81704
81704
|
}
|
|
81705
81705
|
if (components[0] === "m") {
|
|
81706
81706
|
components.shift();
|
|
@@ -84496,9 +84496,9 @@ var require_utils5 = __commonJS({
|
|
|
84496
84496
|
return (0, bytes_1.arrayify)(password);
|
|
84497
84497
|
}
|
|
84498
84498
|
exports2.getPassword = getPassword;
|
|
84499
|
-
function searchPath(object2,
|
|
84499
|
+
function searchPath(object2, path8) {
|
|
84500
84500
|
var currentChild = object2;
|
|
84501
|
-
var comps =
|
|
84501
|
+
var comps = path8.toLowerCase().split("/");
|
|
84502
84502
|
for (var i = 0; i < comps.length; i++) {
|
|
84503
84503
|
var matchingChild = null;
|
|
84504
84504
|
for (var key in currentChild) {
|
|
@@ -87483,9 +87483,9 @@ var require_lib163 = __commonJS({
|
|
|
87483
87483
|
if (index > 4294967295) {
|
|
87484
87484
|
throw new Error("invalid index - " + String(index));
|
|
87485
87485
|
}
|
|
87486
|
-
var
|
|
87487
|
-
if (
|
|
87488
|
-
|
|
87486
|
+
var path8 = this.path;
|
|
87487
|
+
if (path8) {
|
|
87488
|
+
path8 += "/" + (index & ~HardenedBit);
|
|
87489
87489
|
}
|
|
87490
87490
|
var data = new Uint8Array(37);
|
|
87491
87491
|
if (index & HardenedBit) {
|
|
@@ -87493,8 +87493,8 @@ var require_lib163 = __commonJS({
|
|
|
87493
87493
|
throw new Error("cannot derive child of neutered node");
|
|
87494
87494
|
}
|
|
87495
87495
|
data.set((0, bytes_1.arrayify)(this.privateKey), 1);
|
|
87496
|
-
if (
|
|
87497
|
-
|
|
87496
|
+
if (path8) {
|
|
87497
|
+
path8 += "'";
|
|
87498
87498
|
}
|
|
87499
87499
|
} else {
|
|
87500
87500
|
data.set((0, bytes_1.arrayify)(this.publicKey));
|
|
@@ -87513,21 +87513,21 @@ var require_lib163 = __commonJS({
|
|
|
87513
87513
|
var ek = new signing_key_1.SigningKey((0, bytes_1.hexlify)(IL));
|
|
87514
87514
|
Ki = ek._addPoint(this.publicKey);
|
|
87515
87515
|
}
|
|
87516
|
-
var mnemonicOrPath =
|
|
87516
|
+
var mnemonicOrPath = path8;
|
|
87517
87517
|
var srcMnemonic = this.mnemonic;
|
|
87518
87518
|
if (srcMnemonic) {
|
|
87519
87519
|
mnemonicOrPath = Object.freeze({
|
|
87520
87520
|
phrase: srcMnemonic.phrase,
|
|
87521
|
-
path:
|
|
87521
|
+
path: path8,
|
|
87522
87522
|
locale: srcMnemonic.locale || "en"
|
|
87523
87523
|
});
|
|
87524
87524
|
}
|
|
87525
87525
|
return new HDNode2(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath);
|
|
87526
87526
|
};
|
|
87527
|
-
HDNode2.prototype.derivePath = function(
|
|
87528
|
-
var components =
|
|
87527
|
+
HDNode2.prototype.derivePath = function(path8) {
|
|
87528
|
+
var components = path8.split("/");
|
|
87529
87529
|
if (components.length === 0 || components[0] === "m" && this.depth !== 0) {
|
|
87530
|
-
throw new Error("invalid path - " +
|
|
87530
|
+
throw new Error("invalid path - " + path8);
|
|
87531
87531
|
}
|
|
87532
87532
|
if (components[0] === "m") {
|
|
87533
87533
|
components.shift();
|
|
@@ -87946,12 +87946,12 @@ var require_keystore2 = __commonJS({
|
|
|
87946
87946
|
var mnemonicIv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "x-ethers/mnemonicCounter"));
|
|
87947
87947
|
var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);
|
|
87948
87948
|
var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);
|
|
87949
|
-
var
|
|
87949
|
+
var path8 = (0, utils_1.searchPath)(data, "x-ethers/path") || hdnode_1.defaultPath;
|
|
87950
87950
|
var locale = (0, utils_1.searchPath)(data, "x-ethers/locale") || "en";
|
|
87951
87951
|
var entropy = (0, bytes_1.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext));
|
|
87952
87952
|
try {
|
|
87953
87953
|
var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, locale);
|
|
87954
|
-
var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(
|
|
87954
|
+
var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path8);
|
|
87955
87955
|
if (node.privateKey != account.privateKey) {
|
|
87956
87956
|
throw new Error("mnemonic mismatch");
|
|
87957
87957
|
}
|
|
@@ -88061,12 +88061,12 @@ var require_keystore2 = __commonJS({
|
|
|
88061
88061
|
var privateKey = (0, bytes_1.arrayify)(account.privateKey);
|
|
88062
88062
|
var passwordBytes = (0, utils_1.getPassword)(password);
|
|
88063
88063
|
var entropy = null;
|
|
88064
|
-
var
|
|
88064
|
+
var path8 = null;
|
|
88065
88065
|
var locale = null;
|
|
88066
88066
|
if (hasMnemonic(account)) {
|
|
88067
88067
|
var srcMnemonic = account.mnemonic;
|
|
88068
88068
|
entropy = (0, bytes_1.arrayify)((0, hdnode_1.mnemonicToEntropy)(srcMnemonic.phrase, srcMnemonic.locale || "en"));
|
|
88069
|
-
|
|
88069
|
+
path8 = srcMnemonic.path || hdnode_1.defaultPath;
|
|
88070
88070
|
locale = srcMnemonic.locale || "en";
|
|
88071
88071
|
}
|
|
88072
88072
|
var client = options.client;
|
|
@@ -88152,7 +88152,7 @@ var require_keystore2 = __commonJS({
|
|
|
88152
88152
|
gethFilename: "UTC--" + timestamp + "--" + data.address,
|
|
88153
88153
|
mnemonicCounter: (0, bytes_1.hexlify)(mnemonicIv).substring(2),
|
|
88154
88154
|
mnemonicCiphertext: (0, bytes_1.hexlify)(mnemonicCiphertext).substring(2),
|
|
88155
|
-
path:
|
|
88155
|
+
path: path8,
|
|
88156
88156
|
locale,
|
|
88157
88157
|
version: "0.1"
|
|
88158
88158
|
};
|
|
@@ -110870,8 +110870,8 @@ var require_parseUtil = __commonJS({
|
|
|
110870
110870
|
var errors_1 = require_errors();
|
|
110871
110871
|
var en_1 = __importDefault2(require_en());
|
|
110872
110872
|
var makeIssue = (params) => {
|
|
110873
|
-
const { data, path:
|
|
110874
|
-
const fullPath = [...
|
|
110873
|
+
const { data, path: path8, errorMaps, issueData } = params;
|
|
110874
|
+
const fullPath = [...path8, ...issueData.path || []];
|
|
110875
110875
|
const fullIssue = {
|
|
110876
110876
|
...issueData,
|
|
110877
110877
|
path: fullPath
|
|
@@ -111011,11 +111011,11 @@ var require_types7 = __commonJS({
|
|
|
111011
111011
|
var util_1 = require_util();
|
|
111012
111012
|
var ZodError_1 = require_ZodError();
|
|
111013
111013
|
var ParseInputLazyPath = class {
|
|
111014
|
-
constructor(parent, value,
|
|
111014
|
+
constructor(parent, value, path8, key) {
|
|
111015
111015
|
this._cachedPath = [];
|
|
111016
111016
|
this.parent = parent;
|
|
111017
111017
|
this.data = value;
|
|
111018
|
-
this._path =
|
|
111018
|
+
this._path = path8;
|
|
111019
111019
|
this._key = key;
|
|
111020
111020
|
}
|
|
111021
111021
|
get path() {
|
|
@@ -125955,11 +125955,11 @@ var require_mime_types = __commonJS({
|
|
|
125955
125955
|
}
|
|
125956
125956
|
return exts[0];
|
|
125957
125957
|
}
|
|
125958
|
-
function lookup(
|
|
125959
|
-
if (!
|
|
125958
|
+
function lookup(path8) {
|
|
125959
|
+
if (!path8 || typeof path8 !== "string") {
|
|
125960
125960
|
return false;
|
|
125961
125961
|
}
|
|
125962
|
-
var extension2 = extname("x." +
|
|
125962
|
+
var extension2 = extname("x." + path8).toLowerCase().substr(1);
|
|
125963
125963
|
if (!extension2) {
|
|
125964
125964
|
return false;
|
|
125965
125965
|
}
|
|
@@ -126216,11 +126216,11 @@ var require_form_data = __commonJS({
|
|
|
126216
126216
|
"../../node_modules/form-data/lib/form_data.js"(exports2, module2) {
|
|
126217
126217
|
var CombinedStream = require_combined_stream();
|
|
126218
126218
|
var util2 = __require("util");
|
|
126219
|
-
var
|
|
126219
|
+
var path8 = __require("path");
|
|
126220
126220
|
var http3 = __require("http");
|
|
126221
126221
|
var https3 = __require("https");
|
|
126222
126222
|
var parseUrl = __require("url").parse;
|
|
126223
|
-
var
|
|
126223
|
+
var fs2 = __require("fs");
|
|
126224
126224
|
var Stream = __require("stream").Stream;
|
|
126225
126225
|
var mime = require_mime_types();
|
|
126226
126226
|
var asynckit = require_asynckit();
|
|
@@ -126285,7 +126285,7 @@ var require_form_data = __commonJS({
|
|
|
126285
126285
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
126286
126286
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
126287
126287
|
} else {
|
|
126288
|
-
|
|
126288
|
+
fs2.stat(value.path, function(err, stat2) {
|
|
126289
126289
|
var fileSize;
|
|
126290
126290
|
if (err) {
|
|
126291
126291
|
callback(err);
|
|
@@ -126343,11 +126343,11 @@ var require_form_data = __commonJS({
|
|
|
126343
126343
|
FormData3.prototype._getContentDisposition = function(value, options) {
|
|
126344
126344
|
var filename, contentDisposition;
|
|
126345
126345
|
if (typeof options.filepath === "string") {
|
|
126346
|
-
filename =
|
|
126346
|
+
filename = path8.normalize(options.filepath).replace(/\\/g, "/");
|
|
126347
126347
|
} else if (options.filename || value.name || value.path) {
|
|
126348
|
-
filename =
|
|
126348
|
+
filename = path8.basename(options.filename || value.name || value.path);
|
|
126349
126349
|
} else if (value.readable && value.hasOwnProperty("httpVersion")) {
|
|
126350
|
-
filename =
|
|
126350
|
+
filename = path8.basename(value.client._httpMessage.path || "");
|
|
126351
126351
|
}
|
|
126352
126352
|
if (filename) {
|
|
126353
126353
|
contentDisposition = 'filename="' + filename + '"';
|
|
@@ -128313,10 +128313,10 @@ var require_axios = __commonJS({
|
|
|
128313
128313
|
function removeBrackets2(key) {
|
|
128314
128314
|
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
128315
128315
|
}
|
|
128316
|
-
function renderKey2(
|
|
128317
|
-
if (!
|
|
128316
|
+
function renderKey2(path8, key, dots) {
|
|
128317
|
+
if (!path8)
|
|
128318
128318
|
return key;
|
|
128319
|
-
return
|
|
128319
|
+
return path8.concat(key).map(function each(token, i) {
|
|
128320
128320
|
token = removeBrackets2(token);
|
|
128321
128321
|
return !dots && i ? "[" + token + "]" : token;
|
|
128322
128322
|
}).join(dots ? "." : "");
|
|
@@ -128362,9 +128362,9 @@ var require_axios = __commonJS({
|
|
|
128362
128362
|
}
|
|
128363
128363
|
return value;
|
|
128364
128364
|
}
|
|
128365
|
-
function defaultVisitor(value, key,
|
|
128365
|
+
function defaultVisitor(value, key, path8) {
|
|
128366
128366
|
let arr = value;
|
|
128367
|
-
if (value && !
|
|
128367
|
+
if (value && !path8 && typeof value === "object") {
|
|
128368
128368
|
if (utils$1.endsWith(key, "{}")) {
|
|
128369
128369
|
key = metaTokens ? key : key.slice(0, -2);
|
|
128370
128370
|
value = JSON.stringify(value);
|
|
@@ -128383,7 +128383,7 @@ var require_axios = __commonJS({
|
|
|
128383
128383
|
if (isVisitable2(value)) {
|
|
128384
128384
|
return true;
|
|
128385
128385
|
}
|
|
128386
|
-
formData.append(renderKey2(
|
|
128386
|
+
formData.append(renderKey2(path8, key, dots), convertValue(value));
|
|
128387
128387
|
return false;
|
|
128388
128388
|
}
|
|
128389
128389
|
const stack = [];
|
|
@@ -128392,11 +128392,11 @@ var require_axios = __commonJS({
|
|
|
128392
128392
|
convertValue,
|
|
128393
128393
|
isVisitable: isVisitable2
|
|
128394
128394
|
});
|
|
128395
|
-
function build(value,
|
|
128395
|
+
function build(value, path8) {
|
|
128396
128396
|
if (utils$1.isUndefined(value))
|
|
128397
128397
|
return;
|
|
128398
128398
|
if (stack.indexOf(value) !== -1) {
|
|
128399
|
-
throw Error("Circular reference detected in " +
|
|
128399
|
+
throw Error("Circular reference detected in " + path8.join("."));
|
|
128400
128400
|
}
|
|
128401
128401
|
stack.push(value);
|
|
128402
128402
|
utils$1.forEach(value, function each(el, key) {
|
|
@@ -128404,11 +128404,11 @@ var require_axios = __commonJS({
|
|
|
128404
128404
|
formData,
|
|
128405
128405
|
el,
|
|
128406
128406
|
utils$1.isString(key) ? key.trim() : key,
|
|
128407
|
-
|
|
128407
|
+
path8,
|
|
128408
128408
|
exposedHelpers
|
|
128409
128409
|
);
|
|
128410
128410
|
if (result === true) {
|
|
128411
|
-
build(el,
|
|
128411
|
+
build(el, path8 ? path8.concat(key) : [key]);
|
|
128412
128412
|
}
|
|
128413
128413
|
});
|
|
128414
128414
|
stack.pop();
|
|
@@ -128570,7 +128570,7 @@ var require_axios = __commonJS({
|
|
|
128570
128570
|
};
|
|
128571
128571
|
function toURLEncodedForm2(data, options) {
|
|
128572
128572
|
return toFormData3(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
128573
|
-
visitor: function(value, key,
|
|
128573
|
+
visitor: function(value, key, path8, helpers) {
|
|
128574
128574
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
128575
128575
|
this.append(key, value.toString("base64"));
|
|
128576
128576
|
return false;
|
|
@@ -128597,12 +128597,12 @@ var require_axios = __commonJS({
|
|
|
128597
128597
|
return obj;
|
|
128598
128598
|
}
|
|
128599
128599
|
function formDataToJSON2(formData) {
|
|
128600
|
-
function buildPath(
|
|
128601
|
-
let name =
|
|
128600
|
+
function buildPath(path8, value, target, index) {
|
|
128601
|
+
let name = path8[index++];
|
|
128602
128602
|
if (name === "__proto__")
|
|
128603
128603
|
return true;
|
|
128604
128604
|
const isNumericKey = Number.isFinite(+name);
|
|
128605
|
-
const isLast = index >=
|
|
128605
|
+
const isLast = index >= path8.length;
|
|
128606
128606
|
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
128607
128607
|
if (isLast) {
|
|
128608
128608
|
if (utils$1.hasOwnProp(target, name)) {
|
|
@@ -128615,7 +128615,7 @@ var require_axios = __commonJS({
|
|
|
128615
128615
|
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
128616
128616
|
target[name] = [];
|
|
128617
128617
|
}
|
|
128618
|
-
const result = buildPath(
|
|
128618
|
+
const result = buildPath(path8, value, target[name], index);
|
|
128619
128619
|
if (result && utils$1.isArray(target[name])) {
|
|
128620
128620
|
target[name] = arrayToObject2(target[name]);
|
|
128621
128621
|
}
|
|
@@ -129659,9 +129659,9 @@ var require_axios = __commonJS({
|
|
|
129659
129659
|
auth = urlUsername + ":" + urlPassword;
|
|
129660
129660
|
}
|
|
129661
129661
|
auth && headers.delete("authorization");
|
|
129662
|
-
let
|
|
129662
|
+
let path8;
|
|
129663
129663
|
try {
|
|
129664
|
-
|
|
129664
|
+
path8 = buildURL2(
|
|
129665
129665
|
parsed.pathname + parsed.search,
|
|
129666
129666
|
config.params,
|
|
129667
129667
|
config.paramsSerializer
|
|
@@ -129679,7 +129679,7 @@ var require_axios = __commonJS({
|
|
|
129679
129679
|
false
|
|
129680
129680
|
);
|
|
129681
129681
|
const options = {
|
|
129682
|
-
path:
|
|
129682
|
+
path: path8,
|
|
129683
129683
|
method,
|
|
129684
129684
|
headers: headers.toJSON(),
|
|
129685
129685
|
agents: { http: config.httpAgent, https: config.httpsAgent },
|
|
@@ -129899,10 +129899,10 @@ var require_axios = __commonJS({
|
|
|
129899
129899
|
var cookies = platform.hasStandardBrowserEnv ? (
|
|
129900
129900
|
// Standard browser envs support document.cookie
|
|
129901
129901
|
{
|
|
129902
|
-
write(name, value, expires,
|
|
129902
|
+
write(name, value, expires, path8, domain, secure) {
|
|
129903
129903
|
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
129904
129904
|
utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
129905
|
-
utils$1.isString(
|
|
129905
|
+
utils$1.isString(path8) && cookie.push("path=" + path8);
|
|
129906
129906
|
utils$1.isString(domain) && cookie.push("domain=" + domain);
|
|
129907
129907
|
secure === true && cookie.push("secure");
|
|
129908
129908
|
document.cookie = cookie.join("; ");
|
|
@@ -131800,11 +131800,11 @@ var require_process = __commonJS({
|
|
|
131800
131800
|
var require_filesystem = __commonJS({
|
|
131801
131801
|
"../../node_modules/node-gyp-build-optional-packages/node_modules/detect-libc/lib/filesystem.js"(exports2, module2) {
|
|
131802
131802
|
"use strict";
|
|
131803
|
-
var
|
|
131803
|
+
var fs2 = __require("fs");
|
|
131804
131804
|
var LDD_PATH = "/usr/bin/ldd";
|
|
131805
|
-
var readFileSync = (
|
|
131806
|
-
var
|
|
131807
|
-
|
|
131805
|
+
var readFileSync = (path8) => fs2.readFileSync(path8, "utf-8");
|
|
131806
|
+
var readFile9 = (path8) => new Promise((resolve2, reject) => {
|
|
131807
|
+
fs2.readFile(path8, "utf-8", (err, data) => {
|
|
131808
131808
|
if (err) {
|
|
131809
131809
|
reject(err);
|
|
131810
131810
|
} else {
|
|
@@ -131815,7 +131815,7 @@ var require_filesystem = __commonJS({
|
|
|
131815
131815
|
module2.exports = {
|
|
131816
131816
|
LDD_PATH,
|
|
131817
131817
|
readFileSync,
|
|
131818
|
-
readFile:
|
|
131818
|
+
readFile: readFile9
|
|
131819
131819
|
};
|
|
131820
131820
|
}
|
|
131821
131821
|
});
|
|
@@ -131826,7 +131826,7 @@ var require_detect_libc = __commonJS({
|
|
|
131826
131826
|
"use strict";
|
|
131827
131827
|
var childProcess = __require("child_process");
|
|
131828
131828
|
var { isLinux, getReport } = require_process();
|
|
131829
|
-
var { LDD_PATH, readFile:
|
|
131829
|
+
var { LDD_PATH, readFile: readFile9, readFileSync } = require_filesystem();
|
|
131830
131830
|
var cachedFamilyFilesystem;
|
|
131831
131831
|
var cachedVersionFilesystem;
|
|
131832
131832
|
var command = "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";
|
|
@@ -131895,7 +131895,7 @@ var require_detect_libc = __commonJS({
|
|
|
131895
131895
|
}
|
|
131896
131896
|
cachedFamilyFilesystem = null;
|
|
131897
131897
|
try {
|
|
131898
|
-
const lddContent = await
|
|
131898
|
+
const lddContent = await readFile9(LDD_PATH);
|
|
131899
131899
|
cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
|
|
131900
131900
|
} catch (e) {
|
|
131901
131901
|
}
|
|
@@ -131949,7 +131949,7 @@ var require_detect_libc = __commonJS({
|
|
|
131949
131949
|
}
|
|
131950
131950
|
cachedVersionFilesystem = null;
|
|
131951
131951
|
try {
|
|
131952
|
-
const lddContent = await
|
|
131952
|
+
const lddContent = await readFile9(LDD_PATH);
|
|
131953
131953
|
const versionMatch = lddContent.match(RE_GLIBC_VERSION);
|
|
131954
131954
|
if (versionMatch) {
|
|
131955
131955
|
cachedVersionFilesystem = versionMatch[1];
|
|
@@ -132035,8 +132035,8 @@ var require_detect_libc = __commonJS({
|
|
|
132035
132035
|
// ../../node_modules/node-gyp-build-optional-packages/index.js
|
|
132036
132036
|
var require_node_gyp_build_optional_packages = __commonJS({
|
|
132037
132037
|
"../../node_modules/node-gyp-build-optional-packages/index.js"(exports2, module2) {
|
|
132038
|
-
var
|
|
132039
|
-
var
|
|
132038
|
+
var fs2 = __require("fs");
|
|
132039
|
+
var path8 = __require("path");
|
|
132040
132040
|
var url2 = __require("url");
|
|
132041
132041
|
var vars = process.config && process.config.variables || {};
|
|
132042
132042
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
@@ -132059,35 +132059,35 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
132059
132059
|
return __require(load.path(dir));
|
|
132060
132060
|
}
|
|
132061
132061
|
load.path = function(dir) {
|
|
132062
|
-
dir =
|
|
132062
|
+
dir = path8.resolve(dir || ".");
|
|
132063
132063
|
var packageName = "";
|
|
132064
132064
|
try {
|
|
132065
132065
|
if (typeof __webpack_require__ === "function")
|
|
132066
|
-
packageName = __non_webpack_require__(
|
|
132066
|
+
packageName = __non_webpack_require__(path8.join(dir, "package.json")).name;
|
|
132067
132067
|
else
|
|
132068
|
-
packageName = __require(
|
|
132068
|
+
packageName = __require(path8.join(dir, "package.json")).name;
|
|
132069
132069
|
var varName = packageName.toUpperCase().replace(/-/g, "_") + "_PREBUILD";
|
|
132070
132070
|
if (process.env[varName])
|
|
132071
132071
|
dir = process.env[varName];
|
|
132072
132072
|
} catch (err) {
|
|
132073
132073
|
}
|
|
132074
132074
|
if (!prebuildsOnly) {
|
|
132075
|
-
var release = getFirst(
|
|
132075
|
+
var release = getFirst(path8.join(dir, "build/Release"), matchBuild);
|
|
132076
132076
|
if (release)
|
|
132077
132077
|
return release;
|
|
132078
|
-
var debug = getFirst(
|
|
132078
|
+
var debug = getFirst(path8.join(dir, "build/Debug"), matchBuild);
|
|
132079
132079
|
if (debug)
|
|
132080
132080
|
return debug;
|
|
132081
132081
|
}
|
|
132082
132082
|
var prebuild = resolve2(dir);
|
|
132083
132083
|
if (prebuild)
|
|
132084
132084
|
return prebuild;
|
|
132085
|
-
var nearby = resolve2(
|
|
132085
|
+
var nearby = resolve2(path8.dirname(process.execPath));
|
|
132086
132086
|
if (nearby)
|
|
132087
132087
|
return nearby;
|
|
132088
132088
|
var platformPackage = (packageName[0] == "@" ? "" : "@" + packageName + "/") + packageName + "-" + platform + "-" + arch;
|
|
132089
132089
|
try {
|
|
132090
|
-
var prebuildPackage =
|
|
132090
|
+
var prebuildPackage = path8.dirname(__require("module").createRequire(url2.pathToFileURL(path8.join(dir, "package.json"))).resolve(platformPackage));
|
|
132091
132091
|
return resolveFile(prebuildPackage);
|
|
132092
132092
|
} catch (error) {
|
|
132093
132093
|
}
|
|
@@ -132106,30 +132106,30 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
132106
132106
|
].filter(Boolean).join(" ");
|
|
132107
132107
|
throw new Error("No native build was found for " + target + "\n attempted loading from: " + dir + " and package: " + platformPackage + "\n");
|
|
132108
132108
|
function resolve2(dir2) {
|
|
132109
|
-
var tuples = readdirSync(
|
|
132109
|
+
var tuples = readdirSync(path8.join(dir2, "prebuilds")).map(parseTuple);
|
|
132110
132110
|
var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
132111
132111
|
if (!tuple)
|
|
132112
132112
|
return;
|
|
132113
|
-
return resolveFile(
|
|
132113
|
+
return resolveFile(path8.join(dir2, "prebuilds", tuple.name));
|
|
132114
132114
|
}
|
|
132115
132115
|
function resolveFile(prebuilds) {
|
|
132116
132116
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
132117
132117
|
var candidates = parsed.filter(matchTags(runtime, abi));
|
|
132118
132118
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
132119
132119
|
if (winner)
|
|
132120
|
-
return
|
|
132120
|
+
return path8.join(prebuilds, winner.file);
|
|
132121
132121
|
}
|
|
132122
132122
|
};
|
|
132123
132123
|
function readdirSync(dir) {
|
|
132124
132124
|
try {
|
|
132125
|
-
return
|
|
132125
|
+
return fs2.readdirSync(dir);
|
|
132126
132126
|
} catch (err) {
|
|
132127
132127
|
return [];
|
|
132128
132128
|
}
|
|
132129
132129
|
}
|
|
132130
132130
|
function getFirst(dir, filter2) {
|
|
132131
132131
|
var files = readdirSync(dir).filter(filter2);
|
|
132132
|
-
return files[0] &&
|
|
132132
|
+
return files[0] && path8.join(dir, files[0]);
|
|
132133
132133
|
}
|
|
132134
132134
|
function matchBuild(name) {
|
|
132135
132135
|
return /\.node$/.test(name);
|
|
@@ -135617,14 +135617,14 @@ var require_url_state_machine = __commonJS({
|
|
|
135617
135617
|
return url2.replace(/\u0009|\u000A|\u000D/g, "");
|
|
135618
135618
|
}
|
|
135619
135619
|
function shortenPath(url2) {
|
|
135620
|
-
const
|
|
135621
|
-
if (
|
|
135620
|
+
const path8 = url2.path;
|
|
135621
|
+
if (path8.length === 0) {
|
|
135622
135622
|
return;
|
|
135623
135623
|
}
|
|
135624
|
-
if (url2.scheme === "file" &&
|
|
135624
|
+
if (url2.scheme === "file" && path8.length === 1 && isNormalizedWindowsDriveLetter(path8[0])) {
|
|
135625
135625
|
return;
|
|
135626
135626
|
}
|
|
135627
|
-
|
|
135627
|
+
path8.pop();
|
|
135628
135628
|
}
|
|
135629
135629
|
function includesCredentials(url2) {
|
|
135630
135630
|
return url2.username !== "" || url2.password !== "";
|
|
@@ -141271,12 +141271,12 @@ var require_abstract_coder3 = __commonJS({
|
|
|
141271
141271
|
exports2.Result = Result3;
|
|
141272
141272
|
function checkResultErrors3(result) {
|
|
141273
141273
|
const errors = [];
|
|
141274
|
-
const checkErrors = function(
|
|
141274
|
+
const checkErrors = function(path8, object2) {
|
|
141275
141275
|
if (!Array.isArray(object2)) {
|
|
141276
141276
|
return;
|
|
141277
141277
|
}
|
|
141278
141278
|
for (let key in object2) {
|
|
141279
|
-
const childPath =
|
|
141279
|
+
const childPath = path8.slice();
|
|
141280
141280
|
childPath.push(key);
|
|
141281
141281
|
try {
|
|
141282
141282
|
checkErrors(childPath, object2[key]);
|
|
@@ -160766,9 +160766,9 @@ var require_provider_ipcsocket = __commonJS({
|
|
|
160766
160766
|
get socket() {
|
|
160767
160767
|
return this.#socket;
|
|
160768
160768
|
}
|
|
160769
|
-
constructor(
|
|
160769
|
+
constructor(path8, network, options) {
|
|
160770
160770
|
super(network, options);
|
|
160771
|
-
this.#socket = (0, net_1.connect)(
|
|
160771
|
+
this.#socket = (0, net_1.connect)(path8);
|
|
160772
160772
|
this.socket.on("ready", async () => {
|
|
160773
160773
|
try {
|
|
160774
160774
|
await this._start();
|
|
@@ -162100,11 +162100,11 @@ var require_utils11 = __commonJS({
|
|
|
162100
162100
|
function spelunk(object2, _path) {
|
|
162101
162101
|
const match = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);
|
|
162102
162102
|
(0, index_js_1.assertArgument)(match != null, "invalid path", "path", _path);
|
|
162103
|
-
const
|
|
162103
|
+
const path8 = match[1];
|
|
162104
162104
|
const type = match[3];
|
|
162105
162105
|
const reqd = match[4] === "!";
|
|
162106
162106
|
let cur = object2;
|
|
162107
|
-
for (const comp of
|
|
162107
|
+
for (const comp of path8.toLowerCase().split(".")) {
|
|
162108
162108
|
if (Array.isArray(cur)) {
|
|
162109
162109
|
if (!comp.match(/^[0-9]+$/)) {
|
|
162110
162110
|
break;
|
|
@@ -162126,7 +162126,7 @@ var require_utils11 = __commonJS({
|
|
|
162126
162126
|
break;
|
|
162127
162127
|
}
|
|
162128
162128
|
}
|
|
162129
|
-
(0, index_js_1.assertArgument)(!reqd || cur != null, "missing required value", "path",
|
|
162129
|
+
(0, index_js_1.assertArgument)(!reqd || cur != null, "missing required value", "path", path8);
|
|
162130
162130
|
if (type && cur != null) {
|
|
162131
162131
|
if (type === "int") {
|
|
162132
162132
|
if (typeof cur === "string" && cur.match(/^-?[0-9]+$/)) {
|
|
@@ -162151,7 +162151,7 @@ var require_utils11 = __commonJS({
|
|
|
162151
162151
|
if (type === typeof cur) {
|
|
162152
162152
|
return cur;
|
|
162153
162153
|
}
|
|
162154
|
-
(0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, "path",
|
|
162154
|
+
(0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, "path", path8);
|
|
162155
162155
|
}
|
|
162156
162156
|
return cur;
|
|
162157
162157
|
}
|
|
@@ -162349,7 +162349,7 @@ var require_json_keystore = __commonJS({
|
|
|
162349
162349
|
};
|
|
162350
162350
|
if (account.mnemonic) {
|
|
162351
162351
|
const client = options.client != null ? options.client : `ethers/${_version_js_1.version}`;
|
|
162352
|
-
const
|
|
162352
|
+
const path8 = account.mnemonic.path || defaultPath;
|
|
162353
162353
|
const locale = account.mnemonic.locale || "en";
|
|
162354
162354
|
const mnemonicKey = key.slice(32, 64);
|
|
162355
162355
|
const entropy = (0, index_js_4.getBytes)(account.mnemonic.entropy, "account.mnemonic.entropy");
|
|
@@ -162362,7 +162362,7 @@ var require_json_keystore = __commonJS({
|
|
|
162362
162362
|
data["x-ethers"] = {
|
|
162363
162363
|
client,
|
|
162364
162364
|
gethFilename,
|
|
162365
|
-
path:
|
|
162365
|
+
path: path8,
|
|
162366
162366
|
locale,
|
|
162367
162367
|
mnemonicCounter: (0, index_js_4.hexlify)(mnemonicIv).substring(2),
|
|
162368
162368
|
mnemonicCiphertext: (0, index_js_4.hexlify)(mnemonicCiphertext).substring(2),
|
|
@@ -162447,9 +162447,9 @@ var require_hdwallet = __commonJS({
|
|
|
162447
162447
|
const I = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)("sha512", chainCode, data));
|
|
162448
162448
|
return { IL: I.slice(0, 32), IR: I.slice(32) };
|
|
162449
162449
|
}
|
|
162450
|
-
function derivePath(node,
|
|
162451
|
-
const components =
|
|
162452
|
-
(0, index_js_4.assertArgument)(components.length > 0 && (components[0] === "m" || node.depth > 0), "invalid path", "path",
|
|
162450
|
+
function derivePath(node, path8) {
|
|
162451
|
+
const components = path8.split("/");
|
|
162452
|
+
(0, index_js_4.assertArgument)(components.length > 0 && (components[0] === "m" || node.depth > 0), "invalid path", "path", path8);
|
|
162453
162453
|
if (components[0] === "m") {
|
|
162454
162454
|
components.shift();
|
|
162455
162455
|
}
|
|
@@ -162520,7 +162520,7 @@ var require_hdwallet = __commonJS({
|
|
|
162520
162520
|
/**
|
|
162521
162521
|
* @private
|
|
162522
162522
|
*/
|
|
162523
|
-
constructor(guard, signingKey, parentFingerprint, chainCode,
|
|
162523
|
+
constructor(guard, signingKey, parentFingerprint, chainCode, path8, index, depth, mnemonic, provider) {
|
|
162524
162524
|
super(signingKey, provider);
|
|
162525
162525
|
(0, index_js_4.assertPrivate)(guard, _guard6, "HDNodeWallet");
|
|
162526
162526
|
(0, index_js_4.defineProperties)(this, { publicKey: signingKey.compressedPublicKey });
|
|
@@ -162529,7 +162529,7 @@ var require_hdwallet = __commonJS({
|
|
|
162529
162529
|
parentFingerprint,
|
|
162530
162530
|
fingerprint,
|
|
162531
162531
|
chainCode,
|
|
162532
|
-
path:
|
|
162532
|
+
path: path8,
|
|
162533
162533
|
index,
|
|
162534
162534
|
depth
|
|
162535
162535
|
});
|
|
@@ -162613,22 +162613,22 @@ var require_hdwallet = __commonJS({
|
|
|
162613
162613
|
deriveChild(_index) {
|
|
162614
162614
|
const index = (0, index_js_4.getNumber)(_index, "index");
|
|
162615
162615
|
(0, index_js_4.assertArgument)(index <= 4294967295, "invalid index", "index", index);
|
|
162616
|
-
let
|
|
162617
|
-
if (
|
|
162618
|
-
|
|
162616
|
+
let path8 = this.path;
|
|
162617
|
+
if (path8) {
|
|
162618
|
+
path8 += "/" + (index & ~HardenedBit);
|
|
162619
162619
|
if (index & HardenedBit) {
|
|
162620
|
-
|
|
162620
|
+
path8 += "'";
|
|
162621
162621
|
}
|
|
162622
162622
|
}
|
|
162623
162623
|
const { IR, IL } = ser_I(index, this.chainCode, this.publicKey, this.privateKey);
|
|
162624
162624
|
const ki = new index_js_1.SigningKey((0, index_js_4.toBeHex)(((0, index_js_4.toBigInt)(IL) + BigInt(this.privateKey)) % N, 32));
|
|
162625
|
-
return new _HDNodeWallet(_guard6, ki, this.fingerprint, (0, index_js_4.hexlify)(IR),
|
|
162625
|
+
return new _HDNodeWallet(_guard6, ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path8, index, this.depth + 1, this.mnemonic, this.provider);
|
|
162626
162626
|
}
|
|
162627
162627
|
/**
|
|
162628
162628
|
* Return the HDNode for %%path%% from this node.
|
|
162629
162629
|
*/
|
|
162630
|
-
derivePath(
|
|
162631
|
-
return derivePath(this,
|
|
162630
|
+
derivePath(path8) {
|
|
162631
|
+
return derivePath(this, path8);
|
|
162632
162632
|
}
|
|
162633
162633
|
static #fromSeed(_seed, mnemonic) {
|
|
162634
162634
|
(0, index_js_4.assertArgument)((0, index_js_4.isBytesLike)(_seed), "invalid seed", "seed", "[REDACTED]");
|
|
@@ -162671,43 +162671,43 @@ var require_hdwallet = __commonJS({
|
|
|
162671
162671
|
/**
|
|
162672
162672
|
* Creates a new random HDNode.
|
|
162673
162673
|
*/
|
|
162674
|
-
static createRandom(password,
|
|
162674
|
+
static createRandom(password, path8, wordlist) {
|
|
162675
162675
|
if (password == null) {
|
|
162676
162676
|
password = "";
|
|
162677
162677
|
}
|
|
162678
|
-
if (
|
|
162679
|
-
|
|
162678
|
+
if (path8 == null) {
|
|
162679
|
+
path8 = exports2.defaultPath;
|
|
162680
162680
|
}
|
|
162681
162681
|
if (wordlist == null) {
|
|
162682
162682
|
wordlist = lang_en_js_1.LangEn.wordlist();
|
|
162683
162683
|
}
|
|
162684
162684
|
const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy((0, index_js_1.randomBytes)(16), password, wordlist);
|
|
162685
|
-
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(
|
|
162685
|
+
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path8);
|
|
162686
162686
|
}
|
|
162687
162687
|
/**
|
|
162688
162688
|
* Create an HD Node from %%mnemonic%%.
|
|
162689
162689
|
*/
|
|
162690
|
-
static fromMnemonic(mnemonic,
|
|
162691
|
-
if (!
|
|
162692
|
-
|
|
162690
|
+
static fromMnemonic(mnemonic, path8) {
|
|
162691
|
+
if (!path8) {
|
|
162692
|
+
path8 = exports2.defaultPath;
|
|
162693
162693
|
}
|
|
162694
|
-
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(
|
|
162694
|
+
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path8);
|
|
162695
162695
|
}
|
|
162696
162696
|
/**
|
|
162697
162697
|
* Creates an HD Node from a mnemonic %%phrase%%.
|
|
162698
162698
|
*/
|
|
162699
|
-
static fromPhrase(phrase, password,
|
|
162699
|
+
static fromPhrase(phrase, password, path8, wordlist) {
|
|
162700
162700
|
if (password == null) {
|
|
162701
162701
|
password = "";
|
|
162702
162702
|
}
|
|
162703
|
-
if (
|
|
162704
|
-
|
|
162703
|
+
if (path8 == null) {
|
|
162704
|
+
path8 = exports2.defaultPath;
|
|
162705
162705
|
}
|
|
162706
162706
|
if (wordlist == null) {
|
|
162707
162707
|
wordlist = lang_en_js_1.LangEn.wordlist();
|
|
162708
162708
|
}
|
|
162709
162709
|
const mnemonic = mnemonic_js_1.Mnemonic.fromPhrase(phrase, password, wordlist);
|
|
162710
|
-
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(
|
|
162710
|
+
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path8);
|
|
162711
162711
|
}
|
|
162712
162712
|
/**
|
|
162713
162713
|
* Creates an HD Node from a %%seed%%.
|
|
@@ -162760,7 +162760,7 @@ var require_hdwallet = __commonJS({
|
|
|
162760
162760
|
/**
|
|
162761
162761
|
* @private
|
|
162762
162762
|
*/
|
|
162763
|
-
constructor(guard, address, publicKey, parentFingerprint, chainCode,
|
|
162763
|
+
constructor(guard, address, publicKey, parentFingerprint, chainCode, path8, index, depth, provider) {
|
|
162764
162764
|
super(address, provider);
|
|
162765
162765
|
(0, index_js_4.assertPrivate)(guard, _guard6, "HDNodeVoidWallet");
|
|
162766
162766
|
(0, index_js_4.defineProperties)(this, { publicKey });
|
|
@@ -162770,7 +162770,7 @@ var require_hdwallet = __commonJS({
|
|
|
162770
162770
|
fingerprint,
|
|
162771
162771
|
parentFingerprint,
|
|
162772
162772
|
chainCode,
|
|
162773
|
-
path:
|
|
162773
|
+
path: path8,
|
|
162774
162774
|
index,
|
|
162775
162775
|
depth
|
|
162776
162776
|
});
|
|
@@ -162808,23 +162808,23 @@ var require_hdwallet = __commonJS({
|
|
|
162808
162808
|
deriveChild(_index) {
|
|
162809
162809
|
const index = (0, index_js_4.getNumber)(_index, "index");
|
|
162810
162810
|
(0, index_js_4.assertArgument)(index <= 4294967295, "invalid index", "index", index);
|
|
162811
|
-
let
|
|
162812
|
-
if (
|
|
162813
|
-
|
|
162811
|
+
let path8 = this.path;
|
|
162812
|
+
if (path8) {
|
|
162813
|
+
path8 += "/" + (index & ~HardenedBit);
|
|
162814
162814
|
if (index & HardenedBit) {
|
|
162815
|
-
|
|
162815
|
+
path8 += "'";
|
|
162816
162816
|
}
|
|
162817
162817
|
}
|
|
162818
162818
|
const { IR, IL } = ser_I(index, this.chainCode, this.publicKey, null);
|
|
162819
162819
|
const Ki = index_js_1.SigningKey.addPoints(IL, this.publicKey, true);
|
|
162820
162820
|
const address = (0, index_js_3.computeAddress)(Ki);
|
|
162821
|
-
return new _HDNodeVoidWallet(_guard6, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR),
|
|
162821
|
+
return new _HDNodeVoidWallet(_guard6, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path8, index, this.depth + 1, this.provider);
|
|
162822
162822
|
}
|
|
162823
162823
|
/**
|
|
162824
162824
|
* Return the signer for %%path%% from this node.
|
|
162825
162825
|
*/
|
|
162826
|
-
derivePath(
|
|
162827
|
-
return derivePath(this,
|
|
162826
|
+
derivePath(path8) {
|
|
162827
|
+
return derivePath(this, path8);
|
|
162828
162828
|
}
|
|
162829
162829
|
};
|
|
162830
162830
|
exports2.HDNodeVoidWallet = HDNodeVoidWallet;
|
|
@@ -166595,7 +166595,7 @@ var require_buffer_list = __commonJS({
|
|
|
166595
166595
|
}
|
|
166596
166596
|
}, {
|
|
166597
166597
|
key: "join",
|
|
166598
|
-
value: function
|
|
166598
|
+
value: function join3(s) {
|
|
166599
166599
|
if (this.length === 0)
|
|
166600
166600
|
return "";
|
|
166601
166601
|
var p = this.head;
|
|
@@ -211640,11 +211640,11 @@ var require_soljson = __commonJS({
|
|
|
211640
211640
|
var ENVIRONMENT_IS_WORKER = typeof importScripts == "function";
|
|
211641
211641
|
var ENVIRONMENT_IS_NODE = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string";
|
|
211642
211642
|
var scriptDirectory = "";
|
|
211643
|
-
function locateFile(
|
|
211643
|
+
function locateFile(path8) {
|
|
211644
211644
|
if (Module["locateFile"]) {
|
|
211645
|
-
return Module["locateFile"](
|
|
211645
|
+
return Module["locateFile"](path8, scriptDirectory);
|
|
211646
211646
|
}
|
|
211647
|
-
return scriptDirectory +
|
|
211647
|
+
return scriptDirectory + path8;
|
|
211648
211648
|
}
|
|
211649
211649
|
var read_;
|
|
211650
211650
|
var readAsync;
|
|
@@ -211656,7 +211656,7 @@ var require_soljson = __commonJS({
|
|
|
211656
211656
|
let toLog = e;
|
|
211657
211657
|
err("exiting due to exception: " + toLog);
|
|
211658
211658
|
}
|
|
211659
|
-
var
|
|
211659
|
+
var fs2;
|
|
211660
211660
|
var nodePath;
|
|
211661
211661
|
var requireNodeFS;
|
|
211662
211662
|
if (ENVIRONMENT_IS_NODE) {
|
|
@@ -211667,14 +211667,14 @@ var require_soljson = __commonJS({
|
|
|
211667
211667
|
}
|
|
211668
211668
|
requireNodeFS = () => {
|
|
211669
211669
|
if (!nodePath) {
|
|
211670
|
-
|
|
211670
|
+
fs2 = __require("fs");
|
|
211671
211671
|
nodePath = __require("path");
|
|
211672
211672
|
}
|
|
211673
211673
|
};
|
|
211674
211674
|
read_ = function shell_read(filename, binary) {
|
|
211675
211675
|
requireNodeFS();
|
|
211676
211676
|
filename = nodePath["normalize"](filename);
|
|
211677
|
-
return
|
|
211677
|
+
return fs2.readFileSync(filename, binary ? void 0 : "utf8");
|
|
211678
211678
|
};
|
|
211679
211679
|
readBinary = (filename) => {
|
|
211680
211680
|
var ret = read_(filename, true);
|
|
@@ -211686,7 +211686,7 @@ var require_soljson = __commonJS({
|
|
|
211686
211686
|
readAsync = (filename, onload, onerror) => {
|
|
211687
211687
|
requireNodeFS();
|
|
211688
211688
|
filename = nodePath["normalize"](filename);
|
|
211689
|
-
|
|
211689
|
+
fs2.readFile(filename, function(err2, data) {
|
|
211690
211690
|
if (err2)
|
|
211691
211691
|
onerror(err2);
|
|
211692
211692
|
else
|
|
@@ -212471,7 +212471,7 @@ var require_soljson = __commonJS({
|
|
|
212471
212471
|
SYSCALLS.varargs = varargs;
|
|
212472
212472
|
return 0;
|
|
212473
212473
|
}
|
|
212474
|
-
function ___syscall_openat(dirfd,
|
|
212474
|
+
function ___syscall_openat(dirfd, path8, flags, varargs) {
|
|
212475
212475
|
SYSCALLS.varargs = varargs;
|
|
212476
212476
|
}
|
|
212477
212477
|
function __emscripten_date_now() {
|
|
@@ -214455,8 +214455,8 @@ var require_solidityCompiler = __commonJS({
|
|
|
214455
214455
|
child.stdin.end();
|
|
214456
214456
|
});
|
|
214457
214457
|
}
|
|
214458
|
-
function importWorker(
|
|
214459
|
-
const resolvedPath = __require.resolve(
|
|
214458
|
+
function importWorker(path8, options) {
|
|
214459
|
+
const resolvedPath = __require.resolve(path8);
|
|
214460
214460
|
return new worker_threads_1.Worker(resolvedPath, Object.assign(Object.assign({}, options), { execArgv: /\.ts$/.test(resolvedPath) ? ["--require", "ts-node/register"] : void 0 }));
|
|
214461
214461
|
}
|
|
214462
214462
|
}
|
|
@@ -215575,10 +215575,10 @@ var require_CheckedContract = __commonJS({
|
|
|
215575
215575
|
} catch (err) {
|
|
215576
215576
|
return null;
|
|
215577
215577
|
}
|
|
215578
|
-
const pathContent = Object.keys(this.solidity).map((
|
|
215578
|
+
const pathContent = Object.keys(this.solidity).map((path8) => {
|
|
215579
215579
|
return {
|
|
215580
|
-
path:
|
|
215581
|
-
content: this.solidity[
|
|
215580
|
+
path: path8,
|
|
215581
|
+
content: this.solidity[path8] || ""
|
|
215582
215582
|
};
|
|
215583
215583
|
});
|
|
215584
215584
|
const byHash = (0, validation_1.storeByHash)(pathContent);
|
|
@@ -216062,7 +216062,7 @@ var require_BufferList = __commonJS({
|
|
|
216062
216062
|
this.head = this.tail = null;
|
|
216063
216063
|
this.length = 0;
|
|
216064
216064
|
};
|
|
216065
|
-
BufferList.prototype.join = function
|
|
216065
|
+
BufferList.prototype.join = function join3(s) {
|
|
216066
216066
|
if (this.length === 0)
|
|
216067
216067
|
return "";
|
|
216068
216068
|
var p = this.head;
|
|
@@ -218780,8 +218780,8 @@ var require_utils26 = __commonJS({
|
|
|
218780
218780
|
var result = transform[inputType][outputType](input);
|
|
218781
218781
|
return result;
|
|
218782
218782
|
};
|
|
218783
|
-
exports2.resolve = function(
|
|
218784
|
-
var parts =
|
|
218783
|
+
exports2.resolve = function(path8) {
|
|
218784
|
+
var parts = path8.split("/");
|
|
218785
218785
|
var result = [];
|
|
218786
218786
|
for (var index = 0; index < parts.length; index++) {
|
|
218787
218787
|
var part = parts[index];
|
|
@@ -224613,18 +224613,18 @@ var require_object2 = __commonJS({
|
|
|
224613
224613
|
var object2 = new ZipObject(name, zipObjectContent, o);
|
|
224614
224614
|
this.files[name] = object2;
|
|
224615
224615
|
};
|
|
224616
|
-
var parentFolder = function(
|
|
224617
|
-
if (
|
|
224618
|
-
|
|
224616
|
+
var parentFolder = function(path8) {
|
|
224617
|
+
if (path8.slice(-1) === "/") {
|
|
224618
|
+
path8 = path8.substring(0, path8.length - 1);
|
|
224619
224619
|
}
|
|
224620
|
-
var lastSlash =
|
|
224621
|
-
return lastSlash > 0 ?
|
|
224620
|
+
var lastSlash = path8.lastIndexOf("/");
|
|
224621
|
+
return lastSlash > 0 ? path8.substring(0, lastSlash) : "";
|
|
224622
224622
|
};
|
|
224623
|
-
var forceTrailingSlash = function(
|
|
224624
|
-
if (
|
|
224625
|
-
|
|
224623
|
+
var forceTrailingSlash = function(path8) {
|
|
224624
|
+
if (path8.slice(-1) !== "/") {
|
|
224625
|
+
path8 += "/";
|
|
224626
224626
|
}
|
|
224627
|
-
return
|
|
224627
|
+
return path8;
|
|
224628
224628
|
};
|
|
224629
224629
|
var folderAdd = function(name, createFolders) {
|
|
224630
224630
|
createFolders = typeof createFolders !== "undefined" ? createFolders : defaults2.createFolders;
|
|
@@ -225654,15 +225654,15 @@ var require_validation3 = __commonJS({
|
|
|
225654
225654
|
];
|
|
225655
225655
|
function checkPaths(paths, ignoring) {
|
|
225656
225656
|
const files = [];
|
|
225657
|
-
paths.forEach((
|
|
225658
|
-
if (fs_1.default.existsSync(
|
|
225659
|
-
traversePathRecursively(
|
|
225657
|
+
paths.forEach((path8) => {
|
|
225658
|
+
if (fs_1.default.existsSync(path8)) {
|
|
225659
|
+
traversePathRecursively(path8, (filePath) => {
|
|
225660
225660
|
const fullPath = path_1.default.resolve(filePath);
|
|
225661
225661
|
const file = { buffer: fs_1.default.readFileSync(filePath), path: fullPath };
|
|
225662
225662
|
files.push(file);
|
|
225663
225663
|
});
|
|
225664
225664
|
} else if (ignoring) {
|
|
225665
|
-
ignoring.push(
|
|
225665
|
+
ignoring.push(path8);
|
|
225666
225666
|
}
|
|
225667
225667
|
});
|
|
225668
225668
|
return checkFiles2(files);
|
|
@@ -225878,22 +225878,22 @@ var require_validation3 = __commonJS({
|
|
|
225878
225878
|
var _a, _b, _c, _d;
|
|
225879
225879
|
return (obj === null || obj === void 0 ? void 0 : obj.language) === "Solidity" && !!((_a = obj === null || obj === void 0 ? void 0 : obj.settings) === null || _a === void 0 ? void 0 : _a.compilationTarget) && !!(obj === null || obj === void 0 ? void 0 : obj.version) && !!((_b = obj === null || obj === void 0 ? void 0 : obj.output) === null || _b === void 0 ? void 0 : _b.abi) && !!((_c = obj === null || obj === void 0 ? void 0 : obj.output) === null || _c === void 0 ? void 0 : _c.userdoc) && !!((_d = obj === null || obj === void 0 ? void 0 : obj.output) === null || _d === void 0 ? void 0 : _d.devdoc) && !!(obj === null || obj === void 0 ? void 0 : obj.sources);
|
|
225880
225880
|
}
|
|
225881
|
-
function traversePathRecursively(
|
|
225882
|
-
if (!fs_1.default.existsSync(
|
|
225883
|
-
const msg = `Encountered a nonexistent path: ${
|
|
225881
|
+
function traversePathRecursively(path8, worker, afterDirectory) {
|
|
225882
|
+
if (!fs_1.default.existsSync(path8)) {
|
|
225883
|
+
const msg = `Encountered a nonexistent path: ${path8}`;
|
|
225884
225884
|
const error = new Error(msg);
|
|
225885
225885
|
throw error;
|
|
225886
225886
|
}
|
|
225887
|
-
const fileStat = fs_1.default.lstatSync(
|
|
225887
|
+
const fileStat = fs_1.default.lstatSync(path8);
|
|
225888
225888
|
if (fileStat.isFile()) {
|
|
225889
|
-
worker(
|
|
225889
|
+
worker(path8);
|
|
225890
225890
|
} else if (fileStat.isDirectory()) {
|
|
225891
|
-
fs_1.default.readdirSync(
|
|
225892
|
-
const nestedPath = path_1.default.join(
|
|
225891
|
+
fs_1.default.readdirSync(path8).forEach((nestedName) => {
|
|
225892
|
+
const nestedPath = path_1.default.join(path8, nestedName);
|
|
225893
225893
|
traversePathRecursively(nestedPath, worker, afterDirectory);
|
|
225894
225894
|
});
|
|
225895
225895
|
if (afterDirectory) {
|
|
225896
|
-
afterDirectory(
|
|
225896
|
+
afterDirectory(path8);
|
|
225897
225897
|
}
|
|
225898
225898
|
}
|
|
225899
225899
|
}
|
|
@@ -225917,19 +225917,19 @@ var require_validation3 = __commonJS({
|
|
|
225917
225917
|
const hardhatSourceFiles = [];
|
|
225918
225918
|
const hardhatJson = JSON.parse(hardhatFile.content);
|
|
225919
225919
|
const hardhatSourceFilesObject = hardhatJson.input.sources;
|
|
225920
|
-
for (const
|
|
225921
|
-
if (hardhatSourceFilesObject[
|
|
225920
|
+
for (const path8 in hardhatSourceFilesObject) {
|
|
225921
|
+
if (hardhatSourceFilesObject[path8].content) {
|
|
225922
225922
|
hardhatSourceFiles.push({
|
|
225923
|
-
path:
|
|
225924
|
-
content: hardhatSourceFilesObject[
|
|
225923
|
+
path: path8,
|
|
225924
|
+
content: hardhatSourceFilesObject[path8].content
|
|
225925
225925
|
});
|
|
225926
225926
|
}
|
|
225927
225927
|
}
|
|
225928
225928
|
const contractsObject = hardhatJson.output.contracts;
|
|
225929
|
-
for (const
|
|
225930
|
-
for (const contractName in contractsObject[
|
|
225931
|
-
if (contractsObject[
|
|
225932
|
-
const metadataObj = extractMetadataFromString(contractsObject[
|
|
225929
|
+
for (const path8 in contractsObject) {
|
|
225930
|
+
for (const contractName in contractsObject[path8]) {
|
|
225931
|
+
if (contractsObject[path8][contractName].metadata) {
|
|
225932
|
+
const metadataObj = extractMetadataFromString(contractsObject[path8][contractName].metadata);
|
|
225933
225933
|
hardhatMetadataFiles.push(metadataObj);
|
|
225934
225934
|
}
|
|
225935
225935
|
}
|
|
@@ -227578,12 +227578,12 @@ var require_abstract_coder4 = __commonJS({
|
|
|
227578
227578
|
var logger2 = new logger_1.Logger(_version_1.version);
|
|
227579
227579
|
function checkResultErrors3(result) {
|
|
227580
227580
|
var errors = [];
|
|
227581
|
-
var checkErrors = function(
|
|
227581
|
+
var checkErrors = function(path8, object2) {
|
|
227582
227582
|
if (!Array.isArray(object2)) {
|
|
227583
227583
|
return;
|
|
227584
227584
|
}
|
|
227585
227585
|
for (var key in object2) {
|
|
227586
|
-
var childPath =
|
|
227586
|
+
var childPath = path8.slice();
|
|
227587
227587
|
childPath.push(key);
|
|
227588
227588
|
try {
|
|
227589
227589
|
checkErrors(childPath, object2[key]);
|
|
@@ -246487,15 +246487,15 @@ var require_route = __commonJS({
|
|
|
246487
246487
|
};
|
|
246488
246488
|
}
|
|
246489
246489
|
function wrapConversion(toModel, graph) {
|
|
246490
|
-
const
|
|
246490
|
+
const path8 = [graph[toModel].parent, toModel];
|
|
246491
246491
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
246492
246492
|
let cur = graph[toModel].parent;
|
|
246493
246493
|
while (graph[cur].parent) {
|
|
246494
|
-
|
|
246494
|
+
path8.unshift(graph[cur].parent);
|
|
246495
246495
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
246496
246496
|
cur = graph[cur].parent;
|
|
246497
246497
|
}
|
|
246498
|
-
fn.conversion =
|
|
246498
|
+
fn.conversion = path8;
|
|
246499
246499
|
return fn;
|
|
246500
246500
|
}
|
|
246501
246501
|
module2.exports = function(fromModel) {
|
|
@@ -267657,7 +267657,7 @@ var {
|
|
|
267657
267657
|
|
|
267658
267658
|
// ../../packages/node/dist/Auditor.js
|
|
267659
267659
|
import { mkdirSync } from "node:fs";
|
|
267660
|
-
import { readFile, rm, writeFile } from "node:fs/promises";
|
|
267660
|
+
import { readFile as readFile2, rm, writeFile } from "node:fs/promises";
|
|
267661
267661
|
import path2 from "node:path";
|
|
267662
267662
|
|
|
267663
267663
|
// ../../packages/shared/dist/ethers6.js
|
|
@@ -316042,19 +316042,19 @@ function toKey(value) {
|
|
|
316042
316042
|
var toKey_default = toKey;
|
|
316043
316043
|
|
|
316044
316044
|
// ../../node_modules/lodash-es/_baseGet.js
|
|
316045
|
-
function baseGet(object2,
|
|
316046
|
-
|
|
316047
|
-
var index = 0, length =
|
|
316045
|
+
function baseGet(object2, path8) {
|
|
316046
|
+
path8 = castPath_default(path8, object2);
|
|
316047
|
+
var index = 0, length = path8.length;
|
|
316048
316048
|
while (object2 != null && index < length) {
|
|
316049
|
-
object2 = object2[toKey_default(
|
|
316049
|
+
object2 = object2[toKey_default(path8[index++])];
|
|
316050
316050
|
}
|
|
316051
316051
|
return index && index == length ? object2 : void 0;
|
|
316052
316052
|
}
|
|
316053
316053
|
var baseGet_default = baseGet;
|
|
316054
316054
|
|
|
316055
316055
|
// ../../node_modules/lodash-es/get.js
|
|
316056
|
-
function get(object2,
|
|
316057
|
-
var result = object2 == null ? void 0 : baseGet_default(object2,
|
|
316056
|
+
function get(object2, path8, defaultValue) {
|
|
316057
|
+
var result = object2 == null ? void 0 : baseGet_default(object2, path8);
|
|
316058
316058
|
return result === void 0 ? defaultValue : result;
|
|
316059
316059
|
}
|
|
316060
316060
|
var get_default = get;
|
|
@@ -317003,11 +317003,11 @@ function baseHasIn(object2, key) {
|
|
|
317003
317003
|
var baseHasIn_default = baseHasIn;
|
|
317004
317004
|
|
|
317005
317005
|
// ../../node_modules/lodash-es/_hasPath.js
|
|
317006
|
-
function hasPath(object2,
|
|
317007
|
-
|
|
317008
|
-
var index = -1, length =
|
|
317006
|
+
function hasPath(object2, path8, hasFunc) {
|
|
317007
|
+
path8 = castPath_default(path8, object2);
|
|
317008
|
+
var index = -1, length = path8.length, result = false;
|
|
317009
317009
|
while (++index < length) {
|
|
317010
|
-
var key = toKey_default(
|
|
317010
|
+
var key = toKey_default(path8[index]);
|
|
317011
317011
|
if (!(result = object2 != null && hasFunc(object2, key))) {
|
|
317012
317012
|
break;
|
|
317013
317013
|
}
|
|
@@ -317022,21 +317022,21 @@ function hasPath(object2, path9, hasFunc) {
|
|
|
317022
317022
|
var hasPath_default = hasPath;
|
|
317023
317023
|
|
|
317024
317024
|
// ../../node_modules/lodash-es/hasIn.js
|
|
317025
|
-
function hasIn(object2,
|
|
317026
|
-
return object2 != null && hasPath_default(object2,
|
|
317025
|
+
function hasIn(object2, path8) {
|
|
317026
|
+
return object2 != null && hasPath_default(object2, path8, baseHasIn_default);
|
|
317027
317027
|
}
|
|
317028
317028
|
var hasIn_default = hasIn;
|
|
317029
317029
|
|
|
317030
317030
|
// ../../node_modules/lodash-es/_baseMatchesProperty.js
|
|
317031
317031
|
var COMPARE_PARTIAL_FLAG6 = 1;
|
|
317032
317032
|
var COMPARE_UNORDERED_FLAG4 = 2;
|
|
317033
|
-
function baseMatchesProperty(
|
|
317034
|
-
if (isKey_default(
|
|
317035
|
-
return matchesStrictComparable_default(toKey_default(
|
|
317033
|
+
function baseMatchesProperty(path8, srcValue) {
|
|
317034
|
+
if (isKey_default(path8) && isStrictComparable_default(srcValue)) {
|
|
317035
|
+
return matchesStrictComparable_default(toKey_default(path8), srcValue);
|
|
317036
317036
|
}
|
|
317037
317037
|
return function(object2) {
|
|
317038
|
-
var objValue = get_default(object2,
|
|
317039
|
-
return objValue === void 0 && objValue === srcValue ? hasIn_default(object2,
|
|
317038
|
+
var objValue = get_default(object2, path8);
|
|
317039
|
+
return objValue === void 0 && objValue === srcValue ? hasIn_default(object2, path8) : baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4);
|
|
317040
317040
|
};
|
|
317041
317041
|
}
|
|
317042
317042
|
var baseMatchesProperty_default = baseMatchesProperty;
|
|
@@ -317050,16 +317050,16 @@ function baseProperty(key) {
|
|
|
317050
317050
|
var baseProperty_default = baseProperty;
|
|
317051
317051
|
|
|
317052
317052
|
// ../../node_modules/lodash-es/_basePropertyDeep.js
|
|
317053
|
-
function basePropertyDeep(
|
|
317053
|
+
function basePropertyDeep(path8) {
|
|
317054
317054
|
return function(object2) {
|
|
317055
|
-
return baseGet_default(object2,
|
|
317055
|
+
return baseGet_default(object2, path8);
|
|
317056
317056
|
};
|
|
317057
317057
|
}
|
|
317058
317058
|
var basePropertyDeep_default = basePropertyDeep;
|
|
317059
317059
|
|
|
317060
317060
|
// ../../node_modules/lodash-es/property.js
|
|
317061
|
-
function property(
|
|
317062
|
-
return isKey_default(
|
|
317061
|
+
function property(path8) {
|
|
317062
|
+
return isKey_default(path8) ? baseProperty_default(toKey_default(path8)) : basePropertyDeep_default(path8);
|
|
317063
317063
|
}
|
|
317064
317064
|
var property_default = property;
|
|
317065
317065
|
|
|
@@ -317689,9 +317689,9 @@ var log_default = logger;
|
|
|
317689
317689
|
var log = log_default.getSubLogger({ name: "git" });
|
|
317690
317690
|
function getGithubUrl(repo, https3 = false) {
|
|
317691
317691
|
const credentials = process.env.GITHUB_TOKEN ?? process.env.GH_TOKEN;
|
|
317692
|
-
const
|
|
317692
|
+
const path8 = repo.replace(/^@/, "").replace(/\/$/, "");
|
|
317693
317693
|
const cred = credentials ? `${credentials}@` : "";
|
|
317694
|
-
return https3 || credentials ? `https://${cred}github.com/${
|
|
317694
|
+
return https3 || credentials ? `https://${cred}github.com/${path8}.git` : `git@github.com:${path8}.git`;
|
|
317695
317695
|
}
|
|
317696
317696
|
async function cloneRepo(opts) {
|
|
317697
317697
|
const { repo, commit, sandboxDir } = opts;
|
|
@@ -317756,6 +317756,47 @@ function compareAudited(a, b3) {
|
|
|
317756
317756
|
}
|
|
317757
317757
|
|
|
317758
317758
|
// ../../packages/node/dist/helpers/batches.js
|
|
317759
|
+
import { readFile } from "node:fs/promises";
|
|
317760
|
+
import { join as join2 } from "node:path";
|
|
317761
|
+
|
|
317762
|
+
// ../../packages/node/dist/helpers/fs.js
|
|
317763
|
+
import { readdir } from "node:fs/promises";
|
|
317764
|
+
import { join, resolve } from "node:path";
|
|
317765
|
+
async function readDirectory(dir) {
|
|
317766
|
+
let files = [];
|
|
317767
|
+
async function readDir(rootDir, subdir) {
|
|
317768
|
+
const items = await readdir(resolve(rootDir, subdir), {
|
|
317769
|
+
withFileTypes: true
|
|
317770
|
+
});
|
|
317771
|
+
for (const item of items) {
|
|
317772
|
+
if (item.isDirectory()) {
|
|
317773
|
+
await readDir(rootDir, join(subdir, item.name));
|
|
317774
|
+
} else {
|
|
317775
|
+
files.push(join(subdir, item.name));
|
|
317776
|
+
}
|
|
317777
|
+
}
|
|
317778
|
+
}
|
|
317779
|
+
await readDir(dir, ".");
|
|
317780
|
+
return files;
|
|
317781
|
+
}
|
|
317782
|
+
|
|
317783
|
+
// ../../packages/node/dist/helpers/batches.js
|
|
317784
|
+
async function loadBatchDir(dir) {
|
|
317785
|
+
const result = [];
|
|
317786
|
+
const files = await readDirectory(dir);
|
|
317787
|
+
for (const f of files) {
|
|
317788
|
+
if (f.endsWith(".governor.json") || f.endsWith(".router.json")) {
|
|
317789
|
+
const raw = await readFile(join2(dir, f), "utf-8").then(json_parse);
|
|
317790
|
+
result.push({
|
|
317791
|
+
id: f,
|
|
317792
|
+
description: "",
|
|
317793
|
+
type: f.endsWith(".governor.json") ? "governor" : "router",
|
|
317794
|
+
transactions: normalizeTransactions(raw)
|
|
317795
|
+
});
|
|
317796
|
+
}
|
|
317797
|
+
}
|
|
317798
|
+
return result;
|
|
317799
|
+
}
|
|
317759
317800
|
function normalizeTransactions(batch) {
|
|
317760
317801
|
return batch.transactions.map((t) => {
|
|
317761
317802
|
if (
|
|
@@ -317843,27 +317884,6 @@ function normalizeSafeApiBatch(tx) {
|
|
|
317843
317884
|
};
|
|
317844
317885
|
}
|
|
317845
317886
|
|
|
317846
|
-
// ../../packages/node/dist/helpers/fs.js
|
|
317847
|
-
import { readdir } from "node:fs/promises";
|
|
317848
|
-
import { join, resolve } from "node:path";
|
|
317849
|
-
async function readDirectory(dir) {
|
|
317850
|
-
let files = [];
|
|
317851
|
-
async function readDir(rootDir, subdir) {
|
|
317852
|
-
const items = await readdir(resolve(rootDir, subdir), {
|
|
317853
|
-
withFileTypes: true
|
|
317854
|
-
});
|
|
317855
|
-
for (const item of items) {
|
|
317856
|
-
if (item.isDirectory()) {
|
|
317857
|
-
await readDir(rootDir, join(subdir, item.name));
|
|
317858
|
-
} else {
|
|
317859
|
-
files.push(join(subdir, item.name));
|
|
317860
|
-
}
|
|
317861
|
-
}
|
|
317862
|
-
}
|
|
317863
|
-
await readDir(dir, ".");
|
|
317864
|
-
return files;
|
|
317865
|
-
}
|
|
317866
|
-
|
|
317867
317887
|
// ../../packages/node/dist/helpers/transactions.js
|
|
317868
317888
|
function isDeployTransaction(t) {
|
|
317869
317889
|
return t.contract === "CREATE2_FACTORY" && t.method === "deploy(bytes32,bytes)";
|
|
@@ -317875,7 +317895,7 @@ function isCallExternalTransaction(t) {
|
|
|
317875
317895
|
// ../../packages/node/dist/utils.js
|
|
317876
317896
|
var import_bytecode_utils = __toESM(require_main(), 1);
|
|
317877
317897
|
function extractFilesFromJSON(files) {
|
|
317878
|
-
return Object.entries(files).map(([
|
|
317898
|
+
return Object.entries(files).map(([path8, file]) => {
|
|
317879
317899
|
let buffer = null;
|
|
317880
317900
|
if (Buffer.isBuffer(file)) {
|
|
317881
317901
|
buffer = file;
|
|
@@ -317890,7 +317910,7 @@ function extractFilesFromJSON(files) {
|
|
|
317890
317910
|
throw new Error(`cannot convert ${typeof file} into buffer`);
|
|
317891
317911
|
}
|
|
317892
317912
|
return {
|
|
317893
|
-
path:
|
|
317913
|
+
path: path8,
|
|
317894
317914
|
buffer
|
|
317895
317915
|
};
|
|
317896
317916
|
});
|
|
@@ -317951,8 +317971,8 @@ var Auditor = class {
|
|
|
317951
317971
|
if (!meta2.files) {
|
|
317952
317972
|
throw new Error("no files to audit");
|
|
317953
317973
|
}
|
|
317954
|
-
const files = extractFilesFromJSON(meta2.files).filter((f) => f.path !== "metadata.json").map(({ path:
|
|
317955
|
-
const p =
|
|
317974
|
+
const files = extractFilesFromJSON(meta2.files).filter((f) => f.path !== "metadata.json").map(({ path: path8, buffer }) => {
|
|
317975
|
+
const p = path8.includes("node_modules/") ? path8.replace("node_modules/", "") : meta2.source;
|
|
317956
317976
|
const gearbox = p.startsWith("@gearbox-protocol");
|
|
317957
317977
|
return {
|
|
317958
317978
|
gearbox,
|
|
@@ -317972,8 +317992,8 @@ var Auditor = class {
|
|
|
317972
317992
|
*/
|
|
317973
317993
|
async auditEtherscanVerified(contract) {
|
|
317974
317994
|
const input = parseEtherscanSourceCode(contract);
|
|
317975
|
-
const files = extractFilesFromJSON(input.sources).map(({ path:
|
|
317976
|
-
const p =
|
|
317995
|
+
const files = extractFilesFromJSON(input.sources).map(({ path: path8, buffer }) => {
|
|
317996
|
+
const p = path8.replace("node_modules/", "");
|
|
317977
317997
|
const gearbox = p.startsWith("@gearbox-protocol");
|
|
317978
317998
|
return {
|
|
317979
317999
|
gearbox,
|
|
@@ -318028,7 +318048,7 @@ var Auditor = class {
|
|
|
318028
318048
|
const commitish = repoAudit.type === "commit" ? repoAudit.commit : repoAudit.branch;
|
|
318029
318049
|
const filePath = path2.resolve(this.#sandboxDir, file.repo, commitish, file.path);
|
|
318030
318050
|
try {
|
|
318031
|
-
const content = await
|
|
318051
|
+
const content = await readFile2(filePath);
|
|
318032
318052
|
let matches = content.equals(file.buffer);
|
|
318033
318053
|
if (matches) {
|
|
318034
318054
|
this.#logger.trace(`file ${file.repo}/${file.path} matches with audit ${file.repo}@${commitish}`);
|
|
@@ -318107,7 +318127,7 @@ var container = new Container();
|
|
|
318107
318127
|
|
|
318108
318128
|
// ../../packages/node/dist/EtherscanVerifier.js
|
|
318109
318129
|
import { mkdirSync as mkdirSync2 } from "node:fs";
|
|
318110
|
-
import { readFile as
|
|
318130
|
+
import { readFile as readFile3, writeFile as writeFile2 } from "node:fs/promises";
|
|
318111
318131
|
import path3 from "node:path";
|
|
318112
318132
|
|
|
318113
318133
|
// ../../node_modules/axios/lib/helpers/bind.js
|
|
@@ -318559,10 +318579,10 @@ function isVisitable(thing) {
|
|
|
318559
318579
|
function removeBrackets(key) {
|
|
318560
318580
|
return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
318561
318581
|
}
|
|
318562
|
-
function renderKey(
|
|
318563
|
-
if (!
|
|
318582
|
+
function renderKey(path8, key, dots) {
|
|
318583
|
+
if (!path8)
|
|
318564
318584
|
return key;
|
|
318565
|
-
return
|
|
318585
|
+
return path8.concat(key).map(function each(token, i) {
|
|
318566
318586
|
token = removeBrackets(token);
|
|
318567
318587
|
return !dots && i ? "[" + token + "]" : token;
|
|
318568
318588
|
}).join(dots ? "." : "");
|
|
@@ -318608,9 +318628,9 @@ function toFormData(obj, formData, options) {
|
|
|
318608
318628
|
}
|
|
318609
318629
|
return value;
|
|
318610
318630
|
}
|
|
318611
|
-
function defaultVisitor(value, key,
|
|
318631
|
+
function defaultVisitor(value, key, path8) {
|
|
318612
318632
|
let arr = value;
|
|
318613
|
-
if (value && !
|
|
318633
|
+
if (value && !path8 && typeof value === "object") {
|
|
318614
318634
|
if (utils_default.endsWith(key, "{}")) {
|
|
318615
318635
|
key = metaTokens ? key : key.slice(0, -2);
|
|
318616
318636
|
value = JSON.stringify(value);
|
|
@@ -318629,7 +318649,7 @@ function toFormData(obj, formData, options) {
|
|
|
318629
318649
|
if (isVisitable(value)) {
|
|
318630
318650
|
return true;
|
|
318631
318651
|
}
|
|
318632
|
-
formData.append(renderKey(
|
|
318652
|
+
formData.append(renderKey(path8, key, dots), convertValue(value));
|
|
318633
318653
|
return false;
|
|
318634
318654
|
}
|
|
318635
318655
|
const stack = [];
|
|
@@ -318638,11 +318658,11 @@ function toFormData(obj, formData, options) {
|
|
|
318638
318658
|
convertValue,
|
|
318639
318659
|
isVisitable
|
|
318640
318660
|
});
|
|
318641
|
-
function build(value,
|
|
318661
|
+
function build(value, path8) {
|
|
318642
318662
|
if (utils_default.isUndefined(value))
|
|
318643
318663
|
return;
|
|
318644
318664
|
if (stack.indexOf(value) !== -1) {
|
|
318645
|
-
throw Error("Circular reference detected in " +
|
|
318665
|
+
throw Error("Circular reference detected in " + path8.join("."));
|
|
318646
318666
|
}
|
|
318647
318667
|
stack.push(value);
|
|
318648
318668
|
utils_default.forEach(value, function each(el, key) {
|
|
@@ -318650,11 +318670,11 @@ function toFormData(obj, formData, options) {
|
|
|
318650
318670
|
formData,
|
|
318651
318671
|
el,
|
|
318652
318672
|
utils_default.isString(key) ? key.trim() : key,
|
|
318653
|
-
|
|
318673
|
+
path8,
|
|
318654
318674
|
exposedHelpers
|
|
318655
318675
|
);
|
|
318656
318676
|
if (result === true) {
|
|
318657
|
-
build(el,
|
|
318677
|
+
build(el, path8 ? path8.concat(key) : [key]);
|
|
318658
318678
|
}
|
|
318659
318679
|
});
|
|
318660
318680
|
stack.pop();
|
|
@@ -318837,7 +318857,7 @@ var platform_default = {
|
|
|
318837
318857
|
// ../../node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
318838
318858
|
function toURLEncodedForm(data, options) {
|
|
318839
318859
|
return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
|
|
318840
|
-
visitor: function(value, key,
|
|
318860
|
+
visitor: function(value, key, path8, helpers) {
|
|
318841
318861
|
if (platform_default.isNode && utils_default.isBuffer(value)) {
|
|
318842
318862
|
this.append(key, value.toString("base64"));
|
|
318843
318863
|
return false;
|
|
@@ -318866,12 +318886,12 @@ function arrayToObject(arr) {
|
|
|
318866
318886
|
return obj;
|
|
318867
318887
|
}
|
|
318868
318888
|
function formDataToJSON(formData) {
|
|
318869
|
-
function buildPath(
|
|
318870
|
-
let name =
|
|
318889
|
+
function buildPath(path8, value, target, index) {
|
|
318890
|
+
let name = path8[index++];
|
|
318871
318891
|
if (name === "__proto__")
|
|
318872
318892
|
return true;
|
|
318873
318893
|
const isNumericKey = Number.isFinite(+name);
|
|
318874
|
-
const isLast = index >=
|
|
318894
|
+
const isLast = index >= path8.length;
|
|
318875
318895
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
318876
318896
|
if (isLast) {
|
|
318877
318897
|
if (utils_default.hasOwnProp(target, name)) {
|
|
@@ -318884,7 +318904,7 @@ function formDataToJSON(formData) {
|
|
|
318884
318904
|
if (!target[name] || !utils_default.isObject(target[name])) {
|
|
318885
318905
|
target[name] = [];
|
|
318886
318906
|
}
|
|
318887
|
-
const result = buildPath(
|
|
318907
|
+
const result = buildPath(path8, value, target[name], index);
|
|
318888
318908
|
if (result && utils_default.isArray(target[name])) {
|
|
318889
318909
|
target[name] = arrayToObject(target[name]);
|
|
318890
318910
|
}
|
|
@@ -319995,9 +320015,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
319995
320015
|
auth = urlUsername + ":" + urlPassword;
|
|
319996
320016
|
}
|
|
319997
320017
|
auth && headers.delete("authorization");
|
|
319998
|
-
let
|
|
320018
|
+
let path8;
|
|
319999
320019
|
try {
|
|
320000
|
-
|
|
320020
|
+
path8 = buildURL(
|
|
320001
320021
|
parsed.pathname + parsed.search,
|
|
320002
320022
|
config.params,
|
|
320003
320023
|
config.paramsSerializer
|
|
@@ -320015,7 +320035,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
320015
320035
|
false
|
|
320016
320036
|
);
|
|
320017
320037
|
const options = {
|
|
320018
|
-
path:
|
|
320038
|
+
path: path8,
|
|
320019
320039
|
method,
|
|
320020
320040
|
headers: headers.toJSON(),
|
|
320021
320041
|
agents: { http: config.httpAgent, https: config.httpsAgent },
|
|
@@ -320237,10 +320257,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
320237
320257
|
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
320238
320258
|
// Standard browser envs support document.cookie
|
|
320239
320259
|
{
|
|
320240
|
-
write(name, value, expires,
|
|
320260
|
+
write(name, value, expires, path8, domain, secure) {
|
|
320241
320261
|
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
320242
320262
|
utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
320243
|
-
utils_default.isString(
|
|
320263
|
+
utils_default.isString(path8) && cookie.push("path=" + path8);
|
|
320244
320264
|
utils_default.isString(domain) && cookie.push("domain=" + domain);
|
|
320245
320265
|
secure === true && cookie.push("secure");
|
|
320246
320266
|
document.cookie = cookie.join("; ");
|
|
@@ -321350,7 +321370,7 @@ var EtherscanVerifier = class {
|
|
|
321350
321370
|
async #getCached(address) {
|
|
321351
321371
|
try {
|
|
321352
321372
|
const cacheFile = path3.resolve(this.#cacheDir, `${address.toLowerCase()}.json`);
|
|
321353
|
-
const content = await
|
|
321373
|
+
const content = await readFile3(cacheFile, "utf8");
|
|
321354
321374
|
const resp = json_parse(content);
|
|
321355
321375
|
this.#logger.trace(`cache hit for ${address}`);
|
|
321356
321376
|
return resp;
|
|
@@ -321368,7 +321388,7 @@ var EtherscanVerifier = class {
|
|
|
321368
321388
|
};
|
|
321369
321389
|
|
|
321370
321390
|
// ../../packages/node/dist/ProviderBase.js
|
|
321371
|
-
import { readFile as
|
|
321391
|
+
import { readFile as readFile4 } from "node:fs/promises";
|
|
321372
321392
|
var import_sdk_gov2 = __toESM(require_lib222(), 1);
|
|
321373
321393
|
var import_api_kit = __toESM(require_src8(), 1);
|
|
321374
321394
|
|
|
@@ -321498,7 +321518,7 @@ var ProviderBase = class {
|
|
|
321498
321518
|
this.logger.debug(`overriding address provider: ${this.#options.addressProvider}`);
|
|
321499
321519
|
} else if (this.#options.addressProviderJson) {
|
|
321500
321520
|
this.logger.debug(`reading address provider json ${this.#options.addressProviderJson}`);
|
|
321501
|
-
const gov = await
|
|
321521
|
+
const gov = await readFile4(this.#options.addressProviderJson, "utf-8").then(JSON.parse);
|
|
321502
321522
|
if (gov.network !== this.#network) {
|
|
321503
321523
|
throw new Error(`address provider file network mismatch: expected ${this.#network}, got ${gov.network}`);
|
|
321504
321524
|
}
|
|
@@ -321506,7 +321526,7 @@ var ProviderBase = class {
|
|
|
321506
321526
|
}
|
|
321507
321527
|
if (this.#options.governanceJson) {
|
|
321508
321528
|
this.logger.debug(`reading governance json ${this.#options.governanceJson}`);
|
|
321509
|
-
const gov = await
|
|
321529
|
+
const gov = await readFile4(this.#options.governanceJson, "utf-8").then(JSON.parse);
|
|
321510
321530
|
if (gov.network !== this.#network) {
|
|
321511
321531
|
throw new Error(`governance file network mismatch: expected ${this.#network}, got ${gov.network}`);
|
|
321512
321532
|
}
|
|
@@ -321569,7 +321589,7 @@ var ProviderBase = class {
|
|
|
321569
321589
|
|
|
321570
321590
|
// ../../packages/node/dist/tree/GearboxAddressTree.js
|
|
321571
321591
|
import { mkdirSync as mkdirSync3 } from "node:fs";
|
|
321572
|
-
import { readFile as
|
|
321592
|
+
import { readFile as readFile5, writeFile as writeFile3 } from "node:fs/promises";
|
|
321573
321593
|
import path4 from "node:path";
|
|
321574
321594
|
var import_sdk_gov8 = __toESM(require_lib222(), 1);
|
|
321575
321595
|
|
|
@@ -323049,7 +323069,7 @@ var GearboxAddressTree = class _GearboxAddressTree extends ProviderBase {
|
|
|
323049
323069
|
return [];
|
|
323050
323070
|
}
|
|
323051
323071
|
try {
|
|
323052
|
-
const content = await
|
|
323072
|
+
const content = await readFile5(this.outFile, "utf-8").then(json_parse);
|
|
323053
323073
|
if (content.version !== _GearboxAddressTree.version) {
|
|
323054
323074
|
this.logger.warn(`ignoring cache file because it has version ${content.version}, but we need ${_GearboxAddressTree.version}`);
|
|
323055
323075
|
return [];
|
|
@@ -323145,103 +323165,13 @@ var GearboxAddressTree = class _GearboxAddressTree extends ProviderBase {
|
|
|
323145
323165
|
|
|
323146
323166
|
// ../../packages/node/dist/UpdateParser.js
|
|
323147
323167
|
import { mkdirSync as mkdirSync5 } from "node:fs";
|
|
323148
|
-
import {
|
|
323149
|
-
import
|
|
323150
|
-
|
|
323151
|
-
// ../../packages/node/dist/DeployResult.js
|
|
323152
|
-
import fs2 from "node:fs/promises";
|
|
323153
|
-
import path5 from "node:path";
|
|
323154
|
-
var DeployResult = class _DeployResult {
|
|
323155
|
-
governorBatches = [];
|
|
323156
|
-
routerBatches = [];
|
|
323157
|
-
#id;
|
|
323158
|
-
constructor(id3) {
|
|
323159
|
-
this.#id = id3;
|
|
323160
|
-
}
|
|
323161
|
-
static async loadFromFiles(outputDir) {
|
|
323162
|
-
const id3 = outputDir.split(path5.sep).pop();
|
|
323163
|
-
if (!id3) {
|
|
323164
|
-
throw new Error(`cannot make deploy result id for dir '${outputDir}'`);
|
|
323165
|
-
}
|
|
323166
|
-
const deployResult = new _DeployResult(id3);
|
|
323167
|
-
const batchesDir = path5.join(outputDir, "governor");
|
|
323168
|
-
const subfolders = await fs2.readdir(batchesDir);
|
|
323169
|
-
for (const subfolder of subfolders) {
|
|
323170
|
-
const queueBatches = await _DeployResult.loadMultisigBatches(path5.join(batchesDir, subfolder));
|
|
323171
|
-
deployResult.#addGovernorBatches([
|
|
323172
|
-
{
|
|
323173
|
-
name: subfolder,
|
|
323174
|
-
queue: queueBatches
|
|
323175
|
-
}
|
|
323176
|
-
]);
|
|
323177
|
-
}
|
|
323178
|
-
const routerDir = path5.join(outputDir, "router");
|
|
323179
|
-
const routerBatches = await _DeployResult.loadMultisigBatches(routerDir, "direct");
|
|
323180
|
-
deployResult.#addRouterBatches(routerBatches);
|
|
323181
|
-
return deployResult;
|
|
323182
|
-
}
|
|
323183
|
-
normalized() {
|
|
323184
|
-
return [
|
|
323185
|
-
...this.governorBatches.flatMap((b3) => this.#normalizeGovernorBatch(b3)),
|
|
323186
|
-
...this.routerBatches.flatMap((b3) => this.#normalizeRouterBatch(b3))
|
|
323187
|
-
];
|
|
323188
|
-
}
|
|
323189
|
-
#addGovernorBatches(batch) {
|
|
323190
|
-
batch.filter((b3) => b3 !== null).forEach((b3) => this.governorBatches.push(b3));
|
|
323191
|
-
}
|
|
323192
|
-
#addRouterBatches(batch) {
|
|
323193
|
-
batch.filter((b3) => b3 !== null).forEach((b3) => this.routerBatches.push(b3));
|
|
323194
|
-
}
|
|
323195
|
-
#normalizeGovernorBatch(batch) {
|
|
323196
|
-
return batch.queue.map((q) => ({
|
|
323197
|
-
id: path5.join(this.#id, batch.name, q.meta.name),
|
|
323198
|
-
description: "",
|
|
323199
|
-
// TODO
|
|
323200
|
-
type: "governor",
|
|
323201
|
-
transactions: normalizeTransactions(q)
|
|
323202
|
-
}));
|
|
323203
|
-
}
|
|
323204
|
-
#normalizeRouterBatch(batch) {
|
|
323205
|
-
return [
|
|
323206
|
-
{
|
|
323207
|
-
id: path5.join(this.#id, "router", batch.meta.name),
|
|
323208
|
-
description: "",
|
|
323209
|
-
// TODO
|
|
323210
|
-
type: "router",
|
|
323211
|
-
transactions: normalizeTransactions(batch)
|
|
323212
|
-
}
|
|
323213
|
-
];
|
|
323214
|
-
}
|
|
323215
|
-
/**
|
|
323216
|
-
* Load all batches from subfolder searching by type e.g. 00.queue.json
|
|
323217
|
-
* Used to load multisig queue batches to execute on anvil
|
|
323218
|
-
* or to load multisig execute batches when governor is not used yet,
|
|
323219
|
-
* aka to load timelock.setPendingAdmin execute batch
|
|
323220
|
-
*/
|
|
323221
|
-
static async loadMultisigBatches(fullDirPath, type = "queue") {
|
|
323222
|
-
try {
|
|
323223
|
-
await fs2.access(fullDirPath);
|
|
323224
|
-
} catch (e) {
|
|
323225
|
-
throw new Error(`Directory ${fullDirPath} not found`);
|
|
323226
|
-
}
|
|
323227
|
-
const files = await fs2.readdir(fullDirPath);
|
|
323228
|
-
const batches = [];
|
|
323229
|
-
for (const file of files) {
|
|
323230
|
-
const filePath = path5.join(fullDirPath, file);
|
|
323231
|
-
if (file.includes(`${type}.json`)) {
|
|
323232
|
-
const batch = JSON.parse(await fs2.readFile(filePath, "utf8"));
|
|
323233
|
-
batch.meta.name = file.replace(".json", "");
|
|
323234
|
-
batches.push(batch);
|
|
323235
|
-
}
|
|
323236
|
-
}
|
|
323237
|
-
return batches;
|
|
323238
|
-
}
|
|
323239
|
-
};
|
|
323168
|
+
import { stat } from "node:fs/promises";
|
|
323169
|
+
import path6 from "node:path";
|
|
323240
323170
|
|
|
323241
323171
|
// ../../packages/node/dist/meta/MetaRepo.js
|
|
323242
323172
|
import { mkdirSync as mkdirSync4 } from "node:fs";
|
|
323243
|
-
import { readFile as
|
|
323244
|
-
import
|
|
323173
|
+
import { readFile as readFile6 } from "node:fs/promises";
|
|
323174
|
+
import path5 from "node:path";
|
|
323245
323175
|
var META_REPO = "deploy-v3";
|
|
323246
323176
|
var MetaRepo = class {
|
|
323247
323177
|
#logger = log_default.getSubLogger({ name: "metarepo" });
|
|
@@ -323249,7 +323179,7 @@ var MetaRepo = class {
|
|
|
323249
323179
|
#meta = /* @__PURE__ */ new Map();
|
|
323250
323180
|
#network;
|
|
323251
323181
|
constructor(opts) {
|
|
323252
|
-
this.#dir =
|
|
323182
|
+
this.#dir = path5.resolve(opts.sandboxDir, "meta");
|
|
323253
323183
|
this.#network = opts.network;
|
|
323254
323184
|
}
|
|
323255
323185
|
getMeta(address) {
|
|
@@ -323269,7 +323199,7 @@ var MetaRepo = class {
|
|
|
323269
323199
|
repo: `@gearbox-protocol/${META_REPO}`,
|
|
323270
323200
|
sandboxDir: this.#dir
|
|
323271
323201
|
});
|
|
323272
|
-
const metaRoot =
|
|
323202
|
+
const metaRoot = path5.resolve(this.#dir, META_REPO, "deploy-state", this.#network.toLowerCase());
|
|
323273
323203
|
await this.loadFromDir(metaRoot);
|
|
323274
323204
|
}
|
|
323275
323205
|
/**
|
|
@@ -323280,9 +323210,9 @@ var MetaRepo = class {
|
|
|
323280
323210
|
const files = await readDirectory(metaRoot);
|
|
323281
323211
|
const before = this.#meta.size;
|
|
323282
323212
|
for (const f of files) {
|
|
323283
|
-
const fname =
|
|
323213
|
+
const fname = path5.basename(f, `.json`);
|
|
323284
323214
|
if (isAddress2(fname)) {
|
|
323285
|
-
const meta2 = await
|
|
323215
|
+
const meta2 = await readFile6(path5.resolve(metaRoot, f)).then(json_parse);
|
|
323286
323216
|
if (!meta2.encodedConstructorArgs.startsWith("0x")) {
|
|
323287
323217
|
throw new Error(`expect encodedConstructorArgs for ${fname} to start with '0x'`);
|
|
323288
323218
|
}
|
|
@@ -325589,14 +325519,14 @@ var UpdateParser = class extends ProviderBase {
|
|
|
325589
325519
|
constructor(options) {
|
|
325590
325520
|
super(options);
|
|
325591
325521
|
this.logger = this.logger.getSubLogger({ name: "parser" });
|
|
325592
|
-
this.#sandboxDir =
|
|
325522
|
+
this.#sandboxDir = path6.resolve(options.sandboxDir, "parser");
|
|
325593
325523
|
mkdirSync5(this.#sandboxDir, { recursive: true });
|
|
325594
325524
|
}
|
|
325595
325525
|
async init() {
|
|
325596
325526
|
await super.init();
|
|
325597
325527
|
this.#metaRepo = new MetaRepo({
|
|
325598
325528
|
network: this.network,
|
|
325599
|
-
sandboxDir:
|
|
325529
|
+
sandboxDir: path6.dirname(this.#sandboxDir)
|
|
325600
325530
|
});
|
|
325601
325531
|
}
|
|
325602
325532
|
async parse(opts) {
|
|
@@ -325627,14 +325557,7 @@ var UpdateParser = class extends ProviderBase {
|
|
|
325627
325557
|
if (!batchStat.isDirectory()) {
|
|
325628
325558
|
throw new Error(`'${dir}' is not a directory`);
|
|
325629
325559
|
}
|
|
325630
|
-
const
|
|
325631
|
-
const batches = [];
|
|
325632
|
-
for (const subdir of subdirs) {
|
|
325633
|
-
const fullDir = path7.join(dir, subdir);
|
|
325634
|
-
this.logger.trace(`loading deploy result from ${fullDir}`);
|
|
325635
|
-
const result = await DeployResult.loadFromFiles(fullDir);
|
|
325636
|
-
batches.push(...result.normalized());
|
|
325637
|
-
}
|
|
325560
|
+
const batches = await loadBatchDir(dir);
|
|
325638
325561
|
await this.metaRepo.loadFromDir(dir);
|
|
325639
325562
|
if (!batches?.length) {
|
|
325640
325563
|
throw new Error(`no batch files found in ${dir}`);
|
|
@@ -325821,7 +325744,7 @@ function addressTree() {
|
|
|
325821
325744
|
}
|
|
325822
325745
|
|
|
325823
325746
|
// src/commands/launch-forks.ts
|
|
325824
|
-
import { readFile as
|
|
325747
|
+
import { readFile as readFile7 } from "node:fs/promises";
|
|
325825
325748
|
function launchForks() {
|
|
325826
325749
|
return new Command().name("launch-forks").description("launches anvil-manager test forks from template json file").addOption(
|
|
325827
325750
|
new Option(
|
|
@@ -325840,7 +325763,7 @@ function launchForks() {
|
|
|
325840
325763
|
).default("")
|
|
325841
325764
|
).action(async (opts) => {
|
|
325842
325765
|
const { endpoint, apiKey, release, template } = opts;
|
|
325843
|
-
let raw = await
|
|
325766
|
+
let raw = await readFile7(template, "utf-8");
|
|
325844
325767
|
raw = raw.replace(/%release/g, release);
|
|
325845
325768
|
const requests = JSON.parse(raw);
|
|
325846
325769
|
if (!Array.isArray(requests)) {
|
|
@@ -326855,14 +326778,14 @@ function getTldr({ transactions }) {
|
|
|
326855
326778
|
var import_react = __toESM(require_react(), 1);
|
|
326856
326779
|
var import_server = __toESM(require_server_node(), 1);
|
|
326857
326780
|
import { writeFileSync } from "node:fs";
|
|
326858
|
-
import
|
|
326781
|
+
import path7 from "node:path";
|
|
326859
326782
|
var HtmlRenderer = class {
|
|
326860
326783
|
#htmlFile;
|
|
326861
326784
|
constructor(opts) {
|
|
326862
326785
|
if (!opts.htmlFile) {
|
|
326863
326786
|
throw new Error(`output HTML file not specified`);
|
|
326864
326787
|
}
|
|
326865
|
-
this.#htmlFile =
|
|
326788
|
+
this.#htmlFile = path7.resolve(opts.htmlFile);
|
|
326866
326789
|
}
|
|
326867
326790
|
render(updates) {
|
|
326868
326791
|
const html = (0, import_server.renderToString)(/* @__PURE__ */ import_react.default.createElement("div", null));
|
|
@@ -326985,7 +326908,7 @@ function updateEpoch() {
|
|
|
326985
326908
|
}
|
|
326986
326909
|
|
|
326987
326910
|
// src/commands/verify-etherscan.ts
|
|
326988
|
-
import { readFile as
|
|
326911
|
+
import { readFile as readFile8 } from "node:fs/promises";
|
|
326989
326912
|
function verifyEtherscan() {
|
|
326990
326913
|
return new Command().name("verify-etherscan").description(
|
|
326991
326914
|
"performs bulk verification of gearbox contracts using etherscan"
|
|
@@ -327005,7 +326928,7 @@ function verifyEtherscan() {
|
|
|
327005
326928
|
}
|
|
327006
326929
|
let addresses = opts.addresses ?? [];
|
|
327007
326930
|
if (addresses.length === 0 && opts.addressesFile) {
|
|
327008
|
-
const content = await
|
|
326931
|
+
const content = await readFile8(opts.addressesFile, "utf-8");
|
|
327009
326932
|
addresses = Object.keys(json_parse(content));
|
|
327010
326933
|
}
|
|
327011
326934
|
if (!addresses.length) {
|