@gearbox-protocol/deploy-tools 5.45.2 → 5.45.4

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 +20 -13
  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: mkdir4, retryEAGAIN, fsync, contentMode, mode } = opts || {};
141465
+ let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir: mkdir5, 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 = mkdir4 || false;
141490
+ this.mkdir = mkdir5 || 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 { writeFile as writeFile5 } from "node:fs/promises";
446190
+ import { mkdir as mkdir2, writeFile as writeFile5 } from "node:fs/promises";
446191
446191
  import path8 from "node:path";
446192
446192
 
446193
446193
  // src/commands/defillama-test/abi.ts
@@ -446391,14 +446391,20 @@ function defillamaTest() {
446391
446391
  args: [addressProvider]
446392
446392
  });
446393
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(", ")}`);
446394
446396
  const result = {};
446395
446397
  try {
446396
- result.poolsGas = await sdk.provider.publicClient.estimateContractGas({
446398
+ const poolsGas = await sdk.provider.publicClient.estimateContractGas({
446397
446399
  abi: DefillamaCompressorAbi,
446398
446400
  address,
446399
446401
  functionName: "getPools",
446400
- args: [marketConfigurators]
446402
+ args: [mcs]
446401
446403
  });
446404
+ result.poolGas = poolsGas;
446405
+ log_default.debug(
446406
+ `estimated gas for pools: ${Number(poolsGas / 100000n) / 10}M`
446407
+ );
446402
446408
  } catch (e) {
446403
446409
  log_default.error(`error estimating pools gas: ${e}`);
446404
446410
  result.poolsGas = { error: `${e}` };
@@ -446408,7 +446414,7 @@ function defillamaTest() {
446408
446414
  address,
446409
446415
  abi: DefillamaCompressorAbi,
446410
446416
  functionName: "getPools",
446411
- args: [marketConfigurators],
446417
+ args: [mcs],
446412
446418
  // @ts-expect-error
446413
446419
  gas
446414
446420
  });
@@ -446432,7 +446438,7 @@ function defillamaTest() {
446432
446438
  });
446433
446439
  creditManagersGas[suite.creditManager.address] = cmGas;
446434
446440
  log_default.debug(
446435
- `estimated gas for ${sdk.provider.addressLabels.get(suite.creditManager.address)}: ${cmGas}`
446441
+ `estimated gas for ${sdk.provider.addressLabels.get(suite.creditManager.address)}: ${Number(cmGas / 100000n) / 10}M`
446436
446442
  );
446437
446443
  } catch (e) {
446438
446444
  log_default.error(
@@ -446461,6 +446467,7 @@ function defillamaTest() {
446461
446467
  }
446462
446468
  }
446463
446469
  const outDir = outputDir ?? process.cwd();
446470
+ await mkdir2(outDir, { recursive: true });
446464
446471
  const outputJson = path8.resolve(outDir, "defillama.json");
446465
446472
  log_default.debug(`saving results to ${outputJson}`);
446466
446473
  await writeFile5(
@@ -446474,7 +446481,7 @@ function defillamaTest() {
446474
446481
 
446475
446482
  // src/commands/open-accounts.ts
446476
446483
  import { spawnSync as spawnSync3 } from "node:child_process";
446477
- import { mkdir as mkdir2, readFile as readFile8, writeFile as writeFile6 } from "node:fs/promises";
446484
+ import { mkdir as mkdir3, readFile as readFile8, writeFile as writeFile6 } from "node:fs/promises";
446478
446485
  import path9 from "node:path";
446479
446486
  function openAccounts() {
446480
446487
  return newCommand().name("open-accounts").description("Script to open accounts in v3.1").addOption(
@@ -446497,7 +446504,7 @@ function openAccounts() {
446497
446504
  castBin = "cast",
446498
446505
  inputJson
446499
446506
  } = opts;
446500
- await mkdir2(path9.resolve(sharedDir, "deploy-state"), { recursive: true });
446507
+ await mkdir3(path9.resolve(sharedDir, "deploy-state"), { recursive: true });
446501
446508
  const transportOptions = getSDKTransportOptions({
446502
446509
  ...opts,
446503
446510
  anvilUrl
@@ -446583,7 +446590,7 @@ function openAccounts() {
446583
446590
  try {
446584
446591
  const result = await accountOpener.openCreditAccounts(accounts, true);
446585
446592
  const destDir = path9.resolve(sharedDir, "open-accounts");
446586
- await mkdir2(destDir, { recursive: true });
446593
+ await mkdir3(destDir, { recursive: true });
446587
446594
  await writeFile6(
446588
446595
  path9.resolve(destDir, "result.json"),
446589
446596
  json_stringify(result),
@@ -446732,7 +446739,7 @@ function getRenderer(opts) {
446732
446739
  var package_default = {
446733
446740
  name: "@gearbox-protocol/deploy-tools",
446734
446741
  description: "Gearbox deploy tools",
446735
- version: "5.45.2",
446742
+ version: "5.45.4",
446736
446743
  homepage: "https://gearbox.fi",
446737
446744
  keywords: [
446738
446745
  "gearbox"
@@ -446981,7 +446988,7 @@ function printSafeTx() {
446981
446988
  }
446982
446989
 
446983
446990
  // src/commands/state-snapshot.ts
446984
- import { mkdir as mkdir3, writeFile as writeFile8 } from "node:fs/promises";
446991
+ import { mkdir as mkdir4, writeFile as writeFile8 } from "node:fs/promises";
446985
446992
  import path11 from "node:path";
446986
446993
 
446987
446994
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/plugins/bots/abi/iPartialLiquidationBotV300.js
@@ -447629,7 +447636,7 @@ function stateSnapshot() {
447629
447636
  });
447630
447637
  log_default.debug(`saving state to ${outputJson}`);
447631
447638
  const outputDir = path11.dirname(outputJson);
447632
- await mkdir3(outputDir, { recursive: true });
447639
+ await mkdir4(outputDir, { recursive: true });
447633
447640
  await writeFile8(outputJson, json_stringify(sdk.state), "utf-8");
447634
447641
  log_default.info("done");
447635
447642
  });
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.2",
4
+ "version": "5.45.4",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"