@gearbox-protocol/deploy-tools 5.21.6 → 5.22.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 +31 -35
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -408715,7 +408715,7 @@ async function loadGovernorBatches(opts) {
408715
408715
  }
408716
408716
  }
408717
408717
  let result = Array.from(batches.values());
408718
- result = result.sort((a, b) => a.block < b.block ? 1 : -1);
408718
+ result = result.sort((a, b) => a.block < b.block ? -1 : 1);
408719
408719
  return result.map((b) => ({
408720
408720
  id: `batch_${b.block}`,
408721
408721
  description: `batch in block ${b.block}`,
@@ -416718,6 +416718,9 @@ function parserForContractType(contract, version4, contractName) {
416718
416718
  var UpdateParser = class extends ProviderBase {
416719
416719
  #sandboxDir;
416720
416720
  #output = {
416721
+ input: {
416722
+ network: "Mainnet"
416723
+ },
416721
416724
  status: "success",
416722
416725
  version: "dev",
416723
416726
  chainId: 0,
@@ -416743,9 +416746,9 @@ var UpdateParser = class extends ProviderBase {
416743
416746
  async parse(opts) {
416744
416747
  await this.init();
416745
416748
  const { batchDir, safeTxHashes, unsafeMainnetMeta, governor } = opts;
416746
- this.#output.input = { governor, safeTxHashes, unsafeMainnetMeta };
416749
+ this.#output.input = { governor, safeTxHashes, network: this.network };
416747
416750
  if (batchDir) {
416748
- await this.#parseBatchDir(batchDir, opts.unsafeMainnetMeta);
416751
+ await this.#parseBatchDir(batchDir, unsafeMainnetMeta);
416749
416752
  } else if (governor) {
416750
416753
  await this.#parseGovernorQueue(governor.address, governor.fromBlock, governor.toBlock);
416751
416754
  } else {
@@ -416755,7 +416758,7 @@ var UpdateParser = class extends ProviderBase {
416755
416758
  return this.#output;
416756
416759
  }
416757
416760
  async #parseSafeTxHashes(hashes) {
416758
- const txs = await this.getSafeTransactions(typeof hashes === "boolean" ? void 0 : hashes);
416761
+ const txs = await this.getSafeTransactions(hashes);
416759
416762
  const total = txs.length;
416760
416763
  if (!total) {
416761
416764
  this.logger.warn("no safe transactions to parse");
@@ -417866,6 +417869,7 @@ var CliRenderer = class {
417866
417869
  #interactive;
417867
417870
  #nav = { batch: 0, tx: 0 };
417868
417871
  #output = {
417872
+ input: { network: "Mainnet" },
417869
417873
  addresses: {},
417870
417874
  batches: [],
417871
417875
  chainId: 1,
@@ -419033,7 +419037,7 @@ function getRenderer(opts) {
419033
419037
  var package_default = {
419034
419038
  name: "@gearbox-protocol/deploy-tools",
419035
419039
  description: "Gearbox deploy tools",
419036
- version: "5.21.6",
419040
+ version: "5.22.0",
419037
419041
  homepage: "https://gearbox.fi",
419038
419042
  keywords: [
419039
419043
  "gearbox"
@@ -419130,7 +419134,7 @@ function parse() {
419130
419134
  "--safe-tx-hashes [hash...]",
419131
419135
  "Safe tx hashes to get from safe api and verify"
419132
419136
  )
419133
- ).addOption(new Option("--governor", "Parse entire governor queue")).addOption(
419137
+ ).addOption(
419134
419138
  new Option(
419135
419139
  "--governor-address <address>",
419136
419140
  "Optional governor address"
@@ -419161,36 +419165,28 @@ function parse() {
419161
419165
  "-i, --interactive",
419162
419166
  "Interactive navigation for pretty-print"
419163
419167
  )
419164
- ).addOption(new Option("--html-file <file>", "output html file")).action(
419165
- async ({
419166
- governor,
419167
- governorFrom,
419168
- governorTo,
419169
- governorAddress,
419170
- ...opts
419171
- }) => {
419172
- container.auditor = new Auditor(opts);
419173
- await container.auditor.setup();
419174
- container.addressTree = new GearboxAddressTree(opts);
419175
- await container.addressTree.build();
419176
- const options = {
419177
- ...opts,
419178
- safeTxHashes: opts.safeTxHashes,
419179
- governor: governor || governorFrom || governorTo ? {
419180
- address: governorAddress,
419181
- fromBlock: governorFrom,
419182
- toBlock: governorTo
419183
- } : void 0
419184
- };
419185
- const parser = new UpdateParser(opts, version_default);
419186
- const result = await parser.parse(options);
419187
- if (opts.outFile) {
419188
- await writeFile5(opts.outFile, json_stringify(result), "utf-8");
419189
- }
419190
- const renderer = getRenderer(opts);
419191
- return renderer?.render(result);
419168
+ ).addOption(new Option("--html-file <file>", "output html file")).action(async ({ governorFrom, governorTo, governorAddress, ...opts }) => {
419169
+ container.auditor = new Auditor(opts);
419170
+ await container.auditor.setup();
419171
+ container.addressTree = new GearboxAddressTree(opts);
419172
+ await container.addressTree.build();
419173
+ const options = {
419174
+ ...opts,
419175
+ safeTxHashes: opts.safeTxHashes,
419176
+ governor: governorAddress && governorFrom && governorTo ? {
419177
+ address: governorAddress,
419178
+ fromBlock: governorFrom,
419179
+ toBlock: governorTo
419180
+ } : void 0
419181
+ };
419182
+ const parser = new UpdateParser(opts, version_default);
419183
+ const result = await parser.parse(options);
419184
+ if (opts.outFile) {
419185
+ await writeFile5(opts.outFile, json_stringify(result), "utf-8");
419192
419186
  }
419193
- );
419187
+ const renderer = getRenderer(opts);
419188
+ return renderer?.render(result);
419189
+ });
419194
419190
  }
419195
419191
 
419196
419192
  // src/commands/prices.ts
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": "5.21.6",
4
+ "version": "5.22.0",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"