@gearbox-protocol/deploy-tools 1.6.0-next.17 → 1.6.0-next.19

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.js +22 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -202663,10 +202663,10 @@ var require_log = __commonJS({
202663
202663
  error: 5,
202664
202664
  fatal: 6
202665
202665
  };
202666
- var _a;
202667
- var minLevel = levels[((_a = process.env.LOG_LEVEL) == null ? void 0 : _a.toLowerCase()) ?? "info"] ?? 3;
202666
+ var logLevelArg = process.argv.indexOf("--log-level") > 0 ? process.argv[process.argv.indexOf("--log-level") + 1] : void 0;
202667
+ var minLevel = levels[(logLevelArg ?? process.env.LOG_LEVEL ?? "info").toLowerCase()] ?? 3;
202668
202668
  var logger = new tslog_1.Logger({
202669
- prettyLogTemplate: minLevel < 3 ? "{{logLevelName}} {{filePathWithLine}} {{name}} " : "{{logLevelName}} {{name}} ",
202669
+ prettyLogTemplate: process.env.NODE_ENV === "production" ? "{{logLevelName}} {{name}} " : "{{logLevelName}} {{filePathWithLine}} {{name}} ",
202670
202670
  minLevel
202671
202671
  });
202672
202672
  exports2.default = logger;
@@ -375303,7 +375303,11 @@ var require_ZeroLT = __commonJS({
375303
375303
  __privateAdd(this, _dc300, void 0);
375304
375304
  __privateAdd(this, _configrator, void 0);
375305
375305
  __privateAdd(this, _provider, void 0);
375306
- __privateSet(this, _provider, new ethers_1.ethers.providers.StaticJsonRpcProvider(opts.rpcUrl));
375306
+ __privateSet(this, _provider, new ethers_1.ethers.providers.StaticJsonRpcProvider({
375307
+ url: opts.rpcUrl,
375308
+ timeout: 3e5,
375309
+ allowGzip: true
375310
+ }));
375307
375311
  }
375308
375312
  async setLtZero() {
375309
375313
  var _a, _b;
@@ -416235,7 +416239,7 @@ var require_package3 = __commonJS({
416235
416239
  module2.exports = {
416236
416240
  name: "@gearbox-protocol/deploy-tools",
416237
416241
  description: "Gearbox deploy tools",
416238
- version: "1.6.0-next.16",
416242
+ version: "1.6.0-next.18",
416239
416243
  homepage: "https://gearbox.fi",
416240
416244
  keywords: [
416241
416245
  "gearbox"
@@ -416349,8 +416353,15 @@ var {
416349
416353
 
416350
416354
  // src/commands/address-tree.ts
416351
416355
  var import_lib = __toESM(require_dist11());
416356
+
416357
+ // src/commands/options.ts
416358
+ function RpcURL(local) {
416359
+ return new Option("--rpc-url <url>", "rpc provider url").default(local ? "http://127.0.0.1:8545" : "https://rpc.ankr.com/eth").env("RPC_URL");
416360
+ }
416361
+
416362
+ // src/commands/address-tree.ts
416352
416363
  function addressTree() {
416353
- return new Command().name("address-tree").description("builds gearbox addresses tree").action(async (opts) => {
416364
+ return new Command().name("address-tree").description("builds gearbox addresses tree").addOption(RpcURL()).action(async (opts) => {
416354
416365
  await new import_lib.GearboxAddressTree(opts).build(opts.cachePolicy);
416355
416366
  });
416356
416367
  }
@@ -416361,7 +416372,7 @@ var import_lib2 = __toESM(require_dist11());
416361
416372
  function copyMultisig() {
416362
416373
  return new Command().name("copy-multisig").description(
416363
416374
  "Copies transactions from safe multisig to anvil (or tenderly) fork using multisig impersonation"
416364
- ).addOption(
416375
+ ).addOption(RpcURL()).addOption(
416365
416376
  new Option(
416366
416377
  "--disable-paired-execute",
416367
416378
  "Disable creation and execution of paired executeTrransaction for timelock.queueTransaction"
@@ -417447,7 +417458,7 @@ function getRenderer(opts) {
417447
417458
  function parse2() {
417448
417459
  return new Command().name("parse").description(
417449
417460
  "displays protocol updates from safe multisig or from batch json files"
417450
- ).addOption(
417461
+ ).addOption(RpcURL()).addOption(
417451
417462
  new Option(
417452
417463
  "--batch-file [json/dir]",
417453
417464
  "Batch json file (or dir with json files) which is uploaded into safe ui"
@@ -417487,7 +417498,7 @@ var import_lib6 = __toESM(require_dist11());
417487
417498
  function verifyEtherscan() {
417488
417499
  return new Command().name("verify-etherscan").description(
417489
417500
  "performs bulk verification of gearbox contracts using etherscan"
417490
- ).addOption(
417501
+ ).addOption(RpcURL()).addOption(
417491
417502
  new Option(
417492
417503
  "--addresses-file [json]",
417493
417504
  "json file where keys are addresses to verify, e.g. gearbox contracts tree"
@@ -417512,7 +417523,7 @@ function verifyEtherscan() {
417512
417523
  // src/commands/zero-lt.ts
417513
417524
  var import_lib7 = __toESM(require_dist11());
417514
417525
  function zeroLT() {
417515
- return new Command().name("zero-lt").description("sets LTs to zero on credit managers").action(async (opts) => {
417526
+ return new Command().name("zero-lt").description("sets LTs to zero on credit managers").addOption(RpcURL(true)).action(async (opts) => {
417516
417527
  const zlt = new import_lib7.ZeroLT(opts);
417517
417528
  await zlt.setLtZero();
417518
417529
  });
@@ -417528,8 +417539,6 @@ program2.addCommand(parse2());
417528
417539
  program2.addCommand(zeroLT());
417529
417540
  program2.commands.forEach((cmd) => {
417530
417541
  cmd.addOption(
417531
- new Option("--rpc-url <url>", "rpc provider url").default("https://rpc.ankr.com/eth").env("RPC_URL")
417532
- ).addOption(
417533
417542
  new Option(
417534
417543
  "--cache-policy [never|only]",
417535
417544
  "never use cache or use cache only"
@@ -417539,7 +417548,7 @@ program2.commands.forEach((cmd) => {
417539
417548
  "--sandbox-dir <dir>",
417540
417549
  "directory for intermediate results and cache"
417541
417550
  ).default("./sandbox")
417542
- ).addOption(new Option("--out-file [json]", "save output as json")).addOption(
417551
+ ).addOption(new Option("--log-level [info]", "log level")).addOption(new Option("--out-file [json]", "save output as json")).addOption(
417543
417552
  new Option("--pretty", "pretty-print output event when saving to json")
417544
417553
  ).addOption(
417545
417554
  new Option("--multisig <string>", "multisig contract address").default("0xA7D5DDc1b8557914F158076b228AA91eF613f1D5").env("MULTISIG")
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": "1.6.0-next.17",
4
+ "version": "1.6.0-next.19",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"