@gearbox-protocol/deploy-tools 5.71.3 → 5.71.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 +519 -140
  2. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -4480,7 +4480,7 @@ var init_size = __esm({
4480
4480
  var version2;
4481
4481
  var init_version2 = __esm({
4482
4482
  "../../node_modules/viem/_esm/errors/version.js"() {
4483
- version2 = "2.47.0";
4483
+ version2 = "2.47.2";
4484
4484
  }
4485
4485
  });
4486
4486
 
@@ -180208,6 +180208,7 @@ var require_safe_4337_module = __commonJS({
180208
180208
  "480": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
180209
180209
  "3338": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
180210
180210
  "3637": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
180211
+ "8150": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
180211
180212
  "8453": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
180212
180213
  "9745": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
180213
180214
  "10143": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
@@ -181444,6 +181445,7 @@ var require_safe_module_setup = __commonJS({
181444
181445
  "480": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
181445
181446
  "3338": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
181446
181447
  "3637": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
181448
+ "8150": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
181447
181449
  "8453": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
181448
181450
  "9745": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
181449
181451
  "10143": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
@@ -181561,6 +181563,8 @@ var require_safe_webauthn_signer_factory = __commonJS({
181561
181563
  "10": "0x1d31F259eE307358a26dFb23EB365939E8641195",
181562
181564
  "100": "0x1d31F259eE307358a26dFb23EB365939E8641195",
181563
181565
  "137": "0x1d31F259eE307358a26dFb23EB365939E8641195",
181566
+ "1328": "0x1d31F259eE307358a26dFb23EB365939E8641195",
181567
+ "1329": "0x1d31F259eE307358a26dFb23EB365939E8641195",
181564
181568
  "4078": "0x1d31F259eE307358a26dFb23EB365939E8641195",
181565
181569
  "8453": "0x1d31F259eE307358a26dFb23EB365939E8641195",
181566
181570
  "42161": "0x1d31F259eE307358a26dFb23EB365939E8641195",
@@ -181734,6 +181738,8 @@ var require_safe_webauthn_signer_factory2 = __commonJS({
181734
181738
  "10": "0xF7488fFbe67327ac9f37D5F722d83Fc900852Fbf",
181735
181739
  "100": "0xF7488fFbe67327ac9f37D5F722d83Fc900852Fbf",
181736
181740
  "137": "0xF7488fFbe67327ac9f37D5F722d83Fc900852Fbf",
181741
+ "1328": "0xF7488fFbe67327ac9f37D5F722d83Fc900852Fbf",
181742
+ "1329": "0xF7488fFbe67327ac9f37D5F722d83Fc900852Fbf",
181737
181743
  "4078": "0xF7488fFbe67327ac9f37D5F722d83Fc900852Fbf",
181738
181744
  "8453": "0xF7488fFbe67327ac9f37D5F722d83Fc900852Fbf",
181739
181745
  "42161": "0xF7488fFbe67327ac9f37D5F722d83Fc900852Fbf",
@@ -181907,6 +181913,8 @@ var require_safe_webauthn_shared_signer = __commonJS({
181907
181913
  "10": "0x94a4F6affBd8975951142c3999aEAB7ecee555c2",
181908
181914
  "100": "0x94a4F6affBd8975951142c3999aEAB7ecee555c2",
181909
181915
  "137": "0x94a4F6affBd8975951142c3999aEAB7ecee555c2",
181916
+ "1328": "0x94a4F6affBd8975951142c3999aEAB7ecee555c2",
181917
+ "1329": "0x94a4F6affBd8975951142c3999aEAB7ecee555c2",
181910
181918
  "4078": "0x94a4F6affBd8975951142c3999aEAB7ecee555c2",
181911
181919
  "8453": "0x94a4F6affBd8975951142c3999aEAB7ecee555c2",
181912
181920
  "42161": "0x94a4F6affBd8975951142c3999aEAB7ecee555c2",
@@ -182102,6 +182110,8 @@ var require_daimo_p256_verifier = __commonJS({
182102
182110
  "10": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182103
182111
  "100": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182104
182112
  "137": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182113
+ "1328": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182114
+ "1329": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182105
182115
  "4078": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182106
182116
  "8453": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182107
182117
  "42161": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
@@ -182134,6 +182144,8 @@ var require_daimo_p256_verifier2 = __commonJS({
182134
182144
  "10": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182135
182145
  "100": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182136
182146
  "137": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182147
+ "1328": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182148
+ "1329": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182137
182149
  "4078": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182138
182150
  "8453": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
182139
182151
  "42161": "0xc2b78104907F722DABAc4C69f826a522B2754De4",
@@ -182165,6 +182177,8 @@ var require_fcl_p256_verifier = __commonJS({
182165
182177
  "10": "0xA86e0054C51E4894D88762a017ECc5E5235f5DBA",
182166
182178
  "100": "0xA86e0054C51E4894D88762a017ECc5E5235f5DBA",
182167
182179
  "137": "0xA86e0054C51E4894D88762a017ECc5E5235f5DBA",
182180
+ "1328": "0xA86e0054C51E4894D88762a017ECc5E5235f5DBA",
182181
+ "1329": "0xA86e0054C51E4894D88762a017ECc5E5235f5DBA",
182168
182182
  "4078": "0xA86e0054C51E4894D88762a017ECc5E5235f5DBA",
182169
182183
  "8453": "0xA86e0054C51E4894D88762a017ECc5E5235f5DBA",
182170
182184
  "42161": "0xA86e0054C51E4894D88762a017ECc5E5235f5DBA",
@@ -182196,6 +182210,8 @@ var require_fcl_p256_verifier2 = __commonJS({
182196
182210
  "10": "0x445a0683e494ea0c5AF3E83c5159fBE47Cf9e765",
182197
182211
  "100": "0x445a0683e494ea0c5AF3E83c5159fBE47Cf9e765",
182198
182212
  "137": "0x445a0683e494ea0c5AF3E83c5159fBE47Cf9e765",
182213
+ "1328": "0x445a0683e494ea0c5AF3E83c5159fBE47Cf9e765",
182214
+ "1329": "0x445a0683e494ea0c5AF3E83c5159fBE47Cf9e765",
182199
182215
  "4078": "0x445a0683e494ea0c5AF3E83c5159fBE47Cf9e765",
182200
182216
  "8453": "0x445a0683e494ea0c5AF3E83c5159fBE47Cf9e765",
182201
182217
  "42161": "0x445a0683e494ea0c5AF3E83c5159fBE47Cf9e765",
@@ -281900,6 +281916,9 @@ function extendSchema() {
281900
281916
  // ../../node_modules/viem/_esm/utils/index.js
281901
281917
  init_fromHex();
281902
281918
 
281919
+ // ../../node_modules/viem/_esm/utils/hash/toFunctionSignature.js
281920
+ init_toSignature();
281921
+
281903
281922
  // ../../node_modules/viem/_esm/utils/rpc/http.js
281904
281923
  init_request();
281905
281924
 
@@ -337569,6 +337588,15 @@ var AddressSet = class extends Set {
337569
337588
  };
337570
337589
 
337571
337590
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/utils/abi-decode.js
337591
+ function getFunctionSignature(abi31, calldataOrSelector) {
337592
+ const selector = calldataOrSelector.slice(0, 10);
337593
+ for (const item of abi31) {
337594
+ if (item.type === "function" && toFunctionSelector(item) === selector) {
337595
+ return toSignature(item);
337596
+ }
337597
+ }
337598
+ throw new Error(`Function with selector ${selector} not found in ABI`);
337599
+ }
337572
337600
  function functionArgsToMap(abi31, functionName, args) {
337573
337601
  const abiItem = getAbiItem({
337574
337602
  abi: abi31,
@@ -337598,6 +337626,34 @@ function functionArgsToMap(abi31, functionName, args) {
337598
337626
  }
337599
337627
  return namedArgs;
337600
337628
  }
337629
+ function functionArgsToRecord(abi31, functionName, args) {
337630
+ const abiItem = getAbiItem({
337631
+ abi: abi31,
337632
+ name: functionName,
337633
+ args
337634
+ });
337635
+ if (!abiItem || abiItem.type !== "function") {
337636
+ throw new AbiFunctionNotFoundError(functionName);
337637
+ }
337638
+ const namedArgs = {};
337639
+ if (Array.isArray(args)) {
337640
+ args.forEach((value, i) => {
337641
+ const input = abiItem.inputs?.[i];
337642
+ const key = input?.name || `${i}`;
337643
+ namedArgs[key] = value;
337644
+ });
337645
+ } else {
337646
+ Object.entries(args || {}).forEach(([key, value]) => {
337647
+ const index2 = parseInt(key, 10);
337648
+ if (!Number.isNaN(index2) && abiItem.inputs?.[index2]?.name) {
337649
+ namedArgs[abiItem.inputs[index2].name] = value;
337650
+ } else {
337651
+ namedArgs[key] = value;
337652
+ }
337653
+ });
337654
+ }
337655
+ return namedArgs;
337656
+ }
337601
337657
 
337602
337658
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/utils/bytes32ToString.js
337603
337659
  function bytes32ToString(bytes) {
@@ -339754,13 +339810,6 @@ function toAddress2(value) {
339754
339810
 
339755
339811
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/abi/310/iSecuritizeKYCFactory.js
339756
339812
  var iSecuritizeKYCFactoryAbi = [
339757
- {
339758
- type: "function",
339759
- name: "addRegistrar",
339760
- inputs: [{ name: "registrar", type: "address", internalType: "address" }],
339761
- outputs: [],
339762
- stateMutability: "nonpayable"
339763
- },
339764
339813
  {
339765
339814
  type: "function",
339766
339815
  name: "contractType",
@@ -339768,13 +339817,6 @@ var iSecuritizeKYCFactoryAbi = [
339768
339817
  outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
339769
339818
  stateMutability: "view"
339770
339819
  },
339771
- {
339772
- type: "function",
339773
- name: "degenNFT",
339774
- inputs: [],
339775
- outputs: [{ name: "", type: "address", internalType: "address" }],
339776
- stateMutability: "view"
339777
- },
339778
339820
  {
339779
339821
  type: "function",
339780
339822
  name: "getCreditAccounts",
@@ -339784,33 +339826,17 @@ var iSecuritizeKYCFactoryAbi = [
339784
339826
  },
339785
339827
  {
339786
339828
  type: "function",
339787
- name: "getDSTokens",
339829
+ name: "getDegenNFT",
339788
339830
  inputs: [],
339789
- outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
339790
- stateMutability: "view"
339791
- },
339792
- {
339793
- type: "function",
339794
- name: "getInvestor",
339795
- inputs: [
339796
- { name: "creditAccount", type: "address", internalType: "address" }
339797
- ],
339798
339831
  outputs: [{ name: "", type: "address", internalType: "address" }],
339799
339832
  stateMutability: "view"
339800
339833
  },
339801
339834
  {
339802
339835
  type: "function",
339803
- name: "getRegisteredTokens",
339836
+ name: "getInvestor",
339804
339837
  inputs: [
339805
339838
  { name: "creditAccount", type: "address", internalType: "address" }
339806
339839
  ],
339807
- outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
339808
- stateMutability: "view"
339809
- },
339810
- {
339811
- type: "function",
339812
- name: "getRegistrar",
339813
- inputs: [{ name: "token", type: "address", internalType: "address" }],
339814
339840
  outputs: [{ name: "", type: "address", internalType: "address" }],
339815
339841
  stateMutability: "view"
339816
339842
  },
@@ -339823,15 +339849,6 @@ var iSecuritizeKYCFactoryAbi = [
339823
339849
  outputs: [{ name: "", type: "address", internalType: "address" }],
339824
339850
  stateMutability: "view"
339825
339851
  },
339826
- {
339827
- type: "function",
339828
- name: "isActiveCreditAccount",
339829
- inputs: [
339830
- { name: "creditAccount", type: "address", internalType: "address" }
339831
- ],
339832
- outputs: [{ name: "", type: "bool", internalType: "bool" }],
339833
- stateMutability: "view"
339834
- },
339835
339852
  {
339836
339853
  type: "function",
339837
339854
  name: "isCreditAccount",
@@ -339850,15 +339867,6 @@ var iSecuritizeKYCFactoryAbi = [
339850
339867
  outputs: [{ name: "", type: "bool", internalType: "bool" }],
339851
339868
  stateMutability: "view"
339852
339869
  },
339853
- {
339854
- type: "function",
339855
- name: "isInactiveCreditAccount",
339856
- inputs: [
339857
- { name: "creditAccount", type: "address", internalType: "address" }
339858
- ],
339859
- outputs: [{ name: "", type: "bool", internalType: "bool" }],
339860
- stateMutability: "view"
339861
- },
339862
339870
  {
339863
339871
  type: "function",
339864
339872
  name: "multicall",
@@ -339918,6 +339926,13 @@ var iSecuritizeKYCFactoryAbi = [
339918
339926
  outputs: [{ name: "", type: "address", internalType: "address" }],
339919
339927
  stateMutability: "view"
339920
339928
  },
339929
+ {
339930
+ type: "function",
339931
+ name: "serialize",
339932
+ inputs: [],
339933
+ outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
339934
+ stateMutability: "view"
339935
+ },
339921
339936
  {
339922
339937
  type: "function",
339923
339938
  name: "setFrozenStatus",
@@ -340009,30 +340024,6 @@ var iSecuritizeKYCFactoryAbi = [
340009
340024
  ],
340010
340025
  anonymous: false
340011
340026
  },
340012
- {
340013
- type: "event",
340014
- name: "SetRegistrar",
340015
- inputs: [
340016
- {
340017
- name: "token",
340018
- type: "address",
340019
- indexed: true,
340020
- internalType: "address"
340021
- },
340022
- {
340023
- name: "registrar",
340024
- type: "address",
340025
- indexed: true,
340026
- internalType: "address"
340027
- }
340028
- ],
340029
- anonymous: false
340030
- },
340031
- {
340032
- type: "error",
340033
- name: "CallerIsNotInstanceOwnerException",
340034
- inputs: [{ name: "caller", type: "address", internalType: "address" }]
340035
- },
340036
340027
  {
340037
340028
  type: "error",
340038
340029
  name: "CallerIsNotInvestorException",
@@ -340060,11 +340051,6 @@ var iSecuritizeKYCFactoryAbi = [
340060
340051
  name: "InvalidUnderlyingTokenException",
340061
340052
  inputs: [{ name: "underlying", type: "address", internalType: "address" }]
340062
340053
  },
340063
- {
340064
- type: "error",
340065
- name: "RegistrarNotSetForTokenException",
340066
- inputs: [{ name: "token", type: "address", internalType: "address" }]
340067
- },
340068
340054
  {
340069
340055
  type: "error",
340070
340056
  name: "UnknownCreditAccountException",
@@ -340072,14 +340058,6 @@ var iSecuritizeKYCFactoryAbi = [
340072
340058
  { name: "creditAccount", type: "address", internalType: "address" }
340073
340059
  ]
340074
340060
  },
340075
- {
340076
- type: "error",
340077
- name: "WalletCallExecutionFailedException",
340078
- inputs: [
340079
- { name: "index", type: "uint256", internalType: "uint256" },
340080
- { name: "reason", type: "bytes", internalType: "bytes" }
340081
- ]
340082
- },
340083
340061
  { type: "error", name: "ZeroAddressException", inputs: [] }
340084
340062
  ];
340085
340063
 
@@ -340534,6 +340512,39 @@ var ChainContractsRegister = class _ChainContractsRegister {
340534
340512
  (call2) => this.parseFunctionData(call2.target, call2.callData)
340535
340513
  );
340536
340514
  }
340515
+ /**
340516
+ * Parses calldata for a contract at the given address, preserving original types.
340517
+ * When strict is true, throws on unknown address or selector; otherwise returns a fallback.
340518
+ */
340519
+ parseFunctionDataV2(address, calldata, strict) {
340520
+ const contract = this.contracts.get(address);
340521
+ if (contract) {
340522
+ return contract.parseFunctionDataV2(calldata, strict);
340523
+ }
340524
+ if (strict) {
340525
+ throw new Error(`contract ${address} not found on chain ${this.chainId}`);
340526
+ }
340527
+ const selector = calldata.slice(0, 10);
340528
+ const data = `0x${calldata.slice(10)}`;
340529
+ return {
340530
+ chainId: this.chainId,
340531
+ target: address,
340532
+ contractType: "",
340533
+ label: this.labelAddress(address, true),
340534
+ version: 0,
340535
+ functionName: `unknown function ${selector}`,
340536
+ rawArgs: { _data: data }
340537
+ };
340538
+ }
340539
+ /**
340540
+ * Parses multicalls preserving original types.
340541
+ * When strict is true, throws on unknown targets or selectors.
340542
+ */
340543
+ parseMultiCallV2(calls, strict) {
340544
+ return calls.map(
340545
+ (call2) => this.parseFunctionDataV2(call2.target, call2.callData, strict)
340546
+ );
340547
+ }
340537
340548
  };
340538
340549
 
340539
340550
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/base/Construct.js
@@ -340545,9 +340556,17 @@ var Construct = class {
340545
340556
  * Indicates that contract state needs to be updated
340546
340557
  */
340547
340558
  #dirty = false;
340548
- constructor({ client, logger: logger2 }) {
340549
- this.client = client;
340550
- this.register = ChainContractsRegister.for(client, logger2);
340559
+ constructor(options) {
340560
+ const { logger: logger2 } = options;
340561
+ if ("client" in options) {
340562
+ const { client } = options;
340563
+ this.client = client;
340564
+ this.register = ChainContractsRegister.for(client, logger2);
340565
+ } else {
340566
+ const { register } = options;
340567
+ this.register = register;
340568
+ this.client = register.client;
340569
+ }
340551
340570
  this.logger = childLogger(
340552
340571
  this.constructor.name,
340553
340572
  this.register.logger ?? logger2
@@ -340622,15 +340641,15 @@ var BaseContract = class extends Construct {
340622
340641
  version;
340623
340642
  address;
340624
340643
  name;
340625
- constructor({ client, logger: logger2 }, args) {
340626
- super({ client, logger: logger2 });
340644
+ constructor(options, args) {
340645
+ super(options);
340627
340646
  this.abi = args.abi;
340628
340647
  this.address = getAddress(args.addr);
340629
340648
  this.contract = getContract({
340630
340649
  address: this.address,
340631
340650
  // add exceptions for better error decoding
340632
340651
  abi: [...this.abi, ...errorAbis],
340633
- client
340652
+ client: this.client
340634
340653
  });
340635
340654
  this.version = Number(args.version || 0);
340636
340655
  this.contractType = args.contractType ?? "";
@@ -340778,6 +340797,57 @@ var BaseContract = class extends Construct {
340778
340797
  args
340779
340798
  };
340780
340799
  }
340800
+ /**
340801
+ * Parses calldata into structured result with preserved original types.
340802
+ * When strict is true, throws {@link ContractParseError} on unknown selectors;
340803
+ * otherwise returns a fallback with the raw calldata.
340804
+ */
340805
+ parseFunctionDataV2(calldata, strict) {
340806
+ try {
340807
+ const decoded = decodeFunctionData({
340808
+ abi: this.abi,
340809
+ data: calldata
340810
+ });
340811
+ const functionName = getFunctionSignature(this.abi, calldata);
340812
+ return this.wrapParseCallV2(
340813
+ functionName,
340814
+ this.parseFunctionParamsV2(decoded, strict)
340815
+ );
340816
+ } catch (e) {
340817
+ if (strict) {
340818
+ throw new ContractParseError(e, {
340819
+ address: this.address,
340820
+ callData: calldata,
340821
+ contractName: this.name
340822
+ });
340823
+ }
340824
+ this.logger?.warn(e);
340825
+ const selector = calldata.slice(0, 10);
340826
+ const data = `0x${calldata.slice(10)}`;
340827
+ return this.wrapParseCallV2(`unknown function ${selector}`, {
340828
+ _data: data
340829
+ });
340830
+ }
340831
+ }
340832
+ /**
340833
+ * Converts viem-decoded function arguments to a record preserving original types.
340834
+ * Override in subclasses to handle nesting (e.g., multicall inner calls).
340835
+ * @param strict - propagated from parseFunctionDataV2 for recursive parsing
340836
+ */
340837
+ parseFunctionParamsV2(params, _strict) {
340838
+ return functionArgsToRecord(this.abi, params.functionName, params.args);
340839
+ }
340840
+ wrapParseCallV2(functionName, rawArgs) {
340841
+ return {
340842
+ chainId: this.chainId,
340843
+ target: this.address,
340844
+ contractType: this.contractType,
340845
+ label: this.register.labelAddress(this.address, true),
340846
+ version: this.version,
340847
+ functionName,
340848
+ rawArgs
340849
+ };
340850
+ }
340781
340851
  /**
340782
340852
  * Creates a raw transaction for a function in this contract
340783
340853
  * @param parameters
@@ -340858,11 +340928,21 @@ var BaseContract = class extends Construct {
340858
340928
  }
340859
340929
  };
340860
340930
 
340931
+ // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/base/errors.js
340932
+ var MissingSerializedParamsError = class extends Error {
340933
+ constructor(propertyName) {
340934
+ super(
340935
+ `Cannot access '${propertyName}': serializedParams were not provided`
340936
+ );
340937
+ this.name = "MissingSerializedParamsError";
340938
+ }
340939
+ };
340940
+
340861
340941
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/base/PlaceholderContract.js
340862
340942
  var abi2 = [];
340863
340943
  var PlaceholderContract = class extends BaseContract {
340864
- constructor(sdk, args) {
340865
- super(sdk, { ...args, abi: abi2 });
340944
+ constructor(options, args) {
340945
+ super(options, { ...args, abi: abi2 });
340866
340946
  }
340867
340947
  };
340868
340948
 
@@ -346653,20 +346733,92 @@ var CreditFacadeV300Contract = class extends BaseContract {
346653
346733
  }
346654
346734
  };
346655
346735
 
346656
- // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js
346736
+ // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js
346657
346737
  var abi12 = [
346658
346738
  ...iCreditFacadeV310Abi,
346659
346739
  ...iCreditFacadeMulticallV310Abi,
346660
346740
  ...iPausableAbi
346661
346741
  ];
346662
- var CreditFacadeV310Contract = class extends BaseContract {
346742
+ var CreditFacadeV310BaseContract = class extends BaseContract {
346743
+ constructor(options, args) {
346744
+ super(options, { ...args, abi: abi12 });
346745
+ }
346746
+ parseFunctionParamsV2(params, strict) {
346747
+ switch (params.functionName) {
346748
+ case "openCreditAccount": {
346749
+ const [onBehalfOf, calls, referralCode] = params.args;
346750
+ return {
346751
+ onBehalfOf,
346752
+ calls: this.register.parseMultiCallV2([...calls], strict),
346753
+ referralCode
346754
+ };
346755
+ }
346756
+ case "closeCreditAccount": {
346757
+ const [creditAccount, calls] = params.args;
346758
+ return {
346759
+ creditAccount,
346760
+ calls: this.register.parseMultiCallV2([...calls], strict)
346761
+ };
346762
+ }
346763
+ case "botMulticall":
346764
+ case "multicall": {
346765
+ const [creditAccount, calls] = params.args;
346766
+ return {
346767
+ creditAccount,
346768
+ calls: this.register.parseMultiCallV2([...calls], strict)
346769
+ };
346770
+ }
346771
+ case "liquidateCreditAccount": {
346772
+ const [creditAccount, to2, calls] = params.args;
346773
+ return {
346774
+ creditAccount,
346775
+ to: to2,
346776
+ calls: this.register.parseMultiCallV2([...calls], strict)
346777
+ };
346778
+ }
346779
+ default:
346780
+ return super.parseFunctionParamsV2(params, strict);
346781
+ }
346782
+ }
346783
+ stringifyFunctionParams(params) {
346784
+ switch (params.functionName) {
346785
+ case "openCreditAccount": {
346786
+ const [onBehalfOf, calls, referralCode] = params.args;
346787
+ return [
346788
+ this.labelAddress(onBehalfOf),
346789
+ this.register.parseMultiCall([...calls]).join(","),
346790
+ `${referralCode}`
346791
+ ];
346792
+ }
346793
+ case "closeCreditAccount": {
346794
+ const [creditAccount, calls] = params.args;
346795
+ return [
346796
+ this.labelAddress(creditAccount),
346797
+ this.register.parseMultiCall([...calls]).join(",")
346798
+ ];
346799
+ }
346800
+ case "liquidateCreditAccount": {
346801
+ const [creditAccount, to2, calls] = params.args;
346802
+ return [
346803
+ this.labelAddress(creditAccount),
346804
+ this.labelAddress(to2),
346805
+ this.register.parseMultiCall([...calls]).join(",")
346806
+ ];
346807
+ }
346808
+ default:
346809
+ return super.stringifyFunctionParams(params);
346810
+ }
346811
+ }
346812
+ };
346813
+
346814
+ // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js
346815
+ var CreditFacadeV310Contract = class extends CreditFacadeV310BaseContract {
346663
346816
  underlying;
346664
346817
  constructor(options, { creditFacade, creditManager }) {
346665
346818
  const { baseParams, ...rest } = creditFacade;
346666
346819
  super(options, {
346667
346820
  ...baseParams,
346668
- name: `CreditFacadeV310(${creditManager.name})`,
346669
- abi: abi12
346821
+ name: `CreditFacadeV310(${creditManager.name})`
346670
346822
  });
346671
346823
  Object.assign(this, rest);
346672
346824
  this.underlying = creditManager.underlying;
@@ -346733,47 +346885,24 @@ var CreditFacadeV310Contract = class extends BaseContract {
346733
346885
  args: [to2, calls, referralCode]
346734
346886
  });
346735
346887
  }
346736
- stringifyFunctionParams(params) {
346737
- switch (params.functionName) {
346738
- case "openCreditAccount": {
346739
- const [onBehalfOf, calls, referralCode] = params.args;
346740
- return [
346741
- this.labelAddress(onBehalfOf),
346742
- this.register.parseMultiCall([...calls]).join(","),
346743
- `${referralCode}`
346744
- ];
346745
- }
346746
- case "closeCreditAccount": {
346747
- const [creditAccount, calls] = params.args;
346748
- return [
346749
- this.labelAddress(creditAccount),
346750
- this.register.parseMultiCall([...calls]).join(",")
346751
- ];
346752
- }
346753
- case "liquidateCreditAccount": {
346754
- const [creditAccount, to2, calls] = params.args;
346755
- return [
346756
- this.labelAddress(creditAccount),
346757
- this.labelAddress(to2),
346758
- this.register.parseMultiCall([...calls]).join(",")
346759
- ];
346760
- }
346761
- default:
346762
- return super.stringifyFunctionParams(params);
346763
- }
346764
- }
346765
346888
  };
346766
346889
 
346767
346890
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/adapters/PlaceholderAdapterContracts.js
346768
346891
  var PlaceholderAdapterContract = class extends PlaceholderContract {
346769
- targetContract;
346770
- constructor(sdk, args) {
346771
- super(sdk, args.baseParams);
346772
- this.targetContract = args.targetContract;
346892
+ #targetContract;
346893
+ constructor(options, args) {
346894
+ super(options, args.baseParams);
346895
+ this.#targetContract = args.targetContract;
346896
+ }
346897
+ get targetContract() {
346898
+ if (!this.#targetContract) {
346899
+ throw new MissingSerializedParamsError("targetContract");
346900
+ }
346901
+ return this.#targetContract;
346773
346902
  }
346774
346903
  };
346775
346904
 
346776
- // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/adapters/factory.js
346905
+ // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/adapters/createAdapter.js
346777
346906
  function createAdapter(sdk, args) {
346778
346907
  const adapterType = bytes32ToString(args.baseParams.contractType);
346779
346908
  for (const [name, plugin] of Object.entries(sdk.plugins)) {
@@ -354595,10 +354724,249 @@ var PoolV300Contract = class extends BaseContract {
354595
354724
  }
354596
354725
  };
354597
354726
 
354727
+ // ../../node_modules/@gearbox-protocol/sdk/dist/esm/abi/310/iSecuritizeDegenNFT.js
354728
+ var iSecuritizeDegenNFTAbi = [
354729
+ {
354730
+ type: "function",
354731
+ name: "addRegistrar",
354732
+ inputs: [{ name: "registrar", type: "address", internalType: "address" }],
354733
+ outputs: [],
354734
+ stateMutability: "nonpayable"
354735
+ },
354736
+ {
354737
+ type: "function",
354738
+ name: "burn",
354739
+ inputs: [
354740
+ { name: "wallet", type: "address", internalType: "address" },
354741
+ { name: "", type: "uint256", internalType: "uint256" }
354742
+ ],
354743
+ outputs: [],
354744
+ stateMutability: "nonpayable"
354745
+ },
354746
+ {
354747
+ type: "function",
354748
+ name: "contractType",
354749
+ inputs: [],
354750
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
354751
+ stateMutability: "view"
354752
+ },
354753
+ {
354754
+ type: "function",
354755
+ name: "getDSTokens",
354756
+ inputs: [],
354757
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
354758
+ stateMutability: "view"
354759
+ },
354760
+ {
354761
+ type: "function",
354762
+ name: "getFactory",
354763
+ inputs: [],
354764
+ outputs: [{ name: "", type: "address", internalType: "address" }],
354765
+ stateMutability: "view"
354766
+ },
354767
+ {
354768
+ type: "function",
354769
+ name: "getOperators",
354770
+ inputs: [{ name: "token", type: "address", internalType: "address" }],
354771
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
354772
+ stateMutability: "view"
354773
+ },
354774
+ {
354775
+ type: "function",
354776
+ name: "getRegisteredTokens",
354777
+ inputs: [
354778
+ { name: "creditAccount", type: "address", internalType: "address" }
354779
+ ],
354780
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
354781
+ stateMutability: "view"
354782
+ },
354783
+ {
354784
+ type: "function",
354785
+ name: "getRegistrar",
354786
+ inputs: [{ name: "token", type: "address", internalType: "address" }],
354787
+ outputs: [{ name: "", type: "address", internalType: "address" }],
354788
+ stateMutability: "view"
354789
+ },
354790
+ {
354791
+ type: "function",
354792
+ name: "isDSToken",
354793
+ inputs: [{ name: "token", type: "address", internalType: "address" }],
354794
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
354795
+ stateMutability: "view"
354796
+ },
354797
+ {
354798
+ type: "function",
354799
+ name: "isOperator",
354800
+ inputs: [
354801
+ { name: "token", type: "address", internalType: "address" },
354802
+ { name: "operator", type: "address", internalType: "address" }
354803
+ ],
354804
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
354805
+ stateMutability: "view"
354806
+ },
354807
+ {
354808
+ type: "function",
354809
+ name: "mint",
354810
+ inputs: [{ name: "wallet", type: "address", internalType: "address" }],
354811
+ outputs: [],
354812
+ stateMutability: "nonpayable"
354813
+ },
354814
+ {
354815
+ type: "function",
354816
+ name: "registerCreditAccount",
354817
+ inputs: [
354818
+ { name: "creditAccount", type: "address", internalType: "address" },
354819
+ { name: "tokens", type: "address[]", internalType: "address[]" }
354820
+ ],
354821
+ outputs: [],
354822
+ stateMutability: "nonpayable"
354823
+ },
354824
+ {
354825
+ type: "function",
354826
+ name: "registerHelperAccount",
354827
+ inputs: [
354828
+ { name: "creditAccount", type: "address", internalType: "address" },
354829
+ { name: "helperAccount", type: "address", internalType: "address" },
354830
+ { name: "token", type: "address", internalType: "address" }
354831
+ ],
354832
+ outputs: [],
354833
+ stateMutability: "nonpayable"
354834
+ },
354835
+ {
354836
+ type: "function",
354837
+ name: "serialize",
354838
+ inputs: [],
354839
+ outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
354840
+ stateMutability: "view"
354841
+ },
354842
+ {
354843
+ type: "function",
354844
+ name: "setOperatorStatus",
354845
+ inputs: [
354846
+ { name: "token", type: "address", internalType: "address" },
354847
+ { name: "operator", type: "address", internalType: "address" },
354848
+ { name: "approved", type: "bool", internalType: "bool" }
354849
+ ],
354850
+ outputs: [],
354851
+ stateMutability: "nonpayable"
354852
+ },
354853
+ {
354854
+ type: "function",
354855
+ name: "version",
354856
+ inputs: [],
354857
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
354858
+ stateMutability: "view"
354859
+ },
354860
+ {
354861
+ type: "event",
354862
+ name: "Burn",
354863
+ inputs: [
354864
+ {
354865
+ name: "wallet",
354866
+ type: "address",
354867
+ indexed: true,
354868
+ internalType: "address"
354869
+ }
354870
+ ],
354871
+ anonymous: false
354872
+ },
354873
+ {
354874
+ type: "event",
354875
+ name: "Mint",
354876
+ inputs: [
354877
+ {
354878
+ name: "wallet",
354879
+ type: "address",
354880
+ indexed: true,
354881
+ internalType: "address"
354882
+ }
354883
+ ],
354884
+ anonymous: false
354885
+ },
354886
+ {
354887
+ type: "event",
354888
+ name: "SetOperatorStatus",
354889
+ inputs: [
354890
+ {
354891
+ name: "token",
354892
+ type: "address",
354893
+ indexed: true,
354894
+ internalType: "address"
354895
+ },
354896
+ {
354897
+ name: "operator",
354898
+ type: "address",
354899
+ indexed: true,
354900
+ internalType: "address"
354901
+ },
354902
+ { name: "approved", type: "bool", indexed: false, internalType: "bool" }
354903
+ ],
354904
+ anonymous: false
354905
+ },
354906
+ {
354907
+ type: "event",
354908
+ name: "SetRegistrar",
354909
+ inputs: [
354910
+ {
354911
+ name: "token",
354912
+ type: "address",
354913
+ indexed: true,
354914
+ internalType: "address"
354915
+ },
354916
+ {
354917
+ name: "registrar",
354918
+ type: "address",
354919
+ indexed: true,
354920
+ internalType: "address"
354921
+ }
354922
+ ],
354923
+ anonymous: false
354924
+ },
354925
+ {
354926
+ type: "error",
354927
+ name: "CallerIsNotCreditFacadeException",
354928
+ inputs: [{ name: "caller", type: "address", internalType: "address" }]
354929
+ },
354930
+ {
354931
+ type: "error",
354932
+ name: "CallerIsNotFactoryException",
354933
+ inputs: [{ name: "caller", type: "address", internalType: "address" }]
354934
+ },
354935
+ {
354936
+ type: "error",
354937
+ name: "CallerIsNotInstanceOwnerException",
354938
+ inputs: [{ name: "caller", type: "address", internalType: "address" }]
354939
+ },
354940
+ {
354941
+ type: "error",
354942
+ name: "CallerIsNotOperatorException",
354943
+ inputs: [
354944
+ { name: "token", type: "address", internalType: "address" },
354945
+ { name: "caller", type: "address", internalType: "address" }
354946
+ ]
354947
+ },
354948
+ {
354949
+ type: "error",
354950
+ name: "RegistrarNotSetForTokenException",
354951
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
354952
+ },
354953
+ {
354954
+ type: "error",
354955
+ name: "UnknownTokenException",
354956
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
354957
+ },
354958
+ {
354959
+ type: "error",
354960
+ name: "UnknownWalletException",
354961
+ inputs: [{ name: "wallet", type: "address", internalType: "address" }]
354962
+ }
354963
+ ];
354964
+
354598
354965
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pool/SecuritizeKYCFactory.js
354599
354966
  var abi24 = iSecuritizeKYCFactoryAbi;
354600
354967
  var SecuritizeKYCFactory = class extends BaseContract {
354601
354968
  investorCache;
354969
+ #degenNFT;
354602
354970
  constructor(options, address) {
354603
354971
  super(options, {
354604
354972
  addr: address,
@@ -354634,7 +355002,12 @@ var SecuritizeKYCFactory = class extends BaseContract {
354634
355002
  return investor;
354635
355003
  }
354636
355004
  async getDSTokens() {
354637
- const tokens = await this.contract.read.getDSTokens();
355005
+ const degenNFT = await this.getDegenNFT();
355006
+ const tokens = await this.client.readContract({
355007
+ address: degenNFT,
355008
+ abi: iSecuritizeDegenNFTAbi,
355009
+ functionName: "getDSTokens"
355010
+ });
354638
355011
  return [...tokens];
354639
355012
  }
354640
355013
  multicall(creditAccount, calls, tokensToRegister) {
@@ -354649,6 +355022,12 @@ var SecuritizeKYCFactory = class extends BaseContract {
354649
355022
  args: [creditManager, calls, tokensToRegister]
354650
355023
  });
354651
355024
  }
355025
+ async getDegenNFT() {
355026
+ if (!this.#degenNFT) {
355027
+ this.#degenNFT = await this.contract.read.getDegenNFT();
355028
+ }
355029
+ return this.#degenNFT;
355030
+ }
354652
355031
  };
354653
355032
 
354654
355033
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pool/PoolV310Contract.js
@@ -398060,7 +398439,7 @@ function getRenderer(opts) {
398060
398439
  var package_default = {
398061
398440
  name: "@gearbox-protocol/deploy-tools",
398062
398441
  description: "Gearbox deploy tools",
398063
- version: "5.71.3",
398442
+ version: "5.71.4",
398064
398443
  homepage: "https://gearbox.fi",
398065
398444
  keywords: [
398066
398445
  "gearbox"
@@ -398100,17 +398479,17 @@ var package_default = {
398100
398479
  "@gearbox-protocol/deploy-tools-node": "0.0.0",
398101
398480
  "@gearbox-protocol/deploy-tools-shared": "0.0.0",
398102
398481
  "@gearbox-protocol/deploy-tools-types": "0.0.0",
398103
- "@gearbox-protocol/sdk": "13.0.0-next.26",
398482
+ "@gearbox-protocol/sdk": "13.0.0-next.30",
398104
398483
  "@gearbox-protocol/sdk-gov": "2.34.0-next.114",
398105
398484
  "@types/lodash-es": "^4.17.12",
398106
- "@types/node": "^25.3.0",
398485
+ "@types/node": "^25.5.0",
398107
398486
  "@types/react": "^19.2.14",
398108
398487
  "@types/react-dom": "^19.2.3",
398109
398488
  abitype: "^1.2.3",
398110
398489
  chalk: "^5.6.2",
398111
398490
  commander: "^14.0.3",
398112
398491
  "date-fns": "^4.1.0",
398113
- esbuild: "^0.27.3",
398492
+ esbuild: "^0.27.4",
398114
398493
  "lodash-es": "^4.17.23",
398115
398494
  "p-retry": "^7.1.1",
398116
398495
  pino: "^10.3.1",
@@ -398120,7 +398499,7 @@ var package_default = {
398120
398499
  "react-dom": "^19.2.4",
398121
398500
  table: "^6.9.0",
398122
398501
  tsx: "^4.21.0",
398123
- viem: "^2.46.2",
398502
+ viem: "^2.47.2",
398124
398503
  yaml: "^2.8.2",
398125
398504
  zod: "^4.3.6"
398126
398505
  }
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.71.3",
4
+ "version": "5.71.4",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"
@@ -41,17 +41,17 @@
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": "13.0.0-next.26",
44
+ "@gearbox-protocol/sdk": "13.0.0-next.30",
45
45
  "@gearbox-protocol/sdk-gov": "2.34.0-next.114",
46
46
  "@types/lodash-es": "^4.17.12",
47
- "@types/node": "^25.3.0",
47
+ "@types/node": "^25.5.0",
48
48
  "@types/react": "^19.2.14",
49
49
  "@types/react-dom": "^19.2.3",
50
50
  "abitype": "^1.2.3",
51
51
  "chalk": "^5.6.2",
52
52
  "commander": "^14.0.3",
53
53
  "date-fns": "^4.1.0",
54
- "esbuild": "^0.27.3",
54
+ "esbuild": "^0.27.4",
55
55
  "lodash-es": "^4.17.23",
56
56
  "p-retry": "^7.1.1",
57
57
  "pino": "^10.3.1",
@@ -61,7 +61,7 @@
61
61
  "react-dom": "^19.2.4",
62
62
  "table": "^6.9.0",
63
63
  "tsx": "^4.21.0",
64
- "viem": "^2.46.2",
64
+ "viem": "^2.47.2",
65
65
  "yaml": "^2.8.2",
66
66
  "zod": "^4.3.6"
67
67
  }