@strkfarm/sdk 2.0.0-staging.51 → 2.0.0-staging.53

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.
@@ -92332,6 +92332,9 @@ spurious results.`);
92332
92332
  async getUserPositionCards(_input) {
92333
92333
  throw new Error("Not implemented");
92334
92334
  }
92335
+ async getMaxTVL() {
92336
+ return new Web3Number("0", 18);
92337
+ }
92335
92338
  formatTokenAmountForCard(amount, tokenInfo) {
92336
92339
  const displayDecimals = tokenInfo.displayDecimals ?? 2;
92337
92340
  const fixed = Number(amount.toFixed(displayDecimals));
@@ -98691,7 +98694,6 @@ spurious results.`);
98691
98694
  (t) => t.symbol === tokenSymbol
98692
98695
  );
98693
98696
  return {
98694
- maxTVL: Web3Number.fromWei("0", depositToken.decimals),
98695
98697
  isPaused: false,
98696
98698
  liveStatus: "Deprecated" /* DEPRECATED */,
98697
98699
  isAudited: true,
@@ -104138,6 +104140,9 @@ spurious results.`);
104138
104140
  async getUserRealizedAPY(blockIdentifier = "latest", sinceBlocks = 6e5) {
104139
104141
  throw new Error("getUserRealizedAPY not implemented yet for Ekubo CL Vault strategy");
104140
104142
  }
104143
+ async getMaxTVL() {
104144
+ return new Web3Number("0", 18);
104145
+ }
104141
104146
  async getUserPositionCards(input) {
104142
104147
  const quoteToken = this.metadata.additionalInfo.quoteAsset;
104143
104148
  const [userTVL, quotePrice] = await Promise.all([
@@ -105488,7 +105493,6 @@ spurious results.`);
105488
105493
  quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "STRK")
105489
105494
  },
105490
105495
  settings: {
105491
- maxTVL: Web3Number.fromWei("0", 18),
105492
105496
  isAudited: true,
105493
105497
  isPaused: false,
105494
105498
  liveStatus: "Active" /* ACTIVE */,
@@ -105715,14 +105719,7 @@ spurious results.`);
105715
105719
  (t) => t.symbol === quoteTokenSymbol
105716
105720
  ),
105717
105721
  alerts: getRe7Alerts(),
105718
- tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
105719
- security: {
105720
- ...xSTRKSTRK.security,
105721
- accessControl: {
105722
- ...xSTRKSTRK.security.accessControl,
105723
- addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
105724
- }
105725
- }
105722
+ tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */]
105726
105723
  });
105727
105724
  var getRe7FAQs = () => [
105728
105725
  ...faqs2,
@@ -105792,7 +105789,14 @@ spurious results.`);
105792
105789
  tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
105793
105790
  discontinuationInfo: isDeprecated ? {
105794
105791
  info: "This strategy has been deprecated and is no longer accepting new deposits."
105795
- } : void 0
105792
+ } : void 0,
105793
+ security: {
105794
+ ...xSTRKSTRK.security,
105795
+ accessControl: {
105796
+ ...xSTRKSTRK.security.accessControl,
105797
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
105798
+ }
105799
+ }
105796
105800
  };
105797
105801
  };
105798
105802
  var ETHUSDCRe7Strategy = createRe7Strategy(
@@ -116006,7 +116010,6 @@ spurious results.`);
116006
116010
  ],
116007
116011
  protocols: [endurProtocol, vesuProtocol],
116008
116012
  settings: {
116009
- maxTVL: new Web3Number("1500000", 18),
116010
116013
  alerts: [
116011
116014
  {
116012
116015
  type: "info",
@@ -116511,6 +116514,9 @@ spurious results.`);
116511
116514
  isReadyForNextSwap: swapAmounts[2]
116512
116515
  };
116513
116516
  }
