@gearbox-protocol/deploy-tools 5.39.2 → 5.39.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 +155 -19
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -66788,6 +66788,16 @@ var require_axios = __commonJS({
66788
66788
  const prototype2 = getPrototypeOf(val);
66789
66789
  return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
66790
66790
  };
66791
+ var isEmptyObject = (val) => {
66792
+ if (!isObject3(val) || isBuffer2(val)) {
66793
+ return false;
66794
+ }
66795
+ try {
66796
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
66797
+ } catch (e) {
66798
+ return false;
66799
+ }
66800
+ };
66791
66801
  var isDate2 = kindOfTest("Date");
66792
66802
  var isFile = kindOfTest("File");
66793
66803
  var isBlob = kindOfTest("Blob");
@@ -66815,6 +66825,9 @@ var require_axios = __commonJS({
66815
66825
  fn.call(null, obj[i], i, obj);
66816
66826
  }
66817
66827
  } else {
66828
+ if (isBuffer2(obj)) {
66829
+ return;
66830
+ }
66818
66831
  const keys2 = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
66819
66832
  const len = keys2.length;
66820
66833
  let key;
@@ -66825,6 +66838,9 @@ var require_axios = __commonJS({
66825
66838
  }
66826
66839
  }
66827
66840
  function findKey2(obj, key) {
66841
+ if (isBuffer2(obj)) {
66842
+ return null;
66843
+ }
66828
66844
  key = key.toLowerCase();
66829
66845
  const keys2 = Object.keys(obj);
66830
66846
  let i = keys2.length;
@@ -67015,6 +67031,9 @@ var require_axios = __commonJS({
67015
67031
  if (stack.indexOf(source) >= 0) {
67016
67032
  return;
67017
67033
  }
67034
+ if (isBuffer2(source)) {
67035
+ return source;
67036
+ }
67018
67037
  if (!("toJSON" in source)) {
67019
67038
  stack[i] = source;
67020
67039
  const target = isArray2(source) ? [] : {};
@@ -67064,6 +67083,7 @@ var require_axios = __commonJS({
67064
67083
  isBoolean,
67065
67084
  isObject: isObject3,
67066
67085
  isPlainObject: isPlainObject2,
67086
+ isEmptyObject,
67067
67087
  isReadableStream,
67068
67088
  isRequest,
67069
67089
  isResponse,
@@ -67472,15 +67492,16 @@ var require_axios = __commonJS({
67472
67492
  ...platform$1
67473
67493
  };
67474
67494
  function toURLEncodedForm(data, options) {
67475
- return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
67495
+ return toFormData(data, new platform.classes.URLSearchParams(), {
67476
67496
  visitor: function(value, key, path11, helpers) {
67477
67497
  if (platform.isNode && utils$1.isBuffer(value)) {
67478
67498
  this.append(key, value.toString("base64"));
67479
67499
  return false;
67480
67500
  }
67481
67501
  return helpers.defaultVisitor.apply(this, arguments);
67482
- }
67483
- }, options));
67502
+ },
67503
+ ...options
67504
+ });
67484
67505
  }
67485
67506
  function parsePropPath(name) {
67486
67507
  return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => {
@@ -67957,7 +67978,7 @@ var require_axios = __commonJS({
67957
67978
  }
67958
67979
  return requestedURL;
67959
67980
  }
67960
- var VERSION = "1.10.0";
67981
+ var VERSION = "1.11.0";
67961
67982
  function parseProtocol(url3) {
67962
67983
  const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url3);
67963
67984
  return match2 && match2[1] || "";
@@ -68268,7 +68289,7 @@ var require_axios = __commonJS({
68268
68289
  clearTimeout(timer);
68269
68290
  timer = null;
68270
68291
  }
68271
- fn.apply(null, args);
68292
+ fn(...args);
68272
68293
  };
68273
68294
  const throttled = (...args) => {
68274
68295
  const now = Date.now();
@@ -68929,7 +68950,7 @@ var require_axios = __commonJS({
68929
68950
  validateStatus: mergeDirectKeys,
68930
68951
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
68931
68952
  };
68932
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
68953
+ utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
68933
68954
  const merge3 = mergeMap[prop] || mergeDeepProperties;
68934
68955
  const configValue = merge3(config1[prop], config2[prop], prop);
68935
68956
  utils$1.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config3[prop] = configValue);
@@ -69625,8 +69646,8 @@ var require_axios = __commonJS({
69625
69646
  let len;
69626
69647
  if (!synchronousRequestInterceptors) {
69627
69648
  const chain = [dispatchRequest.bind(this), void 0];
69628
- chain.unshift.apply(chain, requestInterceptorChain);
69629
- chain.push.apply(chain, responseInterceptorChain);
69649
+ chain.unshift(...requestInterceptorChain);
69650
+ chain.push(...responseInterceptorChain);
69630
69651
  len = chain.length;
69631
69652
  promise2 = Promise.resolve(config2);
69632
69653
  while (i < len) {
@@ -373208,7 +373229,10 @@ var tokenDataByNetwork = {
373208
373229
  PT_sUSDX_1SEP2025: NOT_DEPLOYED,
373209
373230
  lskETH: NOT_DEPLOYED,
373210
373231
  hemiBTC: NOT_DEPLOYED,
373211
- bfBTC: NOT_DEPLOYED
373232
+ bfBTC: NOT_DEPLOYED,
373233
+ PT_sUSDf_25SEP2025: "0xAB365C0879024481E4ad3b47bd6FeA9c10014FbC",
373234
+ sUSDf: "0xc8CF6D7991f15525488b2A83Df53468D682Ba4B0",
373235
+ stkcvxUSDCUSDf: "0xa327D7f665AFE9Ecb0963B5561C84C48C7EC71AB"
373212
373236
  },
373213
373237
  ///
373214
373238
  ///
@@ -396432,6 +396456,9 @@ var chains = {
396432
396456
  "0xc168343c791d56dd1da4b4b8b0cc1c1ec1a16e6b": "cp0x",
396433
396457
  "0x3b56538833fc02f4f0e75609390f26ded0c32e42": "Re7"
396434
396458
  },
396459
+ testMarketConfigurators: {
396460
+ "0x7a133fbd01736fd076158307c9476cc3877f1af5": "Invariant Group"
396461
+ },
396435
396462
  isPublic: true,
396436
396463
  wellKnownToken: {
396437
396464
  address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
@@ -396627,7 +396654,7 @@ var chains = {
396627
396654
  network: "Hemi",
396628
396655
  defaultMarketConfigurators: {},
396629
396656
  testMarketConfigurators: {
396630
- "0xc9961b8a0c763779690577f2c76962c086af2fe3": "Invariant"
396657
+ "0xc9961b8a0c763779690577f2c76962c086af2fe3": "Invariant Group"
396631
396658
  },
396632
396659
  isPublic: false,
396633
396660
  wellKnownToken: {
@@ -396644,11 +396671,10 @@ var chains = {
396644
396671
  Lisk: defineChain({
396645
396672
  ...lisk,
396646
396673
  network: "Lisk",
396647
- defaultMarketConfigurators: {},
396648
- testMarketConfigurators: {
396674
+ defaultMarketConfigurators: {
396649
396675
  "0x25778dbf0e56b7feb8358c4aa2f6f9e19a1c145a": "Re7"
396650
396676
  },
396651
- isPublic: false,
396677
+ isPublic: true,
396652
396678
  wellKnownToken: {
396653
396679
  address: "0xF242275d3a6527d877f2c927a82D9b057609cc71",
396654
396680
  symbol: "USDC.e"
@@ -413083,6 +413109,79 @@ var pythPriceFeedAbi = [
413083
413109
  { type: "error", name: "PriceTimestampTooFarAheadException", inputs: [] },
413084
413110
  { type: "error", name: "PriceTimestampTooFarBehindException", inputs: [] }
413085
413111
  ];
413112
+ var constantPriceFeedAbi = [
413113
+ {
413114
+ type: "constructor",
413115
+ inputs: [
413116
+ { name: "_price", type: "int256", internalType: "int256" },
413117
+ { name: "_descriptionTicker", type: "string", internalType: "string" }
413118
+ ],
413119
+ stateMutability: "nonpayable"
413120
+ },
413121
+ {
413122
+ type: "function",
413123
+ name: "contractType",
413124
+ inputs: [],
413125
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
413126
+ stateMutability: "view"
413127
+ },
413128
+ {
413129
+ type: "function",
413130
+ name: "decimals",
413131
+ inputs: [],
413132
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
413133
+ stateMutability: "view"
413134
+ },
413135
+ {
413136
+ type: "function",
413137
+ name: "description",
413138
+ inputs: [],
413139
+ outputs: [{ name: "", type: "string", internalType: "string" }],
413140
+ stateMutability: "view"
413141
+ },
413142
+ {
413143
+ type: "function",
413144
+ name: "latestRoundData",
413145
+ inputs: [],
413146
+ outputs: [
413147
+ { name: "", type: "uint80", internalType: "uint80" },
413148
+ { name: "answer", type: "int256", internalType: "int256" },
413149
+ { name: "", type: "uint256", internalType: "uint256" },
413150
+ { name: "", type: "uint256", internalType: "uint256" },
413151
+ { name: "", type: "uint80", internalType: "uint80" }
413152
+ ],
413153
+ stateMutability: "view"
413154
+ },
413155
+ {
413156
+ type: "function",
413157
+ name: "price",
413158
+ inputs: [],
413159
+ outputs: [{ name: "", type: "int256", internalType: "int256" }],
413160
+ stateMutability: "view"
413161
+ },
413162
+ {
413163
+ type: "function",
413164
+ name: "serialize",
413165
+ inputs: [],
413166
+ outputs: [{ name: "", type: "bytes", internalType: "bytes" }],
413167
+ stateMutability: "view"
413168
+ },
413169
+ {
413170
+ type: "function",
413171
+ name: "skipPriceCheck",
413172
+ inputs: [],
413173
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
413174
+ stateMutability: "view"
413175
+ },
413176
+ {
413177
+ type: "function",
413178
+ name: "version",
413179
+ inputs: [],
413180
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
413181
+ stateMutability: "view"
413182
+ },
413183
+ { type: "error", name: "IncorrectPriceException", inputs: [] }
413184
+ ];
413086
413185
 
413087
413186
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pricefeeds/isUpdatablePriceFeed.js
413088
413187
  function isUpdatablePriceFeed(pf) {
@@ -413553,6 +413652,35 @@ var PendleTWAPPTPriceFeed = class extends AbstractPriceFeedContract {
413553
413652
  }
413554
413653
  };
413555
413654
 
413655
+ // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pricefeeds/ConstantPriceFeed.js
413656
+ var ConstantPriceFeedContract = class extends AbstractPriceFeedContract {
413657
+ price;
413658
+ constructor(sdk, args) {
413659
+ super(sdk, {
413660
+ ...args,
413661
+ name: "ConstantPriceFeed",
413662
+ abi: constantPriceFeedAbi,
413663
+ decimals: 8
413664
+ // always 8 for USD price feeds
413665
+ });
413666
+ const decoder = decodeAbiParameters(
413667
+ [
413668
+ { type: "int256" }
413669
+ // price
413670
+ ],
413671
+ args.baseParams.serializedParams
413672
+ );
413673
+ this.price = decoder[0];
413674
+ }
413675
+ stateHuman(raw = true) {
413676
+ return {
413677
+ ...super.stateHuman(raw),
413678
+ contractType: "PRICE_FEED::CONSTANT",
413679
+ price: this.price
413680
+ };
413681
+ }
413682
+ };
413683
+
413556
413684
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pricefeeds/PythPriceFeed.js
413557
413685
  var abi16 = pythPriceFeedAbi;
413558
413686
  var PythPriceFeed = class extends AbstractPriceFeedContract {
@@ -414489,6 +414617,8 @@ var PriceFeedRegister = class extends SDKConstruct {
414489
414617
  return new BoundedPriceFeedContract(this.sdk, data);
414490
414618
  case "PRICE_FEED::COMPOSITE":
414491
414619
  return new CompositePriceFeedContract(this.sdk, data);
414620
+ case "PRICE_FEED::CONSTANT":
414621
+ return new ConstantPriceFeedContract(this.sdk, data);
414492
414622
  case "PRICE_FEED::CURVE_CRYPTO":
414493
414623
  return new CurveCryptoPriceFeedContract(this.sdk, data);
414494
414624
  case "PRICE_FEED::CURVE_STABLE":
@@ -436772,6 +436902,7 @@ async function evmMineDetailed(client, timestamp) {
436772
436902
  }
436773
436903
 
436774
436904
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/dev/AccountOpener.js
436905
+ var DIRECT_TRANSFERS_QUOTA = parseEther("10000", "wei");
436775
436906
  var OpenTxRevertedError = class extends BaseError2 {
436776
436907
  txHash;
436777
436908
  constructor(txHash) {
@@ -436931,7 +437062,7 @@ var AccountOpener = class extends SDKConstruct {
436931
437062
  };
436932
437063
  }
436933
437064
  async prepareOpen(input) {
436934
- const { creditManager, target, slippage = 50 } = input;
437065
+ const { creditManager, target, slippage = 50, directTransfer = [] } = input;
436935
437066
  const borrower = await this.#getBorrower();
436936
437067
  const cm = this.sdk.marketRegister.findCreditManager(creditManager);
436937
437068
  const symbol2 = this.sdk.tokensMeta.symbol(target);
@@ -436990,6 +437121,10 @@ var AccountOpener = class extends SDKConstruct {
436990
437121
  debt,
436991
437122
  logger2
436992
437123
  );
437124
+ for (const token of directTransfer) {
437125
+ averageQuota.push({ token, balance: DIRECT_TRANSFERS_QUOTA });
437126
+ minQuota.push({ token, balance: DIRECT_TRANSFERS_QUOTA });
437127
+ }
436993
437128
  logger2?.debug({ averageQuota, minQuota }, "calculated quotas");
436994
437129
  const { tx, calls } = await this.#service.openCA({
436995
437130
  creditManager: cm.creditManager.address,
@@ -437277,7 +437412,6 @@ var AccountOpener = class extends SDKConstruct {
437277
437412
  publicClient: this.#anvil,
437278
437413
  wallet: this.#anvil,
437279
437414
  faucet: this.faucet,
437280
- amountUSD: (minAmountUSD) => minAmountUSD * BigInt(targets.length),
437281
437415
  claimer: distributor,
437282
437416
  role: "reward token distributor",
437283
437417
  logger: this.#logger
@@ -437297,7 +437431,9 @@ var AccountOpener = class extends SDKConstruct {
437297
437431
  for (let i = 0; i < tokensArr.length; i++) {
437298
437432
  const token = tokensArr[i];
437299
437433
  const balance = actualBalances[i];
437300
- this.#logger?.debug(`${token} balance: ${balance}`);
437434
+ this.#logger?.debug(
437435
+ `${this.labelAddress(token)} balance: ${this.sdk.tokensMeta.formatBN(token, balance)}`
437436
+ );
437301
437437
  }
437302
437438
  for (const { account, input } of targets) {
437303
437439
  if (!account) {
@@ -448694,7 +448830,7 @@ function getRenderer(opts) {
448694
448830
  var package_default = {
448695
448831
  name: "@gearbox-protocol/deploy-tools",
448696
448832
  description: "Gearbox deploy tools",
448697
- version: "5.39.2",
448833
+ version: "5.39.4",
448698
448834
  homepage: "https://gearbox.fi",
448699
448835
  keywords: [
448700
448836
  "gearbox"
@@ -448734,7 +448870,7 @@ var package_default = {
448734
448870
  "@gearbox-protocol/deploy-tools-node": "0.0.0",
448735
448871
  "@gearbox-protocol/deploy-tools-shared": "0.0.0",
448736
448872
  "@gearbox-protocol/deploy-tools-types": "0.0.0",
448737
- "@gearbox-protocol/sdk": "8.10.1",
448873
+ "@gearbox-protocol/sdk": "8.12.1",
448738
448874
  "@gearbox-protocol/sdk-gov": "2.37.0",
448739
448875
  "@types/lodash-es": "^4.17.12",
448740
448876
  "@types/node": "^24.1.0",
@@ -449687,7 +449823,7 @@ decimal.js/decimal.js:
449687
449823
  *)
449688
449824
 
449689
449825
  axios/dist/node/axios.cjs:
449690
- (*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors *)
449826
+ (*! Axios v1.11.0 Copyright (c) 2025 Matt Zabriskie and contributors *)
449691
449827
 
449692
449828
  lodash/lodash.js:
449693
449829
  (**
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.39.2",
4
+ "version": "5.39.4",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"
@@ -41,7 +41,7 @@
41
41
  "@gearbox-protocol/deploy-tools-node": "0.0.0",
42
42
  "@gearbox-protocol/deploy-tools-shared": "0.0.0",
43
43
  "@gearbox-protocol/deploy-tools-types": "0.0.0",
44
- "@gearbox-protocol/sdk": "8.10.1",
44
+ "@gearbox-protocol/sdk": "8.12.1",
45
45
  "@gearbox-protocol/sdk-gov": "2.37.0",
46
46
  "@types/lodash-es": "^4.17.12",
47
47
  "@types/node": "^24.1.0",