@gearbox-protocol/deploy-tools 5.45.1 → 5.45.3

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 +18 -18
  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({
@@ -446393,13 +446391,15 @@ function defillamaTest() {
446393
446391
  args: [addressProvider]
446394
446392
  });
446395
446393
  log_default.info(`deployed defillama compressor at ${address}`);
446394
+ const mcs = sdk.marketRegister.marketConfigurators.map((mc) => mc.address);
446395
+ log_default.info(`got ${mcs.length} market configurators: ${mcs.join(", ")}`);
446396
446396
  const result = {};
446397
446397
  try {
446398
446398
  result.poolsGas = await sdk.provider.publicClient.estimateContractGas({
446399
446399
  abi: DefillamaCompressorAbi,
446400
446400
  address,
446401
446401
  functionName: "getPools",
446402
- args: [marketConfigurators]
446402
+ args: [mcs]
446403
446403
  });
446404
446404
  } catch (e) {
446405
446405
  log_default.error(`error estimating pools gas: ${e}`);
@@ -446410,7 +446410,7 @@ function defillamaTest() {
446410
446410
  address,
446411
446411
  abi: DefillamaCompressorAbi,
446412
446412
  functionName: "getPools",
446413
- args: [marketConfigurators],
446413
+ args: [mcs],
446414
446414
  // @ts-expect-error
446415
446415
  gas
446416
446416
  });
@@ -446462,9 +446462,9 @@ function defillamaTest() {
446462
446462
  creditManagers[suite.creditManager.address] = { error: `${e}` };
446463
446463
  }
446464
446464
  }
446465
- log_default.debug(`saving state to ${outputJson}`);
446466
- const outputDir = path8.dirname(outputJson);
446467
- await mkdir2(outputDir, { recursive: true });
446465
+ const outDir = outputDir ?? process.cwd();
446466
+ const outputJson = path8.resolve(outDir, "defillama.json");
446467
+ log_default.debug(`saving results to ${outputJson}`);
446468
446468
  await writeFile5(
446469
446469
  outputJson,
446470
446470
  json_stringify({ ...result, creditManagers, creditManagersGas }),
@@ -446476,7 +446476,7 @@ function defillamaTest() {
446476
446476
 
446477
446477
  // src/commands/open-accounts.ts
446478
446478
  import { spawnSync as spawnSync3 } from "node:child_process";
446479
- import { mkdir as mkdir3, readFile as readFile8, writeFile as writeFile6 } from "node:fs/promises";
446479
+ import { mkdir as mkdir2, readFile as readFile8, writeFile as writeFile6 } from "node:fs/promises";
446480
446480
  import path9 from "node:path";
446481
446481
  function openAccounts() {
446482
446482
  return newCommand().name("open-accounts").description("Script to open accounts in v3.1").addOption(
@@ -446499,7 +446499,7 @@ function openAccounts() {
446499
446499
  castBin = "cast",
446500
446500
  inputJson
446501
446501
  } = opts;
446502
- await mkdir3(path9.resolve(sharedDir, "deploy-state"), { recursive: true });
446502
+ await mkdir2(path9.resolve(sharedDir, "deploy-state"), { recursive: true });
446503
446503
  const transportOptions = getSDKTransportOptions({
446504
446504
  ...opts,
446505
446505
  anvilUrl
@@ -446585,7 +446585,7 @@ function openAccounts() {
446585
446585
  try {
446586
446586
  const result = await accountOpener.openCreditAccounts(accounts, true);
446587
446587
  const destDir = path9.resolve(sharedDir, "open-accounts");
446588
- await mkdir3(destDir, { recursive: true });
446588
+ await mkdir2(destDir, { recursive: true });
446589
446589
  await writeFile6(
446590
446590
  path9.resolve(destDir, "result.json"),
446591
446591
  json_stringify(result),
@@ -446734,7 +446734,7 @@ function getRenderer(opts) {
446734
446734
  var package_default = {
446735
446735
  name: "@gearbox-protocol/deploy-tools",
446736
446736
  description: "Gearbox deploy tools",
446737
- version: "5.45.1",
446737
+ version: "5.45.3",
446738
446738
  homepage: "https://gearbox.fi",
446739
446739
  keywords: [
446740
446740
  "gearbox"
@@ -446983,7 +446983,7 @@ function printSafeTx() {
446983
446983
  }
446984
446984
 
446985
446985
  // src/commands/state-snapshot.ts
446986
- import { mkdir as mkdir4, writeFile as writeFile8 } from "node:fs/promises";
446986
+ import { mkdir as mkdir3, writeFile as writeFile8 } from "node:fs/promises";
446987
446987
  import path11 from "node:path";
446988
446988
 
446989
446989
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/plugins/bots/abi/iPartialLiquidationBotV300.js
@@ -447631,7 +447631,7 @@ function stateSnapshot() {
447631
447631
  });
447632
447632
  log_default.debug(`saving state to ${outputJson}`);
447633
447633
  const outputDir = path11.dirname(outputJson);
447634
- await mkdir4(outputDir, { recursive: true });
447634
+ await mkdir3(outputDir, { recursive: true });
447635
447635
  await writeFile8(outputJson, json_stringify(sdk.state), "utf-8");
447636
447636
  log_default.info("done");
447637
447637
  });
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.3",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"