@gearbox-protocol/deploy-tools 5.45.1 → 5.45.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 +14 -16
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -141462,7 +141462,7 @@ var require_sonic_boom = __commonJS({
141462
141462
  if (!(this instanceof SonicBoom)) {
141463
141463
  return new SonicBoom(opts);
141464
141464
  }
141465
- let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir: mkdir5, retryEAGAIN, fsync, contentMode, mode } = opts || {};
141465
+ let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir: mkdir4, retryEAGAIN, fsync, contentMode, mode } = opts || {};
141466
141466
  fd = fd || dest;
141467
141467
  this._len = 0;
141468
141468
  this.fd = -1;
@@ -141487,7 +141487,7 @@ var require_sonic_boom = __commonJS({
141487
141487
  this.append = append || false;
141488
141488
  this.mode = mode;
141489
141489
  this.retryEAGAIN = retryEAGAIN || (() => true);
141490
- this.mkdir = mkdir5 || false;
141490
+ this.mkdir = mkdir4 || false;
141491
141491
  let fsWriteSync;
141492
141492
  let fsWrite;
141493
141493
  if (contentMode === kContentModeBuffer) {
@@ -446187,7 +446187,7 @@ function audit() {
446187
446187
  }
446188
446188
 
446189
446189
  // src/commands/defillama-test/index.ts
446190
- import { mkdir as mkdir2, writeFile as writeFile5 } from "node:fs/promises";
446190
+ import { writeFile as writeFile5 } from "node:fs/promises";
446191
446191
  import path8 from "node:path";
446192
446192
 
446193
446193
  // src/commands/defillama-test/abi.ts
@@ -446354,15 +446354,13 @@ var DefillamaCompressorBytecode = "0x60a060405234801561000f575f80fd5b50604051611
446354
446354
  // src/commands/defillama-test/index.ts
446355
446355
  function defillamaTest() {
446356
446356
  return newCommand().name("defillama-test").description("Test defillama compressor").addOption(
446357
- new Option("--output-json <file>", "json state location").env(
446358
- "OUTPUT_JSON"
446359
- )
446357
+ new Option("--output-dir <file>", "output dir").env("OUTPUT_DIR")
446360
446358
  ).addOption(new Option("--gas-limit <number>", "gas limit")).action(async (opts) => {
446361
446359
  const {
446362
446360
  addressProvider,
446363
446361
  marketConfigurators,
446364
446362
  anvilUrl = "http://127.0.0.1:8545",
446365
- outputJson = "state.json",
446363
+ outputDir,
446366
446364
  gasLimit = "550000000"
446367
446365
  } = opts;
446368
446366
  const transportOptions = getSDKTransportOptions({
@@ -446462,9 +446460,9 @@ function defillamaTest() {
446462
446460
  creditManagers[suite.creditManager.address] = { error: `${e}` };
446463
446461
  }
446464
446462
  }
446465
- log_default.debug(`saving state to ${outputJson}`);
446466
- const outputDir = path8.dirname(outputJson);
446467
- await mkdir2(outputDir, { recursive: true });
446463
+ const outDir = outputDir ?? process.cwd();
446464
+ const outputJson = path8.resolve(outDir, "defillama.json");
446465
+ log_default.debug(`saving results to ${outputJson}`);
446468
446466
  await writeFile5(
446469
446467
  outputJson,
446470
446468
  json_stringify({ ...result, creditManagers, creditManagersGas }),
@@ -446476,7 +446474,7 @@ function defillamaTest() {
446476
446474
 
446477
446475
  // src/commands/open-accounts.ts
446478
446476
  import { spawnSync as spawnSync3 } from "node:child_process";
446479
- import { mkdir as mkdir3, readFile as readFile8, writeFile as writeFile6 } from "node:fs/promises";
446477
+ import { mkdir as mkdir2, readFile as readFile8, writeFile as writeFile6 } from "node:fs/promises";
446480
446478
  import path9 from "node:path";
446481
446479
  function openAccounts() {
446482
446480
  return newCommand().name("open-accounts").description("Script to open accounts in v3.1").addOption(
@@ -446499,7 +446497,7 @@ function openAccounts() {
446499
446497
  castBin = "cast",
446500
446498
  inputJson
446501
446499
  } = opts;
446502
- await mkdir3(path9.resolve(sharedDir, "deploy-state"), { recursive: true });
446500
+ await mkdir2(path9.resolve(sharedDir, "deploy-state"), { recursive: true });
446503
446501
  const transportOptions = getSDKTransportOptions({
446504
446502
  ...opts,
446505
446503
  anvilUrl
@@ -446585,7 +446583,7 @@ function openAccounts() {
446585
446583
  try {
446586
446584
  const result = await accountOpener.openCreditAccounts(accounts, true);
446587
446585
  const destDir = path9.resolve(sharedDir, "open-accounts");
446588
- await mkdir3(destDir, { recursive: true });
446586
+ await mkdir2(destDir, { recursive: true });
446589
446587
  await writeFile6(
446590
446588
  path9.resolve(destDir, "result.json"),
446591
446589
  json_stringify(result),
@@ -446734,7 +446732,7 @@ function getRenderer(opts) {
446734
446732
  var package_default = {
446735
446733
  name: "@gearbox-protocol/deploy-tools",
446736
446734
  description: "Gearbox deploy tools",
446737
- version: "5.45.1",
446735
+ version: "5.45.2",
446738
446736
  homepage: "https://gearbox.fi",
446739
446737
  keywords: [
446740
446738
  "gearbox"
@@ -446983,7 +446981,7 @@ function printSafeTx() {
446983
446981
  }
446984
446982
 
446985
446983
  // src/commands/state-snapshot.ts
446986
- import { mkdir as mkdir4, writeFile as writeFile8 } from "node:fs/promises";
446984
+ import { mkdir as mkdir3, writeFile as writeFile8 } from "node:fs/promises";
446987
446985
  import path11 from "node:path";
446988
446986
 
446989
446987
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/plugins/bots/abi/iPartialLiquidationBotV300.js
@@ -447631,7 +447629,7 @@ function stateSnapshot() {
447631
447629
  });
447632
447630
  log_default.debug(`saving state to ${outputJson}`);
447633
447631
  const outputDir = path11.dirname(outputJson);
447634
- await mkdir4(outputDir, { recursive: true });
447632
+ await mkdir3(outputDir, { recursive: true });
447635
447633
  await writeFile8(outputJson, json_stringify(sdk.state), "utf-8");
447636
447634
  log_default.info("done");
447637
447635
  });
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.45.1",
4
+ "version": "5.45.2",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"