116517
+ async getMaxTVL() {
116518
+ return new Web3Number("200000", 6);
116519
+ }
116514
116520
  async getUserPositionCards(input) {
116515
116521
  const userTVL = await this.getUserTVL(input.user);
116516
116522
  const holdingsTitle = `${this.tokenForPrimaryPricing().symbol} Left`;
@@ -116860,8 +116866,7 @@ spurious results.`);
116860
116866
  liveStatus: "Hot & New \u{1F525}" /* HOT */,
116861
116867
  isAudited: false,
116862
116868
  quoteToken: erc4626Cfg.isBaseERC4626 && erc4626Cfg.baseUnderlying ? erc4626Cfg.baseUnderlying : yoloConfig.mainToken,
116863
- isTransactionHistDisabled: true,
116864
- maxTVL: new Web3Number("200000", 6)
116869
+ isTransactionHistDisabled: true
116865
116870
  },
116866
116871
  apyHistoryUIConfig: {
116867
116872
  showApyHistory: false,
@@ -117048,11 +117053,11 @@ spurious results.`);
117048
117053
  {
117049
117054
  type: "impl",
117050
117055
  name: "UpgradeableImpl",
117051
- interface_name: "openzeppelin_upgrades::interface::IUpgradeable"
117056
+ interface_name: "openzeppelin_interfaces::upgrades::IUpgradeable"
117052
117057
  },
