@gearbox-protocol/deploy-tools 5.9.2 → 5.9.3
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 +531 -463
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1163,7 +1163,7 @@ var require_command = __commonJS({
|
|
|
1163
1163
|
"../../node_modules/commander/lib/command.js"(exports2) {
|
|
1164
1164
|
var EventEmitter = __require("node:events").EventEmitter;
|
|
1165
1165
|
var childProcess = __require("node:child_process");
|
|
1166
|
-
var
|
|
1166
|
+
var path12 = __require("node:path");
|
|
1167
1167
|
var fs3 = __require("node:fs");
|
|
1168
1168
|
var process3 = __require("node:process");
|
|
1169
1169
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
@@ -2163,9 +2163,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2163
2163
|
let launchWithNode = false;
|
|
2164
2164
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
2165
2165
|
function findFile(baseDir, baseName) {
|
|
2166
|
-
const localBin =
|
|
2166
|
+
const localBin = path12.resolve(baseDir, baseName);
|
|
2167
2167
|
if (fs3.existsSync(localBin)) return localBin;
|
|
2168
|
-
if (sourceExt.includes(
|
|
2168
|
+
if (sourceExt.includes(path12.extname(baseName))) return void 0;
|
|
2169
2169
|
const foundExt = sourceExt.find(
|
|
2170
2170
|
(ext) => fs3.existsSync(`${localBin}${ext}`)
|
|
2171
2171
|
);
|
|
@@ -2183,17 +2183,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2183
2183
|
} catch {
|
|
2184
2184
|
resolvedScriptPath = this._scriptPath;
|
|
2185
2185
|
}
|
|
2186
|
-
executableDir =
|
|
2187
|
-
|
|
2186
|
+
executableDir = path12.resolve(
|
|
2187
|
+
path12.dirname(resolvedScriptPath),
|
|
2188
2188
|
executableDir
|
|
2189
2189
|
);
|
|
2190
2190
|
}
|
|
2191
2191
|
if (executableDir) {
|
|
2192
2192
|
let localFile = findFile(executableDir, executableFile);
|
|
2193
2193
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
2194
|
-
const legacyName =
|
|
2194
|
+
const legacyName = path12.basename(
|
|
2195
2195
|
this._scriptPath,
|
|
2196
|
-
|
|
2196
|
+
path12.extname(this._scriptPath)
|
|
2197
2197
|
);
|
|
2198
2198
|
if (legacyName !== this._name) {
|
|
2199
2199
|
localFile = findFile(
|
|
@@ -2204,7 +2204,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2204
2204
|
}
|
|
2205
2205
|
executableFile = localFile || executableFile;
|
|
2206
2206
|
}
|
|
2207
|
-
launchWithNode = sourceExt.includes(
|
|
2207
|
+
launchWithNode = sourceExt.includes(path12.extname(executableFile));
|
|
2208
2208
|
let proc;
|
|
2209
2209
|
if (process3.platform !== "win32") {
|
|
2210
2210
|
if (launchWithNode) {
|
|
@@ -3051,7 +3051,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3051
3051
|
* @return {Command}
|
|
3052
3052
|
*/
|
|
3053
3053
|
nameFromFilename(filename) {
|
|
3054
|
-
this._name =
|
|
3054
|
+
this._name = path12.basename(filename, path12.extname(filename));
|
|
3055
3055
|
return this;
|
|
3056
3056
|
}
|
|
3057
3057
|
/**
|
|
@@ -3065,9 +3065,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3065
3065
|
* @param {string} [path]
|
|
3066
3066
|
* @return {(string|null|Command)}
|
|
3067
3067
|
*/
|
|
3068
|
-
executableDir(
|
|
3069
|
-
if (
|
|
3070
|
-
this._executableDir =
|
|
3068
|
+
executableDir(path13) {
|
|
3069
|
+
if (path13 === void 0) return this._executableDir;
|
|
3070
|
+
this._executableDir = path13;
|
|
3071
3071
|
return this;
|
|
3072
3072
|
}
|
|
3073
3073
|
/**
|
|
@@ -17513,12 +17513,12 @@ var require_abstract_coder = __commonJS({
|
|
|
17513
17513
|
var logger2 = new logger_1.Logger(_version_1.version);
|
|
17514
17514
|
function checkResultErrors(result) {
|
|
17515
17515
|
var errors = [];
|
|
17516
|
-
var checkErrors = function(
|
|
17516
|
+
var checkErrors = function(path12, object) {
|
|
17517
17517
|
if (!Array.isArray(object)) {
|
|
17518
17518
|
return;
|
|
17519
17519
|
}
|
|
17520
17520
|
for (var key in object) {
|
|
17521
|
-
var childPath =
|
|
17521
|
+
var childPath = path12.slice();
|
|
17522
17522
|
childPath.push(key);
|
|
17523
17523
|
try {
|
|
17524
17524
|
checkErrors(childPath, object[key]);
|
|
@@ -31555,9 +31555,9 @@ var require_lib20 = __commonJS({
|
|
|
31555
31555
|
if (index2 > 4294967295) {
|
|
31556
31556
|
throw new Error("invalid index - " + String(index2));
|
|
31557
31557
|
}
|
|
31558
|
-
var
|
|
31559
|
-
if (
|
|
31560
|
-
|
|
31558
|
+
var path12 = this.path;
|
|
31559
|
+
if (path12) {
|
|
31560
|
+
path12 += "/" + (index2 & ~HardenedBit);
|
|
31561
31561
|
}
|
|
31562
31562
|
var data = new Uint8Array(37);
|
|
31563
31563
|
if (index2 & HardenedBit) {
|
|
@@ -31565,8 +31565,8 @@ var require_lib20 = __commonJS({
|
|
|
31565
31565
|
throw new Error("cannot derive child of neutered node");
|
|
31566
31566
|
}
|
|
31567
31567
|
data.set((0, bytes_1.arrayify)(this.privateKey), 1);
|
|
31568
|
-
if (
|
|
31569
|
-
|
|
31568
|
+
if (path12) {
|
|
31569
|
+
path12 += "'";
|
|
31570
31570
|
}
|
|
31571
31571
|
} else {
|
|
31572
31572
|
data.set((0, bytes_1.arrayify)(this.publicKey));
|
|
@@ -31585,21 +31585,21 @@ var require_lib20 = __commonJS({
|
|
|
31585
31585
|
var ek = new signing_key_1.SigningKey((0, bytes_1.hexlify)(IL));
|
|
31586
31586
|
Ki = ek._addPoint(this.publicKey);
|
|
31587
31587
|
}
|
|
31588
|
-
var mnemonicOrPath =
|
|
31588
|
+
var mnemonicOrPath = path12;
|
|
31589
31589
|
var srcMnemonic = this.mnemonic;
|
|
31590
31590
|
if (srcMnemonic) {
|
|
31591
31591
|
mnemonicOrPath = Object.freeze({
|
|
31592
31592
|
phrase: srcMnemonic.phrase,
|
|
31593
|
-
path:
|
|
31593
|
+
path: path12,
|
|
31594
31594
|
locale: srcMnemonic.locale || "en"
|
|
31595
31595
|
});
|
|
31596
31596
|
}
|
|
31597
31597
|
return new HDNode2(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index2, this.depth + 1, mnemonicOrPath);
|
|
31598
31598
|
};
|
|
31599
|
-
HDNode2.prototype.derivePath = function(
|
|
31600
|
-
var components =
|
|
31599
|
+
HDNode2.prototype.derivePath = function(path12) {
|
|
31600
|
+
var components = path12.split("/");
|
|
31601
31601
|
if (components.length === 0 || components[0] === "m" && this.depth !== 0) {
|
|
31602
|
-
throw new Error("invalid path - " +
|
|
31602
|
+
throw new Error("invalid path - " + path12);
|
|
31603
31603
|
}
|
|
31604
31604
|
if (components[0] === "m") {
|
|
31605
31605
|
components.shift();
|
|
@@ -32353,9 +32353,9 @@ var require_utils4 = __commonJS({
|
|
|
32353
32353
|
return (0, bytes_1.arrayify)(password);
|
|
32354
32354
|
}
|
|
32355
32355
|
exports2.getPassword = getPassword;
|
|
32356
|
-
function searchPath(object,
|
|
32356
|
+
function searchPath(object, path12) {
|
|
32357
32357
|
var currentChild = object;
|
|
32358
|
-
var comps =
|
|
32358
|
+
var comps = path12.toLowerCase().split("/");
|
|
32359
32359
|
for (var i = 0; i < comps.length; i++) {
|
|
32360
32360
|
var matchingChild = null;
|
|
32361
32361
|
for (var key in currentChild) {
|
|
@@ -33242,12 +33242,12 @@ var require_keystore = __commonJS({
|
|
|
33242
33242
|
var mnemonicIv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "x-ethers/mnemonicCounter"));
|
|
33243
33243
|
var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);
|
|
33244
33244
|
var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);
|
|
33245
|
-
var
|
|
33245
|
+
var path12 = (0, utils_1.searchPath)(data, "x-ethers/path") || hdnode_1.defaultPath;
|
|
33246
33246
|
var locale = (0, utils_1.searchPath)(data, "x-ethers/locale") || "en";
|
|
33247
33247
|
var entropy = (0, bytes_1.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext));
|
|
33248
33248
|
try {
|
|
33249
33249
|
var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, locale);
|
|
33250
|
-
var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(
|
|
33250
|
+
var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path12);
|
|
33251
33251
|
if (node.privateKey != account.privateKey) {
|
|
33252
33252
|
throw new Error("mnemonic mismatch");
|
|
33253
33253
|
}
|
|
@@ -33357,12 +33357,12 @@ var require_keystore = __commonJS({
|
|
|
33357
33357
|
var privateKey = (0, bytes_1.arrayify)(account.privateKey);
|
|
33358
33358
|
var passwordBytes = (0, utils_1.getPassword)(password);
|
|
33359
33359
|
var entropy = null;
|
|
33360
|
-
var
|
|
33360
|
+
var path12 = null;
|
|
33361
33361
|
var locale = null;
|
|
33362
33362
|
if (hasMnemonic(account)) {
|
|
33363
33363
|
var srcMnemonic = account.mnemonic;
|
|
33364
33364
|
entropy = (0, bytes_1.arrayify)((0, hdnode_1.mnemonicToEntropy)(srcMnemonic.phrase, srcMnemonic.locale || "en"));
|
|
33365
|
-
|
|
33365
|
+
path12 = srcMnemonic.path || hdnode_1.defaultPath;
|
|
33366
33366
|
locale = srcMnemonic.locale || "en";
|
|
33367
33367
|
}
|
|
33368
33368
|
var client = options.client;
|
|
@@ -33448,7 +33448,7 @@ var require_keystore = __commonJS({
|
|
|
33448
33448
|
gethFilename: "UTC--" + timestamp + "--" + data.address,
|
|
33449
33449
|
mnemonicCounter: (0, bytes_1.hexlify)(mnemonicIv).substring(2),
|
|
33450
33450
|
mnemonicCiphertext: (0, bytes_1.hexlify)(mnemonicCiphertext).substring(2),
|
|
33451
|
-
path:
|
|
33451
|
+
path: path12,
|
|
33452
33452
|
locale,
|
|
33453
33453
|
version: "0.1"
|
|
33454
33454
|
};
|
|
@@ -34815,11 +34815,11 @@ var require_lib27 = __commonJS({
|
|
|
34815
34815
|
Wallet2.fromEncryptedJsonSync = function(json, password) {
|
|
34816
34816
|
return new Wallet2((0, json_wallets_1.decryptJsonWalletSync)(json, password));
|
|
34817
34817
|
};
|
|
34818
|
-
Wallet2.fromMnemonic = function(mnemonic,
|
|
34819
|
-
if (!
|
|
34820
|
-
|
|
34818
|
+
Wallet2.fromMnemonic = function(mnemonic, path12, wordlist) {
|
|
34819
|
+
if (!path12) {
|
|
34820
|
+
path12 = hdnode_1.defaultPath;
|
|
34821
34821
|
}
|
|
34822
|
-
return new Wallet2(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(
|
|
34822
|
+
return new Wallet2(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path12));
|
|
34823
34823
|
};
|
|
34824
34824
|
return Wallet2;
|
|
34825
34825
|
}(abstract_signer_1.Signer)
|
|
@@ -46882,13 +46882,13 @@ var require_ipc_provider = __commonJS({
|
|
|
46882
46882
|
/** @class */
|
|
46883
46883
|
function(_super) {
|
|
46884
46884
|
__extends4(IpcProvider2, _super);
|
|
46885
|
-
function IpcProvider2(
|
|
46885
|
+
function IpcProvider2(path12, network) {
|
|
46886
46886
|
var _this = this;
|
|
46887
|
-
if (
|
|
46887
|
+
if (path12 == null) {
|
|
46888
46888
|
logger2.throwError("missing path", logger_1.Logger.errors.MISSING_ARGUMENT, { arg: "path" });
|
|
46889
46889
|
}
|
|
46890
|
-
_this = _super.call(this, "ipc://" +
|
|
46891
|
-
(0, properties_1.defineReadOnly)(_this, "path",
|
|
46890
|
+
_this = _super.call(this, "ipc://" + path12, network) || this;
|
|
46891
|
+
(0, properties_1.defineReadOnly)(_this, "path", path12);
|
|
46892
46892
|
return _this;
|
|
46893
46893
|
}
|
|
46894
46894
|
IpcProvider2.prototype.send = function(method, params) {
|
|
@@ -47487,21 +47487,21 @@ var require_web3_provider = __commonJS({
|
|
|
47487
47487
|
if (provider == null) {
|
|
47488
47488
|
logger2.throwArgumentError("missing provider", "provider", provider);
|
|
47489
47489
|
}
|
|
47490
|
-
var
|
|
47490
|
+
var path12 = null;
|
|
47491
47491
|
var jsonRpcFetchFunc = null;
|
|
47492
47492
|
var subprovider = null;
|
|
47493
47493
|
if (typeof provider === "function") {
|
|
47494
|
-
|
|
47494
|
+
path12 = "unknown:";
|
|
47495
47495
|
jsonRpcFetchFunc = provider;
|
|
47496
47496
|
} else {
|
|
47497
|
-
|
|
47498
|
-
if (!
|
|
47499
|
-
|
|
47497
|
+
path12 = provider.host || provider.path || "";
|
|
47498
|
+
if (!path12 && provider.isMetaMask) {
|
|
47499
|
+
path12 = "metamask";
|
|
47500
47500
|
}
|
|
47501
47501
|
subprovider = provider;
|
|
47502
47502
|
if (provider.request) {
|
|
47503
|
-
if (
|
|
47504
|
-
|
|
47503
|
+
if (path12 === "") {
|
|
47504
|
+
path12 = "eip-1193:";
|
|
47505
47505
|
}
|
|
47506
47506
|
jsonRpcFetchFunc = buildEip1193Fetcher(provider);
|
|
47507
47507
|
} else if (provider.sendAsync) {
|
|
@@ -47511,11 +47511,11 @@ var require_web3_provider = __commonJS({
|
|
|
47511
47511
|
} else {
|
|
47512
47512
|
logger2.throwArgumentError("unsupported provider", "provider", provider);
|
|
47513
47513
|
}
|
|
47514
|
-
if (!
|
|
47515
|
-
|
|
47514
|
+
if (!path12) {
|
|
47515
|
+
path12 = "unknown:";
|
|
47516
47516
|
}
|
|
47517
47517
|
}
|
|
47518
|
-
_this = _super.call(this,
|
|
47518
|
+
_this = _super.call(this, path12, network) || this;
|
|
47519
47519
|
(0, properties_1.defineReadOnly)(_this, "jsonRpcFetchFunc", jsonRpcFetchFunc);
|
|
47520
47520
|
(0, properties_1.defineReadOnly)(_this, "provider", subprovider);
|
|
47521
47521
|
return _this;
|
|
@@ -50245,7 +50245,7 @@ var require_data_point_deserializer = __commonJS({
|
|
|
50245
50245
|
var require_node_gyp_build = __commonJS({
|
|
50246
50246
|
"../../node_modules/node-gyp-build/node-gyp-build.js"(exports2, module2) {
|
|
50247
50247
|
var fs3 = __require("fs");
|
|
50248
|
-
var
|
|
50248
|
+
var path12 = __require("path");
|
|
50249
50249
|
var os2 = __require("os");
|
|
50250
50250
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
50251
50251
|
var vars = process.config && process.config.variables || {};
|
|
@@ -50262,21 +50262,21 @@ var require_node_gyp_build = __commonJS({
|
|
|
50262
50262
|
return runtimeRequire(load.resolve(dir));
|
|
50263
50263
|
}
|
|
50264
50264
|
load.resolve = load.path = function(dir) {
|
|
50265
|
-
dir =
|
|
50265
|
+
dir = path12.resolve(dir || ".");
|
|
50266
50266
|
try {
|
|
50267
|
-
var name = runtimeRequire(
|
|
50267
|
+
var name = runtimeRequire(path12.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
|
|
50268
50268
|
if (process.env[name + "_PREBUILD"]) dir = process.env[name + "_PREBUILD"];
|
|
50269
50269
|
} catch (err) {
|
|
50270
50270
|
}
|
|
50271
50271
|
if (!prebuildsOnly) {
|
|
50272
|
-
var release = getFirst(
|
|
50272
|
+
var release = getFirst(path12.join(dir, "build/Release"), matchBuild);
|
|
50273
50273
|
if (release) return release;
|
|
50274
|
-
var debug = getFirst(
|
|
50274
|
+
var debug = getFirst(path12.join(dir, "build/Debug"), matchBuild);
|
|
50275
50275
|
if (debug) return debug;
|
|
50276
50276
|
}
|
|
50277
50277
|
var prebuild = resolve2(dir);
|
|
50278
50278
|
if (prebuild) return prebuild;
|
|
50279
|
-
var nearby = resolve2(
|
|
50279
|
+
var nearby = resolve2(path12.dirname(process.execPath));
|
|
50280
50280
|
if (nearby) return nearby;
|
|
50281
50281
|
var target = [
|
|
50282
50282
|
"platform=" + platform,
|
|
@@ -50293,14 +50293,14 @@ var require_node_gyp_build = __commonJS({
|
|
|
50293
50293
|
].filter(Boolean).join(" ");
|
|
50294
50294
|
throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
|
|
50295
50295
|
function resolve2(dir2) {
|
|
50296
|
-
var tuples = readdirSync(
|
|
50296
|
+
var tuples = readdirSync(path12.join(dir2, "prebuilds")).map(parseTuple);
|
|
50297
50297
|
var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
50298
50298
|
if (!tuple) return;
|
|
50299
|
-
var prebuilds =
|
|
50299
|
+
var prebuilds = path12.join(dir2, "prebuilds", tuple.name);
|
|
50300
50300
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
50301
50301
|
var candidates = parsed.filter(matchTags(runtime, abi33));
|
|
50302
50302
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
50303
|
-
if (winner) return
|
|
50303
|
+
if (winner) return path12.join(prebuilds, winner.file);
|
|
50304
50304
|
}
|
|
50305
50305
|
};
|
|
50306
50306
|
function readdirSync(dir) {
|
|
@@ -50312,7 +50312,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
50312
50312
|
}
|
|
50313
50313
|
function getFirst(dir, filter) {
|
|
50314
50314
|
var files = readdirSync(dir).filter(filter);
|
|
50315
|
-
return files[0] &&
|
|
50315
|
+
return files[0] && path12.join(dir, files[0]);
|
|
50316
50316
|
}
|
|
50317
50317
|
function matchBuild(name) {
|
|
50318
50318
|
return /\.node$/.test(name);
|
|
@@ -63919,11 +63919,11 @@ var require_mime_types = __commonJS({
|
|
|
63919
63919
|
}
|
|
63920
63920
|
return exts[0];
|
|
63921
63921
|
}
|
|
63922
|
-
function lookup(
|
|
63923
|
-
if (!
|
|
63922
|
+
function lookup(path12) {
|
|
63923
|
+
if (!path12 || typeof path12 !== "string") {
|
|
63924
63924
|
return false;
|
|
63925
63925
|
}
|
|
63926
|
-
var extension2 = extname("x." +
|
|
63926
|
+
var extension2 = extname("x." + path12).toLowerCase().substr(1);
|
|
63927
63927
|
if (!extension2) {
|
|
63928
63928
|
return false;
|
|
63929
63929
|
}
|
|
@@ -64180,7 +64180,7 @@ var require_form_data = __commonJS({
|
|
|
64180
64180
|
"../../node_modules/form-data/lib/form_data.js"(exports2, module2) {
|
|
64181
64181
|
var CombinedStream = require_combined_stream();
|
|
64182
64182
|
var util2 = __require("util");
|
|
64183
|
-
var
|
|
64183
|
+
var path12 = __require("path");
|
|
64184
64184
|
var http2 = __require("http");
|
|
64185
64185
|
var https = __require("https");
|
|
64186
64186
|
var parseUrl = __require("url").parse;
|
|
@@ -64306,11 +64306,11 @@ var require_form_data = __commonJS({
|
|
|
64306
64306
|
FormData2.prototype._getContentDisposition = function(value, options) {
|
|
64307
64307
|
var filename, contentDisposition;
|
|
64308
64308
|
if (typeof options.filepath === "string") {
|
|
64309
|
-
filename =
|
|
64309
|
+
filename = path12.normalize(options.filepath).replace(/\\/g, "/");
|
|
64310
64310
|
} else if (options.filename || value.name || value.path) {
|
|
64311
|
-
filename =
|
|
64311
|
+
filename = path12.basename(options.filename || value.name || value.path);
|
|
64312
64312
|
} else if (value.readable && value.hasOwnProperty("httpVersion")) {
|
|
64313
|
-
filename =
|
|
64313
|
+
filename = path12.basename(value.client._httpMessage.path || "");
|
|
64314
64314
|
}
|
|
64315
64315
|
if (filename) {
|
|
64316
64316
|
contentDisposition = 'filename="' + filename + '"';
|
|
@@ -66324,9 +66324,9 @@ var require_axios = __commonJS({
|
|
|
66324
66324
|
function removeBrackets(key) {
|
|
66325
66325
|
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
66326
66326
|
}
|
|
66327
|
-
function renderKey(
|
|
66328
|
-
if (!
|
|
66329
|
-
return
|
|
66327
|
+
function renderKey(path12, key, dots) {
|
|
66328
|
+
if (!path12) return key;
|
|
66329
|
+
return path12.concat(key).map(function each(token, i) {
|
|
66330
66330
|
token = removeBrackets(token);
|
|
66331
66331
|
return !dots && i ? "[" + token + "]" : token;
|
|
66332
66332
|
}).join(dots ? "." : "");
|
|
@@ -66371,9 +66371,9 @@ var require_axios = __commonJS({
|
|
|
66371
66371
|
}
|
|
66372
66372
|
return value;
|
|
66373
66373
|
}
|
|
66374
|
-
function defaultVisitor(value, key,
|
|
66374
|
+
function defaultVisitor(value, key, path12) {
|
|
66375
66375
|
let arr = value;
|
|
66376
|
-
if (value && !
|
|
66376
|
+
if (value && !path12 && typeof value === "object") {
|
|
66377
66377
|
if (utils$1.endsWith(key, "{}")) {
|
|
66378
66378
|
key = metaTokens ? key : key.slice(0, -2);
|
|
66379
66379
|
value = JSON.stringify(value);
|
|
@@ -66392,7 +66392,7 @@ var require_axios = __commonJS({
|
|
|
66392
66392
|
if (isVisitable(value)) {
|
|
66393
66393
|
return true;
|
|
66394
66394
|
}
|
|
66395
|
-
formData.append(renderKey(
|
|
66395
|
+
formData.append(renderKey(path12, key, dots), convertValue(value));
|
|
66396
66396
|
return false;
|
|
66397
66397
|
}
|
|
66398
66398
|
const stack = [];
|
|
@@ -66401,10 +66401,10 @@ var require_axios = __commonJS({
|
|
|
66401
66401
|
convertValue,
|
|
66402
66402
|
isVisitable
|
|
66403
66403
|
});
|
|
66404
|
-
function build(value,
|
|
66404
|
+
function build(value, path12) {
|
|
66405
66405
|
if (utils$1.isUndefined(value)) return;
|
|
66406
66406
|
if (stack.indexOf(value) !== -1) {
|
|
66407
|
-
throw Error("Circular reference detected in " +
|
|
66407
|
+
throw Error("Circular reference detected in " + path12.join("."));
|
|
66408
66408
|
}
|
|
66409
66409
|
stack.push(value);
|
|
66410
66410
|
utils$1.forEach(value, function each(el, key) {
|
|
@@ -66412,11 +66412,11 @@ var require_axios = __commonJS({
|
|
|
66412
66412
|
formData,
|
|
66413
66413
|
el,
|
|
66414
66414
|
utils$1.isString(key) ? key.trim() : key,
|
|
66415
|
-
|
|
66415
|
+
path12,
|
|
66416
66416
|
exposedHelpers
|
|
66417
66417
|
);
|
|
66418
66418
|
if (result === true) {
|
|
66419
|
-
build(el,
|
|
66419
|
+
build(el, path12 ? path12.concat(key) : [key]);
|
|
66420
66420
|
}
|
|
66421
66421
|
});
|
|
66422
66422
|
stack.pop();
|
|
@@ -66585,7 +66585,7 @@ var require_axios = __commonJS({
|
|
|
66585
66585
|
};
|
|
66586
66586
|
function toURLEncodedForm(data, options) {
|
|
66587
66587
|
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
66588
|
-
visitor: function(value, key,
|
|
66588
|
+
visitor: function(value, key, path12, helpers) {
|
|
66589
66589
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
66590
66590
|
this.append(key, value.toString("base64"));
|
|
66591
66591
|
return false;
|
|
@@ -66612,11 +66612,11 @@ var require_axios = __commonJS({
|
|
|
66612
66612
|
return obj;
|
|
66613
66613
|
}
|
|
66614
66614
|
function formDataToJSON(formData) {
|
|
66615
|
-
function buildPath(
|
|
66616
|
-
let name =
|
|
66615
|
+
function buildPath(path12, value, target, index2) {
|
|
66616
|
+
let name = path12[index2++];
|
|
66617
66617
|
if (name === "__proto__") return true;
|
|
66618
66618
|
const isNumericKey = Number.isFinite(+name);
|
|
66619
|
-
const isLast = index2 >=
|
|
66619
|
+
const isLast = index2 >= path12.length;
|
|
66620
66620
|
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
66621
66621
|
if (isLast) {
|
|
66622
66622
|
if (utils$1.hasOwnProp(target, name)) {
|
|
@@ -66629,7 +66629,7 @@ var require_axios = __commonJS({
|
|
|
66629
66629
|
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
66630
66630
|
target[name] = [];
|
|
66631
66631
|
}
|
|
66632
|
-
const result = buildPath(
|
|
66632
|
+
const result = buildPath(path12, value, target[name], index2);
|
|
66633
66633
|
if (result && utils$1.isArray(target[name])) {
|
|
66634
66634
|
target[name] = arrayToObject(target[name]);
|
|
66635
66635
|
}
|
|
@@ -67687,9 +67687,9 @@ var require_axios = __commonJS({
|
|
|
67687
67687
|
auth = urlUsername + ":" + urlPassword;
|
|
67688
67688
|
}
|
|
67689
67689
|
auth && headers.delete("authorization");
|
|
67690
|
-
let
|
|
67690
|
+
let path12;
|
|
67691
67691
|
try {
|
|
67692
|
-
|
|
67692
|
+
path12 = buildURL(
|
|
67693
67693
|
parsed.pathname + parsed.search,
|
|
67694
67694
|
config.params,
|
|
67695
67695
|
config.paramsSerializer
|
|
@@ -67707,7 +67707,7 @@ var require_axios = __commonJS({
|
|
|
67707
67707
|
false
|
|
67708
67708
|
);
|
|
67709
67709
|
const options = {
|
|
67710
|
-
path:
|
|
67710
|
+
path: path12,
|
|
67711
67711
|
method,
|
|
67712
67712
|
headers: headers.toJSON(),
|
|
67713
67713
|
agents: { http: config.httpAgent, https: config.httpsAgent },
|
|
@@ -67933,10 +67933,10 @@ var require_axios = __commonJS({
|
|
|
67933
67933
|
var cookies = platform.hasStandardBrowserEnv ? (
|
|
67934
67934
|
// Standard browser envs support document.cookie
|
|
67935
67935
|
{
|
|
67936
|
-
write(name, value, expires,
|
|
67936
|
+
write(name, value, expires, path12, domain, secure) {
|
|
67937
67937
|
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
67938
67938
|
utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
67939
|
-
utils$1.isString(
|
|
67939
|
+
utils$1.isString(path12) && cookie.push("path=" + path12);
|
|
67940
67940
|
utils$1.isString(domain) && cookie.push("domain=" + domain);
|
|
67941
67941
|
secure === true && cookie.push("secure");
|
|
67942
67942
|
document.cookie = cookie.join("; ");
|
|
@@ -70478,8 +70478,8 @@ var require_parseUtil = __commonJS({
|
|
|
70478
70478
|
var errors_1 = require_errors();
|
|
70479
70479
|
var en_1 = __importDefault4(require_en());
|
|
70480
70480
|
var makeIssue2 = (params) => {
|
|
70481
|
-
const { data, path:
|
|
70482
|
-
const fullPath = [...
|
|
70481
|
+
const { data, path: path12, errorMaps, issueData } = params;
|
|
70482
|
+
const fullPath = [...path12, ...issueData.path || []];
|
|
70483
70483
|
const fullIssue = {
|
|
70484
70484
|
...issueData,
|
|
70485
70485
|
path: fullPath
|
|
@@ -70645,11 +70645,11 @@ var require_types3 = __commonJS({
|
|
|
70645
70645
|
var util_1 = require_util();
|
|
70646
70646
|
var ZodError_1 = require_ZodError();
|
|
70647
70647
|
var ParseInputLazyPath2 = class {
|
|
70648
|
-
constructor(parent, value,
|
|
70648
|
+
constructor(parent, value, path12, key) {
|
|
70649
70649
|
this._cachedPath = [];
|
|
70650
70650
|
this.parent = parent;
|
|
70651
70651
|
this.data = value;
|
|
70652
|
-
this._path =
|
|
70652
|
+
this._path = path12;
|
|
70653
70653
|
this._key = key;
|
|
70654
70654
|
}
|
|
70655
70655
|
get path() {
|
|
@@ -77259,11 +77259,11 @@ var require_lodash = __commonJS({
|
|
|
77259
77259
|
return isFunction2(object[key]);
|
|
77260
77260
|
});
|
|
77261
77261
|
}
|
|
77262
|
-
function baseGet2(object,
|
|
77263
|
-
|
|
77264
|
-
var index2 = 0, length =
|
|
77262
|
+
function baseGet2(object, path12) {
|
|
77263
|
+
path12 = castPath2(path12, object);
|
|
77264
|
+
var index2 = 0, length = path12.length;
|
|
77265
77265
|
while (object != null && index2 < length) {
|
|
77266
|
-
object = object[toKey2(
|
|
77266
|
+
object = object[toKey2(path12[index2++])];
|
|
77267
77267
|
}
|
|
77268
77268
|
return index2 && index2 == length ? object : undefined2;
|
|
77269
77269
|
}
|
|
@@ -77327,10 +77327,10 @@ var require_lodash = __commonJS({
|
|
|
77327
77327
|
});
|
|
77328
77328
|
return accumulator;
|
|
77329
77329
|
}
|
|
77330
|
-
function baseInvoke(object,
|
|
77331
|
-
|
|
77332
|
-
object = parent(object,
|
|
77333
|
-
var func = object == null ? object : object[toKey2(last(
|
|
77330
|
+
function baseInvoke(object, path12, args) {
|
|
77331
|
+
path12 = castPath2(path12, object);
|
|
77332
|
+
object = parent(object, path12);
|
|
77333
|
+
var func = object == null ? object : object[toKey2(last(path12))];
|
|
77334
77334
|
return func == null ? undefined2 : apply(func, object, args);
|
|
77335
77335
|
}
|
|
77336
77336
|
function baseIsArguments2(value) {
|
|
@@ -77486,13 +77486,13 @@ var require_lodash = __commonJS({
|
|
|
77486
77486
|
return object === source || baseIsMatch2(object, source, matchData);
|
|
77487
77487
|
};
|
|
77488
77488
|
}
|
|
77489
|
-
function baseMatchesProperty2(
|
|
77490
|
-
if (isKey2(
|
|
77491
|
-
return matchesStrictComparable2(toKey2(
|
|
77489
|
+
function baseMatchesProperty2(path12, srcValue) {
|
|
77490
|
+
if (isKey2(path12) && isStrictComparable2(srcValue)) {
|
|
77491
|
+
return matchesStrictComparable2(toKey2(path12), srcValue);
|
|
77492
77492
|
}
|
|
77493
77493
|
return function(object) {
|
|
77494
|
-
var objValue = get2(object,
|
|
77495
|
-
return objValue === undefined2 && objValue === srcValue ? hasIn2(object,
|
|
77494
|
+
var objValue = get2(object, path12);
|
|
77495
|
+
return objValue === undefined2 && objValue === srcValue ? hasIn2(object, path12) : baseIsEqual2(srcValue, objValue, COMPARE_PARTIAL_FLAG7 | COMPARE_UNORDERED_FLAG5);
|
|
77496
77496
|
};
|
|
77497
77497
|
}
|
|
77498
77498
|
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
@@ -77589,23 +77589,23 @@ var require_lodash = __commonJS({
|
|
|
77589
77589
|
});
|
|
77590
77590
|
}
|
|
77591
77591
|
function basePick(object, paths) {
|
|
77592
|
-
return basePickBy(object, paths, function(value,
|
|
77593
|
-
return hasIn2(object,
|
|
77592
|
+
return basePickBy(object, paths, function(value, path12) {
|
|
77593
|
+
return hasIn2(object, path12);
|
|
77594
77594
|
});
|
|
77595
77595
|
}
|
|
77596
77596
|
function basePickBy(object, paths, predicate) {
|
|
77597
77597
|
var index2 = -1, length = paths.length, result2 = {};
|
|
77598
77598
|
while (++index2 < length) {
|
|
77599
|
-
var
|
|
77600
|
-
if (predicate(value,
|
|
77601
|
-
baseSet(result2, castPath2(
|
|
77599
|
+
var path12 = paths[index2], value = baseGet2(object, path12);
|
|
77600
|
+
if (predicate(value, path12)) {
|
|
77601
|
+
baseSet(result2, castPath2(path12, object), value);
|
|
77602
77602
|
}
|
|
77603
77603
|
}
|
|
77604
77604
|
return result2;
|
|
77605
77605
|
}
|
|
77606
|
-
function basePropertyDeep2(
|
|
77606
|
+
function basePropertyDeep2(path12) {
|
|
77607
77607
|
return function(object) {
|
|
77608
|
-
return baseGet2(object,
|
|
77608
|
+
return baseGet2(object, path12);
|
|
77609
77609
|
};
|
|
77610
77610
|
}
|
|
77611
77611
|
function basePullAll(array, values2, iteratee2, comparator) {
|
|
@@ -77679,14 +77679,14 @@ var require_lodash = __commonJS({
|
|
|
77679
77679
|
var array = values(collection);
|
|
77680
77680
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
77681
77681
|
}
|
|
77682
|
-
function baseSet(object,
|
|
77682
|
+
function baseSet(object, path12, value, customizer) {
|
|
77683
77683
|
if (!isObject2(object)) {
|
|
77684
77684
|
return object;
|
|
77685
77685
|
}
|
|
77686
|
-
|
|
77687
|
-
var index2 = -1, length =
|
|
77686
|
+
path12 = castPath2(path12, object);
|
|
77687
|
+
var index2 = -1, length = path12.length, lastIndex = length - 1, nested = object;
|
|
77688
77688
|
while (nested != null && ++index2 < length) {
|
|
77689
|
-
var key = toKey2(
|
|
77689
|
+
var key = toKey2(path12[index2]), newValue = value;
|
|
77690
77690
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
77691
77691
|
return object;
|
|
77692
77692
|
}
|
|
@@ -77694,7 +77694,7 @@ var require_lodash = __commonJS({
|
|
|
77694
77694
|
var objValue = nested[key];
|
|
77695
77695
|
newValue = customizer ? customizer(objValue, key, nested) : undefined2;
|
|
77696
77696
|
if (newValue === undefined2) {
|
|
77697
|
-
newValue = isObject2(objValue) ? objValue : isIndex2(
|
|
77697
|
+
newValue = isObject2(objValue) ? objValue : isIndex2(path12[index2 + 1]) ? [] : {};
|
|
77698
77698
|
}
|
|
77699
77699
|
}
|
|
77700
77700
|
assignValue(nested, key, newValue);
|
|
@@ -77860,13 +77860,13 @@ var require_lodash = __commonJS({
|
|
|
77860
77860
|
}
|
|
77861
77861
|
return result2;
|
|
77862
77862
|
}
|
|
77863
|
-
function baseUnset(object,
|
|
77864
|
-
|
|
77865
|
-
object = parent(object,
|
|
77866
|
-
return object == null || delete object[toKey2(last(
|
|
77863
|
+
function baseUnset(object, path12) {
|
|
77864
|
+
path12 = castPath2(path12, object);
|
|
77865
|
+
object = parent(object, path12);
|
|
77866
|
+
return object == null || delete object[toKey2(last(path12))];
|
|
77867
77867
|
}
|
|
77868
|
-
function baseUpdate(object,
|
|
77869
|
-
return baseSet(object,
|
|
77868
|
+
function baseUpdate(object, path12, updater, customizer) {
|
|
77869
|
+
return baseSet(object, path12, updater(baseGet2(object, path12)), customizer);
|
|
77870
77870
|
}
|
|
77871
77871
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
77872
77872
|
var length = array.length, index2 = fromRight ? length : -1;
|
|
@@ -78749,11 +78749,11 @@ var require_lodash = __commonJS({
|
|
|
78749
78749
|
var match2 = source.match(reWrapDetails);
|
|
78750
78750
|
return match2 ? match2[1].split(reSplitDetails) : [];
|
|
78751
78751
|
}
|
|
78752
|
-
function hasPath2(object,
|
|
78753
|
-
|
|
78754
|
-
var index2 = -1, length =
|
|
78752
|
+
function hasPath2(object, path12, hasFunc) {
|
|
78753
|
+
path12 = castPath2(path12, object);
|
|
78754
|
+
var index2 = -1, length = path12.length, result2 = false;
|
|
78755
78755
|
while (++index2 < length) {
|
|
78756
|
-
var key = toKey2(
|
|
78756
|
+
var key = toKey2(path12[index2]);
|
|
78757
78757
|
if (!(result2 = object != null && hasFunc(object, key))) {
|
|
78758
78758
|
break;
|
|
78759
78759
|
}
|
|
@@ -78955,8 +78955,8 @@ var require_lodash = __commonJS({
|
|
|
78955
78955
|
return apply(func, this, otherArgs);
|
|
78956
78956
|
};
|
|
78957
78957
|
}
|
|
78958
|
-
function parent(object,
|
|
78959
|
-
return
|
|
78958
|
+
function parent(object, path12) {
|
|
78959
|
+
return path12.length < 2 ? object : baseGet2(object, baseSlice2(path12, 0, -1));
|
|
78960
78960
|
}
|
|
78961
78961
|
function reorder(array, indexes) {
|
|
78962
78962
|
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
|
|
@@ -79591,10 +79591,10 @@ var require_lodash = __commonJS({
|
|
|
79591
79591
|
}
|
|
79592
79592
|
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
79593
79593
|
}
|
|
79594
|
-
var invokeMap = baseRest(function(collection,
|
|
79595
|
-
var index2 = -1, isFunc = typeof
|
|
79594
|
+
var invokeMap = baseRest(function(collection, path12, args) {
|
|
79595
|
+
var index2 = -1, isFunc = typeof path12 == "function", result2 = isArrayLike2(collection) ? Array2(collection.length) : [];
|
|
79596
79596
|
baseEach(collection, function(value) {
|
|
79597
|
-
result2[++index2] = isFunc ? apply(
|
|
79597
|
+
result2[++index2] = isFunc ? apply(path12, value, args) : baseInvoke(value, path12, args);
|
|
79598
79598
|
});
|
|
79599
79599
|
return result2;
|
|
79600
79600
|
});
|
|
@@ -80246,15 +80246,15 @@ var require_lodash = __commonJS({
|
|
|
80246
80246
|
function functionsIn(object) {
|
|
80247
80247
|
return object == null ? [] : baseFunctions(object, keysIn(object));
|
|
80248
80248
|
}
|
|
80249
|
-
function get2(object,
|
|
80250
|
-
var result2 = object == null ? undefined2 : baseGet2(object,
|
|
80249
|
+
function get2(object, path12, defaultValue) {
|
|
80250
|
+
var result2 = object == null ? undefined2 : baseGet2(object, path12);
|
|
80251
80251
|
return result2 === undefined2 ? defaultValue : result2;
|
|
80252
80252
|
}
|
|
80253
|
-
function has2(object,
|
|
80254
|
-
return object != null && hasPath2(object,
|
|
80253
|
+
function has2(object, path12) {
|
|
80254
|
+
return object != null && hasPath2(object, path12, baseHas);
|
|
80255
80255
|
}
|
|
80256
|
-
function hasIn2(object,
|
|
80257
|
-
return object != null && hasPath2(object,
|
|
80256
|
+
function hasIn2(object, path12) {
|
|
80257
|
+
return object != null && hasPath2(object, path12, baseHasIn2);
|
|
80258
80258
|
}
|
|
80259
80259
|
var invert2 = createInverter(function(result2, value, key) {
|
|
80260
80260
|
if (value != null && typeof value.toString != "function") {
|
|
@@ -80307,10 +80307,10 @@ var require_lodash = __commonJS({
|
|
|
80307
80307
|
return result2;
|
|
80308
80308
|
}
|
|
80309
80309
|
var isDeep = false;
|
|
80310
|
-
paths = arrayMap2(paths, function(
|
|
80311
|
-
|
|
80312
|
-
isDeep || (isDeep =
|
|
80313
|
-
return
|
|
80310
|
+
paths = arrayMap2(paths, function(path12) {
|
|
80311
|
+
path12 = castPath2(path12, object);
|
|
80312
|
+
isDeep || (isDeep = path12.length > 1);
|
|
80313
|
+
return path12;
|
|
80314
80314
|
});
|
|
80315
80315
|
copyObject(object, getAllKeysIn(object), result2);
|
|
80316
80316
|
if (isDeep) {
|
|
@@ -80336,19 +80336,19 @@ var require_lodash = __commonJS({
|
|
|
80336
80336
|
return [prop];
|
|
80337
80337
|
});
|
|
80338
80338
|
predicate = getIteratee(predicate);
|
|
80339
|
-
return basePickBy(object, props, function(value,
|
|
80340
|
-
return predicate(value,
|
|
80339
|
+
return basePickBy(object, props, function(value, path12) {
|
|
80340
|
+
return predicate(value, path12[0]);
|
|
80341
80341
|
});
|
|
80342
80342
|
}
|
|
80343
|
-
function result(object,
|
|
80344
|
-
|
|
80345
|
-
var index2 = -1, length =
|
|
80343
|
+
function result(object, path12, defaultValue) {
|
|
80344
|
+
path12 = castPath2(path12, object);
|
|
80345
|
+
var index2 = -1, length = path12.length;
|
|
80346
80346
|
if (!length) {
|
|
80347
80347
|
length = 1;
|
|
80348
80348
|
object = undefined2;
|
|
80349
80349
|
}
|
|
80350
80350
|
while (++index2 < length) {
|
|
80351
|
-
var value = object == null ? undefined2 : object[toKey2(
|
|
80351
|
+
var value = object == null ? undefined2 : object[toKey2(path12[index2])];
|
|
80352
80352
|
if (value === undefined2) {
|
|
80353
80353
|
index2 = length;
|
|
80354
80354
|
value = defaultValue;
|
|
@@ -80357,12 +80357,12 @@ var require_lodash = __commonJS({
|
|
|
80357
80357
|
}
|
|
80358
80358
|
return object;
|
|
80359
80359
|
}
|
|
80360
|
-
function set(object,
|
|
80361
|
-
return object == null ? object : baseSet(object,
|
|
80360
|
+
function set(object, path12, value) {
|
|
80361
|
+
return object == null ? object : baseSet(object, path12, value);
|
|
80362
80362
|
}
|
|
80363
|
-
function setWith(object,
|
|
80363
|
+
function setWith(object, path12, value, customizer) {
|
|
80364
80364
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
80365
|
-
return object == null ? object : baseSet(object,
|
|
80365
|
+
return object == null ? object : baseSet(object, path12, value, customizer);
|
|
80366
80366
|
}
|
|
80367
80367
|
var toPairs = createToPairs(keys2);
|
|
80368
80368
|
var toPairsIn = createToPairs(keysIn);
|
|
@@ -80384,15 +80384,15 @@ var require_lodash = __commonJS({
|
|
|
80384
80384
|
});
|
|
80385
80385
|
return accumulator;
|
|
80386
80386
|
}
|
|
80387
|
-
function unset(object,
|
|
80388
|
-
return object == null ? true : baseUnset(object,
|
|
80387
|
+
function unset(object, path12) {
|
|
80388
|
+
return object == null ? true : baseUnset(object, path12);
|
|
80389
80389
|
}
|
|
80390
|
-
function update(object,
|
|
80391
|
-
return object == null ? object : baseUpdate(object,
|
|
80390
|
+
function update(object, path12, updater) {
|
|
80391
|
+
return object == null ? object : baseUpdate(object, path12, castFunction(updater));
|
|
80392
80392
|
}
|
|
80393
|
-
function updateWith(object,
|
|
80393
|
+
function updateWith(object, path12, updater, customizer) {
|
|
80394
80394
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
80395
|
-
return object == null ? object : baseUpdate(object,
|
|
80395
|
+
return object == null ? object : baseUpdate(object, path12, castFunction(updater), customizer);
|
|
80396
80396
|
}
|
|
80397
80397
|
function values(object) {
|
|
80398
80398
|
return object == null ? [] : baseValues(object, keys2(object));
|
|
@@ -80773,17 +80773,17 @@ var require_lodash = __commonJS({
|
|
|
80773
80773
|
function matches(source) {
|
|
80774
80774
|
return baseMatches2(baseClone(source, CLONE_DEEP_FLAG));
|
|
80775
80775
|
}
|
|
80776
|
-
function matchesProperty(
|
|
80777
|
-
return baseMatchesProperty2(
|
|
80776
|
+
function matchesProperty(path12, srcValue) {
|
|
80777
|
+
return baseMatchesProperty2(path12, baseClone(srcValue, CLONE_DEEP_FLAG));
|
|
80778
80778
|
}
|
|
80779
|
-
var method = baseRest(function(
|
|
80779
|
+
var method = baseRest(function(path12, args) {
|
|
80780
80780
|
return function(object) {
|
|
80781
|
-
return baseInvoke(object,
|
|
80781
|
+
return baseInvoke(object, path12, args);
|
|
80782
80782
|
};
|
|
80783
80783
|
});
|
|
80784
80784
|
var methodOf = baseRest(function(object, args) {
|
|
80785
|
-
return function(
|
|
80786
|
-
return baseInvoke(object,
|
|
80785
|
+
return function(path12) {
|
|
80786
|
+
return baseInvoke(object, path12, args);
|
|
80787
80787
|
};
|
|
80788
80788
|
});
|
|
80789
80789
|
function mixin(object, source, options) {
|
|
@@ -80830,12 +80830,12 @@ var require_lodash = __commonJS({
|
|
|
80830
80830
|
var over = createOver(arrayMap2);
|
|
80831
80831
|
var overEvery = createOver(arrayEvery);
|
|
80832
80832
|
var overSome = createOver(arraySome2);
|
|
80833
|
-
function property2(
|
|
80834
|
-
return isKey2(
|
|
80833
|
+
function property2(path12) {
|
|
80834
|
+
return isKey2(path12) ? baseProperty2(toKey2(path12)) : basePropertyDeep2(path12);
|
|
80835
80835
|
}
|
|
80836
80836
|
function propertyOf(object) {
|
|
80837
|
-
return function(
|
|
80838
|
-
return object == null ? undefined2 : baseGet2(object,
|
|
80837
|
+
return function(path12) {
|
|
80838
|
+
return object == null ? undefined2 : baseGet2(object, path12);
|
|
80839
80839
|
};
|
|
80840
80840
|
}
|
|
80841
80841
|
var range2 = createRange();
|
|
@@ -81288,12 +81288,12 @@ var require_lodash = __commonJS({
|
|
|
81288
81288
|
LazyWrapper.prototype.findLast = function(predicate) {
|
|
81289
81289
|
return this.reverse().find(predicate);
|
|
81290
81290
|
};
|
|
81291
|
-
LazyWrapper.prototype.invokeMap = baseRest(function(
|
|
81292
|
-
if (typeof
|
|
81291
|
+
LazyWrapper.prototype.invokeMap = baseRest(function(path12, args) {
|
|
81292
|
+
if (typeof path12 == "function") {
|
|
81293
81293
|
return new LazyWrapper(this);
|
|
81294
81294
|
}
|
|
81295
81295
|
return this.map(function(value) {
|
|
81296
|
-
return baseInvoke(value,
|
|
81296
|
+
return baseInvoke(value, path12, args);
|
|
81297
81297
|
});
|
|
81298
81298
|
});
|
|
81299
81299
|
LazyWrapper.prototype.reject = function(predicate) {
|
|
@@ -101636,12 +101636,12 @@ var require_abstract_coder2 = __commonJS({
|
|
|
101636
101636
|
exports2.Result = Result;
|
|
101637
101637
|
function checkResultErrors(result) {
|
|
101638
101638
|
const errors = [];
|
|
101639
|
-
const checkErrors = function(
|
|
101639
|
+
const checkErrors = function(path12, object) {
|
|
101640
101640
|
if (!Array.isArray(object)) {
|
|
101641
101641
|
return;
|
|
101642
101642
|
}
|
|
101643
101643
|
for (let key in object) {
|
|
101644
|
-
const childPath =
|
|
101644
|
+
const childPath = path12.slice();
|
|
101645
101645
|
childPath.push(key);
|
|
101646
101646
|
try {
|
|
101647
101647
|
checkErrors(childPath, object[key]);
|
|
@@ -125081,9 +125081,9 @@ var require_provider_ipcsocket = __commonJS({
|
|
|
125081
125081
|
get socket() {
|
|
125082
125082
|
return this.#socket;
|
|
125083
125083
|
}
|
|
125084
|
-
constructor(
|
|
125084
|
+
constructor(path12, network, options) {
|
|
125085
125085
|
super(network, options);
|
|
125086
|
-
this.#socket = (0, net_1.connect)(
|
|
125086
|
+
this.#socket = (0, net_1.connect)(path12);
|
|
125087
125087
|
this.socket.on("ready", async () => {
|
|
125088
125088
|
try {
|
|
125089
125089
|
await this._start();
|
|
@@ -126394,11 +126394,11 @@ var require_utils11 = __commonJS({
|
|
|
126394
126394
|
function spelunk(object, _path) {
|
|
126395
126395
|
const match2 = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);
|
|
126396
126396
|
(0, index_js_1.assertArgument)(match2 != null, "invalid path", "path", _path);
|
|
126397
|
-
const
|
|
126397
|
+
const path12 = match2[1];
|
|
126398
126398
|
const type = match2[3];
|
|
126399
126399
|
const reqd = match2[4] === "!";
|
|
126400
126400
|
let cur = object;
|
|
126401
|
-
for (const comp of
|
|
126401
|
+
for (const comp of path12.toLowerCase().split(".")) {
|
|
126402
126402
|
if (Array.isArray(cur)) {
|
|
126403
126403
|
if (!comp.match(/^[0-9]+$/)) {
|
|
126404
126404
|
break;
|
|
@@ -126420,7 +126420,7 @@ var require_utils11 = __commonJS({
|
|
|
126420
126420
|
break;
|
|
126421
126421
|
}
|
|
126422
126422
|
}
|
|
126423
|
-
(0, index_js_1.assertArgument)(!reqd || cur != null, "missing required value", "path",
|
|
126423
|
+
(0, index_js_1.assertArgument)(!reqd || cur != null, "missing required value", "path", path12);
|
|
126424
126424
|
if (type && cur != null) {
|
|
126425
126425
|
if (type === "int") {
|
|
126426
126426
|
if (typeof cur === "string" && cur.match(/^-?[0-9]+$/)) {
|
|
@@ -126445,7 +126445,7 @@ var require_utils11 = __commonJS({
|
|
|
126445
126445
|
if (type === typeof cur) {
|
|
126446
126446
|
return cur;
|
|
126447
126447
|
}
|
|
126448
|
-
(0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, "path",
|
|
126448
|
+
(0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, "path", path12);
|
|
126449
126449
|
}
|
|
126450
126450
|
return cur;
|
|
126451
126451
|
}
|
|
@@ -126643,7 +126643,7 @@ var require_json_keystore = __commonJS({
|
|
|
126643
126643
|
};
|
|
126644
126644
|
if (account.mnemonic) {
|
|
126645
126645
|
const client = options.client != null ? options.client : `ethers/${_version_js_1.version}`;
|
|
126646
|
-
const
|
|
126646
|
+
const path12 = account.mnemonic.path || defaultPath;
|
|
126647
126647
|
const locale = account.mnemonic.locale || "en";
|
|
126648
126648
|
const mnemonicKey = key.slice(32, 64);
|
|
126649
126649
|
const entropy = (0, index_js_4.getBytes)(account.mnemonic.entropy, "account.mnemonic.entropy");
|
|
@@ -126656,7 +126656,7 @@ var require_json_keystore = __commonJS({
|
|
|
126656
126656
|
data["x-ethers"] = {
|
|
126657
126657
|
client,
|
|
126658
126658
|
gethFilename,
|
|
126659
|
-
path:
|
|
126659
|
+
path: path12,
|
|
126660
126660
|
locale,
|
|
126661
126661
|
mnemonicCounter: (0, index_js_4.hexlify)(mnemonicIv).substring(2),
|
|
126662
126662
|
mnemonicCiphertext: (0, index_js_4.hexlify)(mnemonicCiphertext).substring(2),
|
|
@@ -126741,11 +126741,11 @@ var require_hdwallet = __commonJS({
|
|
|
126741
126741
|
const I = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)("sha512", chainCode, data));
|
|
126742
126742
|
return { IL: I.slice(0, 32), IR: I.slice(32) };
|
|
126743
126743
|
}
|
|
126744
|
-
function derivePath(node,
|
|
126745
|
-
const components =
|
|
126746
|
-
(0, index_js_4.assertArgument)(components.length > 0, "invalid path", "path",
|
|
126744
|
+
function derivePath(node, path12) {
|
|
126745
|
+
const components = path12.split("/");
|
|
126746
|
+
(0, index_js_4.assertArgument)(components.length > 0, "invalid path", "path", path12);
|
|
126747
126747
|
if (components[0] === "m") {
|
|
126748
|
-
(0, index_js_4.assertArgument)(node.depth === 0, `cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${node.depth}`, "path",
|
|
126748
|
+
(0, index_js_4.assertArgument)(node.depth === 0, `cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${node.depth}`, "path", path12);
|
|
126749
126749
|
components.shift();
|
|
126750
126750
|
}
|
|
126751
126751
|
let result = node;
|
|
@@ -126815,7 +126815,7 @@ var require_hdwallet = __commonJS({
|
|
|
126815
126815
|
/**
|
|
126816
126816
|
* @private
|
|
126817
126817
|
*/
|
|
126818
|
-
constructor(guard, signingKey, parentFingerprint, chainCode,
|
|
126818
|
+
constructor(guard, signingKey, parentFingerprint, chainCode, path12, index2, depth, mnemonic, provider) {
|
|
126819
126819
|
super(signingKey, provider);
|
|
126820
126820
|
(0, index_js_4.assertPrivate)(guard, _guard, "HDNodeWallet");
|
|
126821
126821
|
(0, index_js_4.defineProperties)(this, { publicKey: signingKey.compressedPublicKey });
|
|
@@ -126824,7 +126824,7 @@ var require_hdwallet = __commonJS({
|
|
|
126824
126824
|
parentFingerprint,
|
|
126825
126825
|
fingerprint,
|
|
126826
126826
|
chainCode,
|
|
126827
|
-
path:
|
|
126827
|
+
path: path12,
|
|
126828
126828
|
index: index2,
|
|
126829
126829
|
depth
|
|
126830
126830
|
});
|
|
@@ -126908,22 +126908,22 @@ var require_hdwallet = __commonJS({
|
|
|
126908
126908
|
deriveChild(_index) {
|
|
126909
126909
|
const index2 = (0, index_js_4.getNumber)(_index, "index");
|
|
126910
126910
|
(0, index_js_4.assertArgument)(index2 <= 4294967295, "invalid index", "index", index2);
|
|
126911
|
-
let
|
|
126912
|
-
if (
|
|
126913
|
-
|
|
126911
|
+
let path12 = this.path;
|
|
126912
|
+
if (path12) {
|
|
126913
|
+
path12 += "/" + (index2 & ~HardenedBit);
|
|
126914
126914
|
if (index2 & HardenedBit) {
|
|
126915
|
-
|
|
126915
|
+
path12 += "'";
|
|
126916
126916
|
}
|
|
126917
126917
|
}
|
|
126918
126918
|
const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, this.privateKey);
|
|
126919
126919
|
const ki = new index_js_1.SigningKey((0, index_js_4.toBeHex)(((0, index_js_4.toBigInt)(IL) + BigInt(this.privateKey)) % N, 32));
|
|
126920
|
-
return new _HDNodeWallet(_guard, ki, this.fingerprint, (0, index_js_4.hexlify)(IR),
|
|
126920
|
+
return new _HDNodeWallet(_guard, ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path12, index2, this.depth + 1, this.mnemonic, this.provider);
|
|
126921
126921
|
}
|
|
126922
126922
|
/**
|
|
126923
126923
|
* Return the HDNode for %%path%% from this node.
|
|
126924
126924
|
*/
|
|
126925
|
-
derivePath(
|
|
126926
|
-
return derivePath(this,
|
|
126925
|
+
derivePath(path12) {
|
|
126926
|
+
return derivePath(this, path12);
|
|
126927
126927
|
}
|
|
126928
126928
|
static #fromSeed(_seed, mnemonic) {
|
|
126929
126929
|
(0, index_js_4.assertArgument)((0, index_js_4.isBytesLike)(_seed), "invalid seed", "seed", "[REDACTED]");
|
|
@@ -126968,43 +126968,43 @@ var require_hdwallet = __commonJS({
|
|
|
126968
126968
|
/**
|
|
126969
126969
|
* Creates a new random HDNode.
|
|
126970
126970
|
*/
|
|
126971
|
-
static createRandom(password,
|
|
126971
|
+
static createRandom(password, path12, wordlist) {
|
|
126972
126972
|
if (password == null) {
|
|
126973
126973
|
password = "";
|
|
126974
126974
|
}
|
|
126975
|
-
if (
|
|
126976
|
-
|
|
126975
|
+
if (path12 == null) {
|
|
126976
|
+
path12 = exports2.defaultPath;
|
|
126977
126977
|
}
|
|
126978
126978
|
if (wordlist == null) {
|
|
126979
126979
|
wordlist = lang_en_js_1.LangEn.wordlist();
|
|
126980
126980
|
}
|
|
126981
126981
|
const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy((0, index_js_1.randomBytes)(16), password, wordlist);
|
|
126982
|
-
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(
|
|
126982
|
+
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path12);
|
|
126983
126983
|
}
|
|
126984
126984
|
/**
|
|
126985
126985
|
* Create an HD Node from %%mnemonic%%.
|
|
126986
126986
|
*/
|
|
126987
|
-
static fromMnemonic(mnemonic,
|
|
126988
|
-
if (!
|
|
126989
|
-
|
|
126987
|
+
static fromMnemonic(mnemonic, path12) {
|
|
126988
|
+
if (!path12) {
|
|
126989
|
+
path12 = exports2.defaultPath;
|
|
126990
126990
|
}
|
|
126991
|
-
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(
|
|
126991
|
+
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path12);
|
|
126992
126992
|
}
|
|
126993
126993
|
/**
|
|
126994
126994
|
* Creates an HD Node from a mnemonic %%phrase%%.
|
|
126995
126995
|
*/
|
|
126996
|
-
static fromPhrase(phrase, password,
|
|
126996
|
+
static fromPhrase(phrase, password, path12, wordlist) {
|
|
126997
126997
|
if (password == null) {
|
|
126998
126998
|
password = "";
|
|
126999
126999
|
}
|
|
127000
|
-
if (
|
|
127001
|
-
|
|
127000
|
+
if (path12 == null) {
|
|
127001
|
+
path12 = exports2.defaultPath;
|
|
127002
127002
|
}
|
|
127003
127003
|
if (wordlist == null) {
|
|
127004
127004
|
wordlist = lang_en_js_1.LangEn.wordlist();
|
|
127005
127005
|
}
|
|
127006
127006
|
const mnemonic = mnemonic_js_1.Mnemonic.fromPhrase(phrase, password, wordlist);
|
|
127007
|
-
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(
|
|
127007
|
+
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path12);
|
|
127008
127008
|
}
|
|
127009
127009
|
/**
|
|
127010
127010
|
* Creates an HD Node from a %%seed%%.
|
|
@@ -127057,7 +127057,7 @@ var require_hdwallet = __commonJS({
|
|
|
127057
127057
|
/**
|
|
127058
127058
|
* @private
|
|
127059
127059
|
*/
|
|
127060
|
-
constructor(guard, address, publicKey, parentFingerprint, chainCode,
|
|
127060
|
+
constructor(guard, address, publicKey, parentFingerprint, chainCode, path12, index2, depth, provider) {
|
|
127061
127061
|
super(address, provider);
|
|
127062
127062
|
(0, index_js_4.assertPrivate)(guard, _guard, "HDNodeVoidWallet");
|
|
127063
127063
|
(0, index_js_4.defineProperties)(this, { publicKey });
|
|
@@ -127067,7 +127067,7 @@ var require_hdwallet = __commonJS({
|
|
|
127067
127067
|
fingerprint,
|
|
127068
127068
|
parentFingerprint,
|
|
127069
127069
|
chainCode,
|
|
127070
|
-
path:
|
|
127070
|
+
path: path12,
|
|
127071
127071
|
index: index2,
|
|
127072
127072
|
depth
|
|
127073
127073
|
});
|
|
@@ -127105,23 +127105,23 @@ var require_hdwallet = __commonJS({
|
|
|
127105
127105
|
deriveChild(_index) {
|
|
127106
127106
|
const index2 = (0, index_js_4.getNumber)(_index, "index");
|
|
127107
127107
|
(0, index_js_4.assertArgument)(index2 <= 4294967295, "invalid index", "index", index2);
|
|
127108
|
-
let
|
|
127109
|
-
if (
|
|
127110
|
-
|
|
127108
|
+
let path12 = this.path;
|
|
127109
|
+
if (path12) {
|
|
127110
|
+
path12 += "/" + (index2 & ~HardenedBit);
|
|
127111
127111
|
if (index2 & HardenedBit) {
|
|
127112
|
-
|
|
127112
|
+
path12 += "'";
|
|
127113
127113
|
}
|
|
127114
127114
|
}
|
|
127115
127115
|
const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, null);
|
|
127116
127116
|
const Ki = index_js_1.SigningKey.addPoints(IL, this.publicKey, true);
|
|
127117
127117
|
const address = (0, index_js_3.computeAddress)(Ki);
|
|
127118
|
-
return new _HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR),
|
|
127118
|
+
return new _HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path12, index2, this.depth + 1, this.provider);
|
|
127119
127119
|
}
|
|
127120
127120
|
/**
|
|
127121
127121
|
* Return the signer for %%path%% from this node.
|
|
127122
127122
|
*/
|
|
127123
|
-
derivePath(
|
|
127124
|
-
return derivePath(this,
|
|
127123
|
+
derivePath(path12) {
|
|
127124
|
+
return derivePath(this, path12);
|
|
127125
127125
|
}
|
|
127126
127126
|
};
|
|
127127
127127
|
exports2.HDNodeVoidWallet = HDNodeVoidWallet;
|
|
@@ -133944,8 +133944,8 @@ var require_req = __commonJS({
|
|
|
133944
133944
|
if (req.originalUrl) {
|
|
133945
133945
|
_req.url = req.originalUrl;
|
|
133946
133946
|
} else {
|
|
133947
|
-
const
|
|
133948
|
-
_req.url = typeof
|
|
133947
|
+
const path12 = req.path;
|
|
133948
|
+
_req.url = typeof path12 === "string" ? path12 : req.url ? req.url.path || req.url : void 0;
|
|
133949
133949
|
}
|
|
133950
133950
|
if (req.query) {
|
|
133951
133951
|
_req.query = req.query;
|
|
@@ -134134,17 +134134,17 @@ var require_parse = __commonJS({
|
|
|
134134
134134
|
const wildcards = [];
|
|
134135
134135
|
var wcLen = 0;
|
|
134136
134136
|
const secret = paths.reduce(function(o, strPath, ix) {
|
|
134137
|
-
var
|
|
134137
|
+
var path12 = strPath.match(rx).map((p) => p.replace(/'|"|`/g, ""));
|
|
134138
134138
|
const leadingBracket = strPath[0] === "[";
|
|
134139
|
-
|
|
134139
|
+
path12 = path12.map((p) => {
|
|
134140
134140
|
if (p[0] === "[") return p.substr(1, p.length - 2);
|
|
134141
134141
|
else return p;
|
|
134142
134142
|
});
|
|
134143
|
-
const star =
|
|
134143
|
+
const star = path12.indexOf("*");
|
|
134144
134144
|
if (star > -1) {
|
|
134145
|
-
const before =
|
|
134145
|
+
const before = path12.slice(0, star);
|
|
134146
134146
|
const beforeStr = before.join(".");
|
|
134147
|
-
const after =
|
|
134147
|
+
const after = path12.slice(star + 1, path12.length);
|
|
134148
134148
|
const nested = after.length > 0;
|
|
134149
134149
|
wcLen++;
|
|
134150
134150
|
wildcards.push({
|
|
@@ -134155,7 +134155,7 @@ var require_parse = __commonJS({
|
|
|
134155
134155
|
});
|
|
134156
134156
|
} else {
|
|
134157
134157
|
o[strPath] = {
|
|
134158
|
-
path:
|
|
134158
|
+
path: path12,
|
|
134159
134159
|
val: void 0,
|
|
134160
134160
|
precensored: false,
|
|
134161
134161
|
circle: "",
|
|
@@ -134201,20 +134201,20 @@ var require_redactor = __commonJS({
|
|
|
134201
134201
|
return redact;
|
|
134202
134202
|
}
|
|
134203
134203
|
function redactTmpl(secret, isCensorFct, censorFctTakesPath) {
|
|
134204
|
-
return Object.keys(secret).map((
|
|
134205
|
-
const { escPath, leadingBracket, path: arrPath } = secret[
|
|
134204
|
+
return Object.keys(secret).map((path12) => {
|
|
134205
|
+
const { escPath, leadingBracket, path: arrPath } = secret[path12];
|
|
134206
134206
|
const skip = leadingBracket ? 1 : 0;
|
|
134207
134207
|
const delim = leadingBracket ? "" : ".";
|
|
134208
134208
|
const hops = [];
|
|
134209
134209
|
var match2;
|
|
134210
|
-
while ((match2 = rx.exec(
|
|
134210
|
+
while ((match2 = rx.exec(path12)) !== null) {
|
|
134211
134211
|
const [, ix] = match2;
|
|
134212
134212
|
const { index: index2, input } = match2;
|
|
134213
134213
|
if (index2 > skip) hops.push(input.substring(0, index2 - (ix ? 0 : 1)));
|
|
134214
134214
|
}
|
|
134215
134215
|
var existence = hops.map((p) => `o${delim}${p}`).join(" && ");
|
|
134216
|
-
if (existence.length === 0) existence += `o${delim}${
|
|
134217
|
-
else existence += ` && o${delim}${
|
|
134216
|
+
if (existence.length === 0) existence += `o${delim}${path12} != null`;
|
|
134217
|
+
else existence += ` && o${delim}${path12} != null`;
|
|
134218
134218
|
const circularDetection = `
|
|
134219
134219
|
switch (true) {
|
|
134220
134220
|
${hops.reverse().map((p) => `
|
|
@@ -134227,12 +134227,12 @@ var require_redactor = __commonJS({
|
|
|
134227
134227
|
const censorArgs = censorFctTakesPath ? `val, ${JSON.stringify(arrPath)}` : `val`;
|
|
134228
134228
|
return `
|
|
134229
134229
|
if (${existence}) {
|
|
134230
|
-
const val = o${delim}${
|
|
134230
|
+
const val = o${delim}${path12}
|
|
134231
134231
|
if (val === censor) {
|
|
134232
134232
|
secret[${escPath}].precensored = true
|
|
134233
134233
|
} else {
|
|
134234
134234
|
secret[${escPath}].val = val
|
|
134235
|
-
o${delim}${
|
|
134235
|
+
o${delim}${path12} = ${isCensorFct ? `censor(${censorArgs})` : "censor"}
|
|
134236
134236
|
${circularDetection}
|
|
134237
134237
|
}
|
|
134238
134238
|
}
|
|
@@ -134284,13 +134284,13 @@ var require_modifiers = __commonJS({
|
|
|
134284
134284
|
target[k] = values[i];
|
|
134285
134285
|
}
|
|
134286
134286
|
}
|
|
134287
|
-
function groupRedact(o,
|
|
134288
|
-
const target = get2(o,
|
|
134287
|
+
function groupRedact(o, path12, censor, isCensorFct, censorFctTakesPath) {
|
|
134288
|
+
const target = get2(o, path12);
|
|
134289
134289
|
if (target == null || typeof target === "string") return { keys: null, values: null, target, flat: true };
|
|
134290
134290
|
const keys2 = Object.keys(target);
|
|
134291
134291
|
const keysLength = keys2.length;
|
|
134292
|
-
const pathLength =
|
|
134293
|
-
const pathWithKey = censorFctTakesPath ? [...
|
|
134292
|
+
const pathLength = path12.length;
|
|
134293
|
+
const pathWithKey = censorFctTakesPath ? [...path12] : void 0;
|
|
134294
134294
|
const values = new Array(keysLength);
|
|
134295
134295
|
for (var i = 0; i < keysLength; i++) {
|
|
134296
134296
|
const key = keys2[i];
|
|
@@ -134308,29 +134308,29 @@ var require_modifiers = __commonJS({
|
|
|
134308
134308
|
}
|
|
134309
134309
|
function nestedRestore(instructions) {
|
|
134310
134310
|
for (let i = 0; i < instructions.length; i++) {
|
|
134311
|
-
const { target, path:
|
|
134311
|
+
const { target, path: path12, value } = instructions[i];
|
|
134312
134312
|
let current = target;
|
|
134313
|
-
for (let i2 =
|
|
134314
|
-
current = current[
|
|
134313
|
+
for (let i2 = path12.length - 1; i2 > 0; i2--) {
|
|
134314
|
+
current = current[path12[i2]];
|
|
134315
134315
|
}
|
|
134316
|
-
current[
|
|
134316
|
+
current[path12[0]] = value;
|
|
134317
134317
|
}
|
|
134318
134318
|
}
|
|
134319
|
-
function nestedRedact(store, o,
|
|
134320
|
-
const target = get2(o,
|
|
134319
|
+
function nestedRedact(store, o, path12, ns, censor, isCensorFct, censorFctTakesPath) {
|
|
134320
|
+
const target = get2(o, path12);
|
|
134321
134321
|
if (target == null) return;
|
|
134322
134322
|
const keys2 = Object.keys(target);
|
|
134323
134323
|
const keysLength = keys2.length;
|
|
134324
134324
|
for (var i = 0; i < keysLength; i++) {
|
|
134325
134325
|
const key = keys2[i];
|
|
134326
|
-
specialSet(store, target, key,
|
|
134326
|
+
specialSet(store, target, key, path12, ns, censor, isCensorFct, censorFctTakesPath);
|
|
134327
134327
|
}
|
|
134328
134328
|
return store;
|
|
134329
134329
|
}
|
|
134330
134330
|
function has2(obj, prop) {
|
|
134331
134331
|
return obj !== void 0 && obj !== null ? "hasOwn" in Object ? Object.hasOwn(obj, prop) : Object.prototype.hasOwnProperty.call(obj, prop) : false;
|
|
134332
134332
|
}
|
|
134333
|
-
function specialSet(store, o, k,
|
|
134333
|
+
function specialSet(store, o, k, path12, afterPath, censor, isCensorFct, censorFctTakesPath) {
|
|
134334
134334
|
const afterPathLen = afterPath.length;
|
|
134335
134335
|
const lastPathIndex = afterPathLen - 1;
|
|
134336
134336
|
const originalKey = k;
|
|
@@ -134373,7 +134373,7 @@ var require_modifiers = __commonJS({
|
|
|
134373
134373
|
if (consecutive) {
|
|
134374
134374
|
redactPathCurrent = node(redactPathCurrent, wck, depth);
|
|
134375
134375
|
level = i;
|
|
134376
|
-
ov = iterateNthLevel(wcov, level - 1, k,
|
|
134376
|
+
ov = iterateNthLevel(wcov, level - 1, k, path12, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, o[originalKey], depth + 1);
|
|
134377
134377
|
} else {
|
|
134378
134378
|
if (kIsWc || typeof wcov === "object" && wcov !== null && k in wcov) {
|
|
134379
134379
|
if (kIsWc) {
|
|
@@ -134381,7 +134381,7 @@ var require_modifiers = __commonJS({
|
|
|
134381
134381
|
} else {
|
|
134382
134382
|
ov = wcov[k];
|
|
134383
134383
|
}
|
|
134384
|
-
nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...
|
|
134384
|
+
nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path12, originalKey, ...afterPath]) : censor(ov) : censor;
|
|
134385
134385
|
if (kIsWc) {
|
|
134386
134386
|
const rv = restoreInstr(node(redactPathCurrent, wck, depth), ov, o[originalKey]);
|
|
134387
134387
|
store.push(rv);
|
|
@@ -134404,7 +134404,7 @@ var require_modifiers = __commonJS({
|
|
|
134404
134404
|
} else {
|
|
134405
134405
|
ov = n[k];
|
|
134406
134406
|
redactPathCurrent = node(redactPathCurrent, k, depth);
|
|
134407
|
-
nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...
|
|
134407
|
+
nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path12, originalKey, ...afterPath]) : censor(ov) : censor;
|
|
134408
134408
|
if (has2(n, k) && nv === ov || nv === void 0 && censor !== void 0) {
|
|
134409
134409
|
} else {
|
|
134410
134410
|
const rv = restoreInstr(redactPathCurrent, ov, o[originalKey]);
|
|
@@ -134427,7 +134427,7 @@ var require_modifiers = __commonJS({
|
|
|
134427
134427
|
}
|
|
134428
134428
|
return n;
|
|
134429
134429
|
}
|
|
134430
|
-
function iterateNthLevel(wcov, level, k,
|
|
134430
|
+
function iterateNthLevel(wcov, level, k, path12, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth) {
|
|
134431
134431
|
if (level === 0) {
|
|
134432
134432
|
if (kIsWc || typeof wcov === "object" && wcov !== null && k in wcov) {
|
|
134433
134433
|
if (kIsWc) {
|
|
@@ -134435,7 +134435,7 @@ var require_modifiers = __commonJS({
|
|
|
134435
134435
|
} else {
|
|
134436
134436
|
ov = wcov[k];
|
|
134437
134437
|
}
|
|
134438
|
-
nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...
|
|
134438
|
+
nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path12, originalKey, ...afterPath]) : censor(ov) : censor;
|
|
134439
134439
|
if (kIsWc) {
|
|
134440
134440
|
const rv = restoreInstr(redactPathCurrent, ov, parent);
|
|
134441
134441
|
store.push(rv);
|
|
@@ -134454,7 +134454,7 @@ var require_modifiers = __commonJS({
|
|
|
134454
134454
|
for (const key in wcov) {
|
|
134455
134455
|
if (typeof wcov[key] === "object") {
|
|
134456
134456
|
redactPathCurrent = node(redactPathCurrent, key, depth);
|
|
134457
|
-
iterateNthLevel(wcov[key], level - 1, k,
|
|
134457
|
+
iterateNthLevel(wcov[key], level - 1, k, path12, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth + 1);
|
|
134458
134458
|
}
|
|
134459
134459
|
}
|
|
134460
134460
|
}
|
|
@@ -134476,12 +134476,12 @@ var require_modifiers = __commonJS({
|
|
|
134476
134476
|
}
|
|
134477
134477
|
function restoreInstr(node2, value, target) {
|
|
134478
134478
|
let current = node2;
|
|
134479
|
-
const
|
|
134479
|
+
const path12 = [];
|
|
134480
134480
|
do {
|
|
134481
|
-
|
|
134481
|
+
path12.push(current.key);
|
|
134482
134482
|
current = current.parent;
|
|
134483
134483
|
} while (current.parent != null);
|
|
134484
|
-
return { path:
|
|
134484
|
+
return { path: path12, value, target };
|
|
134485
134485
|
}
|
|
134486
134486
|
}
|
|
134487
134487
|
});
|
|
@@ -134511,10 +134511,10 @@ var require_restorer = __commonJS({
|
|
|
134511
134511
|
};
|
|
134512
134512
|
}
|
|
134513
134513
|
function resetTmpl(secret, paths) {
|
|
134514
|
-
return paths.map((
|
|
134515
|
-
const { circle, escPath, leadingBracket } = secret[
|
|
134514
|
+
return paths.map((path12) => {
|
|
134515
|
+
const { circle, escPath, leadingBracket } = secret[path12];
|
|
134516
134516
|
const delim = leadingBracket ? "" : ".";
|
|
134517
|
-
const reset2 = circle ? `o.${circle} = secret[${escPath}].val` : `o${delim}${
|
|
134517
|
+
const reset2 = circle ? `o.${circle} = secret[${escPath}].val` : `o${delim}${path12} = secret[${escPath}].val`;
|
|
134518
134518
|
const clear = `secret[${escPath}].val = undefined`;
|
|
134519
134519
|
return `
|
|
134520
134520
|
if (secret[${escPath}].val !== undefined) {
|
|
@@ -134746,8 +134746,8 @@ var require_redaction = __commonJS({
|
|
|
134746
134746
|
if (shape[k] === null) {
|
|
134747
134747
|
o[k] = (value) => topCensor(value, [k]);
|
|
134748
134748
|
} else {
|
|
134749
|
-
const wrappedCensor = typeof censor === "function" ? (value,
|
|
134750
|
-
return censor(value, [k, ...
|
|
134749
|
+
const wrappedCensor = typeof censor === "function" ? (value, path12) => {
|
|
134750
|
+
return censor(value, [k, ...path12]);
|
|
134751
134751
|
} : censor;
|
|
134752
134752
|
o[k] = fastRedact({
|
|
134753
134753
|
paths: shape[k],
|
|
@@ -134950,7 +134950,7 @@ var require_sonic_boom = __commonJS({
|
|
|
134950
134950
|
var fs3 = __require("fs");
|
|
134951
134951
|
var EventEmitter = __require("events");
|
|
134952
134952
|
var inherits = __require("util").inherits;
|
|
134953
|
-
var
|
|
134953
|
+
var path12 = __require("path");
|
|
134954
134954
|
var sleep = require_atomic_sleep();
|
|
134955
134955
|
var assert = __require("assert");
|
|
134956
134956
|
var BUSY_WRITE_TIMEOUT = 100;
|
|
@@ -135004,7 +135004,7 @@ var require_sonic_boom = __commonJS({
|
|
|
135004
135004
|
const mode = sonic2.mode;
|
|
135005
135005
|
if (sonic2.sync) {
|
|
135006
135006
|
try {
|
|
135007
|
-
if (sonic2.mkdir) fs3.mkdirSync(
|
|
135007
|
+
if (sonic2.mkdir) fs3.mkdirSync(path12.dirname(file), { recursive: true });
|
|
135008
135008
|
const fd = fs3.openSync(file, flags, mode);
|
|
135009
135009
|
fileOpened(null, fd);
|
|
135010
135010
|
} catch (err) {
|
|
@@ -135012,7 +135012,7 @@ var require_sonic_boom = __commonJS({
|
|
|
135012
135012
|
throw err;
|
|
135013
135013
|
}
|
|
135014
135014
|
} else if (sonic2.mkdir) {
|
|
135015
|
-
fs3.mkdir(
|
|
135015
|
+
fs3.mkdir(path12.dirname(file), { recursive: true }, (err) => {
|
|
135016
135016
|
if (err) return fileOpened(err);
|
|
135017
135017
|
fs3.open(file, flags, mode, fileOpened);
|
|
135018
135018
|
});
|
|
@@ -142386,11 +142386,11 @@ var require_soljson = __commonJS({
|
|
|
142386
142386
|
var ENVIRONMENT_IS_WORKER = typeof importScripts == "function";
|
|
142387
142387
|
var ENVIRONMENT_IS_NODE = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string";
|
|
142388
142388
|
var scriptDirectory = "";
|
|
142389
|
-
function locateFile(
|
|
142389
|
+
function locateFile(path12) {
|
|
142390
142390
|
if (Module["locateFile"]) {
|
|
142391
|
-
return Module["locateFile"](
|
|
142391
|
+
return Module["locateFile"](path12, scriptDirectory);
|
|
142392
142392
|
}
|
|
142393
|
-
return scriptDirectory +
|
|
142393
|
+
return scriptDirectory + path12;
|
|
142394
142394
|
}
|
|
142395
142395
|
var read_;
|
|
142396
142396
|
var readAsync;
|
|
@@ -143181,7 +143181,7 @@ var require_soljson = __commonJS({
|
|
|
143181
143181
|
var ret = UTF8ToString(ptr);
|
|
143182
143182
|
return ret;
|
|
143183
143183
|
} };
|
|
143184
|
-
function ___syscall_faccessat(dirfd,
|
|
143184
|
+
function ___syscall_faccessat(dirfd, path12, amode, flags) {
|
|
143185
143185
|
}
|
|
143186
143186
|
function ___syscall_fcntl64(fd, cmd, varargs) {
|
|
143187
143187
|
SYSCALLS.varargs = varargs;
|
|
@@ -143191,10 +143191,10 @@ var require_soljson = __commonJS({
|
|
|
143191
143191
|
SYSCALLS.varargs = varargs;
|
|
143192
143192
|
return 0;
|
|
143193
143193
|
}
|
|
143194
|
-
function ___syscall_openat(dirfd,
|
|
143194
|
+
function ___syscall_openat(dirfd, path12, flags, varargs) {
|
|
143195
143195
|
SYSCALLS.varargs = varargs;
|
|
143196
143196
|
}
|
|
143197
|
-
function ___syscall_stat64(
|
|
143197
|
+
function ___syscall_stat64(path12, buf) {
|
|
143198
143198
|
}
|
|
143199
143199
|
function __emscripten_date_now() {
|
|
143200
143200
|
return Date.now();
|
|
@@ -145123,9 +145123,9 @@ var require_filesystem = __commonJS({
|
|
|
145123
145123
|
"use strict";
|
|
145124
145124
|
var fs3 = __require("fs");
|
|
145125
145125
|
var LDD_PATH = "/usr/bin/ldd";
|
|
145126
|
-
var readFileSync = (
|
|
145127
|
-
var
|
|
145128
|
-
fs3.readFile(
|
|
145126
|
+
var readFileSync = (path12) => fs3.readFileSync(path12, "utf-8");
|
|
145127
|
+
var readFile10 = (path12) => new Promise((resolve2, reject) => {
|
|
145128
|
+
fs3.readFile(path12, "utf-8", (err, data) => {
|
|
145129
145129
|
if (err) {
|
|
145130
145130
|
reject(err);
|
|
145131
145131
|
} else {
|
|
@@ -145136,7 +145136,7 @@ var require_filesystem = __commonJS({
|
|
|
145136
145136
|
module2.exports = {
|
|
145137
145137
|
LDD_PATH,
|
|
145138
145138
|
readFileSync,
|
|
145139
|
-
readFile:
|
|
145139
|
+
readFile: readFile10
|
|
145140
145140
|
};
|
|
145141
145141
|
}
|
|
145142
145142
|
});
|
|
@@ -145147,7 +145147,7 @@ var require_detect_libc = __commonJS({
|
|
|
145147
145147
|
"use strict";
|
|
145148
145148
|
var childProcess = __require("child_process");
|
|
145149
145149
|
var { isLinux, getReport } = require_process();
|
|
145150
|
-
var { LDD_PATH, readFile:
|
|
145150
|
+
var { LDD_PATH, readFile: readFile10, readFileSync } = require_filesystem();
|
|
145151
145151
|
var cachedFamilyFilesystem;
|
|
145152
145152
|
var cachedVersionFilesystem;
|
|
145153
145153
|
var command = "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";
|
|
@@ -145214,7 +145214,7 @@ var require_detect_libc = __commonJS({
|
|
|
145214
145214
|
}
|
|
145215
145215
|
cachedFamilyFilesystem = null;
|
|
145216
145216
|
try {
|
|
145217
|
-
const lddContent = await
|
|
145217
|
+
const lddContent = await readFile10(LDD_PATH);
|
|
145218
145218
|
cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
|
|
145219
145219
|
} catch (e) {
|
|
145220
145220
|
}
|
|
@@ -145268,7 +145268,7 @@ var require_detect_libc = __commonJS({
|
|
|
145268
145268
|
}
|
|
145269
145269
|
cachedVersionFilesystem = null;
|
|
145270
145270
|
try {
|
|
145271
|
-
const lddContent = await
|
|
145271
|
+
const lddContent = await readFile10(LDD_PATH);
|
|
145272
145272
|
const versionMatch = lddContent.match(RE_GLIBC_VERSION);
|
|
145273
145273
|
if (versionMatch) {
|
|
145274
145274
|
cachedVersionFilesystem = versionMatch[1];
|
|
@@ -145355,7 +145355,7 @@ var require_detect_libc = __commonJS({
|
|
|
145355
145355
|
var require_node_gyp_build_optional_packages = __commonJS({
|
|
145356
145356
|
"../../node_modules/node-gyp-build-optional-packages/index.js"(exports2, module2) {
|
|
145357
145357
|
var fs3 = __require("fs");
|
|
145358
|
-
var
|
|
145358
|
+
var path12 = __require("path");
|
|
145359
145359
|
var url = __require("url");
|
|
145360
145360
|
var vars = process.config && process.config.variables || {};
|
|
145361
145361
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
@@ -145378,30 +145378,30 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145378
145378
|
return __require(load.path(dir));
|
|
145379
145379
|
}
|
|
145380
145380
|
load.path = function(dir) {
|
|
145381
|
-
dir =
|
|
145381
|
+
dir = path12.resolve(dir || ".");
|
|
145382
145382
|
var packageName = "";
|
|
145383
145383
|
try {
|
|
145384
145384
|
if (typeof __webpack_require__ === "function")
|
|
145385
|
-
packageName = __non_webpack_require__(
|
|
145385
|
+
packageName = __non_webpack_require__(path12.join(dir, "package.json")).name;
|
|
145386
145386
|
else
|
|
145387
|
-
packageName = __require(
|
|
145387
|
+
packageName = __require(path12.join(dir, "package.json")).name;
|
|
145388
145388
|
var varName = packageName.toUpperCase().replace(/-/g, "_") + "_PREBUILD";
|
|
145389
145389
|
if (process.env[varName]) dir = process.env[varName];
|
|
145390
145390
|
} catch (err) {
|
|
145391
145391
|
}
|
|
145392
145392
|
if (!prebuildsOnly) {
|
|
145393
|
-
var release = getFirst(
|
|
145393
|
+
var release = getFirst(path12.join(dir, "build/Release"), matchBuild);
|
|
145394
145394
|
if (release) return release;
|
|
145395
|
-
var debug = getFirst(
|
|
145395
|
+
var debug = getFirst(path12.join(dir, "build/Debug"), matchBuild);
|
|
145396
145396
|
if (debug) return debug;
|
|
145397
145397
|
}
|
|
145398
145398
|
var prebuild = resolve2(dir);
|
|
145399
145399
|
if (prebuild) return prebuild;
|
|
145400
|
-
var nearby = resolve2(
|
|
145400
|
+
var nearby = resolve2(path12.dirname(process.execPath));
|
|
145401
145401
|
if (nearby) return nearby;
|
|
145402
145402
|
var platformPackage = (packageName[0] == "@" ? "" : "@" + packageName + "/") + packageName + "-" + platform + "-" + arch;
|
|
145403
145403
|
try {
|
|
145404
|
-
var prebuildPackage =
|
|
145404
|
+
var prebuildPackage = path12.dirname(__require("module").createRequire(url.pathToFileURL(path12.join(dir, "package.json"))).resolve(platformPackage));
|
|
145405
145405
|
return resolveFile(prebuildPackage);
|
|
145406
145406
|
} catch (error) {
|
|
145407
145407
|
}
|
|
@@ -145420,16 +145420,16 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145420
145420
|
].filter(Boolean).join(" ");
|
|
145421
145421
|
throw new Error("No native build was found for " + target + "\n attempted loading from: " + dir + " and package: " + platformPackage + "\n");
|
|
145422
145422
|
function resolve2(dir2) {
|
|
145423
|
-
var tuples = readdirSync(
|
|
145423
|
+
var tuples = readdirSync(path12.join(dir2, "prebuilds")).map(parseTuple);
|
|
145424
145424
|
var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
145425
145425
|
if (!tuple) return;
|
|
145426
|
-
return resolveFile(
|
|
145426
|
+
return resolveFile(path12.join(dir2, "prebuilds", tuple.name));
|
|
145427
145427
|
}
|
|
145428
145428
|
function resolveFile(prebuilds) {
|
|
145429
145429
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
145430
145430
|
var candidates = parsed.filter(matchTags(runtime, abi33));
|
|
145431
145431
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
145432
|
-
if (winner) return
|
|
145432
|
+
if (winner) return path12.join(prebuilds, winner.file);
|
|
145433
145433
|
}
|
|
145434
145434
|
};
|
|
145435
145435
|
function readdirSync(dir) {
|
|
@@ -145441,7 +145441,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145441
145441
|
}
|
|
145442
145442
|
function getFirst(dir, filter) {
|
|
145443
145443
|
var files = readdirSync(dir).filter(filter);
|
|
145444
|
-
return files[0] &&
|
|
145444
|
+
return files[0] && path12.join(dir, files[0]);
|
|
145445
145445
|
}
|
|
145446
145446
|
function matchBuild(name) {
|
|
145447
145447
|
return /\.node$/.test(name);
|
|
@@ -149104,14 +149104,14 @@ var require_url_state_machine = __commonJS({
|
|
|
149104
149104
|
return url.replace(/\u0009|\u000A|\u000D/g, "");
|
|
149105
149105
|
}
|
|
149106
149106
|
function shortenPath(url) {
|
|
149107
|
-
const
|
|
149108
|
-
if (
|
|
149107
|
+
const path12 = url.path;
|
|
149108
|
+
if (path12.length === 0) {
|
|
149109
149109
|
return;
|
|
149110
149110
|
}
|
|
149111
|
-
if (url.scheme === "file" &&
|
|
149111
|
+
if (url.scheme === "file" && path12.length === 1 && isNormalizedWindowsDriveLetter(path12[0])) {
|
|
149112
149112
|
return;
|
|
149113
149113
|
}
|
|
149114
|
-
|
|
149114
|
+
path12.pop();
|
|
149115
149115
|
}
|
|
149116
149116
|
function includesCredentials(url) {
|
|
149117
149117
|
return url.username !== "" || url.password !== "";
|
|
@@ -183862,9 +183862,9 @@ var require_setupKzg = __commonJS({
|
|
|
183862
183862
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
183863
183863
|
exports2.setupKzg = setupKzg;
|
|
183864
183864
|
var defineKzg_js_1 = require_defineKzg();
|
|
183865
|
-
function setupKzg(parameters,
|
|
183865
|
+
function setupKzg(parameters, path12) {
|
|
183866
183866
|
try {
|
|
183867
|
-
parameters.loadTrustedSetup(
|
|
183867
|
+
parameters.loadTrustedSetup(path12);
|
|
183868
183868
|
} catch (e) {
|
|
183869
183869
|
const error = e;
|
|
183870
183870
|
if (!error.message.includes("trusted setup is already loaded"))
|
|
@@ -230178,13 +230178,13 @@ function __disposeResources(env2) {
|
|
|
230178
230178
|
}
|
|
230179
230179
|
return next();
|
|
230180
230180
|
}
|
|
230181
|
-
function __rewriteRelativeImportExtension(
|
|
230182
|
-
if (typeof
|
|
230183
|
-
return
|
|
230181
|
+
function __rewriteRelativeImportExtension(path12, preserveJsx) {
|
|
230182
|
+
if (typeof path12 === "string" && /^\.\.?\//.test(path12)) {
|
|
230183
|
+
return path12.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
230184
230184
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
230185
230185
|
});
|
|
230186
230186
|
}
|
|
230187
|
-
return
|
|
230187
|
+
return path12;
|
|
230188
230188
|
}
|
|
230189
230189
|
var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, ownKeys, _SuppressedError, tslib_es6_default;
|
|
230190
230190
|
var init_tslib_es62 = __esm({
|
|
@@ -236377,14 +236377,14 @@ var require_lib41 = __commonJS({
|
|
|
236377
236377
|
}
|
|
236378
236378
|
this.pubHash = hash160(this.pubKey);
|
|
236379
236379
|
}
|
|
236380
|
-
derive(
|
|
236381
|
-
if (!/^[mM]'?/.test(
|
|
236380
|
+
derive(path12) {
|
|
236381
|
+
if (!/^[mM]'?/.test(path12)) {
|
|
236382
236382
|
throw new Error('Path must start with "m" or "M"');
|
|
236383
236383
|
}
|
|
236384
|
-
if (/^[mM]'?$/.test(
|
|
236384
|
+
if (/^[mM]'?$/.test(path12)) {
|
|
236385
236385
|
return this;
|
|
236386
236386
|
}
|
|
236387
|
-
const parts =
|
|
236387
|
+
const parts = path12.replace(/^[mM]'?\//, "").split("/");
|
|
236388
236388
|
let child = this;
|
|
236389
236389
|
for (const c of parts) {
|
|
236390
236390
|
const m = /^(\d+)('?)$/.exec(c);
|
|
@@ -257507,8 +257507,8 @@ var require_hdKeyToAccount = __commonJS({
|
|
|
257507
257507
|
exports2.hdKeyToAccount = hdKeyToAccount;
|
|
257508
257508
|
var toHex_js_1 = require_toHex();
|
|
257509
257509
|
var privateKeyToAccount_js_1 = require_privateKeyToAccount();
|
|
257510
|
-
function hdKeyToAccount(hdKey_, { accountIndex = 0, addressIndex = 0, changeIndex = 0, path:
|
|
257511
|
-
const hdKey = hdKey_.derive(
|
|
257510
|
+
function hdKeyToAccount(hdKey_, { accountIndex = 0, addressIndex = 0, changeIndex = 0, path: path12, ...options } = {}) {
|
|
257511
|
+
const hdKey = hdKey_.derive(path12 || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`);
|
|
257512
257512
|
const account = (0, privateKeyToAccount_js_1.privateKeyToAccount)((0, toHex_js_1.toHex)(hdKey.privateKey), options);
|
|
257513
257513
|
return {
|
|
257514
257514
|
...account,
|
|
@@ -264646,12 +264646,12 @@ var require_abstract_coder3 = __commonJS({
|
|
|
264646
264646
|
exports2.Result = Result;
|
|
264647
264647
|
function checkResultErrors(result) {
|
|
264648
264648
|
const errors = [];
|
|
264649
|
-
const checkErrors = function(
|
|
264649
|
+
const checkErrors = function(path12, object) {
|
|
264650
264650
|
if (!Array.isArray(object)) {
|
|
264651
264651
|
return;
|
|
264652
264652
|
}
|
|
264653
264653
|
for (let key in object) {
|
|
264654
|
-
const childPath =
|
|
264654
|
+
const childPath = path12.slice();
|
|
264655
264655
|
childPath.push(key);
|
|
264656
264656
|
try {
|
|
264657
264657
|
checkErrors(childPath, object[key]);
|
|
@@ -287355,9 +287355,9 @@ var require_provider_ipcsocket2 = __commonJS({
|
|
|
287355
287355
|
get socket() {
|
|
287356
287356
|
return this.#socket;
|
|
287357
287357
|
}
|
|
287358
|
-
constructor(
|
|
287358
|
+
constructor(path12, network, options) {
|
|
287359
287359
|
super(network, options);
|
|
287360
|
-
this.#socket = (0, net_1.connect)(
|
|
287360
|
+
this.#socket = (0, net_1.connect)(path12);
|
|
287361
287361
|
this.socket.on("ready", async () => {
|
|
287362
287362
|
try {
|
|
287363
287363
|
await this._start();
|
|
@@ -288044,11 +288044,11 @@ var require_utils34 = __commonJS({
|
|
|
288044
288044
|
function spelunk(object, _path) {
|
|
288045
288045
|
const match2 = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);
|
|
288046
288046
|
(0, index_js_1.assertArgument)(match2 != null, "invalid path", "path", _path);
|
|
288047
|
-
const
|
|
288047
|
+
const path12 = match2[1];
|
|
288048
288048
|
const type = match2[3];
|
|
288049
288049
|
const reqd = match2[4] === "!";
|
|
288050
288050
|
let cur = object;
|
|
288051
|
-
for (const comp of
|
|
288051
|
+
for (const comp of path12.toLowerCase().split(".")) {
|
|
288052
288052
|
if (Array.isArray(cur)) {
|
|
288053
288053
|
if (!comp.match(/^[0-9]+$/)) {
|
|
288054
288054
|
break;
|
|
@@ -288070,7 +288070,7 @@ var require_utils34 = __commonJS({
|
|
|
288070
288070
|
break;
|
|
288071
288071
|
}
|
|
288072
288072
|
}
|
|
288073
|
-
(0, index_js_1.assertArgument)(!reqd || cur != null, "missing required value", "path",
|
|
288073
|
+
(0, index_js_1.assertArgument)(!reqd || cur != null, "missing required value", "path", path12);
|
|
288074
288074
|
if (type && cur != null) {
|
|
288075
288075
|
if (type === "int") {
|
|
288076
288076
|
if (typeof cur === "string" && cur.match(/^-?[0-9]+$/)) {
|
|
@@ -288095,7 +288095,7 @@ var require_utils34 = __commonJS({
|
|
|
288095
288095
|
if (type === typeof cur) {
|
|
288096
288096
|
return cur;
|
|
288097
288097
|
}
|
|
288098
|
-
(0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, "path",
|
|
288098
|
+
(0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, "path", path12);
|
|
288099
288099
|
}
|
|
288100
288100
|
return cur;
|
|
288101
288101
|
}
|
|
@@ -288293,7 +288293,7 @@ var require_json_keystore2 = __commonJS({
|
|
|
288293
288293
|
};
|
|
288294
288294
|
if (account.mnemonic) {
|
|
288295
288295
|
const client = options.client != null ? options.client : `ethers/${_version_js_1.version}`;
|
|
288296
|
-
const
|
|
288296
|
+
const path12 = account.mnemonic.path || defaultPath;
|
|
288297
288297
|
const locale = account.mnemonic.locale || "en";
|
|
288298
288298
|
const mnemonicKey = key.slice(32, 64);
|
|
288299
288299
|
const entropy = (0, index_js_4.getBytes)(account.mnemonic.entropy, "account.mnemonic.entropy");
|
|
@@ -288306,7 +288306,7 @@ var require_json_keystore2 = __commonJS({
|
|
|
288306
288306
|
data["x-ethers"] = {
|
|
288307
288307
|
client,
|
|
288308
288308
|
gethFilename,
|
|
288309
|
-
path:
|
|
288309
|
+
path: path12,
|
|
288310
288310
|
locale,
|
|
288311
288311
|
mnemonicCounter: (0, index_js_4.hexlify)(mnemonicIv).substring(2),
|
|
288312
288312
|
mnemonicCiphertext: (0, index_js_4.hexlify)(mnemonicCiphertext).substring(2),
|
|
@@ -288391,11 +288391,11 @@ var require_hdwallet2 = __commonJS({
|
|
|
288391
288391
|
const I = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)("sha512", chainCode, data));
|
|
288392
288392
|
return { IL: I.slice(0, 32), IR: I.slice(32) };
|
|
288393
288393
|
}
|
|
288394
|
-
function derivePath(node,
|
|
288395
|
-
const components =
|
|
288396
|
-
(0, index_js_4.assertArgument)(components.length > 0, "invalid path", "path",
|
|
288394
|
+
function derivePath(node, path12) {
|
|
288395
|
+
const components = path12.split("/");
|
|
288396
|
+
(0, index_js_4.assertArgument)(components.length > 0, "invalid path", "path", path12);
|
|
288397
288397
|
if (components[0] === "m") {
|
|
288398
|
-
(0, index_js_4.assertArgument)(node.depth === 0, `cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${node.depth}`, "path",
|
|
288398
|
+
(0, index_js_4.assertArgument)(node.depth === 0, `cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${node.depth}`, "path", path12);
|
|
288399
288399
|
components.shift();
|
|
288400
288400
|
}
|
|
288401
288401
|
let result = node;
|
|
@@ -288465,7 +288465,7 @@ var require_hdwallet2 = __commonJS({
|
|
|
288465
288465
|
/**
|
|
288466
288466
|
* @private
|
|
288467
288467
|
*/
|
|
288468
|
-
constructor(guard, signingKey, parentFingerprint, chainCode,
|
|
288468
|
+
constructor(guard, signingKey, parentFingerprint, chainCode, path12, index2, depth, mnemonic, provider) {
|
|
288469
288469
|
super(signingKey, provider);
|
|
288470
288470
|
(0, index_js_4.assertPrivate)(guard, _guard, "HDNodeWallet");
|
|
288471
288471
|
(0, index_js_4.defineProperties)(this, { publicKey: signingKey.compressedPublicKey });
|
|
@@ -288474,7 +288474,7 @@ var require_hdwallet2 = __commonJS({
|
|
|
288474
288474
|
parentFingerprint,
|
|
288475
288475
|
fingerprint,
|
|
288476
288476
|
chainCode,
|
|
288477
|
-
path:
|
|
288477
|
+
path: path12,
|
|
288478
288478
|
index: index2,
|
|
288479
288479
|
depth
|
|
288480
288480
|
});
|
|
@@ -288558,22 +288558,22 @@ var require_hdwallet2 = __commonJS({
|
|
|
288558
288558
|
deriveChild(_index) {
|
|
288559
288559
|
const index2 = (0, index_js_4.getNumber)(_index, "index");
|
|
288560
288560
|
(0, index_js_4.assertArgument)(index2 <= 4294967295, "invalid index", "index", index2);
|
|
288561
|
-
let
|
|
288562
|
-
if (
|
|
288563
|
-
|
|
288561
|
+
let path12 = this.path;
|
|
288562
|
+
if (path12) {
|
|
288563
|
+
path12 += "/" + (index2 & ~HardenedBit);
|
|
288564
288564
|
if (index2 & HardenedBit) {
|
|
288565
|
-
|
|
288565
|
+
path12 += "'";
|
|
288566
288566
|
}
|
|
288567
288567
|
}
|
|
288568
288568
|
const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, this.privateKey);
|
|
288569
288569
|
const ki = new index_js_1.SigningKey((0, index_js_4.toBeHex)(((0, index_js_4.toBigInt)(IL) + BigInt(this.privateKey)) % N, 32));
|
|
288570
|
-
return new _HDNodeWallet(_guard, ki, this.fingerprint, (0, index_js_4.hexlify)(IR),
|
|
288570
|
+
return new _HDNodeWallet(_guard, ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path12, index2, this.depth + 1, this.mnemonic, this.provider);
|
|
288571
288571
|
}
|
|
288572
288572
|
/**
|
|
288573
288573
|
* Return the HDNode for %%path%% from this node.
|
|
288574
288574
|
*/
|
|
288575
|
-
derivePath(
|
|
288576
|
-
return derivePath(this,
|
|
288575
|
+
derivePath(path12) {
|
|
288576
|
+
return derivePath(this, path12);
|
|
288577
288577
|
}
|
|
288578
288578
|
static #fromSeed(_seed, mnemonic) {
|
|
288579
288579
|
(0, index_js_4.assertArgument)((0, index_js_4.isBytesLike)(_seed), "invalid seed", "seed", "[REDACTED]");
|
|
@@ -288618,43 +288618,43 @@ var require_hdwallet2 = __commonJS({
|
|
|
288618
288618
|
/**
|
|
288619
288619
|
* Creates a new random HDNode.
|
|
288620
288620
|
*/
|
|
288621
|
-
static createRandom(password,
|
|
288621
|
+
static createRandom(password, path12, wordlist) {
|
|
288622
288622
|
if (password == null) {
|
|
288623
288623
|
password = "";
|
|
288624
288624
|
}
|
|
288625
|
-
if (
|
|
288626
|
-
|
|
288625
|
+
if (path12 == null) {
|
|
288626
|
+
path12 = exports2.defaultPath;
|
|
288627
288627
|
}
|
|
288628
288628
|
if (wordlist == null) {
|
|
288629
288629
|
wordlist = lang_en_js_1.LangEn.wordlist();
|
|
288630
288630
|
}
|
|
288631
288631
|
const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy((0, index_js_1.randomBytes)(16), password, wordlist);
|
|
288632
|
-
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(
|
|
288632
|
+
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path12);
|
|
288633
288633
|
}
|
|
288634
288634
|
/**
|
|
288635
288635
|
* Create an HD Node from %%mnemonic%%.
|
|
288636
288636
|
*/
|
|
288637
|
-
static fromMnemonic(mnemonic,
|
|
288638
|
-
if (!
|
|
288639
|
-
|
|
288637
|
+
static fromMnemonic(mnemonic, path12) {
|
|
288638
|
+
if (!path12) {
|
|
288639
|
+
path12 = exports2.defaultPath;
|
|
288640
288640
|
}
|
|
288641
|
-
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(
|
|
288641
|
+
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path12);
|
|
288642
288642
|
}
|
|
288643
288643
|
/**
|
|
288644
288644
|
* Creates an HD Node from a mnemonic %%phrase%%.
|
|
288645
288645
|
*/
|
|
288646
|
-
static fromPhrase(phrase, password,
|
|
288646
|
+
static fromPhrase(phrase, password, path12, wordlist) {
|
|
288647
288647
|
if (password == null) {
|
|
288648
288648
|
password = "";
|
|
288649
288649
|
}
|
|
288650
|
-
if (
|
|
288651
|
-
|
|
288650
|
+
if (path12 == null) {
|
|
288651
|
+
path12 = exports2.defaultPath;
|
|
288652
288652
|
}
|
|
288653
288653
|
if (wordlist == null) {
|
|
288654
288654
|
wordlist = lang_en_js_1.LangEn.wordlist();
|
|
288655
288655
|
}
|
|
288656
288656
|
const mnemonic = mnemonic_js_1.Mnemonic.fromPhrase(phrase, password, wordlist);
|
|
288657
|
-
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(
|
|
288657
|
+
return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path12);
|
|
288658
288658
|
}
|
|
288659
288659
|
/**
|
|
288660
288660
|
* Creates an HD Node from a %%seed%%.
|
|
@@ -288707,7 +288707,7 @@ var require_hdwallet2 = __commonJS({
|
|
|
288707
288707
|
/**
|
|
288708
288708
|
* @private
|
|
288709
288709
|
*/
|
|
288710
|
-
constructor(guard, address, publicKey, parentFingerprint, chainCode,
|
|
288710
|
+
constructor(guard, address, publicKey, parentFingerprint, chainCode, path12, index2, depth, provider) {
|
|
288711
288711
|
super(address, provider);
|
|
288712
288712
|
(0, index_js_4.assertPrivate)(guard, _guard, "HDNodeVoidWallet");
|
|
288713
288713
|
(0, index_js_4.defineProperties)(this, { publicKey });
|
|
@@ -288717,7 +288717,7 @@ var require_hdwallet2 = __commonJS({
|
|
|
288717
288717
|
fingerprint,
|
|
288718
288718
|
parentFingerprint,
|
|
288719
288719
|
chainCode,
|
|
288720
|
-
path:
|
|
288720
|
+
path: path12,
|
|
288721
288721
|
index: index2,
|
|
288722
288722
|
depth
|
|
288723
288723
|
});
|
|
@@ -288755,23 +288755,23 @@ var require_hdwallet2 = __commonJS({
|
|
|
288755
288755
|
deriveChild(_index) {
|
|
288756
288756
|
const index2 = (0, index_js_4.getNumber)(_index, "index");
|
|
288757
288757
|
(0, index_js_4.assertArgument)(index2 <= 4294967295, "invalid index", "index", index2);
|
|
288758
|
-
let
|
|
288759
|
-
if (
|
|
288760
|
-
|
|
288758
|
+
let path12 = this.path;
|
|
288759
|
+
if (path12) {
|
|
288760
|
+
path12 += "/" + (index2 & ~HardenedBit);
|
|
288761
288761
|
if (index2 & HardenedBit) {
|
|
288762
|
-
|
|
288762
|
+
path12 += "'";
|
|
288763
288763
|
}
|
|
288764
288764
|
}
|
|
288765
288765
|
const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, null);
|
|
288766
288766
|
const Ki = index_js_1.SigningKey.addPoints(IL, this.publicKey, true);
|
|
288767
288767
|
const address = (0, index_js_3.computeAddress)(Ki);
|
|
288768
|
-
return new _HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR),
|
|
288768
|
+
return new _HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path12, index2, this.depth + 1, this.provider);
|
|
288769
288769
|
}
|
|
288770
288770
|
/**
|
|
288771
288771
|
* Return the signer for %%path%% from this node.
|
|
288772
288772
|
*/
|
|
288773
|
-
derivePath(
|
|
288774
|
-
return derivePath(this,
|
|
288773
|
+
derivePath(path12) {
|
|
288774
|
+
return derivePath(this, path12);
|
|
288775
288775
|
}
|
|
288776
288776
|
};
|
|
288777
288777
|
exports2.HDNodeVoidWallet = HDNodeVoidWallet;
|
|
@@ -291478,10 +291478,10 @@ var require_CheckedContract = __commonJS({
|
|
|
291478
291478
|
} catch (err) {
|
|
291479
291479
|
return null;
|
|
291480
291480
|
}
|
|
291481
|
-
const pathContent = Object.keys(this.solidity).map((
|
|
291481
|
+
const pathContent = Object.keys(this.solidity).map((path12) => {
|
|
291482
291482
|
return {
|
|
291483
|
-
path:
|
|
291484
|
-
content: this.solidity[
|
|
291483
|
+
path: path12,
|
|
291484
|
+
content: this.solidity[path12] || ""
|
|
291485
291485
|
};
|
|
291486
291486
|
});
|
|
291487
291487
|
const byHash = (0, validation_1.storeByHash)(pathContent);
|
|
@@ -294783,8 +294783,8 @@ var require_utils36 = __commonJS({
|
|
|
294783
294783
|
var result = transform[inputType][outputType](input);
|
|
294784
294784
|
return result;
|
|
294785
294785
|
};
|
|
294786
|
-
exports2.resolve = function(
|
|
294787
|
-
var parts =
|
|
294786
|
+
exports2.resolve = function(path12) {
|
|
294787
|
+
var parts = path12.split("/");
|
|
294788
294788
|
var result = [];
|
|
294789
294789
|
for (var index2 = 0; index2 < parts.length; index2++) {
|
|
294790
294790
|
var part = parts[index2];
|
|
@@ -300637,18 +300637,18 @@ var require_object = __commonJS({
|
|
|
300637
300637
|
var object = new ZipObject(name, zipObjectContent, o);
|
|
300638
300638
|
this.files[name] = object;
|
|
300639
300639
|
};
|
|
300640
|
-
var parentFolder = function(
|
|
300641
|
-
if (
|
|
300642
|
-
|
|
300640
|
+
var parentFolder = function(path12) {
|
|
300641
|
+
if (path12.slice(-1) === "/") {
|
|
300642
|
+
path12 = path12.substring(0, path12.length - 1);
|
|
300643
300643
|
}
|
|
300644
|
-
var lastSlash =
|
|
300645
|
-
return lastSlash > 0 ?
|
|
300644
|
+
var lastSlash = path12.lastIndexOf("/");
|
|
300645
|
+
return lastSlash > 0 ? path12.substring(0, lastSlash) : "";
|
|
300646
300646
|
};
|
|
300647
|
-
var forceTrailingSlash = function(
|
|
300648
|
-
if (
|
|
300649
|
-
|
|
300647
|
+
var forceTrailingSlash = function(path12) {
|
|
300648
|
+
if (path12.slice(-1) !== "/") {
|
|
300649
|
+
path12 += "/";
|
|
300650
300650
|
}
|
|
300651
|
-
return
|
|
300651
|
+
return path12;
|
|
300652
300652
|
};
|
|
300653
300653
|
var folderAdd = function(name, createFolders) {
|
|
300654
300654
|
createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
|
|
@@ -301685,15 +301685,15 @@ var require_validation5 = __commonJS({
|
|
|
301685
301685
|
];
|
|
301686
301686
|
function checkPaths(solidityCompiler, paths, ignoring) {
|
|
301687
301687
|
const files = [];
|
|
301688
|
-
paths.forEach((
|
|
301689
|
-
if (fs_1.default.existsSync(
|
|
301690
|
-
traversePathRecursively(
|
|
301688
|
+
paths.forEach((path12) => {
|
|
301689
|
+
if (fs_1.default.existsSync(path12)) {
|
|
301690
|
+
traversePathRecursively(path12, (filePath) => {
|
|
301691
301691
|
const fullPath = path_1.default.resolve(filePath);
|
|
301692
301692
|
const file = { buffer: fs_1.default.readFileSync(filePath), path: fullPath };
|
|
301693
301693
|
files.push(file);
|
|
301694
301694
|
});
|
|
301695
301695
|
} else if (ignoring) {
|
|
301696
|
-
ignoring.push(
|
|
301696
|
+
ignoring.push(path12);
|
|
301697
301697
|
}
|
|
301698
301698
|
});
|
|
301699
301699
|
return checkFiles2(solidityCompiler, files);
|
|
@@ -301931,22 +301931,22 @@ var require_validation5 = __commonJS({
|
|
|
301931
301931
|
var _a, _b, _c, _d;
|
|
301932
301932
|
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);
|
|
301933
301933
|
}
|
|
301934
|
-
function traversePathRecursively(
|
|
301935
|
-
if (!fs_1.default.existsSync(
|
|
301936
|
-
const msg = `Encountered a nonexistent path: ${
|
|
301934
|
+
function traversePathRecursively(path12, worker, afterDirectory) {
|
|
301935
|
+
if (!fs_1.default.existsSync(path12)) {
|
|
301936
|
+
const msg = `Encountered a nonexistent path: ${path12}`;
|
|
301937
301937
|
const error = new Error(msg);
|
|
301938
301938
|
throw error;
|
|
301939
301939
|
}
|
|
301940
|
-
const fileStat = fs_1.default.lstatSync(
|
|
301940
|
+
const fileStat = fs_1.default.lstatSync(path12);
|
|
301941
301941
|
if (fileStat.isFile()) {
|
|
301942
|
-
worker(
|
|
301942
|
+
worker(path12);
|
|
301943
301943
|
} else if (fileStat.isDirectory()) {
|
|
301944
|
-
fs_1.default.readdirSync(
|
|
301945
|
-
const nestedPath = path_1.default.join(
|
|
301944
|
+
fs_1.default.readdirSync(path12).forEach((nestedName) => {
|
|
301945
|
+
const nestedPath = path_1.default.join(path12, nestedName);
|
|
301946
301946
|
traversePathRecursively(nestedPath, worker, afterDirectory);
|
|
301947
301947
|
});
|
|
301948
301948
|
if (afterDirectory) {
|
|
301949
|
-
afterDirectory(
|
|
301949
|
+
afterDirectory(path12);
|
|
301950
301950
|
}
|
|
301951
301951
|
}
|
|
301952
301952
|
}
|
|
@@ -301976,19 +301976,19 @@ var require_validation5 = __commonJS({
|
|
|
301976
301976
|
const endTime = Date.now();
|
|
301977
301977
|
(0, logger_1.logDebug)(`Parsing hardhat file took ${endTime - startTime} milliseconds.`);
|
|
301978
301978
|
const hardhatSourceFilesObject = hardhatJson.input.sources;
|
|
301979
|
-
for (const
|
|
301980
|
-
if (hardhatSourceFilesObject[
|
|
301979
|
+
for (const path12 in hardhatSourceFilesObject) {
|
|
301980
|
+
if (hardhatSourceFilesObject[path12].content) {
|
|
301981
301981
|
hardhatSourceFiles.push({
|
|
301982
|
-
path:
|
|
301983
|
-
content: hardhatSourceFilesObject[
|
|
301982
|
+
path: path12,
|
|
301983
|
+
content: hardhatSourceFilesObject[path12].content
|
|
301984
301984
|
});
|
|
301985
301985
|
}
|
|
301986
301986
|
}
|
|
301987
301987
|
const contractsObject = hardhatJson.output.contracts;
|
|
301988
|
-
for (const
|
|
301989
|
-
for (const contractName in contractsObject[
|
|
301990
|
-
if (contractsObject[
|
|
301991
|
-
const metadataObj = extractMetadataFromString(contractsObject[
|
|
301988
|
+
for (const path12 in contractsObject) {
|
|
301989
|
+
for (const contractName in contractsObject[path12]) {
|
|
301990
|
+
if (contractsObject[path12][contractName].metadata) {
|
|
301991
|
+
const metadataObj = extractMetadataFromString(contractsObject[path12][contractName].metadata);
|
|
301992
301992
|
hardhatMetadataFiles.push(metadataObj);
|
|
301993
301993
|
}
|
|
301994
301994
|
}
|
|
@@ -303888,15 +303888,15 @@ var require_route = __commonJS({
|
|
|
303888
303888
|
};
|
|
303889
303889
|
}
|
|
303890
303890
|
function wrapConversion(toModel, graph) {
|
|
303891
|
-
const
|
|
303891
|
+
const path12 = [graph[toModel].parent, toModel];
|
|
303892
303892
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
303893
303893
|
let cur = graph[toModel].parent;
|
|
303894
303894
|
while (graph[cur].parent) {
|
|
303895
|
-
|
|
303895
|
+
path12.unshift(graph[cur].parent);
|
|
303896
303896
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
303897
303897
|
cur = graph[cur].parent;
|
|
303898
303898
|
}
|
|
303899
|
-
fn.conversion =
|
|
303899
|
+
fn.conversion = path12;
|
|
303900
303900
|
return fn;
|
|
303901
303901
|
}
|
|
303902
303902
|
module2.exports = function(fromModel) {
|
|
@@ -365271,12 +365271,12 @@ var UniswapV3AdapterContract = class extends AbstractAdapterContract {
|
|
|
365271
365271
|
];
|
|
365272
365272
|
}
|
|
365273
365273
|
case "exactInput": {
|
|
365274
|
-
const [{ amountIn, amountOutMinimum, path:
|
|
365275
|
-
const pathStr = this.trackInputPath(
|
|
365276
|
-
const token = `0x${
|
|
365274
|
+
const [{ amountIn, amountOutMinimum, path: path12 }] = params.args;
|
|
365275
|
+
const pathStr = this.trackInputPath(path12);
|
|
365276
|
+
const token = `0x${path12.replace("0x", "").slice(0, 40)}`;
|
|
365277
365277
|
const amountInStr = this.sdk.tokensMeta.formatBN(token, amountIn);
|
|
365278
365278
|
const amountOutMinimumStr = this.sdk.tokensMeta.formatBN(
|
|
365279
|
-
`0x${
|
|
365279
|
+
`0x${path12.slice(-40, path12.length)}`,
|
|
365280
365280
|
amountOutMinimum
|
|
365281
365281
|
);
|
|
365282
365282
|
return [
|
|
@@ -365284,12 +365284,12 @@ var UniswapV3AdapterContract = class extends AbstractAdapterContract {
|
|
|
365284
365284
|
];
|
|
365285
365285
|
}
|
|
365286
365286
|
case "exactDiffInput": {
|
|
365287
|
-
const [{ leftoverAmount, rateMinRAY, path:
|
|
365287
|
+
const [{ leftoverAmount, rateMinRAY, path: path12 }] = params.args;
|
|
365288
365288
|
const leftoverAmountStr = this.sdk.tokensMeta.formatBN(
|
|
365289
|
-
`0x${
|
|
365289
|
+
`0x${path12.replace("0x", "").slice(0, 40)}`,
|
|
365290
365290
|
leftoverAmount
|
|
365291
365291
|
);
|
|
365292
|
-
const pathStr = this.trackInputPath(
|
|
365292
|
+
const pathStr = this.trackInputPath(path12);
|
|
365293
365293
|
return [
|
|
365294
365294
|
`(leftoverAmount: ${leftoverAmountStr}, rate: ${formatBN(
|
|
365295
365295
|
rateMinRAY,
|
|
@@ -365298,14 +365298,14 @@ var UniswapV3AdapterContract = class extends AbstractAdapterContract {
|
|
|
365298
365298
|
];
|
|
365299
365299
|
}
|
|
365300
365300
|
case "exactOutput": {
|
|
365301
|
-
const [{ amountInMaximum, amountOut, path:
|
|
365302
|
-
const pathStr = this.trackOutputPath(
|
|
365301
|
+
const [{ amountInMaximum, amountOut, path: path12 }] = params.args;
|
|
365302
|
+
const pathStr = this.trackOutputPath(path12);
|
|
365303
365303
|
const amountInMaximumStr = this.sdk.tokensMeta.formatBN(
|
|
365304
|
-
`0x${
|
|
365304
|
+
`0x${path12.slice(-40, path12.length)}`,
|
|
365305
365305
|
amountInMaximum
|
|
365306
365306
|
);
|
|
365307
365307
|
const amountOutStr = this.sdk.tokensMeta.formatBN(
|
|
365308
|
-
`0x${
|
|
365308
|
+
`0x${path12.replace("0x", "").slice(0, 40)}`,
|
|
365309
365309
|
amountOut
|
|
365310
365310
|
);
|
|
365311
365311
|
return [
|
|
@@ -365329,30 +365329,30 @@ var UniswapV3AdapterContract = class extends AbstractAdapterContract {
|
|
|
365329
365329
|
return void 0;
|
|
365330
365330
|
}
|
|
365331
365331
|
}
|
|
365332
|
-
trackInputPath(
|
|
365332
|
+
trackInputPath(path12) {
|
|
365333
365333
|
let result = "";
|
|
365334
|
-
let pointer =
|
|
365335
|
-
while (pointer <=
|
|
365336
|
-
const from = `0x${
|
|
365334
|
+
let pointer = path12.startsWith("0x") ? 2 : 0;
|
|
365335
|
+
while (pointer <= path12.length - 40) {
|
|
365336
|
+
const from = `0x${path12.slice(pointer, pointer + 40)}`.toLowerCase();
|
|
365337
365337
|
result += this.sdk.tokensMeta.symbol(from) || from;
|
|
365338
365338
|
pointer += 40;
|
|
365339
|
-
if (pointer >
|
|
365340
|
-
const fee = parseInt(
|
|
365339
|
+
if (pointer > path12.length - 6) return result;
|
|
365340
|
+
const fee = parseInt(path12.slice(pointer, pointer + 6), 16);
|
|
365341
365341
|
pointer += 6;
|
|
365342
365342
|
result += ` ==(fee: ${fee})==> `;
|
|
365343
365343
|
}
|
|
365344
365344
|
return result;
|
|
365345
365345
|
}
|
|
365346
|
-
trackOutputPath(
|
|
365346
|
+
trackOutputPath(path12) {
|
|
365347
365347
|
let result = "";
|
|
365348
|
-
let pointer =
|
|
365348
|
+
let pointer = path12.length;
|
|
365349
365349
|
while (pointer >= 40) {
|
|
365350
365350
|
pointer -= 40;
|
|
365351
|
-
const from = `0x${
|
|
365351
|
+
const from = `0x${path12.slice(pointer, pointer + 40)}`;
|
|
365352
365352
|
result += this.sdk.tokensMeta.symbol(from) || from;
|
|
365353
365353
|
if (pointer < 6) return result;
|
|
365354
365354
|
pointer -= 6;
|
|
365355
|
-
const fee = parseInt(
|
|
365355
|
+
const fee = parseInt(path12.slice(pointer, pointer + 6), 16);
|
|
365356
365356
|
result += ` ==(fee: ${fee})==> `;
|
|
365357
365357
|
}
|
|
365358
365358
|
return result;
|
|
@@ -375437,9 +375437,9 @@ var PathOptionFactory = class _PathOptionFactory {
|
|
|
375437
375437
|
const balancerSet = /* @__PURE__ */ new Set([...balancerPools, ...balancerTokensFromAura]);
|
|
375438
375438
|
return Array.from(balancerSet.values());
|
|
375439
375439
|
}
|
|
375440
|
-
static next(
|
|
375441
|
-
let newPath = [...
|
|
375442
|
-
for (let i =
|
|
375440
|
+
static next(path12) {
|
|
375441
|
+
let newPath = [...path12];
|
|
375442
|
+
for (let i = path12.length - 1; i >= 0; i--) {
|
|
375443
375443
|
const po = { ...newPath[i] };
|
|
375444
375444
|
po.option++;
|
|
375445
375445
|
newPath[i] = po;
|
|
@@ -377294,9 +377294,9 @@ var log_default = logger;
|
|
|
377294
377294
|
var log = log_default.child({ name: "git" });
|
|
377295
377295
|
function getGithubUrl(repo, https = false) {
|
|
377296
377296
|
const credentials = process.env.GITHUB_TOKEN ?? process.env.GH_TOKEN;
|
|
377297
|
-
const
|
|
377297
|
+
const path12 = repo.replace(/^@/, "").replace(/\/$/, "");
|
|
377298
377298
|
const cred = credentials ? `${credentials}@` : "";
|
|
377299
|
-
return https || credentials ? `https://${cred}github.com/${
|
|
377299
|
+
return https || credentials ? `https://${cred}github.com/${path12}.git` : `git@github.com:${path12}.git`;
|
|
377300
377300
|
}
|
|
377301
377301
|
async function cloneRepo(opts) {
|
|
377302
377302
|
const { repo, commit, sandboxDir } = opts;
|
|
@@ -394603,8 +394603,8 @@ function asyncExecSolc(inputStringified, solcPath) {
|
|
|
394603
394603
|
child.stdin.end();
|
|
394604
394604
|
});
|
|
394605
394605
|
}
|
|
394606
|
-
function importWorker(
|
|
394607
|
-
const resolvedPath = __require.resolve(
|
|
394606
|
+
function importWorker(path12, options) {
|
|
394607
|
+
const resolvedPath = __require.resolve(path12);
|
|
394608
394608
|
return new Worker(resolvedPath, {
|
|
394609
394609
|
...options,
|
|
394610
394610
|
execArgv: /\.ts$/.test(resolvedPath) ? ["--require", "ts-node/register"] : void 0
|
|
@@ -394630,7 +394630,7 @@ function isCallExternalTransaction(t) {
|
|
|
394630
394630
|
// ../../packages/node/dist/utils.js
|
|
394631
394631
|
var import_bytecode_utils = __toESM(require_main(), 1);
|
|
394632
394632
|
function extractFilesFromJSON(files) {
|
|
394633
|
-
return Object.entries(files).map(([
|
|
394633
|
+
return Object.entries(files).map(([path12, file]) => {
|
|
394634
394634
|
let buffer2 = null;
|
|
394635
394635
|
if (Buffer.isBuffer(file)) {
|
|
394636
394636
|
buffer2 = file;
|
|
@@ -394645,7 +394645,7 @@ function extractFilesFromJSON(files) {
|
|
|
394645
394645
|
throw new Error(`cannot convert ${typeof file} into buffer`);
|
|
394646
394646
|
}
|
|
394647
394647
|
return {
|
|
394648
|
-
path:
|
|
394648
|
+
path: path12,
|
|
394649
394649
|
buffer: buffer2
|
|
394650
394650
|
};
|
|
394651
394651
|
});
|
|
@@ -394706,8 +394706,8 @@ var Auditor = class {
|
|
|
394706
394706
|
if (!meta.files) {
|
|
394707
394707
|
throw new Error("no files to audit");
|
|
394708
394708
|
}
|
|
394709
|
-
const files = extractFilesFromJSON(meta.files).filter((f) => f.path !== "metadata.json").map(({ path:
|
|
394710
|
-
const p =
|
|
394709
|
+
const files = extractFilesFromJSON(meta.files).filter((f) => f.path !== "metadata.json").map(({ path: path12, buffer: buffer2 }) => {
|
|
394710
|
+
const p = path12.includes("node_modules/") ? path12.replace("node_modules/", "") : meta.source;
|
|
394711
394711
|
const gearbox = p.startsWith("@gearbox-protocol");
|
|
394712
394712
|
return {
|
|
394713
394713
|
gearbox,
|
|
@@ -394727,8 +394727,8 @@ var Auditor = class {
|
|
|
394727
394727
|
*/
|
|
394728
394728
|
async auditEtherscanVerified(contract) {
|
|
394729
394729
|
const input = parseEtherscanSourceCode(contract);
|
|
394730
|
-
const files = extractFilesFromJSON(input.sources).map(({ path:
|
|
394731
|
-
const p =
|
|
394730
|
+
const files = extractFilesFromJSON(input.sources).map(({ path: path12, buffer: buffer2 }) => {
|
|
394731
|
+
const p = path12.replace("node_modules/", "");
|
|
394732
394732
|
const gearbox = p.startsWith("@gearbox-protocol");
|
|
394733
394733
|
return {
|
|
394734
394734
|
gearbox,
|
|
@@ -395238,8 +395238,8 @@ function getErrorMap() {
|
|
|
395238
395238
|
return overrideErrorMap;
|
|
395239
395239
|
}
|
|
395240
395240
|
var makeIssue = (params) => {
|
|
395241
|
-
const { data, path:
|
|
395242
|
-
const fullPath = [...
|
|
395241
|
+
const { data, path: path12, errorMaps, issueData } = params;
|
|
395242
|
+
const fullPath = [...path12, ...issueData.path || []];
|
|
395243
395243
|
const fullIssue = {
|
|
395244
395244
|
...issueData,
|
|
395245
395245
|
path: fullPath
|
|
@@ -395364,11 +395364,11 @@ var errorUtil;
|
|
|
395364
395364
|
var _ZodEnum_cache;
|
|
395365
395365
|
var _ZodNativeEnum_cache;
|
|
395366
395366
|
var ParseInputLazyPath = class {
|
|
395367
|
-
constructor(parent, value,
|
|
395367
|
+
constructor(parent, value, path12, key) {
|
|
395368
395368
|
this._cachedPath = [];
|
|
395369
395369
|
this.parent = parent;
|
|
395370
395370
|
this.data = value;
|
|
395371
|
-
this._path =
|
|
395371
|
+
this._path = path12;
|
|
395372
395372
|
this._key = key;
|
|
395373
395373
|
}
|
|
395374
395374
|
get path() {
|
|
@@ -399705,19 +399705,19 @@ function toKey(value) {
|
|
|
399705
399705
|
var toKey_default = toKey;
|
|
399706
399706
|
|
|
399707
399707
|
// ../../node_modules/lodash-es/_baseGet.js
|
|
399708
|
-
function baseGet(object,
|
|
399709
|
-
|
|
399710
|
-
var index2 = 0, length =
|
|
399708
|
+
function baseGet(object, path12) {
|
|
399709
|
+
path12 = castPath_default(path12, object);
|
|
399710
|
+
var index2 = 0, length = path12.length;
|
|
399711
399711
|
while (object != null && index2 < length) {
|
|
399712
|
-
object = object[toKey_default(
|
|
399712
|
+
object = object[toKey_default(path12[index2++])];
|
|
399713
399713
|
}
|
|
399714
399714
|
return index2 && index2 == length ? object : void 0;
|
|
399715
399715
|
}
|
|
399716
399716
|
var baseGet_default = baseGet;
|
|
399717
399717
|
|
|
399718
399718
|
// ../../node_modules/lodash-es/get.js
|
|
399719
|
-
function get(object,
|
|
399720
|
-
var result = object == null ? void 0 : baseGet_default(object,
|
|
399719
|
+
function get(object, path12, defaultValue) {
|
|
399720
|
+
var result = object == null ? void 0 : baseGet_default(object, path12);
|
|
399721
399721
|
return result === void 0 ? defaultValue : result;
|
|
399722
399722
|
}
|
|
399723
399723
|
var get_default = get;
|
|
@@ -400666,11 +400666,11 @@ function baseHasIn(object, key) {
|
|
|
400666
400666
|
var baseHasIn_default = baseHasIn;
|
|
400667
400667
|
|
|
400668
400668
|
// ../../node_modules/lodash-es/_hasPath.js
|
|
400669
|
-
function hasPath(object,
|
|
400670
|
-
|
|
400671
|
-
var index2 = -1, length =
|
|
400669
|
+
function hasPath(object, path12, hasFunc) {
|
|
400670
|
+
path12 = castPath_default(path12, object);
|
|
400671
|
+
var index2 = -1, length = path12.length, result = false;
|
|
400672
400672
|
while (++index2 < length) {
|
|
400673
|
-
var key = toKey_default(
|
|
400673
|
+
var key = toKey_default(path12[index2]);
|
|
400674
400674
|
if (!(result = object != null && hasFunc(object, key))) {
|
|
400675
400675
|
break;
|
|
400676
400676
|
}
|
|
@@ -400685,21 +400685,21 @@ function hasPath(object, path11, hasFunc) {
|
|
|
400685
400685
|
var hasPath_default = hasPath;
|
|
400686
400686
|
|
|
400687
400687
|
// ../../node_modules/lodash-es/hasIn.js
|
|
400688
|
-
function hasIn(object,
|
|
400689
|
-
return object != null && hasPath_default(object,
|
|
400688
|
+
function hasIn(object, path12) {
|
|
400689
|
+
return object != null && hasPath_default(object, path12, baseHasIn_default);
|
|
400690
400690
|
}
|
|
400691
400691
|
var hasIn_default = hasIn;
|
|
400692
400692
|
|
|
400693
400693
|
// ../../node_modules/lodash-es/_baseMatchesProperty.js
|
|
400694
400694
|
var COMPARE_PARTIAL_FLAG6 = 1;
|
|
400695
400695
|
var COMPARE_UNORDERED_FLAG4 = 2;
|
|
400696
|
-
function baseMatchesProperty(
|
|
400697
|
-
if (isKey_default(
|
|
400698
|
-
return matchesStrictComparable_default(toKey_default(
|
|
400696
|
+
function baseMatchesProperty(path12, srcValue) {
|
|
400697
|
+
if (isKey_default(path12) && isStrictComparable_default(srcValue)) {
|
|
400698
|
+
return matchesStrictComparable_default(toKey_default(path12), srcValue);
|
|
400699
400699
|
}
|
|
400700
400700
|
return function(object) {
|
|
400701
|
-
var objValue = get_default(object,
|
|
400702
|
-
return objValue === void 0 && objValue === srcValue ? hasIn_default(object,
|
|
400701
|
+
var objValue = get_default(object, path12);
|
|
400702
|
+
return objValue === void 0 && objValue === srcValue ? hasIn_default(object, path12) : baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4);
|
|
400703
400703
|
};
|
|
400704
400704
|
}
|
|
400705
400705
|
var baseMatchesProperty_default = baseMatchesProperty;
|
|
@@ -400713,16 +400713,16 @@ function baseProperty(key) {
|
|
|
400713
400713
|
var baseProperty_default = baseProperty;
|
|
400714
400714
|
|
|
400715
400715
|
// ../../node_modules/lodash-es/_basePropertyDeep.js
|
|
400716
|
-
function basePropertyDeep(
|
|
400716
|
+
function basePropertyDeep(path12) {
|
|
400717
400717
|
return function(object) {
|
|
400718
|
-
return baseGet_default(object,
|
|
400718
|
+
return baseGet_default(object, path12);
|
|
400719
400719
|
};
|
|
400720
400720
|
}
|
|
400721
400721
|
var basePropertyDeep_default = basePropertyDeep;
|
|
400722
400722
|
|
|
400723
400723
|
// ../../node_modules/lodash-es/property.js
|
|
400724
|
-
function property(
|
|
400725
|
-
return isKey_default(
|
|
400724
|
+
function property(path12) {
|
|
400725
|
+
return isKey_default(path12) ? baseProperty_default(toKey_default(path12)) : basePropertyDeep_default(path12);
|
|
400726
400726
|
}
|
|
400727
400727
|
var property_default = property;
|
|
400728
400728
|
|
|
@@ -409175,9 +409175,76 @@ function audit() {
|
|
|
409175
409175
|
});
|
|
409176
409176
|
}
|
|
409177
409177
|
|
|
409178
|
-
// src/commands/
|
|
409179
|
-
import {
|
|
409178
|
+
// src/commands/discover-market-configurator.ts
|
|
409179
|
+
import { readFile as readFile8, writeFile as writeFile5 } from "node:fs/promises";
|
|
409180
409180
|
import path8 from "node:path";
|
|
409181
|
+
function discoverMarketConfigurator() {
|
|
409182
|
+
return newCommand().name("discover-market-configurator").description("Temporary script to discover market configurator").addOption(
|
|
409183
|
+
new Option(
|
|
409184
|
+
"--address-provider <address>",
|
|
409185
|
+
"new address provider address"
|
|
409186
|
+
).env("ADDRESS_PROVIDER")
|
|
409187
|
+
).addOption(
|
|
409188
|
+
new Option("--shared-dir <dir>", "dir to put output files").env(
|
|
409189
|
+
"SHARED_DIR"
|
|
409190
|
+
)
|
|
409191
|
+
).addOption(
|
|
409192
|
+
new Option("--anvil-url <url>", "anvil rpc url").env("ANVIL_URL")
|
|
409193
|
+
).action(async (opts) => {
|
|
409194
|
+
log_default.info("starting sdk v3.1 example");
|
|
409195
|
+
let {
|
|
409196
|
+
addressProviderJson,
|
|
409197
|
+
addressProvider,
|
|
409198
|
+
anvilUrl = "http://127.0.0.1:8545",
|
|
409199
|
+
sharedDir = "."
|
|
409200
|
+
} = opts;
|
|
409201
|
+
if (!addressProvider) {
|
|
409202
|
+
try {
|
|
409203
|
+
addressProvider = await readFile8(addressProviderJson, "utf-8").then(JSON.parse).then((data) => data.addressProvider);
|
|
409204
|
+
} catch {
|
|
409205
|
+
}
|
|
409206
|
+
}
|
|
409207
|
+
if (!addressProvider) {
|
|
409208
|
+
throw new Error("Address provider not found");
|
|
409209
|
+
}
|
|
409210
|
+
log_default.info(`Using address provider: ${addressProvider}`);
|
|
409211
|
+
const client = createAnvilClient({
|
|
409212
|
+
transport: http(anvilUrl)
|
|
409213
|
+
});
|
|
409214
|
+
const marketConfiguratorFactory = await client.readContract({
|
|
409215
|
+
address: addressProvider,
|
|
409216
|
+
abi: iAddressProviderV3_1Abi,
|
|
409217
|
+
functionName: "getAddressOrRevert",
|
|
409218
|
+
args: [stringToHex("MARKET_CONFIGURATOR_FACTORY", { size: 32 }), 0n]
|
|
409219
|
+
});
|
|
409220
|
+
log_default.info(`Market configurator factory: ${marketConfiguratorFactory}`);
|
|
409221
|
+
const mcfAbi = parseAbi([
|
|
409222
|
+
"function getMarketConfigurators() view returns (address[])"
|
|
409223
|
+
]);
|
|
409224
|
+
const marketConfigurators = await client.readContract({
|
|
409225
|
+
address: marketConfiguratorFactory,
|
|
409226
|
+
abi: mcfAbi,
|
|
409227
|
+
functionName: "getMarketConfigurators"
|
|
409228
|
+
});
|
|
409229
|
+
log_default.info(`Market configurators: ${marketConfigurators}`);
|
|
409230
|
+
if (marketConfigurators.length > 0) {
|
|
409231
|
+
const marketConfiguratorJson = path8.resolve(
|
|
409232
|
+
sharedDir,
|
|
409233
|
+
"market-configurator-gearbox.json"
|
|
409234
|
+
);
|
|
409235
|
+
await writeFile5(
|
|
409236
|
+
marketConfiguratorJson,
|
|
409237
|
+
json_stringify({ marketConfigurator: marketConfigurators[0] })
|
|
409238
|
+
);
|
|
409239
|
+
log_default.info(`Market configurator written to ${marketConfiguratorJson}`);
|
|
409240
|
+
}
|
|
409241
|
+
log_default.info("done");
|
|
409242
|
+
});
|
|
409243
|
+
}
|
|
409244
|
+
|
|
409245
|
+
// src/commands/open-accounts.ts
|
|
409246
|
+
import { mkdir, writeFile as writeFile6 } from "node:fs/promises";
|
|
409247
|
+
import path9 from "node:path";
|
|
409181
409248
|
function openAccounts() {
|
|
409182
409249
|
return newCommand().name("open-accounts").description("Script to open accounts in v3.1").addOption(
|
|
409183
409250
|
new Option(
|
|
@@ -409198,24 +409265,24 @@ function openAccounts() {
|
|
|
409198
409265
|
anvilUrl = "http://127.0.0.1:8545",
|
|
409199
409266
|
sharedDir = "."
|
|
409200
409267
|
} = opts;
|
|
409201
|
-
await mkdir(
|
|
409268
|
+
await mkdir(path9.resolve(sharedDir, "deploy-state"), { recursive: true });
|
|
409202
409269
|
const sdkExample2 = new SDKExample(log_default);
|
|
409203
409270
|
await sdkExample2.run({
|
|
409204
409271
|
addressProvider,
|
|
409205
409272
|
addressProviderJson,
|
|
409206
|
-
marketConfiguratorJson:
|
|
409273
|
+
marketConfiguratorJson: path9.resolve(
|
|
409207
409274
|
sharedDir,
|
|
409208
409275
|
"market-configurator-gearbox.json"
|
|
409209
409276
|
),
|
|
409210
409277
|
anvilUrl,
|
|
409211
|
-
outFile:
|
|
409278
|
+
outFile: path9.resolve(
|
|
409212
409279
|
sharedDir,
|
|
409213
409280
|
"deploy-state",
|
|
409214
409281
|
"stateAfter.human.json"
|
|
409215
409282
|
)
|
|
409216
409283
|
});
|
|
409217
|
-
await
|
|
409218
|
-
|
|
409284
|
+
await writeFile6(
|
|
409285
|
+
path9.resolve(sharedDir, "deploy-state", "stateAfter.json"),
|
|
409219
409286
|
json_stringify(sdkExample2.sdk.state),
|
|
409220
409287
|
"utf-8"
|
|
409221
409288
|
);
|
|
@@ -409277,8 +409344,8 @@ function openAccounts() {
|
|
|
409277
409344
|
// sUSDe
|
|
409278
409345
|
}
|
|
409279
409346
|
]);
|
|
409280
|
-
await
|
|
409281
|
-
|
|
409347
|
+
await writeFile6(
|
|
409348
|
+
path9.resolve(sharedDir, "opened-accounts.json"),
|
|
409282
409349
|
json_stringify(opened),
|
|
409283
409350
|
"utf-8"
|
|
409284
409351
|
);
|
|
@@ -409290,20 +409357,20 @@ function openAccounts() {
|
|
|
409290
409357
|
}
|
|
409291
409358
|
|
|
409292
409359
|
// src/commands/parse.ts
|
|
409293
|
-
import { writeFile as
|
|
409360
|
+
import { writeFile as writeFile7 } from "node:fs/promises";
|
|
409294
409361
|
|
|
409295
409362
|
// src/renderer/html/HtmlRenderer.tsx
|
|
409296
409363
|
var import_react = __toESM(require_react(), 1);
|
|
409297
409364
|
var import_server = __toESM(require_server_node(), 1);
|
|
409298
409365
|
import { writeFileSync } from "node:fs";
|
|
409299
|
-
import
|
|
409366
|
+
import path10 from "node:path";
|
|
409300
409367
|
var HtmlRenderer = class {
|
|
409301
409368
|
#htmlFile;
|
|
409302
409369
|
constructor(opts) {
|
|
409303
409370
|
if (!opts.htmlFile) {
|
|
409304
409371
|
throw new Error(`output HTML file not specified`);
|
|
409305
409372
|
}
|
|
409306
|
-
this.#htmlFile =
|
|
409373
|
+
this.#htmlFile = path10.resolve(opts.htmlFile);
|
|
409307
409374
|
}
|
|
409308
409375
|
render(updates) {
|
|
409309
409376
|
const html = (0, import_server.renderToString)(/* @__PURE__ */ import_react.default.createElement("div", null));
|
|
@@ -409336,7 +409403,7 @@ function getRenderer(opts) {
|
|
|
409336
409403
|
var package_default = {
|
|
409337
409404
|
name: "@gearbox-protocol/deploy-tools",
|
|
409338
409405
|
description: "Gearbox deploy tools",
|
|
409339
|
-
version: "5.9.
|
|
409406
|
+
version: "5.9.3",
|
|
409340
409407
|
homepage: "https://gearbox.fi",
|
|
409341
409408
|
keywords: [
|
|
409342
409409
|
"gearbox"
|
|
@@ -409459,7 +409526,7 @@ function parse() {
|
|
|
409459
409526
|
const parser = new UpdateParser(opts, version_default);
|
|
409460
409527
|
const result = await parser.parse(opts);
|
|
409461
409528
|
if (opts.outFile) {
|
|
409462
|
-
await
|
|
409529
|
+
await writeFile7(opts.outFile, json_stringify(result), "utf-8");
|
|
409463
409530
|
}
|
|
409464
409531
|
const renderer = getRenderer(opts);
|
|
409465
409532
|
return renderer?.render(result);
|
|
@@ -409480,8 +409547,8 @@ function printSafeTx() {
|
|
|
409480
409547
|
}
|
|
409481
409548
|
|
|
409482
409549
|
// src/commands/sdk-example.ts
|
|
409483
|
-
import { mkdir as mkdir2, writeFile as
|
|
409484
|
-
import
|
|
409550
|
+
import { mkdir as mkdir2, writeFile as writeFile8 } from "node:fs/promises";
|
|
409551
|
+
import path11 from "node:path";
|
|
409485
409552
|
function sdkExample() {
|
|
409486
409553
|
return newCommand().name("sdk-example").description("SDK example for v3.1").addOption(
|
|
409487
409554
|
new Option(
|
|
@@ -409502,24 +409569,24 @@ function sdkExample() {
|
|
|
409502
409569
|
anvilUrl = "http://127.0.0.1:8545",
|
|
409503
409570
|
sharedDir = "."
|
|
409504
409571
|
} = opts;
|
|
409505
|
-
await mkdir2(
|
|
409572
|
+
await mkdir2(path11.resolve(sharedDir, "deploy-state"), { recursive: true });
|
|
409506
409573
|
const sdkExample2 = new SDKExample(log_default);
|
|
409507
409574
|
await sdkExample2.run({
|
|
409508
409575
|
addressProvider,
|
|
409509
409576
|
addressProviderJson,
|
|
409510
|
-
marketConfiguratorJson:
|
|
409577
|
+
marketConfiguratorJson: path11.resolve(
|
|
409511
409578
|
sharedDir,
|
|
409512
409579
|
"market-configurator-gearbox.json"
|
|
409513
409580
|
),
|
|
409514
409581
|
anvilUrl,
|
|
409515
|
-
outFile:
|
|
409582
|
+
outFile: path11.resolve(
|
|
409516
409583
|
sharedDir,
|
|
409517
409584
|
"deploy-state",
|
|
409518
409585
|
"stateAfter.human.json"
|
|
409519
409586
|
)
|
|
409520
409587
|
});
|
|
409521
|
-
await
|
|
409522
|
-
|
|
409588
|
+
await writeFile8(
|
|
409589
|
+
path11.resolve(sharedDir, "deploy-state", "stateAfter.json"),
|
|
409523
409590
|
json_stringify(sdkExample2.sdk.state),
|
|
409524
409591
|
"utf-8"
|
|
409525
409592
|
);
|
|
@@ -409528,7 +409595,7 @@ function sdkExample() {
|
|
|
409528
409595
|
}
|
|
409529
409596
|
|
|
409530
409597
|
// src/commands/verify-etherscan.ts
|
|
409531
|
-
import { readFile as
|
|
409598
|
+
import { readFile as readFile9 } from "node:fs/promises";
|
|
409532
409599
|
function verifyEtherscan() {
|
|
409533
409600
|
return newCommand().name("verify-etherscan").description(
|
|
409534
409601
|
"performs bulk verification of gearbox contracts using etherscan"
|
|
@@ -409545,7 +409612,7 @@ function verifyEtherscan() {
|
|
|
409545
409612
|
}
|
|
409546
409613
|
let addresses = opts.addresses ?? [];
|
|
409547
409614
|
if (addresses.length === 0 && opts.addressesFile) {
|
|
409548
|
-
const content = await
|
|
409615
|
+
const content = await readFile9(opts.addressesFile, "utf-8");
|
|
409549
409616
|
addresses = Object.keys(json_parse(content));
|
|
409550
409617
|
}
|
|
409551
409618
|
if (!addresses.length) {
|
|
@@ -409572,12 +409639,13 @@ var program2 = new Command();
|
|
|
409572
409639
|
program2.name("deploy-tools").description("gearbox deploy tools").version(version_default);
|
|
409573
409640
|
program2.addCommand(addressTree());
|
|
409574
409641
|
program2.addCommand(audit());
|
|
409642
|
+
program2.addCommand(discoverMarketConfigurator());
|
|
409643
|
+
program2.addCommand(openAccounts());
|
|
409575
409644
|
program2.addCommand(parse());
|
|
409576
409645
|
program2.addCommand(printSafeTx());
|
|
409646
|
+
program2.addCommand(sdkExample());
|
|
409577
409647
|
program2.addCommand(verifyEtherscan());
|
|
409578
409648
|
program2.addCommand(zeroLT());
|
|
409579
|
-
program2.addCommand(sdkExample());
|
|
409580
|
-
program2.addCommand(openAccounts());
|
|
409581
409649
|
program2.parse();
|
|
409582
409650
|
/*! Bundled license information:
|
|
409583
409651
|
|