@gearbox-protocol/deploy-tools 4.1.1 → 4.2.0-next.2

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