117053
117058
  {
117054
117059
  type: "interface",
117055
- name: "openzeppelin_upgrades::interface::IUpgradeable",
117060
+ name: "openzeppelin_interfaces::upgrades::IUpgradeable",
117056
117061
  items: [
117057
117062
  {
117058
117063
  type: "function",
@@ -117071,7 +117076,7 @@ spurious results.`);
117071
117076
  {
117072
117077
  type: "impl",
117073
117078
  name: "VaultMetadataImpl",
117074
- interface_name: "openzeppelin_token::erc20::interface::IERC20Metadata"
117079
+ interface_name: "openzeppelin_interfaces::token::erc20::IERC20Metadata"
117075
117080
  },
117076
117081
  {
117077
117082
  type: "struct",
@@ -117093,7 +117098,7 @@ spurious results.`);
117093
117098
  },
117094
117099
  {
117095
117100
  type: "interface",
117096
- name: "openzeppelin_token::erc20::interface::IERC20Metadata",
117101
+ name: "openzeppelin_interfaces::token::erc20::IERC20Metadata",
117097
117102
  items: [
117098
117103
  {
117099
117104
  type: "function",
@@ -117477,17 +117482,95 @@ spurious results.`);
117477
117482
  }
117478
117483
  ],
117479
117484
  state_mutability: "view"
117485
+ },
117486
+ {
117487
+ type: "function",
117488
+ name: "due_assets_from_id",
117489
+ inputs: [
117490
+ {
117491
+ name: "id",
117492
+ type: "core::integer::u256"
117493
+ }
117494
+ ],
117495
+ outputs: [
117496
+ {
117497
+ type: "core::integer::u256"
117498
+ }
117499
+ ],
117500
+ state_mutability: "view"
117501
+ },
117502
+ {
117503
+ type: "function",
117504
+ name: "due_assets_from_owner",
117505
+ inputs: [
117506
+ {
117507
+ name: "owner",
117508
+ type: "core::starknet::contract_address::ContractAddress"
117509
+ }
117510
+ ],
117511
+ outputs: [
117512
+ {
117513
+ type: "core::integer::u256"
117514
+ }
117515
+ ],
117516
+ state_mutability: "view"
117517
+ },
117518
+ {
117519
+ type: "function",
117520
+ name: "set_deposit_limit",
117521
+ inputs: [
117522
+ {
117523
+ name: "limit",
117524
+ type: "core::integer::u256"
117525
+ }
117526
+ ],
117527
+ outputs: [],
117528
+ state_mutability: "external"
117529
+ },
117530
+ {
117531
+ type: "function",
117532
+ name: "set_mint_limit",
117533
+ inputs: [
117534
+ {
117535
+ name: "limit",
117536
+ type: "core::integer::u256"
117537
+ }
117538
+ ],
117539
+ outputs: [],
117540
+ state_mutability: "external"
117541
+ },
117542
+ {
117543
+ type: "function",
117544
+ name: "get_deposit_limit",
117545
+ inputs: [],
117546
+ outputs: [
117547
+ {
117548
+ type: "core::integer::u256"
117549
+ }
117550
+ ],
117551
+ state_mutability: "view"
117552
+ },
117553
+ {
117554
+ type: "function",
117555
+ name: "get_mint_limit",
117556
+ inputs: [],
117557
+ outputs: [
117558
+ {
117559
+ type: "core::integer::u256"
117560
+ }
117561
+ ],
117562
+ state_mutability: "view"
117480
117563
  }
117481
117564
  ]
117482
117565
  },
117483
117566
  {
117484
117567
  type: "impl",
117485
117568
  name: "ERC4626Impl",
117486
- interface_name: "openzeppelin_token::erc20::extensions::erc4626::interface::IERC4626"
117569
+ interface_name: "openzeppelin_interfaces::token::erc4626::IERC4626"
117487
117570
  },
117488
117571
  {
117489
117572
  type: "interface",
117490
- name: "openzeppelin_token::erc20::extensions::erc4626::interface::IERC4626",
117573
+ name: "openzeppelin_interfaces::token::erc4626::IERC4626",
117491
117574
  items: [
117492
117575
  {
117493
117576
  type: "function",
@@ -117764,7 +117847,7 @@ spurious results.`);
117764
117847
  {
117765
117848
  type: "impl",
117766
117849
  name: "ERC20Impl",
117767
- interface_name: "openzeppelin_token::erc20::interface::IERC20"
117850
+ interface_name: "openzeppelin_interfaces::token::erc20::IERC20"
117768
117851
  },
117769
117852
  {
117770
117853
  type: "enum",
@@ -117782,7 +117865,7 @@ spurious results.`);
117782
117865
  },
117783
117866
  {
117784
117867
  type: "interface",
117785
- name: "openzeppelin_token::erc20::interface::IERC20",
117868
+ name: "openzeppelin_interfaces::token::erc20::IERC20",
117786
117869
  items: [
117787
117870
  {
117788
117871
  type: "function",
@@ -117900,11 +117983,11 @@ spurious results.`);
117900
117983
  {
117901
117984
  type: "impl",
117902
117985
  name: "ERC20CamelOnlyImpl",
117903
- interface_name: "openzeppelin_token::erc20::interface::IERC20CamelOnly"
117986
+ interface_name: "openzeppelin_interfaces::token::erc20::IERC20CamelOnly"
117904
117987
  },
117905
117988
  {
117906
117989
  type: "interface",
117907
- name: "openzeppelin_token::erc20::interface::IERC20CamelOnly",
117990
+ name: "openzeppelin_interfaces::token::erc20::IERC20CamelOnly",
117908
117991
  items: [
117909
117992
  {
117910
117993
  type: "function",
@@ -117962,11 +118045,11 @@ spurious results.`);
117962
118045
  {
117963
118046
  type: "impl",
117964
118047
  name: "AccessControlImpl",
117965
- interface_name: "openzeppelin_access::accesscontrol::interface::IAccessControl"
118048
+ interface_name: "openzeppelin_interfaces::access::accesscontrol::IAccessControl"
117966
118049
  },
117967
118050
  {
117968
118051
  type: "interface",
117969
- name: "openzeppelin_access::accesscontrol::interface::IAccessControl",
118052
+ name: "openzeppelin_interfaces::access::accesscontrol::IAccessControl",
117970
118053
  items: [
117971
118054
  {
117972
118055
  type: "function",
@@ -118057,11 +118140,11 @@ spurious results.`);
118057
118140
  {
118058
118141
  type: "impl",
118059
118142
  name: "PausableImpl",
118060
- interface_name: "openzeppelin_security::interface::IPausable"
118143
+ interface_name: "openzeppelin_interfaces::security::pausable::IPausable"
118061
118144
  },
118062
118145
  {
118063
118146
  type: "interface",
118064
- name: "openzeppelin_security::interface::IPausable",
118147
+ name: "openzeppelin_interfaces::security::pausable::IPausable",
118065
118148
  items: [
118066
118149
  {
118067
118150
  type: "function",
@@ -118185,7 +118268,7 @@ spurious results.`);
118185
118268
  },
118186
118269
  {
118187
118270
  type: "event",
118188
- name: "vault::oz_4626::ERC4626Component::Deposit",
118271
+ name: "openzeppelin_token::erc20::extensions::erc4626::erc4626::ERC4626Component::Deposit",
118189
118272
  kind: "struct",
118190
118273
  members: [
118191
118274
  {
@@ -118212,7 +118295,7 @@ spurious results.`);
118212
118295
  },
118213
118296
  {
118214
118297
  type: "event",
118215
- name: "vault::oz_4626::ERC4626Component::Withdraw",
118298
+ name: "openzeppelin_token::erc20::extensions::erc4626::erc4626::ERC4626Component::Withdraw",
118216
118299
  kind: "struct",
118217
118300
  members: [
118218
118301
  {
@@ -118244,17 +118327,17 @@ spurious results.`);
118244
118327
  },
118245
118328
  {
118246
118329
  type: "event",
118247
- name: "vault::oz_4626::ERC4626Component::Event",
118330
+ name: "openzeppelin_token::erc20::extensions::erc4626::erc4626::ERC4626Component::Event",
118248
118331
  kind: "enum",
118249
118332
  variants: [
118250
118333
  {
118251
118334
  name: "Deposit",
118252
- type: "vault::oz_4626::ERC4626Component::Deposit",
118335
+ type: "openzeppelin_token::erc20::extensions::erc4626::erc4626::ERC4626Component::Deposit",
118253
118336
  kind: "nested"
118254
118337
  },
118255
118338
  {
118256
118339
  name: "Withdraw",
118257
- type: "vault::oz_4626::ERC4626Component::Withdraw",
118340
+ type: "openzeppelin_token::erc20::extensions::erc4626::erc4626::ERC4626Component::Withdraw",
118258
118341
  kind: "nested"
118259
118342
  }
118260
118343
  ]
@@ -118556,6 +118639,38 @@ spurious results.`);
118556
118639
  }
118557
118640
  ]
118558
118641
  },
118642
+ {
118643
+ type: "event",
118644
+ name: "vault::vault::vault::Vault::BringLiquidity",
118645
+ kind: "struct",
118646
+ members: [
118647
+ {
118648
+ name: "caller",
118649
+ type: "core::starknet::contract_address::ContractAddress",
118650
+ kind: "data"
118651
+ },
118652
+ {
118653
+ name: "amount",
118654
+ type: "core::integer::u256",
118655
+ kind: "data"
118656
+ },
118657
+ {
118658
+ name: "new_buffer",
118659
+ type: "core::integer::u256",
118660
+ kind: "data"
118661
+ },
118662
+ {
118663
+ name: "new_aum",
118664
+ type: "core::integer::u256",
118665
+ kind: "data"
118666
+ },
118667
+ {
118668
+ name: "epoch",
118669
+ type: "core::integer::u256",
118670
+ kind: "data"
118671
+ }
118672
+ ]
118673
+ },
118559
118674
  {
118560
118675
  type: "event",
118561
118676
  name: "vault::vault::vault::Vault::Event",
@@ -118564,32 +118679,32 @@ spurious results.`);
118564
118679
  {
118565
118680
  name: "ERC20Event",
118566
118681
  type: "openzeppelin_token::erc20::erc20::ERC20Component::Event",
118567
- kind: "nested"
118682
+ kind: "flat"
118568
118683
  },
118569
118684
  {
118570
118685
  name: "ERC4626Event",
118571
- type: "vault::oz_4626::ERC4626Component::Event",
118572
- kind: "nested"
118686
+ type: "openzeppelin_token::erc20::extensions::erc4626::erc4626::ERC4626Component::Event",
118687
+ kind: "flat"
118573
118688
  },
118574
118689
  {
118575
118690
  name: "SRC5Event",
118576
118691
  type: "openzeppelin_introspection::src5::SRC5Component::Event",
118577
- kind: "nested"
118692
+ kind: "flat"
118578
118693
  },
118579
118694
  {
118580
118695
  name: "AccessControlEvent",
118581
118696
  type: "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::Event",
118582
- kind: "nested"
118697
+ kind: "flat"
118583
118698
  },
118584
118699
  {
118585
118700
  name: "UpgradeableEvent",
118586
118701
  type: "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
118587
- kind: "nested"
118702
+ kind: "flat"
118588
118703
  },
118589
118704
  {
118590
118705
  name: "PausableEvent",
118591
118706
  type: "openzeppelin_security::pausable::PausableComponent::Event",
118592
- kind: "nested"
118707
+ kind: "flat"
118593
118708
  },
118594
118709
  {
118595
118710
  name: "RedeemRequested",
@@ -118605,6 +118720,11 @@ spurious results.`);
118605
118720
  name: "Report",
118606
118721
  type: "vault::vault::vault::Vault::Report",
118607
118722
  kind: "nested"
118723
+ },
118724
+ {
118725
+ name: "BringLiquidity",
118726
+ type: "vault::vault::vault::Vault::BringLiquidity",
118727
+ kind: "nested"
118608
118728
  }
118609
118729
  ]
118610
118730
  }
@@ -119591,6 +119711,9 @@ spurious results.`);
119591
119711
  usdValue
119592
119712
  };
119593
119713
  }
119714
+ async getMaxTVL() {
119715
+ return new Web3Number("0", 18);
119716
+ }
119594
119717
  async getUnusedBalance() {
119595
119718
  const balance = await new ERC20(this.config).balanceOf(this.asset().address, this.metadata.additionalInfo.vaultAllocator, this.asset().decimals);
119596
119719
  const price = await this.pricer.getPrice(this.metadata.depositTokens[0].symbol);
@@ -120268,10 +120391,9 @@ spurious results.`);
120268
120391
  netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
120269
120392
  notARisks: getNoRiskTags(_riskFactor3)
120270
120393
  });
