@strkfarm/sdk 1.1.17 → 1.1.20

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.
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
33
  AUMTypes: () => AUMTypes,
34
+ AVNU_MIDDLEWARE: () => AVNU_MIDDLEWARE,
34
35
  AutoCompounderSTRK: () => AutoCompounderSTRK,
35
36
  AvnuWrapper: () => AvnuWrapper,
36
37
  BaseAdapter: () => BaseAdapter,
@@ -50,6 +51,7 @@ __export(index_exports, {
50
51
  Initializable: () => Initializable,
51
52
  MarginType: () => MarginType,
52
53
  Network: () => Network,
54
+ PRICE_ROUTER: () => PRICE_ROUTER,
53
55
  PasswordJsonCryptoUtil: () => PasswordJsonCryptoUtil,
54
56
  Pragma: () => Pragma,
55
57
  Pricer: () => Pricer,
@@ -58,6 +60,9 @@ __export(index_exports, {
58
60
  PricerRedis: () => PricerRedis,
59
61
  Protocols: () => Protocols,
60
62
  RiskType: () => RiskType,
63
+ SIMPLE_SANITIZER: () => SIMPLE_SANITIZER,
64
+ SIMPLE_SANITIZER_V2: () => SIMPLE_SANITIZER_V2,
65
+ SIMPLE_SANITIZER_VESU_V1_DELEGATIONS: () => SIMPLE_SANITIZER_VESU_V1_DELEGATIONS,
61
66
  SenseiStrategies: () => SenseiStrategies,
62
67
  SenseiVault: () => SenseiVault,
63
68
  StandardMerkleTree: () => StandardMerkleTree,
@@ -68,6 +73,7 @@ __export(index_exports, {
68
73
  UniversalLstMultiplierStrategy: () => UniversalLstMultiplierStrategy,
69
74
  UniversalStrategies: () => UniversalStrategies,
70
75
  UniversalStrategy: () => UniversalStrategy,
76
+ VESU_SINGLETON: () => VESU_SINGLETON,
71
77
  VesuAdapter: () => VesuAdapter,
72
78
  VesuAmountDenomination: () => VesuAmountDenomination,
73
79
  VesuAmountType: () => VesuAmountType,
@@ -85,8 +91,10 @@ __export(index_exports, {
85
91
  getRiskColor: () => getRiskColor,
86
92
  getRiskExplaination: () => getRiskExplaination,
87
93
  getTrovesEndpoint: () => getTrovesEndpoint,
94
+ getVesuSingletonAddress: () => getVesuSingletonAddress,
88
95
  highlightTextWithLinks: () => highlightTextWithLinks,
89
- logger: () => logger
96
+ logger: () => logger,
97
+ toBigInt: () => toBigInt
90
98
  });
91
99
  module.exports = __toCommonJS(index_exports);
92
100
 
@@ -107,23 +115,27 @@ var _Web3Number = class extends import_bignumber.default {
107
115
  this.decimals = decimals;
108
116
  }
109
117
  toWei() {
110
- return this.mul(10 ** this.decimals).toFixed(0);
118
+ return super.mul(10 ** this.decimals).toFixed(0);
111
119
  }
112
120
  multipliedBy(value) {
113
121
  const _value = this.getStandardString(value);
114
- return this.construct(this.mul(_value).toString(), this.decimals);
122
+ return this.construct(super.mul(_value).toString(), this.decimals);
115
123
  }
116
124
  dividedBy(value) {
117
125
  const _value = this.getStandardString(value);
118
- return this.construct(this.div(_value).toString(), this.decimals);
126
+ return this.construct(super.dividedBy(_value).toString(), this.decimals);
119
127
  }
120
128
  plus(value) {
121
- const _value = this.getStandardString(value);
122
- return this.construct(this.add(_value).toString(), this.decimals);
129
+ const rawValue = this.getStandardString(value);
130
+ const thisBN = new import_bignumber.default(this.toString());
131
+ const result = thisBN.plus(rawValue);
132
+ return this.construct(result.toString(), this.decimals);
123
133
  }
124
134
  minus(n, base) {
125
- const _value = this.getStandardString(n);
126
- return this.construct(super.minus(_value, base).toString(), this.decimals);
135
+ const rawValue = this.getStandardString(n);
136
+ const thisBN = new import_bignumber.default(this.toString());
137
+ const result = thisBN.minus(rawValue, base);
138
+ return this.construct(result.toString(), this.decimals);
127
139
  }
128
140
  construct(value, decimals) {
129
141
  return new this.constructor(value, decimals);
@@ -141,10 +153,13 @@ var _Web3Number = class extends import_bignumber.default {
141
153
  return Math.min(this.decimals, 18);
142
154
  }
143
155
  getStandardString(value) {
144
- if (typeof value == "string") {
156
+ if (typeof value === "string") {
145
157
  return value;
146
158
  }
147
- return value.toFixed(this.maxToFixedDecimals());
159
+ if (typeof value === "number") {
160
+ return value.toString();
161
+ }
162
+ return import_bignumber.default.prototype.toString.call(value);
148
163
  }
149
164
  minimum(value) {
150
165
  const _value = new import_bignumber.default(value);
@@ -155,12 +170,10 @@ var _Web3Number = class extends import_bignumber.default {
155
170
  maximum(value) {
156
171
  const _value = new import_bignumber.default(value);
157
172
  const _valueMe = new import_bignumber.default(this.toString());
158
- console.warn(`maximum: _value: ${_value.toString()}, _valueMe: ${_valueMe.toString()}`);
159
173
  const answer = _value.greaterThanOrEqualTo(_valueMe) ? _value : _valueMe;
160
174
  return this.construct(answer.toString(), this.decimals);
161
175
  }
162
176
  abs() {
163
- console.warn(`abs: this: ${this}`);
164
177
  return this.construct(Math.abs(this.toNumber()).toFixed(12), this.decimals);
165
178
  }
166
179
  toI129() {
@@ -1000,7 +1013,7 @@ var PricerFromApi = class extends PricerBase {
1000
1013
  }
1001
1014
  async getPriceFromMyAPI(tokenSymbol) {
1002
1015
  logger.verbose(`getPrice from redis: ${tokenSymbol}`);
1003
- const endpoint = "https://cache-server-t2me.onrender.com";
1016
+ const endpoint = "https://proxy.api.troves.fi";
1004
1017
  const url = `${endpoint}/api/price/${tokenSymbol}`;
1005
1018
  const priceInfoRes = await fetch(url);
1006
1019
  const priceInfo = await priceInfoRes.json();
@@ -4068,6 +4081,9 @@ var BaseStrategy = class extends CacheClass {
4068
4081
  async withdrawCall(amountInfo, receiver, owner) {
4069
4082
  throw new Error("Not implemented");
4070
4083
  }
4084
+ async getVaultPositions() {
4085
+ throw new Error("Not implemented");
4086
+ }
4071
4087
  };
4072
4088
 
4073
4089
  // src/node/headless.browser.ts
@@ -4087,7 +4103,7 @@ var COMMON_CONTRACTS = [{
4087
4103
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
4088
4104
  }];
4089
4105
  var ENDPOINTS = {
4090
- VESU_BASE: "https://cache-server-t2me.onrender.com/vesu"
4106
+ VESU_BASE: "https://proxy.api.troves.fi/vesu-staging"
4091
4107
  };
4092
4108
 
4093
4109
  // src/modules/harvests.ts
@@ -15806,6 +15822,49 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
15806
15822
  const tick = Math.floor(value / tickSpacing) * tickSpacing;
15807
15823
  return this.tickToi129(tick);
15808
15824
  }
15825
+ async getVaultPositions() {
15826
+ const tvlInfo = await this.getTVL();
15827
+ const fees = await this.getUncollectedFees();
15828
+ const unusedBalance = await this.unusedBalances();
15829
+ return [
15830
+ {
15831
+ amount: tvlInfo.token0.amount,
15832
+ usdValue: tvlInfo.token0.usdValue,
15833
+ token: tvlInfo.token0.tokenInfo,
15834
+ remarks: `Liquidity in Ekubo`
15835
+ },
15836
+ {
15837
+ amount: fees.token0.amount,
15838
+ usdValue: fees.token0.usdValue,
15839
+ token: fees.token0.tokenInfo,
15840
+ remarks: "Uncollected Fees in Ekubo"
15841
+ },
15842
+ {
15843
+ amount: unusedBalance.token0.amount,
15844
+ usdValue: unusedBalance.token0.usdValue,
15845
+ token: unusedBalance.token0.tokenInfo,
15846
+ remarks: "Unused Balance in the Vault"
15847
+ },
15848
+ {
15849
+ amount: tvlInfo.token1.amount,
15850
+ usdValue: tvlInfo.token1.usdValue,
15851
+ token: tvlInfo.token1.tokenInfo,
15852
+ remarks: "Liquidity in Ekubo"
15853
+ },
15854
+ {
15855
+ amount: fees.token1.amount,
15856
+ usdValue: fees.token1.usdValue,
15857
+ token: fees.token1.tokenInfo,
15858
+ remarks: "Uncollected Fees in Ekubo"
15859
+ },
15860
+ {
15861
+ amount: unusedBalance.token1.amount,
15862
+ usdValue: unusedBalance.token1.usdValue,
15863
+ token: unusedBalance.token1.tokenInfo,
15864
+ remarks: "Unused Balance in the Vault"
15865
+ }
15866
+ ];
15867
+ }
15809
15868
  async getPoolKey(blockIdentifier = "latest") {
15810
15869
  if (this.poolKey) {
15811
15870
  return this.poolKey;
@@ -18967,9 +19026,11 @@ var import_starknet13 = require("starknet");
18967
19026
 
18968
19027
  // src/strategies/universal-adapters/adapter-utils.ts
18969
19028
  var SIMPLE_SANITIZER = ContractAddr.from("0x5a2e3ceb3da368b983a8717898427ab7b6daf04014b70f321e777f9aad940b4");
18970
- var SIMPLE_SANITIZER_V2 = ContractAddr.from("0x5643d54da70a471cd2b6fa37f52ea7a13cc3f3910689a839f8490a663d2208a");
19029
+ var SIMPLE_SANITIZER_V2 = ContractAddr.from("0x7b6f98311af8aa425278570e62abf523e6462eaa01a38c1feab9b2f416492e2");
19030
+ var SIMPLE_SANITIZER_VESU_V1_DELEGATIONS = ContractAddr.from("0x5643d54da70a471cd2b6fa37f52ea7a13cc3f3910689a839f8490a663d2208a");
18971
19031
  var PRICE_ROUTER = ContractAddr.from("0x05e83Fa38D791d2dba8E6f487758A9687FfEe191A6Cf8a6c5761ab0a110DB837");
18972
19032
  var AVNU_MIDDLEWARE = ContractAddr.from("0x4a7972ed3f5d1e74a6d6c4a8f467666953d081c8f2270390cc169d50d17cb0d");
19033
+ var VESU_SINGLETON = ContractAddr.from("0x000d8d6dfec4d33bfb6895de9f3852143a17c6f92fd2a21da3d6924d34870160");
18973
19034
  function toBigInt(value) {
18974
19035
  if (typeof value === "string") {
18975
19036
  return BigInt(value);
@@ -21904,265 +21965,2142 @@ var vesu_multiple_abi_default = [
21904
21965
  }
21905
21966
  ];
21906
21967
 
21907
- // src/strategies/universal-adapters/vesu-adapter.ts
21908
- var VesuAmountType = /* @__PURE__ */ ((VesuAmountType2) => {
21909
- VesuAmountType2[VesuAmountType2["Delta"] = 0] = "Delta";
21910
- VesuAmountType2[VesuAmountType2["Target"] = 1] = "Target";
21911
- return VesuAmountType2;
21912
- })(VesuAmountType || {});
21913
- var VesuAmountDenomination = /* @__PURE__ */ ((VesuAmountDenomination2) => {
21914
- VesuAmountDenomination2[VesuAmountDenomination2["Native"] = 0] = "Native";
21915
- VesuAmountDenomination2[VesuAmountDenomination2["Assets"] = 1] = "Assets";
21916
- return VesuAmountDenomination2;
21917
- })(VesuAmountDenomination || {});
21918
- function getVesuMultiplyParams(isIncrease, params) {
21919
- if (isIncrease) {
21920
- const _params2 = params;
21921
- return {
21922
- action: new import_starknet15.CairoCustomEnum({ IncreaseLever: {
21923
- pool_id: _params2.pool_id.toBigInt(),
21924
- collateral_asset: _params2.collateral_asset.toBigInt(),
21925
- debt_asset: _params2.debt_asset.toBigInt(),
21926
- user: _params2.user.toBigInt(),
21927
- add_margin: BigInt(_params2.add_margin.toWei()),
21928
- margin_swap: _params2.margin_swap.map((swap) => ({
21929
- route: swap.route.map((route) => ({
21930
- pool_key: {
21931
- token0: route.pool_key.token0.toBigInt(),
21932
- token1: route.pool_key.token1.toBigInt(),
21933
- fee: route.pool_key.fee,
21934
- tick_spacing: route.pool_key.tick_spacing,
21935
- extension: BigInt(import_starknet15.num.hexToDecimalString(route.pool_key.extension))
21936
- },
21937
- sqrt_ratio_limit: import_starknet15.uint256.bnToUint256(route.sqrt_ratio_limit.toWei()),
21938
- skip_ahead: BigInt(100)
21939
- })),
21940
- token_amount: {
21941
- token: swap.token_amount.token.toBigInt(),
21942
- amount: swap.token_amount.amount.toI129()
21943
- }
21944
- })),
21945
- margin_swap_limit_amount: BigInt(_params2.margin_swap_limit_amount.toWei()),
21946
- lever_swap: _params2.lever_swap.map((swap) => ({
21947
- route: swap.route.map((route) => ({
21948
- pool_key: {
21949
- token0: route.pool_key.token0.toBigInt(),
21950
- token1: route.pool_key.token1.toBigInt(),
21951
- fee: route.pool_key.fee,
21952
- tick_spacing: route.pool_key.tick_spacing,
21953
- extension: BigInt(import_starknet15.num.hexToDecimalString(route.pool_key.extension))
21954
- },
21955
- sqrt_ratio_limit: import_starknet15.uint256.bnToUint256(route.sqrt_ratio_limit.toWei()),
21956
- skip_ahead: BigInt(100)
21957
- })),
21958
- token_amount: {
21959
- token: swap.token_amount.token.toBigInt(),
21960
- amount: swap.token_amount.amount.toI129()
21961
- }
21962
- })),
21963
- lever_swap_limit_amount: BigInt(_params2.lever_swap_limit_amount.toWei())
21964
- } })
21965
- };
21966
- }
21967
- const _params = params;
21968
- return {
21969
- action: new import_starknet15.CairoCustomEnum({ DecreaseLever: {
21970
- pool_id: _params.pool_id.toBigInt(),
21971
- collateral_asset: _params.collateral_asset.toBigInt(),
21972
- debt_asset: _params.debt_asset.toBigInt(),
21973
- user: _params.user.toBigInt(),
21974
- sub_margin: BigInt(_params.sub_margin.toWei()),
21975
- recipient: _params.recipient.toBigInt(),
21976
- lever_swap: _params.lever_swap.map((swap) => ({
21977
- route: swap.route.map((route) => ({
21978
- pool_key: {
21979
- token0: route.pool_key.token0.toBigInt(),
21980
- token1: route.pool_key.token1.toBigInt(),
21981
- fee: route.pool_key.fee,
21982
- tick_spacing: route.pool_key.tick_spacing,
21983
- extension: ContractAddr.from(route.pool_key.extension).toBigInt()
21984
- },
21985
- sqrt_ratio_limit: import_starknet15.uint256.bnToUint256(route.sqrt_ratio_limit.toWei()),
21986
- skip_ahead: BigInt(route.skip_ahead.toWei())
21987
- })),
21988
- token_amount: {
21989
- token: swap.token_amount.token.toBigInt(),
21990
- amount: swap.token_amount.amount.toI129()
21991
- }
21992
- })),
21993
- lever_swap_limit_amount: BigInt(_params.lever_swap_limit_amount.toWei()),
21994
- lever_swap_weights: _params.lever_swap_weights.map((weight) => BigInt(weight.toWei())),
21995
- withdraw_swap: _params.withdraw_swap.map((swap) => ({
21996
- route: swap.route.map((route) => ({
21997
- pool_key: {
21998
- token0: route.pool_key.token0.toBigInt(),
21999
- token1: route.pool_key.token1.toBigInt(),
22000
- fee: route.pool_key.fee,
22001
- tick_spacing: route.pool_key.tick_spacing,
22002
- extension: ContractAddr.from(route.pool_key.extension).toBigInt()
22003
- },
22004
- sqrt_ratio_limit: import_starknet15.uint256.bnToUint256(route.sqrt_ratio_limit.toWei()),
22005
- skip_ahead: BigInt(route.skip_ahead.toWei())
22006
- })),
22007
- token_amount: {
22008
- token: swap.token_amount.token.toBigInt(),
22009
- amount: swap.token_amount.amount.toI129()
22010
- }
22011
- })),
22012
- withdraw_swap_limit_amount: BigInt(_params.withdraw_swap_limit_amount.toWei()),
22013
- withdraw_swap_weights: _params.withdraw_swap_weights.map((weight) => BigInt(weight.toWei())),
22014
- close_position: _params.close_position
22015
- } })
22016
- };
22017
- }
22018
- var VesuPools = {
22019
- Genesis: ContractAddr.from("0x4dc4f0ca6ea4961e4c8373265bfd5317678f4fe374d76f3fd7135f57763bf28"),
22020
- Re7xSTRK: ContractAddr.from("0x052fb52363939c3aa848f8f4ac28f0a51379f8d1b971d8444de25fbd77d8f161")
22021
- };
22022
- var VesuAdapter = class _VesuAdapter extends BaseAdapter {
22023
- constructor(config) {
22024
- super();
22025
- this.VESU_SINGLETON = ContractAddr.from("0x000d8d6dfec4d33bfb6895de9f3852143a17c6f92fd2a21da3d6924d34870160");
22026
- this.VESU_MULTIPLY = ContractAddr.from("0x3630f1f8e5b8f5c4c4ae9b6620f8a570ae55cddebc0276c37550e7c118edf67");
22027
- this.getModifyPosition = () => {
22028
- const positionData = [0n];
22029
- const packedArguments = [
22030
- toBigInt(this.config.poolId.toString()),
22031
- // pool id
22032
- toBigInt(this.config.collateral.address.toString()),
22033
- // collateral
22034
- toBigInt(this.config.debt.address.toString()),
22035
- // debt
22036
- toBigInt(this.config.vaultAllocator.toString()),
22037
- // vault allocator
22038
- toBigInt(positionData.length),
22039
- ...positionData
22040
- ];
22041
- const output = this.constructSimpleLeafData({
22042
- id: this.config.id,
22043
- target: this.VESU_SINGLETON,
22044
- method: "modify_position",
22045
- packedArguments
22046
- });
22047
- return { leaf: output, callConstructor: this.getModifyPositionCall.bind(this) };
22048
- };
22049
- this.getModifyPositionCall = (params) => {
22050
- const _collateral = {
22051
- amount_type: this.formatAmountTypeEnum(params.collateralAmount.amount_type),
22052
- denomination: this.formatAmountDenominationEnum(params.collateralAmount.denomination),
22053
- value: {
22054
- abs: import_starknet15.uint256.bnToUint256(params.collateralAmount.value.abs.toWei()),
22055
- is_negative: params.collateralAmount.value.abs.isZero() ? false : params.collateralAmount.value.is_negative
22056
- }
22057
- };
22058
- logger.verbose(`VesuAdapter::ConstructingModify::Collateral::${JSON.stringify(_collateral)}`);
22059
- const _debt = {
22060
- amount_type: this.formatAmountTypeEnum(params.debtAmount.amount_type),
22061
- denomination: this.formatAmountDenominationEnum(params.debtAmount.denomination),
22062
- value: {
22063
- abs: import_starknet15.uint256.bnToUint256(params.debtAmount.value.abs.toWei()),
22064
- is_negative: params.debtAmount.value.abs.isZero() ? false : params.debtAmount.value.is_negative
22065
- }
22066
- };
22067
- logger.verbose(`VesuAdapter::ConstructingModify::Debt::${JSON.stringify(_debt)}`);
22068
- const singletonContract = new import_starknet15.Contract({ abi: vesu_singleton_abi_default, address: this.VESU_SINGLETON.toString(), providerOrAccount: new import_starknet15.RpcProvider({ nodeUrl: "" }) });
22069
- const call = singletonContract.populate("modify_position", {
22070
- params: {
22071
- pool_id: this.config.poolId.toBigInt(),
22072
- collateral_asset: this.config.collateral.address.toBigInt(),
22073
- debt_asset: this.config.debt.address.toBigInt(),
22074
- user: this.config.vaultAllocator.toBigInt(),
22075
- collateral: _collateral,
22076
- debt: _debt,
22077
- data: [0]
22078
- }
22079
- });
22080
- return {
22081
- sanitizer: SIMPLE_SANITIZER,
22082
- call: {
22083
- contractAddress: this.VESU_SINGLETON,
22084
- selector: import_starknet15.hash.getSelectorFromName("modify_position"),
22085
- calldata: [
22086
- ...call.calldata
22087
- ]
22088
- }
22089
- };
22090
- };
22091
- this.getMultiplyAdapter = () => {
22092
- const packedArguments = [
22093
- toBigInt(this.config.poolId.toString()),
22094
- // pool id
22095
- toBigInt(this.config.collateral.address.toString()),
22096
- // collateral
22097
- toBigInt(this.config.debt.address.toString()),
22098
- // debt
22099
- toBigInt(this.config.vaultAllocator.toString())
22100
- // vault allocator
22101
- ];
22102
- const output = this.constructSimpleLeafData({
22103
- id: this.config.id,
22104
- target: this.VESU_MULTIPLY,
22105
- method: "modify_lever",
22106
- packedArguments
22107
- }, SIMPLE_SANITIZER_V2);
22108
- return { leaf: output, callConstructor: this.getMultiplyCall.bind(this) };
22109
- };
22110
- this.getMultiplyCall = (params) => {
22111
- const isIncrease = params.isIncrease;
22112
- const multiplyParams = isIncrease ? params.increaseParams : params.decreaseParams;
22113
- if (!multiplyParams) {
22114
- throw new Error("Multiply params are not provided");
21968
+ // src/data/vesu-pool-v2.abi.json
21969
+ var vesu_pool_v2_abi_default = [
21970
+ {
21971
+ type: "impl",
21972
+ name: "PoolImpl",
21973
+ interface_name: "vesu::pool::IPool"
21974
+ },
21975
+ {
21976
+ type: "struct",
21977
+ name: "core::integer::u256",
21978
+ members: [
21979
+ {
21980
+ name: "low",
21981
+ type: "core::integer::u128"
21982
+ },
21983
+ {
21984
+ name: "high",
21985
+ type: "core::integer::u128"
22115
21986
  }
22116
- const multiplyContract = new import_starknet15.Contract({ abi: vesu_multiple_abi_default, address: this.VESU_MULTIPLY.toString(), providerOrAccount: new import_starknet15.RpcProvider({ nodeUrl: "" }) });
22117
- const call = multiplyContract.populate("modify_lever", {
22118
- modify_lever_params: getVesuMultiplyParams(isIncrease, {
22119
- ...multiplyParams,
22120
- user: this.config.vaultAllocator,
22121
- pool_id: this.config.poolId,
22122
- collateral_asset: this.config.collateral.address,
22123
- debt_asset: this.config.debt.address,
22124
- recipient: this.config.vaultAllocator
22125
- })
22126
- });
22127
- return {
22128
- sanitizer: SIMPLE_SANITIZER_V2,
22129
- call: {
22130
- contractAddress: this.VESU_MULTIPLY,
22131
- selector: import_starknet15.hash.getSelectorFromName("modify_lever"),
22132
- calldata: [
22133
- ...call.calldata
22134
- ]
22135
- }
22136
- };
22137
- };
22138
- this.getVesuModifyDelegationAdapter = (id) => {
22139
- return () => {
22140
- const packedArguments = [
22141
- toBigInt(this.config.poolId.toString()),
22142
- // pool id
21987
+ ]
21988
+ },
21989
+ {
21990
+ type: "enum",
21991
+ name: "core::bool",
21992
+ variants: [
21993
+ {
21994
+ name: "False",
21995
+ type: "()"
21996
+ },
21997
+ {
21998
+ name: "True",
21999
+ type: "()"
22000
+ }
22001
+ ]
22002
+ },
22003
+ {
22004
+ type: "struct",
22005
+ name: "vesu::data_model::AssetConfig",
22006
+ members: [
22007
+ {
22008
+ name: "total_collateral_shares",
22009
+ type: "core::integer::u256"
22010
+ },
22011
+ {
22012
+ name: "total_nominal_debt",
22013
+ type: "core::integer::u256"
22014
+ },
22015
+ {
22016
+ name: "reserve",
22017
+ type: "core::integer::u256"
22018
+ },
22019
+ {
22020
+ name: "max_utilization",
22021
+ type: "core::integer::u256"
22022
+ },
22023
+ {
22024
+ name: "floor",
22025
+ type: "core::integer::u256"
22026
+ },
22027
+ {
22028
+ name: "scale",
22029
+ type: "core::integer::u256"
22030
+ },
22031
+ {
22032
+ name: "is_legacy",
22033
+ type: "core::bool"
22034
+ },
22035
+ {
22036
+ name: "last_updated",
22037
+ type: "core::integer::u64"
22038
+ },
22039
+ {
22040
+ name: "last_rate_accumulator",
22041
+ type: "core::integer::u256"
22042
+ },
22043
+ {
22044
+ name: "last_full_utilization_rate",
22045
+ type: "core::integer::u256"
22046
+ },
22047
+ {
22048
+ name: "fee_rate",
22049
+ type: "core::integer::u256"
22050
+ },
22051
+ {
22052
+ name: "fee_shares",
22053
+ type: "core::integer::u256"
22054
+ }
22055
+ ]
22056
+ },
22057
+ {
22058
+ type: "struct",
22059
+ name: "vesu::data_model::AssetPrice",
22060
+ members: [
22061
+ {
22062
+ name: "value",
22063
+ type: "core::integer::u256"
22064
+ },
22065
+ {
22066
+ name: "is_valid",
22067
+ type: "core::bool"
22068
+ }
22069
+ ]
22070
+ },
22071
+ {
22072
+ type: "struct",
22073
+ name: "vesu::data_model::Position",
22074
+ members: [
22075
+ {
22076
+ name: "collateral_shares",
22077
+ type: "core::integer::u256"
22078
+ },
22079
+ {
22080
+ name: "nominal_debt",
22081
+ type: "core::integer::u256"
22082
+ }
22083
+ ]
22084
+ },
22085
+ {
22086
+ type: "struct",
22087
+ name: "vesu::data_model::Context",
22088
+ members: [
22089
+ {
22090
+ name: "collateral_asset",
22091
+ type: "core::starknet::contract_address::ContractAddress"
22092
+ },
22093
+ {
22094
+ name: "debt_asset",
22095
+ type: "core::starknet::contract_address::ContractAddress"
22096
+ },
22097
+ {
22098
+ name: "collateral_asset_config",
22099
+ type: "vesu::data_model::AssetConfig"
22100
+ },
22101
+ {
22102
+ name: "debt_asset_config",
22103
+ type: "vesu::data_model::AssetConfig"
22104
+ },
22105
+ {
22106
+ name: "collateral_asset_price",
22107
+ type: "vesu::data_model::AssetPrice"
22108
+ },
22109
+ {
22110
+ name: "debt_asset_price",
22111
+ type: "vesu::data_model::AssetPrice"
22112
+ },
22113
+ {
22114
+ name: "max_ltv",
22115
+ type: "core::integer::u64"
22116
+ },
22117
+ {
22118
+ name: "user",
22119
+ type: "core::starknet::contract_address::ContractAddress"
22120
+ },
22121
+ {
22122
+ name: "position",
22123
+ type: "vesu::data_model::Position"
22124
+ }
22125
+ ]
22126
+ },
22127
+ {
22128
+ type: "struct",
22129
+ name: "alexandria_math::i257::i257",
22130
+ members: [
22131
+ {
22132
+ name: "abs",
22133
+ type: "core::integer::u256"
22134
+ },
22135
+ {
22136
+ name: "is_negative",
22137
+ type: "core::bool"
22138
+ }
22139
+ ]
22140
+ },
22141
+ {
22142
+ type: "enum",
22143
+ name: "vesu::data_model::AmountDenomination",
22144
+ variants: [
22145
+ {
22146
+ name: "Native",
22147
+ type: "()"
22148
+ },
22149
+ {
22150
+ name: "Assets",
22151
+ type: "()"
22152
+ }
22153
+ ]
22154
+ },
22155
+ {
22156
+ type: "struct",
22157
+ name: "vesu::data_model::Amount",
22158
+ members: [
22159
+ {
22160
+ name: "denomination",
22161
+ type: "vesu::data_model::AmountDenomination"
22162
+ },
22163
+ {
22164
+ name: "value",
22165
+ type: "alexandria_math::i257::i257"
22166
+ }
22167
+ ]
22168
+ },
22169
+ {
22170
+ type: "struct",
22171
+ name: "vesu::data_model::ModifyPositionParams",
22172
+ members: [
22173
+ {
22174
+ name: "collateral_asset",
22175
+ type: "core::starknet::contract_address::ContractAddress"
22176
+ },
22177
+ {
22178
+ name: "debt_asset",
22179
+ type: "core::starknet::contract_address::ContractAddress"
22180
+ },
22181
+ {
22182
+ name: "user",
22183
+ type: "core::starknet::contract_address::ContractAddress"
22184
+ },
22185
+ {
22186
+ name: "collateral",
22187
+ type: "vesu::data_model::Amount"
22188
+ },
22189
+ {
22190
+ name: "debt",
22191
+ type: "vesu::data_model::Amount"
22192
+ }
22193
+ ]
22194
+ },
22195
+ {
22196
+ type: "struct",
22197
+ name: "vesu::data_model::UpdatePositionResponse",
22198
+ members: [
22199
+ {
22200
+ name: "collateral_delta",
22201
+ type: "alexandria_math::i257::i257"
22202
+ },
22203
+ {
22204
+ name: "collateral_shares_delta",
22205
+ type: "alexandria_math::i257::i257"
22206
+ },
22207
+ {
22208
+ name: "debt_delta",
22209
+ type: "alexandria_math::i257::i257"
22210
+ },
22211
+ {
22212
+ name: "nominal_debt_delta",
22213
+ type: "alexandria_math::i257::i257"
22214
+ },
22215
+ {
22216
+ name: "bad_debt",
22217
+ type: "core::integer::u256"
22218
+ }
22219
+ ]
22220
+ },
22221
+ {
22222
+ type: "struct",
22223
+ name: "vesu::data_model::LiquidatePositionParams",
22224
+ members: [
22225
+ {
22226
+ name: "collateral_asset",
22227
+ type: "core::starknet::contract_address::ContractAddress"
22228
+ },
22229
+ {
22230
+ name: "debt_asset",
22231
+ type: "core::starknet::contract_address::ContractAddress"
22232
+ },
22233
+ {
22234
+ name: "user",
22235
+ type: "core::starknet::contract_address::ContractAddress"
22236
+ },
22237
+ {
22238
+ name: "min_collateral_to_receive",
22239
+ type: "core::integer::u256"
22240
+ },
22241
+ {
22242
+ name: "debt_to_repay",
22243
+ type: "core::integer::u256"
22244
+ }
22245
+ ]
22246
+ },
22247
+ {
22248
+ type: "struct",
22249
+ name: "core::array::Span::<core::felt252>",
22250
+ members: [
22251
+ {
22252
+ name: "snapshot",
22253
+ type: "@core::array::Array::<core::felt252>"
22254
+ }
22255
+ ]
22256
+ },
22257
+ {
22258
+ type: "struct",
22259
+ name: "vesu::data_model::AssetParams",
22260
+ members: [
22261
+ {
22262
+ name: "asset",
22263
+ type: "core::starknet::contract_address::ContractAddress"
22264
+ },
22265
+ {
22266
+ name: "floor",
22267
+ type: "core::integer::u256"
22268
+ },
22269
+ {
22270
+ name: "initial_full_utilization_rate",
22271
+ type: "core::integer::u256"
22272
+ },
22273
+ {
22274
+ name: "max_utilization",
22275
+ type: "core::integer::u256"
22276
+ },
22277
+ {
22278
+ name: "is_legacy",
22279
+ type: "core::bool"
22280
+ },
22281
+ {
22282
+ name: "fee_rate",
22283
+ type: "core::integer::u256"
22284
+ }
22285
+ ]
22286
+ },
22287
+ {
22288
+ type: "struct",
22289
+ name: "vesu::interest_rate_model::InterestRateConfig",
22290
+ members: [
22291
+ {
22292
+ name: "min_target_utilization",
22293
+ type: "core::integer::u256"
22294
+ },
22295
+ {
22296
+ name: "max_target_utilization",
22297
+ type: "core::integer::u256"
22298
+ },
22299
+ {
22300
+ name: "target_utilization",
22301
+ type: "core::integer::u256"
22302
+ },
22303
+ {
22304
+ name: "min_full_utilization_rate",
22305
+ type: "core::integer::u256"
22306
+ },
22307
+ {
22308
+ name: "max_full_utilization_rate",
22309
+ type: "core::integer::u256"
22310
+ },
22311
+ {
22312
+ name: "zero_utilization_rate",
22313
+ type: "core::integer::u256"
22314
+ },
22315
+ {
22316
+ name: "rate_half_life",
22317
+ type: "core::integer::u256"
22318
+ },
22319
+ {
22320
+ name: "target_rate_percent",
22321
+ type: "core::integer::u256"
22322
+ }
22323
+ ]
22324
+ },
22325
+ {
22326
+ type: "struct",
22327
+ name: "vesu::data_model::Pair",
22328
+ members: [
22329
+ {
22330
+ name: "total_collateral_shares",
22331
+ type: "core::integer::u256"
22332
+ },
22333
+ {
22334
+ name: "total_nominal_debt",
22335
+ type: "core::integer::u256"
22336
+ }
22337
+ ]
22338
+ },
22339
+ {
22340
+ type: "struct",
22341
+ name: "vesu::data_model::PairConfig",
22342
+ members: [
22343
+ {
22344
+ name: "max_ltv",
22345
+ type: "core::integer::u64"
22346
+ },
22347
+ {
22348
+ name: "liquidation_factor",
22349
+ type: "core::integer::u64"
22350
+ },
22351
+ {
22352
+ name: "debt_cap",
22353
+ type: "core::integer::u128"
22354
+ }
22355
+ ]
22356
+ },
22357
+ {
22358
+ type: "enum",
22359
+ name: "core::option::Option::<(core::starknet::class_hash::ClassHash, core::array::Span::<core::felt252>)>",
22360
+ variants: [
22361
+ {
22362
+ name: "Some",
22363
+ type: "(core::starknet::class_hash::ClassHash, core::array::Span::<core::felt252>)"
22364
+ },
22365
+ {
22366
+ name: "None",
22367
+ type: "()"
22368
+ }
22369
+ ]
22370
+ },
22371
+ {
22372
+ type: "interface",
22373
+ name: "vesu::pool::IPool",
22374
+ items: [
22375
+ {
22376
+ type: "function",
22377
+ name: "pool_name",
22378
+ inputs: [],
22379
+ outputs: [
22380
+ {
22381
+ type: "core::felt252"
22382
+ }
22383
+ ],
22384
+ state_mutability: "view"
22385
+ },
22386
+ {
22387
+ type: "function",
22388
+ name: "context",
22389
+ inputs: [
22390
+ {
22391
+ name: "collateral_asset",
22392
+ type: "core::starknet::contract_address::ContractAddress"
22393
+ },
22394
+ {
22395
+ name: "debt_asset",
22396
+ type: "core::starknet::contract_address::ContractAddress"
22397
+ },
22398
+ {
22399
+ name: "user",
22400
+ type: "core::starknet::contract_address::ContractAddress"
22401
+ }
22402
+ ],
22403
+ outputs: [
22404
+ {
22405
+ type: "vesu::data_model::Context"
22406
+ }
22407
+ ],
22408
+ state_mutability: "view"
22409
+ },
22410
+ {
22411
+ type: "function",
22412
+ name: "position",
22413
+ inputs: [
22414
+ {
22415
+ name: "collateral_asset",
22416
+ type: "core::starknet::contract_address::ContractAddress"
22417
+ },
22418
+ {
22419
+ name: "debt_asset",
22420
+ type: "core::starknet::contract_address::ContractAddress"
22421
+ },
22422
+ {
22423
+ name: "user",
22424
+ type: "core::starknet::contract_address::ContractAddress"
22425
+ }
22426
+ ],
22427
+ outputs: [
22428
+ {
22429
+ type: "(vesu::data_model::Position, core::integer::u256, core::integer::u256)"
22430
+ }
22431
+ ],
22432
+ state_mutability: "view"
22433
+ },
22434
+ {
22435
+ type: "function",
22436
+ name: "check_collateralization",
22437
+ inputs: [
22438
+ {
22439
+ name: "collateral_asset",
22440
+ type: "core::starknet::contract_address::ContractAddress"
22441
+ },
22442
+ {
22443
+ name: "debt_asset",
22444
+ type: "core::starknet::contract_address::ContractAddress"
22445
+ },
22446
+ {
22447
+ name: "user",
22448
+ type: "core::starknet::contract_address::ContractAddress"
22449
+ }
22450
+ ],
22451
+ outputs: [
22452
+ {
22453
+ type: "(core::bool, core::integer::u256, core::integer::u256)"
22454
+ }
22455
+ ],
22456
+ state_mutability: "view"
22457
+ },
22458
+ {
22459
+ type: "function",
22460
+ name: "check_invariants",
22461
+ inputs: [
22462
+ {
22463
+ name: "collateral_asset",
22464
+ type: "core::starknet::contract_address::ContractAddress"
22465
+ },
22466
+ {
22467
+ name: "debt_asset",
22468
+ type: "core::starknet::contract_address::ContractAddress"
22469
+ },
22470
+ {
22471
+ name: "user",
22472
+ type: "core::starknet::contract_address::ContractAddress"
22473
+ },
22474
+ {
22475
+ name: "collateral_delta",
22476
+ type: "alexandria_math::i257::i257"
22477
+ },
22478
+ {
22479
+ name: "collateral_shares_delta",
22480
+ type: "alexandria_math::i257::i257"
22481
+ },
22482
+ {
22483
+ name: "debt_delta",
22484
+ type: "alexandria_math::i257::i257"
22485
+ },
22486
+ {
22487
+ name: "nominal_debt_delta",
22488
+ type: "alexandria_math::i257::i257"
22489
+ },
22490
+ {
22491
+ name: "is_liquidation",
22492
+ type: "core::bool"
22493
+ }
22494
+ ],
22495
+ outputs: [],
22496
+ state_mutability: "view"
22497
+ },
22498
+ {
22499
+ type: "function",
22500
+ name: "modify_position",
22501
+ inputs: [
22502
+ {
22503
+ name: "params",
22504
+ type: "vesu::data_model::ModifyPositionParams"
22505
+ }
22506
+ ],
22507
+ outputs: [
22508
+ {
22509
+ type: "vesu::data_model::UpdatePositionResponse"
22510
+ }
22511
+ ],
22512
+ state_mutability: "external"
22513
+ },
22514
+ {
22515
+ type: "function",
22516
+ name: "liquidate_position",
22517
+ inputs: [
22518
+ {
22519
+ name: "params",
22520
+ type: "vesu::data_model::LiquidatePositionParams"
22521
+ }
22522
+ ],
22523
+ outputs: [
22524
+ {
22525
+ type: "vesu::data_model::UpdatePositionResponse"
22526
+ }
22527
+ ],
22528
+ state_mutability: "external"
22529
+ },
22530
+ {
22531
+ type: "function",
22532
+ name: "flash_loan",
22533
+ inputs: [
22534
+ {
22535
+ name: "receiver",
22536
+ type: "core::starknet::contract_address::ContractAddress"
22537
+ },
22538
+ {
22539
+ name: "asset",
22540
+ type: "core::starknet::contract_address::ContractAddress"
22541
+ },
22542
+ {
22543
+ name: "amount",
22544
+ type: "core::integer::u256"
22545
+ },
22546
+ {
22547
+ name: "is_legacy",
22548
+ type: "core::bool"
22549
+ },
22550
+ {
22551
+ name: "data",
22552
+ type: "core::array::Span::<core::felt252>"
22553
+ }
22554
+ ],
22555
+ outputs: [],
22556
+ state_mutability: "external"
22557
+ },
22558
+ {
22559
+ type: "function",
22560
+ name: "modify_delegation",
22561
+ inputs: [
22562
+ {
22563
+ name: "delegatee",
22564
+ type: "core::starknet::contract_address::ContractAddress"
22565
+ },
22566
+ {
22567
+ name: "delegation",
22568
+ type: "core::bool"
22569
+ }
22570
+ ],
22571
+ outputs: [],
22572
+ state_mutability: "external"
22573
+ },
22574
+ {
22575
+ type: "function",
22576
+ name: "delegation",
22577
+ inputs: [
22578
+ {
22579
+ name: "delegator",
22580
+ type: "core::starknet::contract_address::ContractAddress"
22581
+ },
22582
+ {
22583
+ name: "delegatee",
22584
+ type: "core::starknet::contract_address::ContractAddress"
22585
+ }
22586
+ ],
22587
+ outputs: [
22588
+ {
22589
+ type: "core::bool"
22590
+ }
22591
+ ],
22592
+ state_mutability: "view"
22593
+ },
22594
+ {
22595
+ type: "function",
22596
+ name: "donate_to_reserve",
22597
+ inputs: [
22598
+ {
22599
+ name: "asset",
22600
+ type: "core::starknet::contract_address::ContractAddress"
22601
+ },
22602
+ {
22603
+ name: "amount",
22604
+ type: "core::integer::u256"
22605
+ }
22606
+ ],
22607
+ outputs: [],
22608
+ state_mutability: "external"
22609
+ },
22610
+ {
22611
+ type: "function",
22612
+ name: "add_asset",
22613
+ inputs: [
22614
+ {
22615
+ name: "params",
22616
+ type: "vesu::data_model::AssetParams"
22617
+ },
22618
+ {
22619
+ name: "interest_rate_config",
22620
+ type: "vesu::interest_rate_model::InterestRateConfig"
22621
+ }
22622
+ ],
22623
+ outputs: [],
22624
+ state_mutability: "external"
22625
+ },
22626
+ {
22627
+ type: "function",
22628
+ name: "set_asset_parameter",
22629
+ inputs: [
22630
+ {
22631
+ name: "asset",
22632
+ type: "core::starknet::contract_address::ContractAddress"
22633
+ },
22634
+ {
22635
+ name: "parameter",
22636
+ type: "core::felt252"
22637
+ },
22638
+ {
22639
+ name: "value",
22640
+ type: "core::integer::u256"
22641
+ }
22642
+ ],
22643
+ outputs: [],
22644
+ state_mutability: "external"
22645
+ },
22646
+ {
22647
+ type: "function",
22648
+ name: "asset_config",
22649
+ inputs: [
22650
+ {
22651
+ name: "asset",
22652
+ type: "core::starknet::contract_address::ContractAddress"
22653
+ }
22654
+ ],
22655
+ outputs: [
22656
+ {
22657
+ type: "vesu::data_model::AssetConfig"
22658
+ }
22659
+ ],
22660
+ state_mutability: "view"
22661
+ },
22662
+ {
22663
+ type: "function",
22664
+ name: "set_oracle",
22665
+ inputs: [
22666
+ {
22667
+ name: "oracle",
22668
+ type: "core::starknet::contract_address::ContractAddress"
22669
+ }
22670
+ ],
22671
+ outputs: [],
22672
+ state_mutability: "external"
22673
+ },
22674
+ {
22675
+ type: "function",
22676
+ name: "oracle",
22677
+ inputs: [],
22678
+ outputs: [
22679
+ {
22680
+ type: "core::starknet::contract_address::ContractAddress"
22681
+ }
22682
+ ],
22683
+ state_mutability: "view"
22684
+ },
22685
+ {
22686
+ type: "function",
22687
+ name: "price",
22688
+ inputs: [
22689
+ {
22690
+ name: "asset",
22691
+ type: "core::starknet::contract_address::ContractAddress"
22692
+ }
22693
+ ],
22694
+ outputs: [
22695
+ {
22696
+ type: "vesu::data_model::AssetPrice"
22697
+ }
22698
+ ],
22699
+ state_mutability: "view"
22700
+ },
22701
+ {
22702
+ type: "function",
22703
+ name: "set_fee_recipient",
22704
+ inputs: [
22705
+ {
22706
+ name: "fee_recipient",
22707
+ type: "core::starknet::contract_address::ContractAddress"
22708
+ }
22709
+ ],
22710
+ outputs: [],
22711
+ state_mutability: "external"
22712
+ },
22713
+ {
22714
+ type: "function",
22715
+ name: "fee_recipient",
22716
+ inputs: [],
22717
+ outputs: [
22718
+ {
22719
+ type: "core::starknet::contract_address::ContractAddress"
22720
+ }
22721
+ ],
22722
+ state_mutability: "view"
22723
+ },
22724
+ {
22725
+ type: "function",
22726
+ name: "claim_fees",
22727
+ inputs: [
22728
+ {
22729
+ name: "asset",
22730
+ type: "core::starknet::contract_address::ContractAddress"
22731
+ },
22732
+ {
22733
+ name: "fee_shares",
22734
+ type: "core::integer::u256"
22735
+ }
22736
+ ],
22737
+ outputs: [],
22738
+ state_mutability: "external"
22739
+ },
22740
+ {
22741
+ type: "function",
22742
+ name: "get_fees",
22743
+ inputs: [
22744
+ {
22745
+ name: "asset",
22746
+ type: "core::starknet::contract_address::ContractAddress"
22747
+ }
22748
+ ],
22749
+ outputs: [
22750
+ {
22751
+ type: "(core::integer::u256, core::integer::u256)"
22752
+ }
22753
+ ],
22754
+ state_mutability: "view"
22755
+ },
22756
+ {
22757
+ type: "function",
22758
+ name: "rate_accumulator",
22759
+ inputs: [
22760
+ {
22761
+ name: "asset",
22762
+ type: "core::starknet::contract_address::ContractAddress"
22763
+ }
22764
+ ],
22765
+ outputs: [
22766
+ {
22767
+ type: "core::integer::u256"
22768
+ }
22769
+ ],
22770
+ state_mutability: "view"
22771
+ },
22772
+ {
22773
+ type: "function",
22774
+ name: "utilization",
22775
+ inputs: [
22776
+ {
22777
+ name: "asset",
22778
+ type: "core::starknet::contract_address::ContractAddress"
22779
+ }
22780
+ ],
22781
+ outputs: [
22782
+ {
22783
+ type: "core::integer::u256"
22784
+ }
22785
+ ],
22786
+ state_mutability: "view"
22787
+ },
22788
+ {
22789
+ type: "function",
22790
+ name: "interest_rate",
22791
+ inputs: [
22792
+ {
22793
+ name: "asset",
22794
+ type: "core::starknet::contract_address::ContractAddress"
22795
+ },
22796
+ {
22797
+ name: "utilization",
22798
+ type: "core::integer::u256"
22799
+ },
22800
+ {
22801
+ name: "last_updated",
22802
+ type: "core::integer::u64"
22803
+ },
22804
+ {
22805
+ name: "last_full_utilization_rate",
22806
+ type: "core::integer::u256"
22807
+ }
22808
+ ],
22809
+ outputs: [
22810
+ {
22811
+ type: "core::integer::u256"
22812
+ }
22813
+ ],
22814
+ state_mutability: "view"
22815
+ },
22816
+ {
22817
+ type: "function",
22818
+ name: "set_interest_rate_parameter",
22819
+ inputs: [
22820
+ {
22821
+ name: "asset",
22822
+ type: "core::starknet::contract_address::ContractAddress"
22823
+ },
22824
+ {
22825
+ name: "parameter",
22826
+ type: "core::felt252"
22827
+ },
22828
+ {
22829
+ name: "value",
22830
+ type: "core::integer::u256"
22831
+ }
22832
+ ],
22833
+ outputs: [],
22834
+ state_mutability: "external"
22835
+ },
22836
+ {
22837
+ type: "function",
22838
+ name: "interest_rate_config",
22839
+ inputs: [
22840
+ {
22841
+ name: "asset",
22842
+ type: "core::starknet::contract_address::ContractAddress"
22843
+ }
22844
+ ],
22845
+ outputs: [
22846
+ {
22847
+ type: "vesu::interest_rate_model::InterestRateConfig"
22848
+ }
22849
+ ],
22850
+ state_mutability: "view"
22851
+ },
22852
+ {
22853
+ type: "function",
22854
+ name: "pairs",
22855
+ inputs: [
22856
+ {
22857
+ name: "collateral_asset",
22858
+ type: "core::starknet::contract_address::ContractAddress"
22859
+ },
22860
+ {
22861
+ name: "debt_asset",
22862
+ type: "core::starknet::contract_address::ContractAddress"
22863
+ }
22864
+ ],
22865
+ outputs: [
22866
+ {
22867
+ type: "vesu::data_model::Pair"
22868
+ }
22869
+ ],
22870
+ state_mutability: "view"
22871
+ },
22872
+ {
22873
+ type: "function",
22874
+ name: "set_pair_config",
22875
+ inputs: [
22876
+ {
22877
+ name: "collateral_asset",
22878
+ type: "core::starknet::contract_address::ContractAddress"
22879
+ },
22880
+ {
22881
+ name: "debt_asset",
22882
+ type: "core::starknet::contract_address::ContractAddress"
22883
+ },
22884
+ {
22885
+ name: "pair_config",
22886
+ type: "vesu::data_model::PairConfig"
22887
+ }
22888
+ ],
22889
+ outputs: [],
22890
+ state_mutability: "external"
22891
+ },
22892
+ {
22893
+ type: "function",
22894
+ name: "set_pair_parameter",
22895
+ inputs: [
22896
+ {
22897
+ name: "collateral_asset",
22898
+ type: "core::starknet::contract_address::ContractAddress"
22899
+ },
22900
+ {
22901
+ name: "debt_asset",
22902
+ type: "core::starknet::contract_address::ContractAddress"
22903
+ },
22904
+ {
22905
+ name: "parameter",
22906
+ type: "core::felt252"
22907
+ },
22908
+ {
22909
+ name: "value",
22910
+ type: "core::integer::u128"
22911
+ }
22912
+ ],
22913
+ outputs: [],
22914
+ state_mutability: "external"
22915
+ },
22916
+ {
22917
+ type: "function",
22918
+ name: "pair_config",
22919
+ inputs: [
22920
+ {
22921
+ name: "collateral_asset",
22922
+ type: "core::starknet::contract_address::ContractAddress"
22923
+ },
22924
+ {
22925
+ name: "debt_asset",
22926
+ type: "core::starknet::contract_address::ContractAddress"
22927
+ }
22928
+ ],
22929
+ outputs: [
22930
+ {
22931
+ type: "vesu::data_model::PairConfig"
22932
+ }
22933
+ ],
22934
+ state_mutability: "view"
22935
+ },
22936
+ {
22937
+ type: "function",
22938
+ name: "calculate_debt",
22939
+ inputs: [
22940
+ {
22941
+ name: "nominal_debt",
22942
+ type: "alexandria_math::i257::i257"
22943
+ },
22944
+ {
22945
+ name: "rate_accumulator",
22946
+ type: "core::integer::u256"
22947
+ },
22948
+ {
22949
+ name: "asset_scale",
22950
+ type: "core::integer::u256"
22951
+ }
22952
+ ],
22953
+ outputs: [
22954
+ {
22955
+ type: "core::integer::u256"
22956
+ }
22957
+ ],
22958
+ state_mutability: "view"
22959
+ },
22960
+ {
22961
+ type: "function",
22962
+ name: "calculate_nominal_debt",
22963
+ inputs: [
22964
+ {
22965
+ name: "debt",
22966
+ type: "alexandria_math::i257::i257"
22967
+ },
22968
+ {
22969
+ name: "rate_accumulator",
22970
+ type: "core::integer::u256"
22971
+ },
22972
+ {
22973
+ name: "asset_scale",
22974
+ type: "core::integer::u256"
22975
+ }
22976
+ ],
22977
+ outputs: [
22978
+ {
22979
+ type: "core::integer::u256"
22980
+ }
22981
+ ],
22982
+ state_mutability: "view"
22983
+ },
22984
+ {
22985
+ type: "function",
22986
+ name: "calculate_collateral_shares",
22987
+ inputs: [
22988
+ {
22989
+ name: "asset",
22990
+ type: "core::starknet::contract_address::ContractAddress"
22991
+ },
22992
+ {
22993
+ name: "collateral",
22994
+ type: "alexandria_math::i257::i257"
22995
+ }
22996
+ ],
22997
+ outputs: [
22998
+ {
22999
+ type: "core::integer::u256"
23000
+ }
23001
+ ],
23002
+ state_mutability: "view"
23003
+ },
23004
+ {
23005
+ type: "function",
23006
+ name: "calculate_collateral",
23007
+ inputs: [
23008
+ {
23009
+ name: "asset",
23010
+ type: "core::starknet::contract_address::ContractAddress"
23011
+ },
23012
+ {
23013
+ name: "collateral_shares",
23014
+ type: "alexandria_math::i257::i257"
23015
+ }
23016
+ ],
23017
+ outputs: [
23018
+ {
23019
+ type: "core::integer::u256"
23020
+ }
23021
+ ],
23022
+ state_mutability: "view"
23023
+ },
23024
+ {
23025
+ type: "function",
23026
+ name: "deconstruct_collateral_amount",
23027
+ inputs: [
23028
+ {
23029
+ name: "collateral_asset",
23030
+ type: "core::starknet::contract_address::ContractAddress"
23031
+ },
23032
+ {
23033
+ name: "debt_asset",
23034
+ type: "core::starknet::contract_address::ContractAddress"
23035
+ },
23036
+ {
23037
+ name: "user",
23038
+ type: "core::starknet::contract_address::ContractAddress"
23039
+ },
23040
+ {
23041
+ name: "collateral",
23042
+ type: "vesu::data_model::Amount"
23043
+ }
23044
+ ],
23045
+ outputs: [
23046
+ {
23047
+ type: "(alexandria_math::i257::i257, alexandria_math::i257::i257)"
23048
+ }
23049
+ ],
23050
+ state_mutability: "view"
23051
+ },
23052
+ {
23053
+ type: "function",
23054
+ name: "deconstruct_debt_amount",
23055
+ inputs: [
23056
+ {
23057
+ name: "collateral_asset",
23058
+ type: "core::starknet::contract_address::ContractAddress"
23059
+ },
23060
+ {
23061
+ name: "debt_asset",
23062
+ type: "core::starknet::contract_address::ContractAddress"
23063
+ },
23064
+ {
23065
+ name: "user",
23066
+ type: "core::starknet::contract_address::ContractAddress"
23067
+ },
23068
+ {
23069
+ name: "debt",
23070
+ type: "vesu::data_model::Amount"
23071
+ }
23072
+ ],
23073
+ outputs: [
23074
+ {
23075
+ type: "(alexandria_math::i257::i257, alexandria_math::i257::i257)"
23076
+ }
23077
+ ],
23078
+ state_mutability: "view"
23079
+ },
23080
+ {
23081
+ type: "function",
23082
+ name: "curator",
23083
+ inputs: [],
23084
+ outputs: [
23085
+ {
23086
+ type: "core::starknet::contract_address::ContractAddress"
23087
+ }
23088
+ ],
23089
+ state_mutability: "view"
23090
+ },
23091
+ {
23092
+ type: "function",
23093
+ name: "pending_curator",
23094
+ inputs: [],
23095
+ outputs: [
23096
+ {
23097
+ type: "core::starknet::contract_address::ContractAddress"
23098
+ }
23099
+ ],
23100
+ state_mutability: "view"
23101
+ },
23102
+ {
23103
+ type: "function",
23104
+ name: "nominate_curator",
23105
+ inputs: [
23106
+ {
23107
+ name: "pending_curator",
23108
+ type: "core::starknet::contract_address::ContractAddress"
23109
+ }
23110
+ ],
23111
+ outputs: [],
23112
+ state_mutability: "external"
23113
+ },
23114
+ {
23115
+ type: "function",
23116
+ name: "accept_curator_ownership",
23117
+ inputs: [],
23118
+ outputs: [],
23119
+ state_mutability: "external"
23120
+ },
23121
+ {
23122
+ type: "function",
23123
+ name: "set_pausing_agent",
23124
+ inputs: [
23125
+ {
23126
+ name: "pausing_agent",
23127
+ type: "core::starknet::contract_address::ContractAddress"
23128
+ }
23129
+ ],
23130
+ outputs: [],
23131
+ state_mutability: "external"
23132
+ },
23133
+ {
23134
+ type: "function",
23135
+ name: "pausing_agent",
23136
+ inputs: [],
23137
+ outputs: [
23138
+ {
23139
+ type: "core::starknet::contract_address::ContractAddress"
23140
+ }
23141
+ ],
23142
+ state_mutability: "view"
23143
+ },
23144
+ {
23145
+ type: "function",
23146
+ name: "pause",
23147
+ inputs: [],
23148
+ outputs: [],
23149
+ state_mutability: "external"
23150
+ },
23151
+ {
23152
+ type: "function",
23153
+ name: "unpause",
23154
+ inputs: [],
23155
+ outputs: [],
23156
+ state_mutability: "external"
23157
+ },
23158
+ {
23159
+ type: "function",
23160
+ name: "is_paused",
23161
+ inputs: [],
23162
+ outputs: [
23163
+ {
23164
+ type: "core::bool"
23165
+ }
23166
+ ],
23167
+ state_mutability: "view"
23168
+ },
23169
+ {
23170
+ type: "function",
23171
+ name: "upgrade_name",
23172
+ inputs: [],
23173
+ outputs: [
23174
+ {
23175
+ type: "core::felt252"
23176
+ }
23177
+ ],
23178
+ state_mutability: "view"
23179
+ },
23180
+ {
23181
+ type: "function",
23182
+ name: "upgrade",
23183
+ inputs: [
23184
+ {
23185
+ name: "new_implementation",
23186
+ type: "core::starknet::class_hash::ClassHash"
23187
+ },
23188
+ {
23189
+ name: "eic_implementation_data",
23190
+ type: "core::option::Option::<(core::starknet::class_hash::ClassHash, core::array::Span::<core::felt252>)>"
23191
+ }
23192
+ ],
23193
+ outputs: [],
23194
+ state_mutability: "external"
23195
+ }
23196
+ ]
23197
+ },
23198
+ {
23199
+ type: "impl",
23200
+ name: "OwnableTwoStepImpl",
23201
+ interface_name: "openzeppelin_access::ownable::interface::IOwnableTwoStep"
23202
+ },
23203
+ {
23204
+ type: "interface",
23205
+ name: "openzeppelin_access::ownable::interface::IOwnableTwoStep",
23206
+ items: [
23207
+ {
23208
+ type: "function",
23209
+ name: "owner",
23210
+ inputs: [],
23211
+ outputs: [
23212
+ {
23213
+ type: "core::starknet::contract_address::ContractAddress"
23214
+ }
23215
+ ],
23216
+ state_mutability: "view"
23217
+ },
23218
+ {
23219
+ type: "function",
23220
+ name: "pending_owner",
23221
+ inputs: [],
23222
+ outputs: [
23223
+ {
23224
+ type: "core::starknet::contract_address::ContractAddress"
23225
+ }
23226
+ ],
23227
+ state_mutability: "view"
23228
+ },
23229
+ {
23230
+ type: "function",
23231
+ name: "accept_ownership",
23232
+ inputs: [],
23233
+ outputs: [],
23234
+ state_mutability: "external"
23235
+ },
23236
+ {
23237
+ type: "function",
23238
+ name: "transfer_ownership",
23239
+ inputs: [
23240
+ {
23241
+ name: "new_owner",
23242
+ type: "core::starknet::contract_address::ContractAddress"
23243
+ }
23244
+ ],
23245
+ outputs: [],
23246
+ state_mutability: "external"
23247
+ },
23248
+ {
23249
+ type: "function",
23250
+ name: "renounce_ownership",
23251
+ inputs: [],
23252
+ outputs: [],
23253
+ state_mutability: "external"
23254
+ }
23255
+ ]
23256
+ },
23257
+ {
23258
+ type: "constructor",
23259
+ name: "constructor",
23260
+ inputs: [
23261
+ {
23262
+ name: "name",
23263
+ type: "core::felt252"
23264
+ },
23265
+ {
23266
+ name: "owner",
23267
+ type: "core::starknet::contract_address::ContractAddress"
23268
+ },
23269
+ {
23270
+ name: "curator",
23271
+ type: "core::starknet::contract_address::ContractAddress"
23272
+ },
23273
+ {
23274
+ name: "oracle",
23275
+ type: "core::starknet::contract_address::ContractAddress"
23276
+ }
23277
+ ]
23278
+ },
23279
+ {
23280
+ type: "event",
23281
+ name: "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
23282
+ kind: "struct",
23283
+ members: [
23284
+ {
23285
+ name: "previous_owner",
23286
+ type: "core::starknet::contract_address::ContractAddress",
23287
+ kind: "key"
23288
+ },
23289
+ {
23290
+ name: "new_owner",
23291
+ type: "core::starknet::contract_address::ContractAddress",
23292
+ kind: "key"
23293
+ }
23294
+ ]
23295
+ },
23296
+ {
23297
+ type: "event",
23298
+ name: "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
23299
+ kind: "struct",
23300
+ members: [
23301
+ {
23302
+ name: "previous_owner",
23303
+ type: "core::starknet::contract_address::ContractAddress",
23304
+ kind: "key"
23305
+ },
23306
+ {
23307
+ name: "new_owner",
23308
+ type: "core::starknet::contract_address::ContractAddress",
23309
+ kind: "key"
23310
+ }
23311
+ ]
23312
+ },
23313
+ {
23314
+ type: "event",
23315
+ name: "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
23316
+ kind: "enum",
23317
+ variants: [
23318
+ {
23319
+ name: "OwnershipTransferred",
23320
+ type: "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
23321
+ kind: "nested"
23322
+ },
23323
+ {
23324
+ name: "OwnershipTransferStarted",
23325
+ type: "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
23326
+ kind: "nested"
23327
+ }
23328
+ ]
23329
+ },
23330
+ {
23331
+ type: "event",
23332
+ name: "vesu::interest_rate_model::interest_rate_model_component::SetInterestRateConfig",
23333
+ kind: "struct",
23334
+ members: [
23335
+ {
23336
+ name: "asset",
23337
+ type: "core::starknet::contract_address::ContractAddress",
23338
+ kind: "data"
23339
+ },
23340
+ {
23341
+ name: "interest_rate_config",
23342
+ type: "vesu::interest_rate_model::InterestRateConfig",
23343
+ kind: "data"
23344
+ }
23345
+ ]
23346
+ },
23347
+ {
23348
+ type: "event",
23349
+ name: "vesu::interest_rate_model::interest_rate_model_component::Event",
23350
+ kind: "enum",
23351
+ variants: [
23352
+ {
23353
+ name: "SetInterestRateConfig",
23354
+ type: "vesu::interest_rate_model::interest_rate_model_component::SetInterestRateConfig",
23355
+ kind: "nested"
23356
+ }
23357
+ ]
23358
+ },
23359
+ {
23360
+ type: "event",
23361
+ name: "vesu::pool::Pool::UpdateContext",
23362
+ kind: "struct",
23363
+ members: [
23364
+ {
23365
+ name: "collateral_asset",
23366
+ type: "core::starknet::contract_address::ContractAddress",
23367
+ kind: "key"
23368
+ },
23369
+ {
23370
+ name: "debt_asset",
23371
+ type: "core::starknet::contract_address::ContractAddress",
23372
+ kind: "key"
23373
+ },
23374
+ {
23375
+ name: "collateral_asset_config",
23376
+ type: "vesu::data_model::AssetConfig",
23377
+ kind: "data"
23378
+ },
23379
+ {
23380
+ name: "debt_asset_config",
23381
+ type: "vesu::data_model::AssetConfig",
23382
+ kind: "data"
23383
+ },
23384
+ {
23385
+ name: "collateral_asset_price",
23386
+ type: "vesu::data_model::AssetPrice",
23387
+ kind: "data"
23388
+ },
23389
+ {
23390
+ name: "debt_asset_price",
23391
+ type: "vesu::data_model::AssetPrice",
23392
+ kind: "data"
23393
+ }
23394
+ ]
23395
+ },
23396
+ {
23397
+ type: "event",
23398
+ name: "vesu::pool::Pool::ModifyPosition",
23399
+ kind: "struct",
23400
+ members: [
23401
+ {
23402
+ name: "collateral_asset",
23403
+ type: "core::starknet::contract_address::ContractAddress",
23404
+ kind: "key"
23405
+ },
23406
+ {
23407
+ name: "debt_asset",
23408
+ type: "core::starknet::contract_address::ContractAddress",
23409
+ kind: "key"
23410
+ },
23411
+ {
23412
+ name: "user",
23413
+ type: "core::starknet::contract_address::ContractAddress",
23414
+ kind: "key"
23415
+ },
23416
+ {
23417
+ name: "collateral_delta",
23418
+ type: "alexandria_math::i257::i257",
23419
+ kind: "data"
23420
+ },
23421
+ {
23422
+ name: "collateral_shares_delta",
23423
+ type: "alexandria_math::i257::i257",
23424
+ kind: "data"
23425
+ },
23426
+ {
23427
+ name: "debt_delta",
23428
+ type: "alexandria_math::i257::i257",
23429
+ kind: "data"
23430
+ },
23431
+ {
23432
+ name: "nominal_debt_delta",
23433
+ type: "alexandria_math::i257::i257",
23434
+ kind: "data"
23435
+ }
23436
+ ]
23437
+ },
23438
+ {
23439
+ type: "event",
23440
+ name: "vesu::pool::Pool::LiquidatePosition",
23441
+ kind: "struct",
23442
+ members: [
23443
+ {
23444
+ name: "collateral_asset",
23445
+ type: "core::starknet::contract_address::ContractAddress",
23446
+ kind: "key"
23447
+ },
23448
+ {
23449
+ name: "debt_asset",
23450
+ type: "core::starknet::contract_address::ContractAddress",
23451
+ kind: "key"
23452
+ },
23453
+ {
23454
+ name: "user",
23455
+ type: "core::starknet::contract_address::ContractAddress",
23456
+ kind: "key"
23457
+ },
23458
+ {
23459
+ name: "liquidator",
23460
+ type: "core::starknet::contract_address::ContractAddress",
23461
+ kind: "key"
23462
+ },
23463
+ {
23464
+ name: "collateral_delta",
23465
+ type: "alexandria_math::i257::i257",
23466
+ kind: "data"
23467
+ },
23468
+ {
23469
+ name: "collateral_shares_delta",
23470
+ type: "alexandria_math::i257::i257",
23471
+ kind: "data"
23472
+ },
23473
+ {
23474
+ name: "debt_delta",
23475
+ type: "alexandria_math::i257::i257",
23476
+ kind: "data"
23477
+ },
23478
+ {
23479
+ name: "nominal_debt_delta",
23480
+ type: "alexandria_math::i257::i257",
23481
+ kind: "data"
23482
+ },
23483
+ {
23484
+ name: "bad_debt",
23485
+ type: "core::integer::u256",
23486
+ kind: "data"
23487
+ }
23488
+ ]
23489
+ },
23490
+ {
23491
+ type: "event",
23492
+ name: "vesu::pool::Pool::Flashloan",
23493
+ kind: "struct",
23494
+ members: [
23495
+ {
23496
+ name: "sender",
23497
+ type: "core::starknet::contract_address::ContractAddress",
23498
+ kind: "key"
23499
+ },
23500
+ {
23501
+ name: "receiver",
23502
+ type: "core::starknet::contract_address::ContractAddress",
23503
+ kind: "key"
23504
+ },
23505
+ {
23506
+ name: "asset",
23507
+ type: "core::starknet::contract_address::ContractAddress",
23508
+ kind: "key"
23509
+ },
23510
+ {
23511
+ name: "amount",
23512
+ type: "core::integer::u256",
23513
+ kind: "data"
23514
+ }
23515
+ ]
23516
+ },
23517
+ {
23518
+ type: "event",
23519
+ name: "vesu::pool::Pool::ModifyDelegation",
23520
+ kind: "struct",
23521
+ members: [
23522
+ {
23523
+ name: "delegator",
23524
+ type: "core::starknet::contract_address::ContractAddress",
23525
+ kind: "key"
23526
+ },
23527
+ {
23528
+ name: "delegatee",
23529
+ type: "core::starknet::contract_address::ContractAddress",
23530
+ kind: "key"
23531
+ },
23532
+ {
23533
+ name: "delegation",
23534
+ type: "core::bool",
23535
+ kind: "data"
23536
+ }
23537
+ ]
23538
+ },
23539
+ {
23540
+ type: "event",
23541
+ name: "vesu::pool::Pool::Donate",
23542
+ kind: "struct",
23543
+ members: [
23544
+ {
23545
+ name: "asset",
23546
+ type: "core::starknet::contract_address::ContractAddress",
23547
+ kind: "key"
23548
+ },
23549
+ {
23550
+ name: "amount",
23551
+ type: "core::integer::u256",
23552
+ kind: "data"
23553
+ }
23554
+ ]
23555
+ },
23556
+ {
23557
+ type: "event",
23558
+ name: "vesu::pool::Pool::SetAssetConfig",
23559
+ kind: "struct",
23560
+ members: [
23561
+ {
23562
+ name: "asset",
23563
+ type: "core::starknet::contract_address::ContractAddress",
23564
+ kind: "key"
23565
+ },
23566
+ {
23567
+ name: "asset_config",
23568
+ type: "vesu::data_model::AssetConfig",
23569
+ kind: "data"
23570
+ }
23571
+ ]
23572
+ },
23573
+ {
23574
+ type: "event",
23575
+ name: "vesu::pool::Pool::SetOracle",
23576
+ kind: "struct",
23577
+ members: [
23578
+ {
23579
+ name: "oracle",
23580
+ type: "core::starknet::contract_address::ContractAddress",
23581
+ kind: "data"
23582
+ }
23583
+ ]
23584
+ },
23585
+ {
23586
+ type: "event",
23587
+ name: "vesu::pool::Pool::SetPairConfig",
23588
+ kind: "struct",
23589
+ members: [
23590
+ {
23591
+ name: "collateral_asset",
23592
+ type: "core::starknet::contract_address::ContractAddress",
23593
+ kind: "key"
23594
+ },
23595
+ {
23596
+ name: "debt_asset",
23597
+ type: "core::starknet::contract_address::ContractAddress",
23598
+ kind: "key"
23599
+ },
23600
+ {
23601
+ name: "pair_config",
23602
+ type: "vesu::data_model::PairConfig",
23603
+ kind: "data"
23604
+ }
23605
+ ]
23606
+ },
23607
+ {
23608
+ type: "event",
23609
+ name: "vesu::pool::Pool::ClaimFees",
23610
+ kind: "struct",
23611
+ members: [
23612
+ {
23613
+ name: "asset",
23614
+ type: "core::starknet::contract_address::ContractAddress",
23615
+ kind: "key"
23616
+ },
23617
+ {
23618
+ name: "recipient",
23619
+ type: "core::starknet::contract_address::ContractAddress",
23620
+ kind: "data"
23621
+ },
23622
+ {
23623
+ name: "fee_shares",
23624
+ type: "core::integer::u256",
23625
+ kind: "data"
23626
+ },
23627
+ {
23628
+ name: "fee_amount",
23629
+ type: "core::integer::u256",
23630
+ kind: "data"
23631
+ }
23632
+ ]
23633
+ },
23634
+ {
23635
+ type: "event",
23636
+ name: "vesu::pool::Pool::SetFeeRecipient",
23637
+ kind: "struct",
23638
+ members: [
23639
+ {
23640
+ name: "fee_recipient",
23641
+ type: "core::starknet::contract_address::ContractAddress",
23642
+ kind: "key"
23643
+ }
23644
+ ]
23645
+ },
23646
+ {
23647
+ type: "event",
23648
+ name: "vesu::pool::Pool::SetPausingAgent",
23649
+ kind: "struct",
23650
+ members: [
23651
+ {
23652
+ name: "agent",
23653
+ type: "core::starknet::contract_address::ContractAddress",
23654
+ kind: "key"
23655
+ }
23656
+ ]
23657
+ },
23658
+ {
23659
+ type: "event",
23660
+ name: "vesu::pool::Pool::SetCurator",
23661
+ kind: "struct",
23662
+ members: [
23663
+ {
23664
+ name: "curator",
23665
+ type: "core::starknet::contract_address::ContractAddress",
23666
+ kind: "key"
23667
+ }
23668
+ ]
23669
+ },
23670
+ {
23671
+ type: "event",
23672
+ name: "vesu::pool::Pool::NominateCurator",
23673
+ kind: "struct",
23674
+ members: [
23675
+ {
23676
+ name: "pending_curator",
23677
+ type: "core::starknet::contract_address::ContractAddress",
23678
+ kind: "key"
23679
+ }
23680
+ ]
23681
+ },
23682
+ {
23683
+ type: "event",
23684
+ name: "vesu::pool::Pool::ContractPaused",
23685
+ kind: "struct",
23686
+ members: [
23687
+ {
23688
+ name: "account",
23689
+ type: "core::starknet::contract_address::ContractAddress",
23690
+ kind: "data"
23691
+ }
23692
+ ]
23693
+ },
23694
+ {
23695
+ type: "event",
23696
+ name: "vesu::pool::Pool::ContractUnpaused",
23697
+ kind: "struct",
23698
+ members: [
23699
+ {
23700
+ name: "account",
23701
+ type: "core::starknet::contract_address::ContractAddress",
23702
+ kind: "data"
23703
+ }
23704
+ ]
23705
+ },
23706
+ {
23707
+ type: "event",
23708
+ name: "vesu::pool::Pool::ContractUpgraded",
23709
+ kind: "struct",
23710
+ members: [
23711
+ {
23712
+ name: "new_implementation",
23713
+ type: "core::starknet::class_hash::ClassHash",
23714
+ kind: "data"
23715
+ }
23716
+ ]
23717
+ },
23718
+ {
23719
+ type: "event",
23720
+ name: "vesu::pool::Pool::Event",
23721
+ kind: "enum",
23722
+ variants: [
23723
+ {
23724
+ name: "OwnableEvent",
23725
+ type: "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
23726
+ kind: "flat"
23727
+ },
23728
+ {
23729
+ name: "InterestRateModelEvents",
23730
+ type: "vesu::interest_rate_model::interest_rate_model_component::Event",
23731
+ kind: "nested"
23732
+ },
23733
+ {
23734
+ name: "UpdateContext",
23735
+ type: "vesu::pool::Pool::UpdateContext",
23736
+ kind: "nested"
23737
+ },
23738
+ {
23739
+ name: "ModifyPosition",
23740
+ type: "vesu::pool::Pool::ModifyPosition",
23741
+ kind: "nested"
23742
+ },
23743
+ {
23744
+ name: "LiquidatePosition",
23745
+ type: "vesu::pool::Pool::LiquidatePosition",
23746
+ kind: "nested"
23747
+ },
23748
+ {
23749
+ name: "Flashloan",
23750
+ type: "vesu::pool::Pool::Flashloan",
23751
+ kind: "nested"
23752
+ },
23753
+ {
23754
+ name: "ModifyDelegation",
23755
+ type: "vesu::pool::Pool::ModifyDelegation",
23756
+ kind: "nested"
23757
+ },
23758
+ {
23759
+ name: "Donate",
23760
+ type: "vesu::pool::Pool::Donate",
23761
+ kind: "nested"
23762
+ },
23763
+ {
23764
+ name: "SetAssetConfig",
23765
+ type: "vesu::pool::Pool::SetAssetConfig",
23766
+ kind: "nested"
23767
+ },
23768
+ {
23769
+ name: "SetOracle",
23770
+ type: "vesu::pool::Pool::SetOracle",
23771
+ kind: "nested"
23772
+ },
23773
+ {
23774
+ name: "SetPairConfig",
23775
+ type: "vesu::pool::Pool::SetPairConfig",
23776
+ kind: "nested"
23777
+ },
23778
+ {
23779
+ name: "ClaimFees",
23780
+ type: "vesu::pool::Pool::ClaimFees",
23781
+ kind: "nested"
23782
+ },
23783
+ {
23784
+ name: "SetFeeRecipient",
23785
+ type: "vesu::pool::Pool::SetFeeRecipient",
23786
+ kind: "nested"
23787
+ },
23788
+ {
23789
+ name: "SetPausingAgent",
23790
+ type: "vesu::pool::Pool::SetPausingAgent",
23791
+ kind: "nested"
23792
+ },
23793
+ {
23794
+ name: "SetCurator",
23795
+ type: "vesu::pool::Pool::SetCurator",
23796
+ kind: "nested"
23797
+ },
23798
+ {
23799
+ name: "NominateCurator",
23800
+ type: "vesu::pool::Pool::NominateCurator",
23801
+ kind: "nested"
23802
+ },
23803
+ {
23804
+ name: "ContractPaused",
23805
+ type: "vesu::pool::Pool::ContractPaused",
23806
+ kind: "nested"
23807
+ },
23808
+ {
23809
+ name: "ContractUnpaused",
23810
+ type: "vesu::pool::Pool::ContractUnpaused",
23811
+ kind: "nested"
23812
+ },
23813
+ {
23814
+ name: "ContractUpgraded",
23815
+ type: "vesu::pool::Pool::ContractUpgraded",
23816
+ kind: "nested"
23817
+ }
23818
+ ]
23819
+ }
23820
+ ];
23821
+
23822
+ // src/strategies/universal-adapters/vesu-adapter.ts
23823
+ var VesuAmountType = /* @__PURE__ */ ((VesuAmountType2) => {
23824
+ VesuAmountType2[VesuAmountType2["Delta"] = 0] = "Delta";
23825
+ VesuAmountType2[VesuAmountType2["Target"] = 1] = "Target";
23826
+ return VesuAmountType2;
23827
+ })(VesuAmountType || {});
23828
+ var VesuAmountDenomination = /* @__PURE__ */ ((VesuAmountDenomination2) => {
23829
+ VesuAmountDenomination2[VesuAmountDenomination2["Native"] = 0] = "Native";
23830
+ VesuAmountDenomination2[VesuAmountDenomination2["Assets"] = 1] = "Assets";
23831
+ return VesuAmountDenomination2;
23832
+ })(VesuAmountDenomination || {});
23833
+ function getVesuMultiplyParams(isIncrease, params) {
23834
+ if (isIncrease) {
23835
+ const _params2 = params;
23836
+ return {
23837
+ action: new import_starknet15.CairoCustomEnum({ IncreaseLever: {
23838
+ pool_id: _params2.pool_id.toBigInt(),
23839
+ collateral_asset: _params2.collateral_asset.toBigInt(),
23840
+ debt_asset: _params2.debt_asset.toBigInt(),
23841
+ user: _params2.user.toBigInt(),
23842
+ add_margin: BigInt(_params2.add_margin.toWei()),
23843
+ margin_swap: _params2.margin_swap.map((swap) => ({
23844
+ route: swap.route.map((route) => ({
23845
+ pool_key: {
23846
+ token0: route.pool_key.token0.toBigInt(),
23847
+ token1: route.pool_key.token1.toBigInt(),
23848
+ fee: route.pool_key.fee,
23849
+ tick_spacing: route.pool_key.tick_spacing,
23850
+ extension: BigInt(import_starknet15.num.hexToDecimalString(route.pool_key.extension))
23851
+ },
23852
+ sqrt_ratio_limit: import_starknet15.uint256.bnToUint256(route.sqrt_ratio_limit.toWei()),
23853
+ skip_ahead: BigInt(100)
23854
+ })),
23855
+ token_amount: {
23856
+ token: swap.token_amount.token.toBigInt(),
23857
+ amount: swap.token_amount.amount.toI129()
23858
+ }
23859
+ })),
23860
+ margin_swap_limit_amount: BigInt(_params2.margin_swap_limit_amount.toWei()),
23861
+ lever_swap: _params2.lever_swap.map((swap) => ({
23862
+ route: swap.route.map((route) => ({
23863
+ pool_key: {
23864
+ token0: route.pool_key.token0.toBigInt(),
23865
+ token1: route.pool_key.token1.toBigInt(),
23866
+ fee: route.pool_key.fee,
23867
+ tick_spacing: route.pool_key.tick_spacing,
23868
+ extension: BigInt(import_starknet15.num.hexToDecimalString(route.pool_key.extension))
23869
+ },
23870
+ sqrt_ratio_limit: import_starknet15.uint256.bnToUint256(route.sqrt_ratio_limit.toWei()),
23871
+ skip_ahead: BigInt(100)
23872
+ })),
23873
+ token_amount: {
23874
+ token: swap.token_amount.token.toBigInt(),
23875
+ amount: swap.token_amount.amount.toI129()
23876
+ }
23877
+ })),
23878
+ lever_swap_limit_amount: BigInt(_params2.lever_swap_limit_amount.toWei())
23879
+ } })
23880
+ };
23881
+ }
23882
+ const _params = params;
23883
+ return {
23884
+ action: new import_starknet15.CairoCustomEnum({ DecreaseLever: {
23885
+ pool_id: _params.pool_id.toBigInt(),
23886
+ collateral_asset: _params.collateral_asset.toBigInt(),
23887
+ debt_asset: _params.debt_asset.toBigInt(),
23888
+ user: _params.user.toBigInt(),
23889
+ sub_margin: BigInt(_params.sub_margin.toWei()),
23890
+ recipient: _params.recipient.toBigInt(),
23891
+ lever_swap: _params.lever_swap.map((swap) => ({
23892
+ route: swap.route.map((route) => ({
23893
+ pool_key: {
23894
+ token0: route.pool_key.token0.toBigInt(),
23895
+ token1: route.pool_key.token1.toBigInt(),
23896
+ fee: route.pool_key.fee,
23897
+ tick_spacing: route.pool_key.tick_spacing,
23898
+ extension: ContractAddr.from(route.pool_key.extension).toBigInt()
23899
+ },
23900
+ sqrt_ratio_limit: import_starknet15.uint256.bnToUint256(route.sqrt_ratio_limit.toWei()),
23901
+ skip_ahead: BigInt(route.skip_ahead.toWei())
23902
+ })),
23903
+ token_amount: {
23904
+ token: swap.token_amount.token.toBigInt(),
23905
+ amount: swap.token_amount.amount.toI129()
23906
+ }
23907
+ })),
23908
+ lever_swap_limit_amount: BigInt(_params.lever_swap_limit_amount.toWei()),
23909
+ lever_swap_weights: _params.lever_swap_weights.map((weight) => BigInt(weight.toWei())),
23910
+ withdraw_swap: _params.withdraw_swap.map((swap) => ({
23911
+ route: swap.route.map((route) => ({
23912
+ pool_key: {
23913
+ token0: route.pool_key.token0.toBigInt(),
23914
+ token1: route.pool_key.token1.toBigInt(),
23915
+ fee: route.pool_key.fee,
23916
+ tick_spacing: route.pool_key.tick_spacing,
23917
+ extension: ContractAddr.from(route.pool_key.extension).toBigInt()
23918
+ },
23919
+ sqrt_ratio_limit: import_starknet15.uint256.bnToUint256(route.sqrt_ratio_limit.toWei()),
23920
+ skip_ahead: BigInt(route.skip_ahead.toWei())
23921
+ })),
23922
+ token_amount: {
23923
+ token: swap.token_amount.token.toBigInt(),
23924
+ amount: swap.token_amount.amount.toI129()
23925
+ }
23926
+ })),
23927
+ withdraw_swap_limit_amount: BigInt(_params.withdraw_swap_limit_amount.toWei()),
23928
+ withdraw_swap_weights: _params.withdraw_swap_weights.map((weight) => BigInt(weight.toWei())),
23929
+ close_position: _params.close_position
23930
+ } })
23931
+ };
23932
+ }
23933
+ var VesuPools = {
23934
+ Genesis: ContractAddr.from("0x4dc4f0ca6ea4961e4c8373265bfd5317678f4fe374d76f3fd7135f57763bf28"),
23935
+ Re7xSTRK: ContractAddr.from("0x052fb52363939c3aa848f8f4ac28f0a51379f8d1b971d8444de25fbd77d8f161"),
23936
+ Re7xBTC: ContractAddr.from("0x3a8416bf20d036df5b1cf3447630a2e1cb04685f6b0c3a70ed7fb1473548ecf")
23937
+ };
23938
+ function getVesuSingletonAddress(vesuPool) {
23939
+ if (vesuPool.eq(VesuPools.Genesis) || vesuPool.eq(VesuPools.Re7xSTRK)) {
23940
+ return { addr: VESU_SINGLETON, isV2: false };
23941
+ }
23942
+ return { addr: vesuPool, isV2: true };
23943
+ }
23944
+ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
23945
+ constructor(config) {
23946
+ super();
23947
+ this.VESU_MULTIPLY_V1 = ContractAddr.from("0x3630f1f8e5b8f5c4c4ae9b6620f8a570ae55cddebc0276c37550e7c118edf67");
23948
+ this.VESU_MULTIPLY = ContractAddr.from("0x027fef272d0a9a3844767c851a64b36fe4f0115141d81134baade95d2b27b781");
23949
+ this.getModifyPosition = () => {
23950
+ const positionData = [0n];
23951
+ const packedArguments = [
23952
+ toBigInt(this.config.poolId.toString()),
23953
+ // pool id
23954
+ toBigInt(this.config.collateral.address.toString()),
23955
+ // collateral
23956
+ toBigInt(this.config.debt.address.toString()),
23957
+ // debt
23958
+ toBigInt(this.config.vaultAllocator.toString()),
23959
+ // vault allocator
23960
+ toBigInt(positionData.length),
23961
+ ...positionData
23962
+ ];
23963
+ const output = this.constructSimpleLeafData({
23964
+ id: this.config.id,
23965
+ target: getVesuSingletonAddress(this.config.poolId).addr,
23966
+ method: "modify_position",
23967
+ packedArguments
23968
+ });
23969
+ return { leaf: output, callConstructor: this.getModifyPositionCall.bind(this) };
23970
+ };
23971
+ this.getModifyPositionCall = (params) => {
23972
+ const _collateral = {
23973
+ amount_type: this.formatAmountTypeEnum(params.collateralAmount.amount_type),
23974
+ denomination: this.formatAmountDenominationEnum(params.collateralAmount.denomination),
23975
+ value: {
23976
+ abs: import_starknet15.uint256.bnToUint256(params.collateralAmount.value.abs.toWei()),
23977
+ is_negative: params.collateralAmount.value.abs.isZero() ? false : params.collateralAmount.value.is_negative
23978
+ }
23979
+ };
23980
+ logger.verbose(`VesuAdapter::ConstructingModify::Collateral::${JSON.stringify(_collateral)}`);
23981
+ const _debt = {
23982
+ amount_type: this.formatAmountTypeEnum(params.debtAmount.amount_type),
23983
+ denomination: this.formatAmountDenominationEnum(params.debtAmount.denomination),
23984
+ value: {
23985
+ abs: import_starknet15.uint256.bnToUint256(params.debtAmount.value.abs.toWei()),
23986
+ is_negative: params.debtAmount.value.abs.isZero() ? false : params.debtAmount.value.is_negative
23987
+ }
23988
+ };
23989
+ logger.verbose(`VesuAdapter::ConstructingModify::Debt::${JSON.stringify(_debt)}`);
23990
+ const { contract, isV2 } = this.getVesuSingletonContract(getMainnetConfig(), this.config.poolId);
23991
+ const call = contract.populate("modify_position", {
23992
+ params: isV2 ? {
23993
+ collateral_asset: this.config.collateral.address.toBigInt(),
23994
+ debt_asset: this.config.debt.address.toBigInt(),
23995
+ user: this.config.vaultAllocator.toBigInt(),
23996
+ collateral: _collateral,
23997
+ debt: _debt
23998
+ } : {
23999
+ pool_id: this.config.poolId.toBigInt(),
24000
+ collateral_asset: this.config.collateral.address.toBigInt(),
24001
+ debt_asset: this.config.debt.address.toBigInt(),
24002
+ user: this.config.vaultAllocator.toBigInt(),
24003
+ collateral: _collateral,
24004
+ debt: _debt,
24005
+ data: [0]
24006
+ }
24007
+ });
24008
+ return {
24009
+ sanitizer: SIMPLE_SANITIZER,
24010
+ call: {
24011
+ contractAddress: ContractAddr.from(contract.address),
24012
+ selector: import_starknet15.hash.getSelectorFromName("modify_position"),
24013
+ calldata: [
24014
+ ...call.calldata
24015
+ ]
24016
+ }
24017
+ };
24018
+ };
24019
+ this.getMultiplyAdapter = () => {
24020
+ const packedArguments = [
24021
+ toBigInt(this.config.poolId.toString()),
24022
+ // pool id
24023
+ toBigInt(this.config.collateral.address.toString()),
24024
+ // collateral
24025
+ toBigInt(this.config.debt.address.toString()),
24026
+ // debt
24027
+ toBigInt(this.config.vaultAllocator.toString())
24028
+ // vault allocator
24029
+ ];
24030
+ const { isV2 } = getVesuSingletonAddress(this.config.poolId);
24031
+ const output = this.constructSimpleLeafData({
24032
+ id: this.config.id,
24033
+ target: isV2 ? this.VESU_MULTIPLY : this.VESU_MULTIPLY_V1,
24034
+ method: "modify_lever",
24035
+ packedArguments
24036
+ }, SIMPLE_SANITIZER_V2);
24037
+ return { leaf: output, callConstructor: this.getMultiplyCall.bind(this) };
24038
+ };
24039
+ this.getMultiplyCall = (params) => {
24040
+ const isIncrease = params.isIncrease;
24041
+ const multiplyParams = isIncrease ? params.increaseParams : params.decreaseParams;
24042
+ if (!multiplyParams) {
24043
+ throw new Error("Multiply params are not provided");
24044
+ }
24045
+ const { isV2 } = getVesuSingletonAddress(this.config.poolId);
24046
+ const VESU_MULTIPLY = isV2 ? this.VESU_MULTIPLY : this.VESU_MULTIPLY_V1;
24047
+ const multiplyContract = new import_starknet15.Contract({ abi: vesu_multiple_abi_default, address: VESU_MULTIPLY.toString(), providerOrAccount: new import_starknet15.RpcProvider({ nodeUrl: "" }) });
24048
+ const call = multiplyContract.populate("modify_lever", {
24049
+ modify_lever_params: getVesuMultiplyParams(isIncrease, {
24050
+ ...multiplyParams,
24051
+ user: this.config.vaultAllocator,
24052
+ pool_id: this.config.poolId,
24053
+ collateral_asset: this.config.collateral.address,
24054
+ debt_asset: this.config.debt.address,
24055
+ recipient: this.config.vaultAllocator
24056
+ })
24057
+ });
24058
+ return {
24059
+ sanitizer: SIMPLE_SANITIZER_V2,
24060
+ call: {
24061
+ contractAddress: VESU_MULTIPLY,
24062
+ selector: import_starknet15.hash.getSelectorFromName("modify_lever"),
24063
+ calldata: [
24064
+ ...call.calldata
24065
+ ]
24066
+ }
24067
+ };
24068
+ };
24069
+ this.getVesuModifyDelegationAdapter = (id) => {
24070
+ return () => {
24071
+ const { addr: VESU_SINGLETON2, isV2 } = getVesuSingletonAddress(this.config.poolId);
24072
+ const packedArguments = isV2 ? [
22143
24073
  toBigInt(this.VESU_MULTIPLY.toString())
22144
- // vault allocator
24074
+ // v2
24075
+ ] : [
24076
+ this.config.poolId.toBigInt(),
24077
+ toBigInt(this.VESU_MULTIPLY_V1.toString())
24078
+ // v1
22145
24079
  ];
22146
24080
  const output = this.constructSimpleLeafData({
22147
24081
  id,
22148
- target: this.VESU_SINGLETON,
24082
+ target: VESU_SINGLETON2,
22149
24083
  method: "modify_delegation",
22150
24084
  packedArguments
22151
- }, SIMPLE_SANITIZER_V2);
24085
+ }, isV2 ? SIMPLE_SANITIZER_V2 : SIMPLE_SANITIZER_VESU_V1_DELEGATIONS);
22152
24086
  return { leaf: output, callConstructor: this.getVesuModifyDelegationCall.bind(this) };
22153
24087
  };
22154
24088
  };
22155
24089
  this.getVesuModifyDelegationCall = (params) => {
22156
- const singletonContract = new import_starknet15.Contract({ abi: vesu_singleton_abi_default, address: this.VESU_SINGLETON.toString(), providerOrAccount: new import_starknet15.RpcProvider({ nodeUrl: "" }) });
22157
- const call = singletonContract.populate("modify_delegation", {
22158
- pool_id: this.config.poolId.toBigInt(),
24090
+ const VESU_SINGLETON2 = getVesuSingletonAddress(this.config.poolId).addr;
24091
+ const { contract, isV2 } = this.getVesuSingletonContract(getMainnetConfig(), this.config.poolId);
24092
+ const call = contract.populate("modify_delegation", isV2 ? {
22159
24093
  delegatee: this.VESU_MULTIPLY.toBigInt(),
22160
24094
  delegation: params.delegation
24095
+ } : {
24096
+ pool_id: this.config.poolId.toBigInt(),
24097
+ delegatee: this.VESU_MULTIPLY_V1.toBigInt(),
24098
+ delegation: params.delegation
22161
24099
  });
22162
24100
  return {
22163
- sanitizer: SIMPLE_SANITIZER_V2,
24101
+ sanitizer: isV2 ? SIMPLE_SANITIZER_V2 : SIMPLE_SANITIZER_VESU_V1_DELEGATIONS,
22164
24102
  call: {
22165
- contractAddress: this.VESU_SINGLETON,
24103
+ contractAddress: VESU_SINGLETON2,
22166
24104
  selector: import_starknet15.hash.getSelectorFromName("modify_delegation"),
22167
24105
  calldata: [
22168
24106
  ...call.calldata
@@ -22244,8 +24182,13 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
22244
24182
  }
22245
24183
  throw new Error(`Unknown VesuAmountDenomination: ${denomination}`);
22246
24184
  }
22247
- getVesuSingletonContract(config) {
22248
- return new import_starknet15.Contract({ abi: vesu_singleton_abi_default, address: this.VESU_SINGLETON.address, providerOrAccount: config.provider });
24185
+ getVesuSingletonContract(config, poolId) {
24186
+ const { addr: VESU_SINGLETON2, isV2 } = getVesuSingletonAddress(poolId);
24187
+ const ABI = isV2 ? vesu_pool_v2_abi_default : vesu_singleton_abi_default;
24188
+ return {
24189
+ contract: new import_starknet15.Contract({ abi: ABI, address: VESU_SINGLETON2.address, providerOrAccount: config.provider }),
24190
+ isV2
24191
+ };
22249
24192
  }
22250
24193
  async getLTVConfig(config) {
22251
24194
  const CACHE_KEY = "ltv_config";
@@ -22253,8 +24196,16 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
22253
24196
  if (cacheData) {
22254
24197
  return cacheData;
22255
24198
  }
22256
- const output = await this.getVesuSingletonContract(config).call("ltv_config", [this.config.poolId.address, this.config.collateral.address.address, this.config.debt.address.address]);
22257
- this.setCache(CACHE_KEY, Number(output.max_ltv) / 1e18, 3e5);
24199
+ const { contract, isV2 } = await this.getVesuSingletonContract(config, this.config.poolId);
24200
+ let ltv = 0;
24201
+ if (isV2) {
24202
+ const output = await contract.call("pair_config", [this.config.collateral.address.address, this.config.debt.address.address]);
24203
+ ltv = Number(output.max_ltv) / 1e18;
24204
+ } else {
24205
+ const output = await contract.call("ltv_config", [this.config.poolId.address, this.config.collateral.address.address, this.config.debt.address.address]);
24206
+ ltv = Number(output.max_ltv) / 1e18;
24207
+ }
24208
+ this.setCache(CACHE_KEY, ltv, 3e5);
22258
24209
  return this.getCache(CACHE_KEY);
22259
24210
  }
22260
24211
  async getPositions(config) {
@@ -22266,14 +24217,17 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
22266
24217
  if (cacheData) {
22267
24218
  return cacheData;
22268
24219
  }
22269
- const output = await this.getVesuSingletonContract(config).call("position_unsafe", [
22270
- this.config.poolId.address,
24220
+ const { contract, isV2 } = this.getVesuSingletonContract(config, this.config.poolId);
24221
+ const output = await contract.call(isV2 ? "position" : "position_unsafe", [
24222
+ ...isV2 ? [] : [this.config.poolId.address],
24223
+ // exclude pool id in v2
22271
24224
  this.config.collateral.address.address,
22272
24225
  this.config.debt.address.address,
22273
24226
  this.config.vaultAllocator.address
22274
24227
  ]);
22275
24228
  const token1Price = await this.pricer.getPrice(this.config.collateral.symbol);
22276
24229
  const token2Price = await this.pricer.getPrice(this.config.debt.symbol);
24230
+ logger.verbose(`VesuAdapter::getPositions token1Price: ${token1Price.price}, token2Price: ${token2Price.price}`);
22277
24231
  const collateralAmount = Web3Number.fromWei(output["1"].toString(), this.config.collateral.decimals);
22278
24232
  const debtAmount = Web3Number.fromWei(output["2"].toString(), this.config.debt.decimals);
22279
24233
  const value = [{
@@ -22299,8 +24253,10 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
22299
24253
  if (cacheData) {
22300
24254
  return cacheData;
22301
24255
  }
22302
- const output = await this.getVesuSingletonContract(config).call("check_collateralization_unsafe", [
22303
- this.config.poolId.address,
24256
+ const { contract, isV2 } = this.getVesuSingletonContract(config, this.config.poolId);
24257
+ const output = await contract.call(isV2 ? "check_collateralization" : "check_collateralization_unsafe", [
24258
+ ...isV2 ? [] : [this.config.poolId.address],
24259
+ // exclude pool id in v2
22304
24260
  this.config.collateral.address.address,
22305
24261
  this.config.debt.address.address,
22306
24262
  this.config.vaultAllocator.address
@@ -22360,7 +24316,7 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
22360
24316
  );
22361
24317
  pools = data.data;
22362
24318
  for (const pool of vesu_pools_default.data) {
22363
- const found = pools.find((d) => d.id === pool.id);
24319
+ const found = pools.find((d) => ContractAddr.from(d.id).eqString(pool.id));
22364
24320
  if (!found) {
22365
24321
  logger.verbose(`VesuRebalance: pools: ${JSON.stringify(pools)}`);
22366
24322
  logger.verbose(
@@ -24750,12 +26706,12 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
24750
26706
  const rewardAPYs = [];
24751
26707
  for (const [index, pool] of pools.entries()) {
24752
26708
  const vesuAdapter = vesuAdapters[index];
24753
- const collateralAsset = pool.assets.find((a) => a.symbol === vesuAdapter.config.collateral.symbol)?.stats;
24754
- const debtAsset = pool.assets.find((a) => a.symbol === vesuAdapter.config.debt.symbol)?.stats;
26709
+ const collateralAsset = pool.assets.find((a) => a.symbol.toLowerCase() === vesuAdapter.config.collateral.symbol.toLowerCase())?.stats;
26710
+ const debtAsset = pool.assets.find((a) => a.symbol.toLowerCase() === vesuAdapter.config.debt.symbol.toLowerCase())?.stats;
24755
26711
  const supplyApy = Number(collateralAsset.supplyApy.value || 0) / 1e18;
24756
26712
  const lstAPY = Number(collateralAsset.lstApr?.value || 0) / 1e18;
24757
26713
  baseAPYs.push(...[supplyApy + lstAPY, Number(debtAsset.borrowApr.value) / 1e18]);
24758
- rewardAPYs.push(...[Number(collateralAsset.defiSpringSupplyApr.value || "0") / 1e18, 0]);
26714
+ rewardAPYs.push(...[Number(collateralAsset.defiSpringSupplyApr?.value || "0") / 1e18, 0]);
24759
26715
  }
24760
26716
  logger.verbose(`${this.metadata.name}::netAPY: baseAPYs: ${JSON.stringify(baseAPYs)}`);
24761
26717
  logger.verbose(`${this.metadata.name}::netAPY: rewardAPYs: ${JSON.stringify(rewardAPYs)}`);
@@ -24825,6 +26781,7 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
24825
26781
  const underlying = this.asset();
24826
26782
  let vesuAum = Web3Number.fromWei("0", underlying.decimals);
24827
26783
  let tokenUnderlyingPrice = await this.pricer.getPrice(this.asset().symbol);
26784
+ logger.verbose(`${this.getTag()} tokenUnderlyingPrice: ${tokenUnderlyingPrice.price}`);
24828
26785
  if (legAUM[0].token.address.eq(underlying.address)) {
24829
26786
  vesuAum = vesuAum.plus(legAUM[0].amount);
24830
26787
  } else {
@@ -24925,7 +26882,7 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
24925
26882
  amount: unusedBalance.amount,
24926
26883
  usdValue: unusedBalance.usdValue,
24927
26884
  token: this.asset(),
24928
- remarks: "Unused Balance"
26885
+ remarks: "Unused Balance (may not include recent deposits)"
24929
26886
  }];
24930
26887
  }
24931
26888
  getSetManagerCall(strategist, root = this.getMerkleRoot()) {
@@ -25263,8 +27220,8 @@ function getLooperSettings(token1Symbol, token2Symbol, vaultSettings, pool1, poo
25263
27220
  vaultSettings.leafAdapters.push(commonAdapter.getFlashloanAdapter.bind(commonAdapter));
25264
27221
  vaultSettings.leafAdapters.push(vesuAdapterUSDCETH.getModifyPosition.bind(vesuAdapterUSDCETH));
25265
27222
  vaultSettings.leafAdapters.push(vesuAdapterETHUSDC.getModifyPosition.bind(vesuAdapterETHUSDC));
25266
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(USDCToken.address, vesuAdapterUSDCETH.VESU_SINGLETON, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
25267
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(ETHToken.address, vesuAdapterETHUSDC.VESU_SINGLETON, "approve_token2" /* APPROVE_TOKEN2 */).bind(commonAdapter));
27223
+ vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(USDCToken.address, VESU_SINGLETON, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
27224
+ vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(ETHToken.address, VESU_SINGLETON, "approve_token2" /* APPROVE_TOKEN2 */).bind(commonAdapter));
25268
27225
  vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(USDCToken.address, vaultSettings.vaultAddress, "approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */).bind(commonAdapter));
25269
27226
  vaultSettings.leafAdapters.push(commonAdapter.getBringLiquidityAdapter("bring_liquidity" /* BRING_LIQUIDITY */).bind(commonAdapter));
25270
27227
  vaultSettings.leafAdapters.push(vesuAdapterUSDCETH.getDefispringRewardsAdapter("defispring_rewards" /* DEFISPRING_REWARDS */).bind(vesuAdapterUSDCETH));
@@ -25568,7 +27525,7 @@ var UniversalStrategies = [
25568
27525
  // src/strategies/universal-lst-muliplier-strategy.tsx
25569
27526
  var import_starknet17 = require("starknet");
25570
27527
  var import_jsx_runtime5 = require("react/jsx-runtime");
25571
- var UniversalLstMultiplierStrategy = class extends UniversalStrategy {
27528
+ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy extends UniversalStrategy {
25572
27529
  constructor(config, pricer, metadata) {
25573
27530
  super(config, pricer, metadata);
25574
27531
  this.quoteAmountToFetchPrice = new Web3Number(1, 18);
@@ -25580,8 +27537,15 @@ var UniversalLstMultiplierStrategy = class extends UniversalStrategy {
25580
27537
  this.quoteAmountToFetchPrice = new Web3Number(0.01, this.asset().decimals);
25581
27538
  }
25582
27539
  }
27540
+ asset() {
27541
+ const vesuAdapter1 = this.getAdapter("vesu_leg1_adapter" /* VESU_LEG1 */);
27542
+ return vesuAdapter1.config.collateral;
27543
+ }
27544
+ getTag() {
27545
+ return `${_UniversalLstMultiplierStrategy.name}:${this.metadata.name}`;
27546
+ }
25583
27547
  // only one leg is used
25584
- // todo support lending assets of underlying as well
27548
+ // todo support lending assets of underlying as well (like if xSTRK looping is not viable, simply supply STRK)
25585
27549
  getVesuAdapters() {
25586
27550
  const vesuAdapter1 = this.getAdapter("vesu_leg1_adapter" /* VESU_LEG1 */);
25587
27551
  vesuAdapter1.pricer = this.pricer;
@@ -25590,9 +27554,13 @@ var UniversalLstMultiplierStrategy = class extends UniversalStrategy {
25590
27554
  }
25591
27555
  // not applicable for this strategy
25592
27556
  // No rewards on collateral or borrowing of LST assets
25593
- // protected async getRewardsAUM(prevAum: Web3Number): Promise<Web3Number> {
25594
- // return Web3Number.fromWei("0", this.asset().decimals);
25595
- // }
27557
+ async getRewardsAUM(prevAum) {
27558
+ const lstToken = this.asset();
27559
+ if (lstToken.symbol === "xSTRK") {
27560
+ return super.getRewardsAUM(prevAum);
27561
+ }
27562
+ return Web3Number.fromWei("0", lstToken.decimals);
27563
+ }
25596
27564
  async getLSTDexPrice() {
25597
27565
  const ekuboQuoter = new EkuboQuoter(this.config);
25598
27566
  const lstTokenInfo = this.asset();
@@ -25615,6 +27583,7 @@ var UniversalLstMultiplierStrategy = class extends UniversalStrategy {
25615
27583
  async getVesuMultiplyCall(params) {
25616
27584
  const [vesuAdapter1] = this.getVesuAdapters();
25617
27585
  const legLTV = await vesuAdapter1.getLTVConfig(this.config);
27586
+ logger.verbose(`${this.getTag()}::getVesuMultiplyCall legLTV: ${legLTV}`);
25618
27587
  const existingPositions = await vesuAdapter1.getPositions(this.config);
25619
27588
  const collateralisation = await vesuAdapter1.getCollateralization(this.config);
25620
27589
  const existingCollateralInfo = existingPositions[0];
@@ -25628,8 +27597,11 @@ var UniversalLstMultiplierStrategy = class extends UniversalStrategy {
25628
27597
  const addedCollateral = params.leg1DepositAmount.multipliedBy(params.isDeposit ? 1 : -1);
25629
27598
  logger.verbose(`${this.getTag()}::getVesuMultiplyCall addedCollateral: ${addedCollateral}`);
25630
27599
  const numeratorPart1 = existingCollateralInfo.amount.plus(addedCollateral).multipliedBy(collateralPrice).multipliedBy(legLTV);
27600
+ logger.verbose(`${this.getTag()}::getVesuMultiplyCall numeratorPart1: ${numeratorPart1}`);
25631
27601
  const numeratorPart2 = existingDebtInfo.amount.multipliedBy(debtPrice).multipliedBy(this.metadata.additionalInfo.targetHealthFactor);
27602
+ logger.verbose(`${this.getTag()}::getVesuMultiplyCall numeratorPart2: ${numeratorPart2}`);
25632
27603
  const denominatorPart = this.metadata.additionalInfo.targetHealthFactor - legLTV / dexPrice;
27604
+ logger.verbose(`${this.getTag()}::getVesuMultiplyCall denominatorPart: ${denominatorPart}`);
25633
27605
  const x_debt_usd = numeratorPart1.minus(numeratorPart2).dividedBy(denominatorPart);
25634
27606
  logger.verbose(`${this.getTag()}::getVesuMultiplyCall x_debt_usd: ${x_debt_usd}`);
25635
27607
  logger.debug(`${this.getTag()}::getVesuMultiplyCall numeratorPart1: ${numeratorPart1}, numeratorPart2: ${numeratorPart2}, denominatorPart: ${denominatorPart}`);
@@ -25665,10 +27637,15 @@ var UniversalLstMultiplierStrategy = class extends UniversalStrategy {
25665
27637
  * @param params marginAmount is in LST, debtAmount is in underlying
25666
27638
  */
25667
27639
  async getModifyLeverCall(params) {
27640
+ logger.verbose(`${this.getTag()}::getModifyLeverCall marginAmount: ${params.marginAmount}, debtAmount: ${params.debtAmount}, lstDexPriceInUnderlying: ${params.lstDexPriceInUnderlying}, isIncrease: ${params.isIncrease}`);
25668
27641
  assert(!params.marginAmount.isZero() || !params.debtAmount.isZero(), "Deposit/debt must be non-0");
25669
27642
  const [vesuAdapter1] = this.getVesuAdapters();
25670
27643
  const lstTokenInfo = this.asset();
25671
27644
  const lstUnderlyingTokenInfo = vesuAdapter1.config.debt;
27645
+ const maxAmounts = lstTokenInfo.symbol == "xSTRK" ? 5e5 : 0.5;
27646
+ if (params.marginAmount.greaterThan(maxAmounts)) {
27647
+ throw new Error(`Margin amount is greater than max amount: ${params.marginAmount.toNumber()} > ${maxAmounts}`);
27648
+ }
25672
27649
  const proofsIDs = [];
25673
27650
  const manageCalls = [];
25674
27651
  if (params.marginAmount.greaterThan(0)) {
@@ -25682,9 +27659,9 @@ var UniversalLstMultiplierStrategy = class extends UniversalStrategy {
25682
27659
  manageCalls.push(manageCall1);
25683
27660
  }
25684
27661
  const lstDexPriceInUnderlying = params.lstDexPriceInUnderlying;
27662
+ const lstTrueExchangeRate = await this.getLSTExchangeRate();
25685
27663
  const ekuboQuoter = new EkuboQuoter(this.config);
25686
- const marginSwap = [];
25687
- const MAX_SLIPPAGE = 0.01;
27664
+ const MAX_SLIPPAGE = 2e-3;
25688
27665
  const fromToken = params.isIncrease ? lstUnderlyingTokenInfo : lstTokenInfo;
25689
27666
  const toToken = params.isIncrease ? lstTokenInfo : lstUnderlyingTokenInfo;
25690
27667
  const leverSwapQuote = await ekuboQuoter.getQuote(
@@ -25693,10 +27670,22 @@ var UniversalLstMultiplierStrategy = class extends UniversalStrategy {
25693
27670
  params.debtAmount
25694
27671
  // negative for exact amount out
25695
27672
  );
25696
- assert(leverSwapQuote.price_impact < MAX_SLIPPAGE, "getIncreaseLeverCall: Price impact is too high [Debt swap]");
27673
+ logger.verbose(`${this.getTag()}::getModifyLeverCall leverSwapQuote: ${JSON.stringify(leverSwapQuote)}`);
27674
+ assert(leverSwapQuote.price_impact < 0.01, "getIncreaseLeverCall: Price impact is too high [Debt swap]");
25697
27675
  const leverSwap = ekuboQuoter.getVesuMultiplyQuote(leverSwapQuote, fromToken, toToken);
25698
- const minExpectedDebt = params.debtAmount.dividedBy(lstDexPriceInUnderlying).multipliedBy(1 - MAX_SLIPPAGE);
25699
- const maxUsedCollateral = params.debtAmount.abs().dividedBy(lstDexPriceInUnderlying).multipliedBy(1 + MAX_SLIPPAGE);
27676
+ logger.verbose(`${this.getTag()}::getModifyLeverCall leverSwap: ${JSON.stringify(leverSwap)}`);
27677
+ let minLSTReceived = params.debtAmount.dividedBy(lstDexPriceInUnderlying).multipliedBy(1 - MAX_SLIPPAGE);
27678
+ const minLSTReceivedAsPerTruePrice = params.debtAmount.dividedBy(lstTrueExchangeRate);
27679
+ if (minLSTReceived < minLSTReceivedAsPerTruePrice) {
27680
+ minLSTReceived = minLSTReceivedAsPerTruePrice;
27681
+ }
27682
+ logger.verbose(`${this.getTag()}::getModifyLeverCall minLSTReceivedAsPerTruePrice: ${minLSTReceivedAsPerTruePrice}, minLSTReceived: ${minLSTReceived}`);
27683
+ let maxUsedCollateral = params.debtAmount.abs().dividedBy(lstDexPriceInUnderlying).multipliedBy(1 + MAX_SLIPPAGE);
27684
+ const maxUsedCollateralInLST = params.debtAmount.abs().dividedBy(lstTrueExchangeRate).multipliedBy(1.005);
27685
+ logger.verbose(`${this.getTag()}::getModifyLeverCall maxUsedCollateralInLST: ${maxUsedCollateralInLST}, maxUsedCollateral: ${maxUsedCollateral}`);
27686
+ if (maxUsedCollateralInLST > maxUsedCollateral) {
27687
+ maxUsedCollateral = maxUsedCollateralInLST;
27688
+ }
25700
27689
  const STEP2_ID = "switch_delegation_on" /* SWITCH_DELEGATION_ON */;
25701
27690
  const manage2Info = this.getProofs(STEP2_ID);
25702
27691
  const manageCall2 = manage2Info.callConstructor({
@@ -25708,10 +27697,10 @@ var UniversalLstMultiplierStrategy = class extends UniversalStrategy {
25708
27697
  isIncrease: true,
25709
27698
  increaseParams: {
25710
27699
  add_margin: params.marginAmount,
25711
- margin_swap: marginSwap,
27700
+ margin_swap: [],
25712
27701
  margin_swap_limit_amount: Web3Number.fromWei(0, this.asset().decimals),
25713
27702
  lever_swap: leverSwap,
25714
- lever_swap_limit_amount: minExpectedDebt
27703
+ lever_swap_limit_amount: minLSTReceived
25715
27704
  }
25716
27705
  } : {
25717
27706
  isIncrease: false,
@@ -25780,7 +27769,9 @@ function getLooperSettings2(lstSymbol, underlyingSymbol, vaultSettings, pool1) {
25780
27769
  vaultAddress: vaultSettings.vaultAddress,
25781
27770
  vaultAllocator: vaultSettings.vaultAllocator
25782
27771
  });
25783
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, vesuAdapterLST.VESU_MULTIPLY, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
27772
+ const { isV2 } = getVesuSingletonAddress(pool1);
27773
+ const VESU_MULTIPLY = isV2 ? vesuAdapterLST.VESU_MULTIPLY : vesuAdapterLST.VESU_MULTIPLY_V1;
27774
+ vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, VESU_MULTIPLY, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
25784
27775
  vaultSettings.leafAdapters.push(vesuAdapterLST.getMultiplyAdapter.bind(vesuAdapterLST));
25785
27776
  vaultSettings.leafAdapters.push(vesuAdapterLST.getVesuModifyDelegationAdapter("switch_delegation_on" /* SWITCH_DELEGATION_ON */).bind(vesuAdapterLST));
25786
27777
  vaultSettings.leafAdapters.push(vesuAdapterLST.getVesuModifyDelegationAdapter("switch_delegation_off" /* SWITCH_DELEGATION_OFF */).bind(vesuAdapterLST));
@@ -25866,7 +27857,7 @@ var hyperxWBTC = {
25866
27857
  manager: ContractAddr.from("0x75866db44c81e6986f06035206ee9c7d15833ddb22d6a22c016cfb5c866a491"),
25867
27858
  vaultAllocator: ContractAddr.from("0x57b5c1bb457b5e840a2714ae53ada87d77be2f3fd33a59b4fe709ef20c020c1"),
25868
27859
  redeemRequestNFT: ContractAddr.from("0x7a5dc288325456f05e70e9616e16bc02ffbe448f4b89f80b47c0970b989c7c"),
25869
- aumOracle: ContractAddr.from(""),
27860
+ aumOracle: ContractAddr.from("0x258f8a0ca0d21f542e48ad89d00e92dc4d9db4999084f50ef9c22dfb1e83023"),
25870
27861
  leafAdapters: [],
25871
27862
  adapters: [],
25872
27863
  targetHealthFactor: 1.1,
@@ -25877,7 +27868,7 @@ var hyperxtBTC = {
25877
27868
  manager: ContractAddr.from("0xc4cc3e08029a0ae076f5fdfca70575abb78d23c5cd1c49a957f7e697885401"),
25878
27869
  vaultAllocator: ContractAddr.from("0x50bbd4fe69f841ecb13b2619fe50ebfa4e8944671b5d0ebf7868fd80c61b31e"),
25879
27870
  redeemRequestNFT: ContractAddr.from("0xeac9032f02057779816e38a6cb9185d12d86b3aacc9949b96b36de359c1e3"),
25880
- aumOracle: ContractAddr.from(""),
27871
+ aumOracle: ContractAddr.from("0x7e0d05cb7ba3f7db77a36c21c21583b5a524c2e685c08c24b3554911fb4a039"),
25881
27872
  leafAdapters: [],
25882
27873
  adapters: [],
25883
27874
  targetHealthFactor: 1.1,
@@ -25888,7 +27879,7 @@ var hyperxsBTC = {
25888
27879
  manager: ContractAddr.from("0xc9ac023090625b0be3f6532ca353f086746f9c09f939dbc1b2613f09e5f821"),
25889
27880
  vaultAllocator: ContractAddr.from("0x60c2d856936b975459a5b4eb28b8672d91f757bd76cebb6241f8d670185dc01"),
25890
27881
  redeemRequestNFT: ContractAddr.from("0x429e8ee8bc7ecd1ade72630d350a2e0f10f9a2507c45f188ba17fe8f2ab4cf3"),
25891
- aumOracle: ContractAddr.from(""),
27882
+ aumOracle: ContractAddr.from("0x149298ade3e79ec6cbdac6cfad289c57504eaf54e590939136ed1ceca60c345"),
25892
27883
  leafAdapters: [],
25893
27884
  adapters: [],
25894
27885
  targetHealthFactor: 1.1,
@@ -25923,7 +27914,7 @@ function getStrategySettings(lstSymbol, underlyingSymbol, addresses, isPreview =
25923
27914
  launchBlock: 0,
25924
27915
  type: "Other",
25925
27916
  depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === lstSymbol)],
25926
- additionalInfo: getLooperSettings2(lstSymbol, underlyingSymbol, addresses, VesuPools.Re7xSTRK),
27917
+ additionalInfo: getLooperSettings2(lstSymbol, underlyingSymbol, addresses, lstSymbol === "xSTRK" ? VesuPools.Re7xSTRK : VesuPools.Re7xBTC),
25927
27918
  risk: {
25928
27919
  riskFactor: _riskFactor4,
25929
27920
  netRisk: _riskFactor4.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor4.reduce((acc, curr) => acc + curr.weight, 0),
@@ -25939,10 +27930,10 @@ function getStrategySettings(lstSymbol, underlyingSymbol, addresses, isPreview =
25939
27930
  }
25940
27931
  var HyperLSTStrategies = [
25941
27932
  getStrategySettings("xSTRK", "STRK", hyperxSTRK, false),
25942
- getStrategySettings("xWBTC", "WBTC", hyperxWBTC, true),
25943
- getStrategySettings("xtBTC", "tBTC", hyperxtBTC, true),
25944
- getStrategySettings("xsBTC", "solvBTC", hyperxsBTC, true),
25945
- getStrategySettings("xLBTC", "LBTC", hyperxLBTC, true)
27933
+ getStrategySettings("xWBTC", "WBTC", hyperxWBTC, false),
27934
+ getStrategySettings("xtBTC", "tBTC", hyperxtBTC, false),
27935
+ getStrategySettings("xsBTC", "solvBTC", hyperxsBTC, false),
27936
+ getStrategySettings("xLBTC", "LBTC", hyperxLBTC, false)
25946
27937
  ];
25947
27938
 
25948
27939
  // src/modules/pricer-lst.ts
@@ -26419,6 +28410,7 @@ var deployer_default = Deployer;
26419
28410
  // Annotate the CommonJS export names for ESM import in node:
26420
28411
  0 && (module.exports = {
26421
28412
  AUMTypes,
28413
+ AVNU_MIDDLEWARE,
26422
28414
  AutoCompounderSTRK,
26423
28415
  AvnuWrapper,
26424
28416
  BaseAdapter,
@@ -26438,6 +28430,7 @@ var deployer_default = Deployer;
26438
28430
  Initializable,
26439
28431
  MarginType,
26440
28432
  Network,
28433
+ PRICE_ROUTER,
26441
28434
  PasswordJsonCryptoUtil,
26442
28435
  Pragma,
26443
28436
  Pricer,
@@ -26446,6 +28439,9 @@ var deployer_default = Deployer;
26446
28439
  PricerRedis,
26447
28440
  Protocols,
26448
28441
  RiskType,
28442
+ SIMPLE_SANITIZER,
28443
+ SIMPLE_SANITIZER_V2,
28444
+ SIMPLE_SANITIZER_VESU_V1_DELEGATIONS,
26449
28445
  SenseiStrategies,
26450
28446
  SenseiVault,
26451
28447
  StandardMerkleTree,
@@ -26456,6 +28452,7 @@ var deployer_default = Deployer;
26456
28452
  UniversalLstMultiplierStrategy,
26457
28453
  UniversalStrategies,
26458
28454
  UniversalStrategy,
28455
+ VESU_SINGLETON,
26459
28456
  VesuAdapter,
26460
28457
  VesuAmountDenomination,
26461
28458
  VesuAmountType,
@@ -26473,6 +28470,8 @@ var deployer_default = Deployer;
26473
28470
  getRiskColor,
26474
28471
  getRiskExplaination,
26475
28472
  getTrovesEndpoint,
28473
+ getVesuSingletonAddress,
26476
28474
  highlightTextWithLinks,
26477
- logger
28475
+ logger,
28476
+ toBigInt
26478
28477
  });