@gearbox-protocol/deploy-tools 4.10.2 → 4.11.0

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 +14 -3
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -350511,7 +350511,7 @@ var UpdateParser = class extends ProviderBase {
350511
350511
  await this.init();
350512
350512
  const { batchDir, safeTxHashes } = opts;
350513
350513
  if (batchDir) {
350514
- await this.#parseBatchDir(batchDir);
350514
+ await this.#parseBatchDir(batchDir, opts.unsafeMainnetMeta);
350515
350515
  } else {
350516
350516
  await this.#parseSafeTxHashes(safeTxHashes);
350517
350517
  }
@@ -350525,18 +350525,23 @@ var UpdateParser = class extends ProviderBase {
350525
350525
  this.logger.warn("no safe transactions to parse");
350526
350526
  return;
350527
350527
  }
350528
+ await this.metaRepo.loadFromRepo();
350528
350529
  for (let i = 0; i < txs.length; i++) {
350529
350530
  const parsed = await this.#parseNormalizedBatch(normalizeSafeApiBatch(txs[i]), i, total);
350530
350531
  this.#output.batches.push(parsed);
350531
350532
  }
350532
350533
  }
350533
- async #parseBatchDir(dir) {
350534
+ async #parseBatchDir(dir, unsafeMainnetMeta = false) {
350534
350535
  const batchStat = await stat(dir);
350535
350536
  if (!batchStat.isDirectory()) {
350536
350537
  throw new Error(`'${dir}' is not a directory`);
350537
350538
  }
350538
350539
  const batches = await loadBatchDir(dir);
350539
350540
  await this.metaRepo.loadFromDir(dir);
350541
+ if (unsafeMainnetMeta) {
350542
+ this.logger.warn(`unsafe: loading mainnet metafiles from repo`);
350543
+ await this.metaRepo.loadFromRepo();
350544
+ }
350540
350545
  if (!batches?.length) {
350541
350546
  throw new Error(`no batch files found in ${dir}`);
350542
350547
  }
@@ -351815,7 +351820,7 @@ function getRenderer(opts) {
351815
351820
  }
351816
351821
 
351817
351822
  // package.json
351818
- var version3 = "4.10.2";
351823
+ var version3 = "4.11.0";
351819
351824
 
351820
351825
  // src/version.ts
351821
351826
  var version_default = version3;
@@ -351834,6 +351839,12 @@ function parse() {
351834
351839
  "--safe-tx-hashes [hash...]",
351835
351840
  "Safe tx hashes to get from safe api and verify"
351836
351841
  )
351842
+ ).addOption(
351843
+ new Option(
351844
+ "--unsafe-mainnet-meta",
351845
+ // TODO: remove me when we fix audits in meta
351846
+ "Load meta from repo even when parsing batches from json"
351847
+ )
351837
351848
  ).addOption(new Option("--renderer [cli|html]", "cli or html")).addOption(
351838
351849
  new Option(
351839
351850
  "-i, --interactive",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/deploy-tools",
3
3
  "description": "Gearbox deploy tools",
4
- "version": "4.10.2",
4
+ "version": "4.11.0",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"