120271
- var createUniversalSettings = (tokenSymbol, maxTVLDecimals) => {
120394
+ var createUniversalSettings = (tokenSymbol) => {
120272
120395
  const isUSDT = tokenSymbol === "USDT";
120273
120396
  return {
120274
- maxTVL: Web3Number.fromWei(0, maxTVLDecimals),
120275
120397
  isAudited: true,
120276
120398
  liveStatus: isUSDT ? "Retired" /* RETIRED */ : "Active" /* ACTIVE */,
120277
120399
  isPaused: isUSDT,
@@ -120341,7 +120463,7 @@ spurious results.`);
120341
120463
  protocols: [Protocols.VESU],
120342
120464
  realizedApyMethodology: "The realizedAPY is based on past 14 days performance by the vault",
120343
120465
  curator: UnwrapLabsCurator,
120344
- settings: createUniversalSettings(params.tokenSymbol, params.maxTVLDecimals),
120466
+ settings: createUniversalSettings(params.tokenSymbol),
120345
120467
  contractDetails: getContractDetails(params.vaultSettings),
120346
120468
  faqs: getFAQs(),
120347
120469
  investmentSteps,
@@ -120362,7 +120484,6 @@ spurious results.`);
120362
120484
  vaultSettings: usdcVaultSettings,
120363
120485
  token1Symbol: "USDC.e",
120364
120486
  token2Symbol: "ETH",
120365
- maxTVLDecimals: 6,
120366
120487
  allowedSources: ["vesu", "extended"],
120367
120488
  tags: ["Meta Vaults" /* META_VAULT */]
120368
120489
  }),
