@gearbox-protocol/deploy-tools 5.15.4 → 5.16.1

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 +346 -30
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -155123,7 +155123,7 @@ var require_structs = __commonJS({
155123
155123
  }
155124
155124
  return resolvedStructs;
155125
155125
  }
155126
- var typeWithoutTupleRegex2 = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
155126
+ var typeWithoutTupleRegex3 = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
155127
155127
  function resolveStructs2(abiParameters, structs, ancestors = /* @__PURE__ */ new Set()) {
155128
155128
  const components = [];
155129
155129
  const length = abiParameters.length;
@@ -155133,7 +155133,7 @@ var require_structs = __commonJS({
155133
155133
  if (isTuple)
155134
155134
  components.push(abiParameter);
155135
155135
  else {
155136
- const match2 = (0, regex_js_1.execTyped)(typeWithoutTupleRegex2, abiParameter.type);
155136
+ const match2 = (0, regex_js_1.execTyped)(typeWithoutTupleRegex3, abiParameter.type);
155137
155137
  if (!match2?.type)
155138
155138
  throw new abiParameter_js_1.InvalidAbiTypeParameterError({ abiParameter });
155139
155139
  const { array, type } = match2;
@@ -184693,7 +184693,7 @@ var require_abiItem2 = __commonJS({
184693
184693
  exports2.normalizeSignature = normalizeSignature3;
184694
184694
  exports2.isArgOfType = isArgOfType3;
184695
184695
  exports2.getAmbiguousTypes = getAmbiguousTypes3;
184696
- var Address = require_Address();
184696
+ var Address2 = require_Address();
184697
184697
  var Errors = require_Errors();
184698
184698
  function normalizeSignature3(signature) {
184699
184699
  let active = true;
@@ -184742,7 +184742,7 @@ var require_abiItem2 = __commonJS({
184742
184742
  const abiParameterType = abiParameter.type;
184743
184743
  switch (abiParameterType) {
184744
184744
  case "address":
184745
- return Address.validate(arg, { strict: false });
184745
+ return Address2.validate(arg, { strict: false });
184746
184746
  case "bool":
184747
184747
  return argType === "boolean";
184748
184748
  case "function":
@@ -184779,11 +184779,11 @@ var require_abiItem2 = __commonJS({
184779
184779
  if (types.includes("address") && types.includes("bytes20"))
184780
184780
  return true;
184781
184781
  if (types.includes("address") && types.includes("string"))
184782
- return Address.validate(args[parameterIndex], {
184782
+ return Address2.validate(args[parameterIndex], {
184783
184783
  strict: false
184784
184784
  });
184785
184785
  if (types.includes("address") && types.includes("bytes"))
184786
- return Address.validate(args[parameterIndex], {
184786
+ return Address2.validate(args[parameterIndex], {
184787
184787
  strict: false
184788
184788
  });
184789
184789
  return false;
@@ -185107,7 +185107,7 @@ var require_abiParameters = __commonJS({
185107
185107
  exports2.getArrayComponents = getArrayComponents3;
185108
185108
  exports2.hasDynamicChild = hasDynamicChild2;
185109
185109
  var AbiParameters = require_AbiParameters();
185110
- var Address = require_Address();
185110
+ var Address2 = require_Address();
185111
185111
  var Bytes = require_Bytes();
185112
185112
  var Errors = require_Errors();
185113
185113
  var Hex = require_Hex();
@@ -185141,7 +185141,7 @@ var require_abiParameters = __commonJS({
185141
185141
  function decodeAddress2(cursor, options = {}) {
185142
185142
  const { checksum: checksum3 = false } = options;
185143
185143
  const value = cursor.readBytes(32);
185144
- const wrap = (address) => checksum3 ? Address.checksum(address) : address;
185144
+ const wrap = (address) => checksum3 ? Address2.checksum(address) : address;
185145
185145
  return [wrap(Hex.fromBytes(Bytes.slice(value, -20))), 32];
185146
185146
  }
185147
185147
  function decodeArray2(cursor, param, options) {
@@ -185350,7 +185350,7 @@ var require_abiParameters = __commonJS({
185350
185350
  }
185351
185351
  function encodeAddress3(value, options) {
185352
185352
  const { checksum: checksum3 = false } = options;
185353
- Address.assert(value, { strict: checksum3 });
185353
+ Address2.assert(value, { strict: checksum3 });
185354
185354
  return {
185355
185355
  dynamic: false,
185356
185356
  encoded: Hex.padLeft(value.toLowerCase())
@@ -185725,7 +185725,7 @@ var require_AbiParameters = __commonJS({
185725
185725
  exports2.format = format;
185726
185726
  exports2.from = from5;
185727
185727
  var abitype = require_exports();
185728
- var Address = require_Address();
185728
+ var Address2 = require_Address();
185729
185729
  var Bytes = require_Bytes();
185730
185730
  var Errors = require_Errors();
185731
185731
  var Hex = require_Hex();
@@ -185796,7 +185796,7 @@ var require_AbiParameters = __commonJS({
185796
185796
  function encode5(type, value, isArray2 = false) {
185797
185797
  if (type === "address") {
185798
185798
  const address = value;
185799
- Address.assert(address);
185799
+ Address2.assert(address);
185800
185800
  return Hex.padLeft(address.toLowerCase(), isArray2 ? 32 : 0);
185801
185801
  }
185802
185802
  if (type === "string")
@@ -186083,8 +186083,8 @@ var require_simulateCalls = __commonJS({
186083
186083
  "use strict";
186084
186084
  Object.defineProperty(exports2, "__esModule", { value: true });
186085
186085
  exports2.simulateCalls = simulateCalls2;
186086
- var AbiConstructor = require_AbiConstructor();
186087
- var AbiFunction = require_AbiFunction();
186086
+ var AbiConstructor2 = require_AbiConstructor();
186087
+ var AbiFunction2 = require_AbiFunction();
186088
186088
  var parseAccount_js_1 = require_parseAccount();
186089
186089
  var address_js_1 = require_address7();
186090
186090
  var contracts_js_1 = require_contracts2();
@@ -186099,11 +186099,11 @@ var require_simulateCalls = __commonJS({
186099
186099
  const account = parameters.account ? (0, parseAccount_js_1.parseAccount)(parameters.account) : void 0;
186100
186100
  if (traceAssetChanges && !account)
186101
186101
  throw new base_js_1.BaseError("`account` is required when `traceAssetChanges` is true");
186102
- const getBalanceData = account ? AbiConstructor.encode(AbiConstructor.from("constructor(bytes, bytes)"), {
186102
+ const getBalanceData = account ? AbiConstructor2.encode(AbiConstructor2.from("constructor(bytes, bytes)"), {
186103
186103
  bytecode: contracts_js_1.deploylessCallViaBytecodeBytecode,
186104
186104
  args: [
186105
186105
  getBalanceCode2,
186106
- AbiFunction.encodeData(AbiFunction.from("function getBalance(address)"), [account.address])
186106
+ AbiFunction2.encodeData(AbiFunction2.from("function getBalance(address)"), [account.address])
186107
186107
  ]
186108
186108
  }) : void 0;
186109
186109
  const assetAddresses = traceAssetChanges ? await Promise.all(parameters.calls.map(async (call2) => {
@@ -186136,7 +186136,7 @@ var require_simulateCalls = __commonJS({
186136
186136
  {
186137
186137
  calls: assetAddresses.map((address, i) => ({
186138
186138
  abi: [
186139
- AbiFunction.from("function balanceOf(address) returns (uint256)")
186139
+ AbiFunction2.from("function balanceOf(address) returns (uint256)")
186140
186140
  ],
186141
186141
  functionName: "balanceOf",
186142
186142
  args: [account.address],
@@ -186167,7 +186167,7 @@ var require_simulateCalls = __commonJS({
186167
186167
  {
186168
186168
  calls: assetAddresses.map((address, i) => ({
186169
186169
  abi: [
186170
- AbiFunction.from("function balanceOf(address) returns (uint256)")
186170
+ AbiFunction2.from("function balanceOf(address) returns (uint256)")
186171
186171
  ],
186172
186172
  functionName: "balanceOf",
186173
186173
  args: [account.address],
@@ -186186,7 +186186,7 @@ var require_simulateCalls = __commonJS({
186186
186186
  calls: assetAddresses.map((address, i) => ({
186187
186187
  to: address,
186188
186188
  abi: [
186189
- AbiFunction.from("function decimals() returns (uint256)")
186189
+ AbiFunction2.from("function decimals() returns (uint256)")
186190
186190
  ],
186191
186191
  functionName: "decimals",
186192
186192
  from: address_js_1.zeroAddress,
@@ -186203,7 +186203,7 @@ var require_simulateCalls = __commonJS({
186203
186203
  calls: assetAddresses.map((address, i) => ({
186204
186204
  to: address,
186205
186205
  abi: [
186206
- AbiFunction.from("function tokenURI(uint256) returns (string)")
186206
+ AbiFunction2.from("function tokenURI(uint256) returns (string)")
186207
186207
  ],
186208
186208
  functionName: "tokenURI",
186209
186209
  args: [0n],
@@ -186220,7 +186220,7 @@ var require_simulateCalls = __commonJS({
186220
186220
  {
186221
186221
  calls: assetAddresses.map((address, i) => ({
186222
186222
  to: address,
186223
- abi: [AbiFunction.from("function symbol() returns (string)")],
186223
+ abi: [AbiFunction2.from("function symbol() returns (string)")],
186224
186224
  functionName: "symbol",
186225
186225
  from: address_js_1.zeroAddress,
186226
186226
  nonce: i
@@ -406306,6 +406306,296 @@ var z = /* @__PURE__ */ Object.freeze({
406306
406306
  ZodError
406307
406307
  });
406308
406308
 
406309
+ // ../../node_modules/abitype/dist/esm/zod.js
406310
+ init_utils();
406311
+ init_regex();
406312
+ var Identifier = z.string().regex(/[a-zA-Z$_][a-zA-Z0-9$_]*/);
406313
+ var Address = z.string().transform((val, ctx) => {
406314
+ const regex = /^0x[a-fA-F0-9]{40}$/;
406315
+ if (!regex.test(val)) {
406316
+ ctx.addIssue({
406317
+ code: z.ZodIssueCode.custom,
406318
+ message: `Invalid Address ${val}`
406319
+ });
406320
+ }
406321
+ return val;
406322
+ });
406323
+ var SolidityAddress = z.literal("address");
406324
+ var SolidityBool = z.literal("bool");
406325
+ var SolidityBytes = z.string().regex(bytesRegex);
406326
+ var SolidityFunction = z.literal("function");
406327
+ var SolidityString = z.literal("string");
406328
+ var SolidityTuple = z.literal("tuple");
406329
+ var SolidityInt = z.string().regex(integerRegex);
406330
+ var SolidityArrayWithoutTuple = z.string().regex(/^(address|bool|function|string|bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?|u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?)(\[[0-9]{0,}\])+$/);
406331
+ var SolidityArrayWithTuple = z.string().regex(/^tuple(\[[0-9]{0,}\])+$/);
406332
+ var SolidityArray = z.union([
406333
+ SolidityArrayWithTuple,
406334
+ SolidityArrayWithoutTuple
406335
+ ]);
406336
+ var AbiParameter = z.lazy(() => z.intersection(z.object({
406337
+ name: z.union([Identifier.optional(), z.literal("")]),
406338
+ /** Representation used by Solidity compiler */
406339
+ internalType: z.string().optional()
406340
+ }), z.union([
406341
+ z.object({
406342
+ type: z.union([
406343
+ SolidityAddress,
406344
+ SolidityBool,
406345
+ SolidityBytes,
406346
+ SolidityFunction,
406347
+ SolidityString,
406348
+ SolidityInt,
406349
+ SolidityArrayWithoutTuple
406350
+ ])
406351
+ }),
406352
+ z.object({
406353
+ type: z.union([SolidityTuple, SolidityArrayWithTuple]),
406354
+ components: z.array(AbiParameter).readonly()
406355
+ })
406356
+ ])));
406357
+ var AbiEventParameter = z.intersection(AbiParameter, z.object({ indexed: z.boolean().optional() }));
406358
+ var AbiStateMutability = z.union([
406359
+ z.literal("pure"),
406360
+ z.literal("view"),
406361
+ z.literal("nonpayable"),
406362
+ z.literal("payable")
406363
+ ]);
406364
+ var AbiFunction = z.preprocess((val) => {
406365
+ const abiFunction = val;
406366
+ if (abiFunction.stateMutability === void 0) {
406367
+ if (abiFunction.constant)
406368
+ abiFunction.stateMutability = "view";
406369
+ else if (abiFunction.payable)
406370
+ abiFunction.stateMutability = "payable";
406371
+ else
406372
+ abiFunction.stateMutability = "nonpayable";
406373
+ }
406374
+ return val;
406375
+ }, z.object({
406376
+ type: z.literal("function"),
406377
+ /**
406378
+ * @deprecated use `pure` or `view` from {@link AbiStateMutability} instead
406379
+ * https://github.com/ethereum/solidity/issues/992
406380
+ */
406381
+ constant: z.boolean().optional(),
406382
+ /**
406383
+ * @deprecated Vyper used to provide gas estimates
406384
+ * https://github.com/vyperlang/vyper/issues/2151
406385
+ */
406386
+ gas: z.number().optional(),
406387
+ inputs: z.array(AbiParameter).readonly(),
406388
+ name: Identifier,
406389
+ outputs: z.array(AbiParameter).readonly(),
406390
+ /**
406391
+ * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
406392
+ * https://github.com/ethereum/solidity/issues/992
406393
+ */
406394
+ payable: z.boolean().optional(),
406395
+ stateMutability: AbiStateMutability
406396
+ }));
406397
+ var AbiConstructor = z.preprocess((val) => {
406398
+ const abiFunction = val;
406399
+ if (abiFunction.stateMutability === void 0) {
406400
+ if (abiFunction.payable)
406401
+ abiFunction.stateMutability = "payable";
406402
+ else
406403
+ abiFunction.stateMutability = "nonpayable";
406404
+ }
406405
+ return val;
406406
+ }, z.object({
406407
+ type: z.literal("constructor"),
406408
+ /**
406409
+ * @deprecated use `pure` or `view` from {@link AbiStateMutability} instead
406410
+ * https://github.com/ethereum/solidity/issues/992
406411
+ */
406412
+ inputs: z.array(AbiParameter).readonly(),
406413
+ /**
406414
+ * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
406415
+ * https://github.com/ethereum/solidity/issues/992
406416
+ */
406417
+ payable: z.boolean().optional(),
406418
+ stateMutability: z.union([z.literal("nonpayable"), z.literal("payable")])
406419
+ }));
406420
+ var AbiFallback = z.preprocess((val) => {
406421
+ const abiFunction = val;
406422
+ if (abiFunction.stateMutability === void 0) {
406423
+ if (abiFunction.payable)
406424
+ abiFunction.stateMutability = "payable";
406425
+ else
406426
+ abiFunction.stateMutability = "nonpayable";
406427
+ }
406428
+ return val;
406429
+ }, z.object({
406430
+ type: z.literal("fallback"),
406431
+ /**
406432
+ * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
406433
+ * https://github.com/ethereum/solidity/issues/992
406434
+ */
406435
+ payable: z.boolean().optional(),
406436
+ stateMutability: z.union([z.literal("nonpayable"), z.literal("payable")])
406437
+ }));
406438
+ var AbiReceive = z.object({
406439
+ type: z.literal("receive"),
406440
+ stateMutability: z.literal("payable")
406441
+ });
406442
+ var AbiEvent = z.object({
406443
+ type: z.literal("event"),
406444
+ anonymous: z.boolean().optional(),
406445
+ inputs: z.array(AbiEventParameter).readonly(),
406446
+ name: Identifier
406447
+ });
406448
+ var AbiError = z.object({
406449
+ type: z.literal("error"),
406450
+ inputs: z.array(AbiParameter).readonly(),
406451
+ name: z.string()
406452
+ });
406453
+ var AbiItemType = z.union([
406454
+ z.literal("constructor"),
406455
+ z.literal("event"),
406456
+ z.literal("error"),
406457
+ z.literal("fallback"),
406458
+ z.literal("function"),
406459
+ z.literal("receive")
406460
+ ]);
406461
+ var Abi = z.array(z.union([
406462
+ AbiError,
406463
+ AbiEvent,
406464
+ // TODO: Replace code below to `z.switch` (https://github.com/colinhacks/zod/issues/2106)
406465
+ // Need to redefine `AbiFunction | AbiConstructor | AbiFallback | AbiReceive` since `z.discriminate` doesn't support `z.preprocess` on `options`
406466
+ // https://github.com/colinhacks/zod/issues/1490
406467
+ z.preprocess((val) => {
406468
+ const abiItem = val;
406469
+ if (abiItem.type === "receive")
406470
+ return abiItem;
406471
+ if (val.stateMutability === void 0) {
406472
+ if (abiItem.type === "function" && abiItem.constant)
406473
+ abiItem.stateMutability = "view";
406474
+ else if (abiItem.payable)
406475
+ abiItem.stateMutability = "payable";
406476
+ else
406477
+ abiItem.stateMutability = "nonpayable";
406478
+ }
406479
+ return val;
406480
+ }, z.intersection(z.object({
406481
+ /**
406482
+ * @deprecated use `pure` or `view` from {@link AbiStateMutability} instead
406483
+ * https://github.com/ethereum/solidity/issues/992
406484
+ */
406485
+ constant: z.boolean().optional(),
406486
+ /**
406487
+ * @deprecated Vyper used to provide gas estimates
406488
+ * https://github.com/vyperlang/vyper/issues/2151
406489
+ */
406490
+ gas: z.number().optional(),
406491
+ /**
406492
+ * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
406493
+ * https://github.com/ethereum/solidity/issues/992
406494
+ */
406495
+ payable: z.boolean().optional()
406496
+ }), z.discriminatedUnion("type", [
406497
+ z.object({
406498
+ type: z.literal("function"),
406499
+ inputs: z.array(AbiParameter).readonly(),
406500
+ name: z.string().regex(/[a-zA-Z$_][a-zA-Z0-9$_]*/),
406501
+ outputs: z.array(AbiParameter).readonly(),
406502
+ stateMutability: AbiStateMutability
406503
+ }),
406504
+ z.object({
406505
+ type: z.literal("constructor"),
406506
+ inputs: z.array(AbiParameter).readonly(),
406507
+ stateMutability: z.union([
406508
+ z.literal("payable"),
406509
+ z.literal("nonpayable")
406510
+ ])
406511
+ }),
406512
+ z.object({
406513
+ type: z.literal("fallback"),
406514
+ inputs: z.tuple([]).optional(),
406515
+ stateMutability: z.union([
406516
+ z.literal("payable"),
406517
+ z.literal("nonpayable")
406518
+ ])
406519
+ }),
406520
+ z.object({
406521
+ type: z.literal("receive"),
406522
+ stateMutability: z.literal("payable")
406523
+ })
406524
+ ])))
406525
+ ])).readonly();
406526
+ var TypedDataDomain = z.object({
406527
+ chainId: z.union([z.number(), z.bigint()]).optional(),
406528
+ name: Identifier.optional(),
406529
+ salt: z.string().optional(),
406530
+ verifyingContract: Address.optional(),
406531
+ version: z.string().optional()
406532
+ });
406533
+ var TypedDataType = z.union([
406534
+ SolidityAddress,
406535
+ SolidityBool,
406536
+ SolidityBytes,
406537
+ SolidityString,
406538
+ SolidityInt,
406539
+ SolidityArray
406540
+ ]);
406541
+ var TypedDataParameter = z.object({
406542
+ name: Identifier,
406543
+ type: z.string()
406544
+ });
406545
+ var TypedData = z.record(Identifier, z.array(TypedDataParameter)).transform((val, ctx) => validateTypedDataKeys(val, ctx));
406546
+ function validateTypedDataKeys(typedData, zodContext) {
406547
+ const keys2 = Object.keys(typedData);
406548
+ for (let i = 0; i < keys2.length; i++) {
406549
+ if (isSolidityType(keys2[i])) {
406550
+ zodContext.addIssue({
406551
+ code: "custom",
406552
+ message: `Invalid key. ${keys2[i]} is a solidity type.`
406553
+ });
406554
+ return z.NEVER;
406555
+ }
406556
+ validateTypedDataParameters(keys2[i], typedData, zodContext);
406557
+ }
406558
+ return typedData;
406559
+ }
406560
+ var typeWithoutTupleRegex2 = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*?)(?<array>(?:\[\d*?\])+?)?$/;
406561
+ function validateTypedDataParameters(key, typedData, zodContext, ancestors = /* @__PURE__ */ new Set()) {
406562
+ const val = typedData[key];
406563
+ const length = val.length;
406564
+ for (let i = 0; i < length; i++) {
406565
+ if (val[i]?.type === key) {
406566
+ zodContext.addIssue({
406567
+ code: "custom",
406568
+ message: `Invalid type. ${key} is a self reference.`
406569
+ });
406570
+ return z.NEVER;
406571
+ }
406572
+ const match2 = execTyped(typeWithoutTupleRegex2, val[i]?.type);
406573
+ if (!match2?.type) {
406574
+ zodContext.addIssue({
406575
+ code: "custom",
406576
+ message: `Invalid type. ${key} does not have a type.`
406577
+ });
406578
+ return z.NEVER;
406579
+ }
406580
+ if (match2.type in typedData) {
406581
+ if (ancestors.has(match2.type)) {
406582
+ zodContext.addIssue({
406583
+ code: "custom",
406584
+ message: `Invalid type. ${match2.type} is a circular reference.`
406585
+ });
406586
+ return z.NEVER;
406587
+ }
406588
+ validateTypedDataParameters(match2.type, typedData, zodContext, /* @__PURE__ */ new Set([...ancestors, match2.type]));
406589
+ } else if (!isSolidityType(match2.type)) {
406590
+ zodContext.addIssue({
406591
+ code: "custom",
406592
+ message: `Invalid type. ${match2.type} is not a valid EIP-712 type.`
406593
+ });
406594
+ }
406595
+ }
406596
+ return;
406597
+ }
406598
+
406309
406599
  // ../../packages/shared/dist/fork-schema.js
406310
406600
  var ScriptTemplate = z.object({
406311
406601
  id: z.string().regex(/^[0-9a-zA-Z\-_]+$/, "invalid script id"),
@@ -406336,6 +406626,14 @@ var ForkTemplate = z.object({
406336
406626
  * Anvil chain id override, if not set, defaults to same as original network chain id (e.g. 1 for mainnet)
406337
406627
  */
406338
406628
  chainId: z.number().int().nonnegative().nullish().transform((v) => v || void 0),
406629
+ /**
406630
+ * Optional address provider pverride
406631
+ */
406632
+ addressProvider: Address.nullish(),
406633
+ /**
406634
+ * Optional market configurators override
406635
+ */
406636
+ marketConfigurators: z.array(Address).nullish(),
406339
406637
  /**
406340
406638
  * Will set appropriate RPC urls
406341
406639
  */
@@ -415949,7 +416247,7 @@ var UpdateParser = class extends ProviderBase {
415949
416247
  if (batchDir) {
415950
416248
  await this.#parseBatchDir(batchDir, opts.unsafeMainnetMeta);
415951
416249
  } else if (governor) {
415952
- await this.#parseGovernorQueue(governor === true ? void 0 : governor);
416250
+ await this.#parseGovernorQueue(governor.fromBlock, governor.toBlock);
415953
416251
  } else {
415954
416252
  await this.#parseSafeTxHashes(safeTxHashes);
415955
416253
  }
@@ -417607,7 +417905,7 @@ function getRenderer(opts) {
417607
417905
  var package_default = {
417608
417906
  name: "@gearbox-protocol/deploy-tools",
417609
417907
  description: "Gearbox deploy tools",
417610
- version: "5.15.4",
417908
+ version: "5.16.1",
417611
417909
  homepage: "https://gearbox.fi",
417612
417910
  keywords: [
417613
417911
  "gearbox"
@@ -417690,6 +417988,18 @@ var package_default = {
417690
417988
  // src/version.ts
417691
417989
  var version_default = package_default.version;
417692
417990
 
417991
+ // src/commands/option-parsers.ts
417992
+ function parseBigInt(value, _dummy) {
417993
+ try {
417994
+ const parsedValue = BigInt(value);
417995
+ return parsedValue;
417996
+ } catch (e) {
417997
+ throw new InvalidArgumentError(
417998
+ e instanceof Error ? e.message : "Not a number."
417999
+ );
418000
+ }
418001
+ }
418002
+
417693
418003
  // src/commands/parse.ts
417694
418004
  function parse() {
417695
418005
  return newCommand().name("parse").description(
@@ -417706,11 +418016,16 @@ function parse() {
417706
418016
  "--safe-tx-hashes [hash...]",
417707
418017
  "Safe tx hashes to get from safe api and verify"
417708
418018
  )
418019
+ ).addOption(new Option("--governor", "Parse entire governor queue")).addOption(
418020
+ new Option(
418021
+ "--governor-from <starting block>",
418022
+ "Parse governor queue starting from this block"
418023
+ ).argParser(parseBigInt)
417709
418024
  ).addOption(
417710
418025
  new Option(
417711
- "--governor [starting block]",
417712
- "Parse governor queue starting from block (or entire queue if not specified)"
417713
- )
418026
+ "--governor-to <ending block>",
418027
+ "Parse governor queue up to this block"
418028
+ ).argParser(parseBigInt)
417714
418029
  ).addOption(
417715
418030
  new Option(
417716
418031
  "--unsafe-mainnet-meta",
@@ -417727,17 +418042,18 @@ function parse() {
417727
418042
  "-i, --interactive",
417728
418043
  "Interactive navigation for pretty-print"
417729
418044
  )
417730
- ).addOption(new Option("--html-file <file>", "output html file")).action(async (opts) => {
418045
+ ).addOption(new Option("--html-file <file>", "output html file")).action(async ({ governor, governorFrom, governorTo, ...opts }) => {
417731
418046
  container.auditor = new Auditor(opts);
417732
418047
  await container.auditor.setup();
417733
418048
  container.addressTree = new GearboxAddressTree(opts);
417734
418049
  await container.addressTree.build();
417735
- const parser = new UpdateParser(opts, version_default);
417736
- const result = await parser.parse({
418050
+ const options = {
417737
418051
  ...opts,
417738
418052
  safeTxHashes: opts.safeTxHashes,
417739
- governor: opts.governor ? opts.governor === true ? true : BigInt(opts.governor) : void 0
417740
- });
418053
+ governor: governor || governorFrom || governorTo ? { fromBlock: governorFrom, toBlock: governorTo } : void 0
418054
+ };
418055
+ const parser = new UpdateParser(opts, version_default);
418056
+ const result = await parser.parse(options);
417741
418057
  if (opts.outFile) {
417742
418058
  await writeFile7(opts.outFile, json_stringify(result), "utf-8");
417743
418059
  }
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.15.4",
4
+ "version": "5.16.1",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"