@@ -120372,7 +120493,6 @@ spurious results.`);
120372
120493
  vaultSettings: wbtcVaultSettings,
120373
120494
  token1Symbol: "WBTC",
120374
120495
  token2Symbol: "ETH",
120375
- maxTVLDecimals: 8,
120376
120496
  allowedSources: ["vesu", "endur", "extended"],
120377
120497
  tags: ["BTC" /* BTC */, "Meta Vaults" /* META_VAULT */]
120378
120498
  }),
@@ -120382,7 +120502,6 @@ spurious results.`);
120382
120502
  vaultSettings: ethVaultSettings,
120383
120503
  token1Symbol: "ETH",
120384
120504
  token2Symbol: "WBTC",
120385
- maxTVLDecimals: 18,
120386
120505
  allowedSources: ["vesu", "extended"],
120387
120506
  tags: ["Meta Vaults" /* META_VAULT */]
120388
120507
  }),
@@ -120392,7 +120511,6 @@ spurious results.`);
120392
120511
  vaultSettings: strkVaultSettings,
120393
120512
  token1Symbol: "STRK",
120394
120513
  token2Symbol: "ETH",
120395
- maxTVLDecimals: 18,
120396
120514
  allowedSources: ["vesu", "endur", "extended"],
120397
120515
  tags: ["Meta Vaults" /* META_VAULT */]
120398
120516
  }),
@@ -120402,7 +120520,6 @@ spurious results.`);
120402
120520
  vaultSettings: usdtVaultSettings,
120403
120521
  token1Symbol: "USDT",
120404
120522
  token2Symbol: "ETH",
120405
- maxTVLDecimals: 6,
120406
120523
  allowedSources: ["vesu"],
120407
120524
  tags: ["Meta Vaults" /* META_VAULT */]
120408
120525
  })
@@ -120906,6 +121023,12 @@ spurious results.`);
120906
121023
  tokenInfo: this.asset()
120907
121024
  };
120908
121025
  }
121026
+ async getMaxTVL() {
121027
+ const lstToken = this.asset();
121028
+ const depositLimit = await this.contract.call("get_deposit_limit", []);
121029
+ const limitBN = uint256_exports.uint256ToBN(depositLimit);
121030
+ return Web3Number.fromWei(limitBN.toString(), lstToken.decimals);
121031
+ }
120909
121032
  async getUserPositionCards(input) {
120910
121033
  const cards = await super.getUserPositionCards(input);
120911
121034
  try {
@@ -121948,29 +122071,11 @@ spurious results.`);
121948
122071
  `If required, adjust leverage or re-allocate assets within LST pool on Vesu to optimize yield`
121949
122072
  ];
121950
122073
  }
121951
- function getMaxTVL(lstSymbol) {
121952
- const lstMaxTVLs = {
121953
- xWBTC: 5,
121954
- xLBTC: 5,
121955
- xtBTC: 5,
121956
- xsBTC: 5,
121957
- xSTRK: 1e7
121958
- };
121959
- const maxTVLValue = lstMaxTVLs[lstSymbol] || 0;
121960
- const token = Global.getDefaultTokens().find(
121961
- (token2) => token2.symbol === lstSymbol
121962
- );
121963
- if (!token) {
121964
- return Web3Number.fromWei(0, 18);
121965
- }
121966
- return Web3Number.fromWei(maxTVLValue, token.decimals);
121967
- }
121968
122074
  function createHyperLSTSettings(lstSymbol, underlyingSymbol) {
121969
122075
  const depositToken = Global.getDefaultTokens().find(
121970
122076
  (token) => token.symbol === lstSymbol
121971
122077
  );
121972
122078
  return {
121973
- maxTVL: getMaxTVL(lstSymbol),
121974
122079
  isPaused: false,
121975
122080
  liveStatus: "Hot & New \u{1F525}" /* HOT */,
121976
122081
  isAudited: true,