@strkfarm/sdk 1.0.53 → 1.0.55
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.browser.global.js +2093 -4
- package/dist/index.browser.mjs +2096 -4
- package/dist/index.d.ts +46 -4
- package/dist/index.js +2208 -112
- package/dist/index.mjs +2097 -4
- package/package.json +3 -3
- package/src/data/sensei.abi.json +1759 -0
- package/src/dataTypes/_bignumber.ts +15 -0
- package/src/interfaces/common.tsx +5 -2
- package/src/modules/avnu.ts +0 -1
- package/src/strategies/base-strategy.ts +27 -0
- package/src/strategies/ekubo-cl-vault.tsx +15 -3
- package/src/strategies/index.ts +1 -0
- package/src/strategies/sensei.ts +333 -0
- package/src/utils/index.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -50,6 +50,8 @@ __export(src_exports, {
|
|
|
50
50
|
PricerFromApi: () => PricerFromApi,
|
|
51
51
|
PricerRedis: () => PricerRedis,
|
|
52
52
|
RiskType: () => RiskType,
|
|
53
|
+
SenseiStrategies: () => SenseiStrategies,
|
|
54
|
+
SenseiVault: () => SenseiVault,
|
|
53
55
|
Store: () => Store,
|
|
54
56
|
TelegramNotif: () => TelegramNotif,
|
|
55
57
|
VesuRebalance: () => VesuRebalance,
|
|
@@ -63,6 +65,7 @@ __export(src_exports, {
|
|
|
63
65
|
getNoRiskTags: () => getNoRiskTags,
|
|
64
66
|
getRiskColor: () => getRiskColor,
|
|
65
67
|
getRiskExplaination: () => getRiskExplaination,
|
|
68
|
+
getTrovesEndpoint: () => getTrovesEndpoint,
|
|
66
69
|
highlightTextWithLinks: () => highlightTextWithLinks,
|
|
67
70
|
logger: () => logger
|
|
68
71
|
});
|
|
@@ -124,6 +127,19 @@ var _Web3Number = class extends import_bignumber.default {
|
|
|
124
127
|
}
|
|
125
128
|
return value.toFixed(this.maxToFixedDecimals());
|
|
126
129
|
}
|
|
130
|
+
minimum(value) {
|
|
131
|
+
const _value = new import_bignumber.default(value);
|
|
132
|
+
const _valueMe = new import_bignumber.default(this.toString());
|
|
133
|
+
const answer = _value.lessThanOrEqualTo(_valueMe) ? _value : _valueMe;
|
|
134
|
+
return this.construct(answer.toString(), this.decimals);
|
|
135
|
+
}
|
|
136
|
+
maximum(value) {
|
|
137
|
+
const _value = new import_bignumber.default(value);
|
|
138
|
+
const _valueMe = new import_bignumber.default(this.toString());
|
|
139
|
+
console.warn(`maximum: _value: ${_value.toString()}, _valueMe: ${_valueMe.toString()}`);
|
|
140
|
+
const answer = _value.greaterThanOrEqualTo(_valueMe) ? _value : _valueMe;
|
|
141
|
+
return this.construct(answer.toString(), this.decimals);
|
|
142
|
+
}
|
|
127
143
|
};
|
|
128
144
|
import_bignumber.default.config({ DECIMAL_PLACES: 18, ROUNDING_MODE: import_bignumber.default.ROUND_DOWN });
|
|
129
145
|
_Web3Number.config({ DECIMAL_PLACES: 18, ROUNDING_MODE: import_bignumber.default.ROUND_DOWN });
|
|
@@ -2005,6 +2021,9 @@ function assert(condition, message) {
|
|
|
2005
2021
|
throw new Error(message);
|
|
2006
2022
|
}
|
|
2007
2023
|
}
|
|
2024
|
+
function getTrovesEndpoint() {
|
|
2025
|
+
return process.env.TROVES_ENDPOINT || "https://app.troves.fi";
|
|
2026
|
+
}
|
|
2008
2027
|
|
|
2009
2028
|
// src/modules/avnu.ts
|
|
2010
2029
|
var AvnuWrapper = class _AvnuWrapper {
|
|
@@ -2030,7 +2049,6 @@ var AvnuWrapper = class _AvnuWrapper {
|
|
|
2030
2049
|
}
|
|
2031
2050
|
throw new Error("no quotes found");
|
|
2032
2051
|
}
|
|
2033
|
-
logger.verbose(`${_AvnuWrapper.name}: getQuotes => Found ${JSON.stringify(filteredQuotes[0])}`);
|
|
2034
2052
|
return filteredQuotes[0];
|
|
2035
2053
|
}
|
|
2036
2054
|
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount) {
|
|
@@ -2097,6 +2115,7 @@ var RiskType = /* @__PURE__ */ ((RiskType2) => {
|
|
|
2097
2115
|
RiskType2["ORACLE_RISK"] = "Oracle Risk";
|
|
2098
2116
|
RiskType2["TECHNICAL_RISK"] = "Technical Risk";
|
|
2099
2117
|
RiskType2["COUNTERPARTY_RISK"] = "Counterparty Risk";
|
|
2118
|
+
RiskType2["DEPEG_RISK"] = "Depeg Risk";
|
|
2100
2119
|
return RiskType2;
|
|
2101
2120
|
})(RiskType || {});
|
|
2102
2121
|
var Network = /* @__PURE__ */ ((Network2) => {
|
|
@@ -2111,7 +2130,7 @@ var FlowChartColors = /* @__PURE__ */ ((FlowChartColors2) => {
|
|
|
2111
2130
|
FlowChartColors2["Purple"] = "#6e53dc";
|
|
2112
2131
|
return FlowChartColors2;
|
|
2113
2132
|
})(FlowChartColors || {});
|
|
2114
|
-
function getMainnetConfig(rpcUrl
|
|
2133
|
+
function getMainnetConfig(rpcUrl, blockIdentifier = "pending") {
|
|
2115
2134
|
return {
|
|
2116
2135
|
provider: new import_starknet5.RpcProvider({
|
|
2117
2136
|
nodeUrl: rpcUrl,
|
|
@@ -2139,6 +2158,8 @@ var getRiskExplaination = (riskType) => {
|
|
|
2139
2158
|
return "The risk of technical issues e.g. backend failure.";
|
|
2140
2159
|
case "Counterparty Risk" /* COUNTERPARTY_RISK */:
|
|
2141
2160
|
return "The risk of the counterparty defaulting e.g. bad debt on lending platforms.";
|
|
2161
|
+
case "Depeg Risk" /* DEPEG_RISK */:
|
|
2162
|
+
return "The risk of a token losing its peg to the underlying asset, leading to potential losses for holders.";
|
|
2142
2163
|
}
|
|
2143
2164
|
};
|
|
2144
2165
|
var getRiskColor = (risk) => {
|
|
@@ -3727,6 +3748,7 @@ var vesu_rebalance_abi_default = [
|
|
|
3727
3748
|
// src/strategies/base-strategy.ts
|
|
3728
3749
|
var BaseStrategy = class {
|
|
3729
3750
|
constructor(config) {
|
|
3751
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
3730
3752
|
this.config = config;
|
|
3731
3753
|
}
|
|
3732
3754
|
async getUserTVL(user) {
|
|
@@ -3741,6 +3763,23 @@ var BaseStrategy = class {
|
|
|
3741
3763
|
async withdrawCall(amountInfo, receiver, owner) {
|
|
3742
3764
|
throw new Error("Not implemented");
|
|
3743
3765
|
}
|
|
3766
|
+
setCache(key, data, ttl = 6e4) {
|
|
3767
|
+
const timestamp = Date.now();
|
|
3768
|
+
this.cache.set(key, { timestamp, ttl, data });
|
|
3769
|
+
}
|
|
3770
|
+
getCache(key) {
|
|
3771
|
+
const cachedData = this.cache.get(key);
|
|
3772
|
+
if (!cachedData || !this.isCacheValid(key)) {
|
|
3773
|
+
return null;
|
|
3774
|
+
}
|
|
3775
|
+
return cachedData.data;
|
|
3776
|
+
}
|
|
3777
|
+
isCacheValid(key) {
|
|
3778
|
+
const cachedData = this.cache.get(key);
|
|
3779
|
+
if (!cachedData) return false;
|
|
3780
|
+
const { timestamp, ttl } = cachedData;
|
|
3781
|
+
return Date.now() - timestamp <= ttl;
|
|
3782
|
+
}
|
|
3744
3783
|
};
|
|
3745
3784
|
|
|
3746
3785
|
// src/node/headless.browser.ts
|
|
@@ -16058,11 +16097,19 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16058
16097
|
import_starknet9.uint256.uint256ToBN(swapInfo1.token_from_amount).toString(),
|
|
16059
16098
|
18
|
|
16060
16099
|
// cause its always STRK?
|
|
16100
|
+
).minimum(
|
|
16101
|
+
postFeeAmount.toFixed(18)
|
|
16102
|
+
// cause always strk
|
|
16103
|
+
);
|
|
16104
|
+
swapInfo.token_from_amount = import_starknet9.uint256.bnToUint256(swap1Amount.toWei());
|
|
16105
|
+
swapInfo.token_to_min_amount = import_starknet9.uint256.bnToUint256(
|
|
16106
|
+
swap1Amount.multipliedBy(0).toWei()
|
|
16107
|
+
// placeholder
|
|
16061
16108
|
);
|
|
16062
16109
|
logger.verbose(
|
|
16063
16110
|
`${_EkuboCLVault.name}: harvest => swap1Amount: ${swap1Amount}`
|
|
16064
16111
|
);
|
|
16065
|
-
const remainingAmount = postFeeAmount.minus(swap1Amount);
|
|
16112
|
+
const remainingAmount = postFeeAmount.minus(swap1Amount).maximum(0);
|
|
16066
16113
|
logger.verbose(
|
|
16067
16114
|
`${_EkuboCLVault.name}: harvest => remainingAmount: ${remainingAmount}`
|
|
16068
16115
|
);
|
|
@@ -16102,7 +16149,12 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16102
16149
|
const _callsFinal = await this.rebalanceIter(
|
|
16103
16150
|
swapInfo,
|
|
16104
16151
|
acc,
|
|
16105
|
-
harvestEstimateCall
|
|
16152
|
+
harvestEstimateCall,
|
|
16153
|
+
claim.token.eq(poolKey.token0),
|
|
16154
|
+
0,
|
|
16155
|
+
0n,
|
|
16156
|
+
BigInt(postFeeAmount.toWei())
|
|
16157
|
+
// upper limit is the post fee amount
|
|
16106
16158
|
);
|
|
16107
16159
|
logger.verbose(
|
|
16108
16160
|
`${_EkuboCLVault.name}: harvest => _callsFinal: ${JSON.stringify(
|
|
@@ -16344,113 +16396,2154 @@ EkuboCLVaultStrategies.forEach((s) => {
|
|
|
16344
16396
|
];
|
|
16345
16397
|
});
|
|
16346
16398
|
|
|
16347
|
-
// src/
|
|
16348
|
-
var import_node_telegram_bot_api = __toESM(require("node-telegram-bot-api"));
|
|
16349
|
-
var TelegramNotif = class {
|
|
16350
|
-
constructor(token, shouldPoll) {
|
|
16351
|
-
this.subscribers = [
|
|
16352
|
-
// '6820228303',
|
|
16353
|
-
"1505578076",
|
|
16354
|
-
// '5434736198', // maaza
|
|
16355
|
-
"1356705582",
|
|
16356
|
-
// langs
|
|
16357
|
-
"1388729514",
|
|
16358
|
-
// hwashere
|
|
16359
|
-
"6020162572",
|
|
16360
|
-
//minato
|
|
16361
|
-
"985902592"
|
|
16362
|
-
];
|
|
16363
|
-
this.bot = new import_node_telegram_bot_api.default(token, { polling: shouldPoll });
|
|
16364
|
-
}
|
|
16365
|
-
// listen to start msgs, register chatId and send registered msg
|
|
16366
|
-
activateChatBot() {
|
|
16367
|
-
this.bot.on("message", (msg) => {
|
|
16368
|
-
const chatId = msg.chat.id;
|
|
16369
|
-
let text = msg.text.toLowerCase().trim();
|
|
16370
|
-
logger.verbose(`Tg: IncomingMsg: ID: ${chatId}, msg: ${text}`);
|
|
16371
|
-
if (text == "start") {
|
|
16372
|
-
this.bot.sendMessage(chatId, "Registered");
|
|
16373
|
-
this.subscribers.push(chatId);
|
|
16374
|
-
logger.verbose(`Tg: New subscriber: ${chatId}`);
|
|
16375
|
-
} else {
|
|
16376
|
-
this.bot.sendMessage(chatId, "Unrecognized command. Supported commands: start");
|
|
16377
|
-
}
|
|
16378
|
-
});
|
|
16379
|
-
}
|
|
16380
|
-
// send a given msg to all registered users
|
|
16381
|
-
sendMessage(msg) {
|
|
16382
|
-
logger.verbose(`Tg: Sending message: ${msg}`);
|
|
16383
|
-
for (let chatId of this.subscribers) {
|
|
16384
|
-
this.bot.sendMessage(chatId, msg).catch((err) => {
|
|
16385
|
-
logger.error(`Tg: Error sending msg to ${chatId}`);
|
|
16386
|
-
logger.error(`Tg: Error sending message: ${err.message}`);
|
|
16387
|
-
}).then(() => {
|
|
16388
|
-
logger.verbose(`Tg: Message sent to ${chatId}`);
|
|
16389
|
-
});
|
|
16390
|
-
}
|
|
16391
|
-
}
|
|
16392
|
-
};
|
|
16393
|
-
|
|
16394
|
-
// src/node/pricer-redis.ts
|
|
16395
|
-
var import_redis = require("redis");
|
|
16396
|
-
var PricerRedis = class extends Pricer {
|
|
16397
|
-
constructor(config, tokens2) {
|
|
16398
|
-
super(config, tokens2);
|
|
16399
|
-
this.redisClient = null;
|
|
16400
|
-
}
|
|
16401
|
-
/** Reads prices from Pricer._loadPrices and uses a callback to set prices in redis */
|
|
16402
|
-
async startWithRedis(redisUrl) {
|
|
16403
|
-
await this.initRedis(redisUrl);
|
|
16404
|
-
logger.info(`Starting Pricer with Redis`);
|
|
16405
|
-
this._loadPrices(this._setRedisPrices.bind(this));
|
|
16406
|
-
setInterval(() => {
|
|
16407
|
-
this._loadPrices(this._setRedisPrices.bind(this));
|
|
16408
|
-
}, 3e4);
|
|
16409
|
-
}
|
|
16410
|
-
async close() {
|
|
16411
|
-
if (this.redisClient) {
|
|
16412
|
-
await this.redisClient.disconnect();
|
|
16413
|
-
}
|
|
16414
|
-
}
|
|
16415
|
-
async initRedis(redisUrl) {
|
|
16416
|
-
logger.info(`Initialising Redis Client`);
|
|
16417
|
-
this.redisClient = await (0, import_redis.createClient)({
|
|
16418
|
-
url: redisUrl
|
|
16419
|
-
});
|
|
16420
|
-
this.redisClient.on("error", (err) => console.log("Redis Client Error", err)).connect();
|
|
16421
|
-
logger.info(`Redis Client Initialised`);
|
|
16422
|
-
}
|
|
16423
|
-
/** sets current local price in redis */
|
|
16424
|
-
_setRedisPrices(tokenSymbol) {
|
|
16425
|
-
if (!this.redisClient) {
|
|
16426
|
-
throw new FatalError(`Redis client not initialised`);
|
|
16427
|
-
}
|
|
16428
|
-
this.redisClient.set(`Price:${tokenSymbol}`, JSON.stringify(this.prices[tokenSymbol])).catch((err) => {
|
|
16429
|
-
logger.warn(`Error setting price in redis for ${tokenSymbol}`);
|
|
16430
|
-
});
|
|
16431
|
-
}
|
|
16432
|
-
/** Returns price from redis */
|
|
16433
|
-
async getPrice(tokenSymbol) {
|
|
16434
|
-
const STALE_TIME = 6e4;
|
|
16435
|
-
if (!this.redisClient) {
|
|
16436
|
-
throw new FatalError(`Redis client not initialised`);
|
|
16437
|
-
}
|
|
16438
|
-
const data = await this.redisClient.get(`Price:${tokenSymbol}`);
|
|
16439
|
-
if (!data) {
|
|
16440
|
-
throw new FatalError(`Redis:Price of ${tokenSymbol} not found`);
|
|
16441
|
-
}
|
|
16442
|
-
logger.verbose(`Redis:Price of ${tokenSymbol} is ${data}`);
|
|
16443
|
-
const priceInfo = JSON.parse(data);
|
|
16444
|
-
priceInfo.timestamp = new Date(priceInfo.timestamp);
|
|
16445
|
-
const isStale = (/* @__PURE__ */ new Date()).getTime() - priceInfo.timestamp.getTime() > STALE_TIME;
|
|
16446
|
-
Global.assert(!isStale, `Price of ${tokenSymbol} is stale`);
|
|
16447
|
-
return priceInfo;
|
|
16448
|
-
}
|
|
16449
|
-
};
|
|
16450
|
-
|
|
16451
|
-
// src/utils/store.ts
|
|
16452
|
-
var import_fs = __toESM(require("fs"));
|
|
16399
|
+
// src/strategies/sensei.ts
|
|
16453
16400
|
var import_starknet10 = require("starknet");
|
|
16401
|
+
|
|
16402
|
+
// src/data/sensei.abi.json
|
|
16403
|
+
var sensei_abi_default = [
|
|
16404
|
+
{
|
|
16405
|
+
type: "impl",
|
|
16406
|
+
name: "IStrategyCustomImpl",
|
|
16407
|
+
interface_name: "strkfarm::interfaces::ERC721Strategy::IStrategyCustom"
|
|
16408
|
+
},
|
|
16409
|
+
{
|
|
16410
|
+
type: "struct",
|
|
16411
|
+
name: "core::integer::u256",
|
|
16412
|
+
members: [
|
|
16413
|
+
{
|
|
16414
|
+
name: "low",
|
|
16415
|
+
type: "core::integer::u128"
|
|
16416
|
+
},
|
|
16417
|
+
{
|
|
16418
|
+
name: "high",
|
|
16419
|
+
type: "core::integer::u128"
|
|
16420
|
+
}
|
|
16421
|
+
]
|
|
16422
|
+
},
|
|
16423
|
+
{
|
|
16424
|
+
type: "struct",
|
|
16425
|
+
name: "strkfarm::interfaces::IEkuboDistributor::Claim",
|
|
16426
|
+
members: [
|
|
16427
|
+
{
|
|
16428
|
+
name: "id",
|
|
16429
|
+
type: "core::integer::u64"
|
|
16430
|
+
},
|
|
16431
|
+
{
|
|
16432
|
+
name: "claimee",
|
|
16433
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16434
|
+
},
|
|
16435
|
+
{
|
|
16436
|
+
name: "amount",
|
|
16437
|
+
type: "core::integer::u128"
|
|
16438
|
+
}
|
|
16439
|
+
]
|
|
16440
|
+
},
|
|
16441
|
+
{
|
|
16442
|
+
type: "struct",
|
|
16443
|
+
name: "core::array::Span::<core::felt252>",
|
|
16444
|
+
members: [
|
|
16445
|
+
{
|
|
16446
|
+
name: "snapshot",
|
|
16447
|
+
type: "@core::array::Array::<core::felt252>"
|
|
16448
|
+
}
|
|
16449
|
+
]
|
|
16450
|
+
},
|
|
16451
|
+
{
|
|
16452
|
+
type: "struct",
|
|
16453
|
+
name: "strkfarm::components::swap::Route",
|
|
16454
|
+
members: [
|
|
16455
|
+
{
|
|
16456
|
+
name: "token_from",
|
|
16457
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16458
|
+
},
|
|
16459
|
+
{
|
|
16460
|
+
name: "token_to",
|
|
16461
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16462
|
+
},
|
|
16463
|
+
{
|
|
16464
|
+
name: "exchange_address",
|
|
16465
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16466
|
+
},
|
|
16467
|
+
{
|
|
16468
|
+
name: "percent",
|
|
16469
|
+
type: "core::integer::u128"
|
|
16470
|
+
},
|
|
16471
|
+
{
|
|
16472
|
+
name: "additional_swap_params",
|
|
16473
|
+
type: "core::array::Array::<core::felt252>"
|
|
16474
|
+
}
|
|
16475
|
+
]
|
|
16476
|
+
},
|
|
16477
|
+
{
|
|
16478
|
+
type: "struct",
|
|
16479
|
+
name: "strkfarm::components::swap::AvnuMultiRouteSwap",
|
|
16480
|
+
members: [
|
|
16481
|
+
{
|
|
16482
|
+
name: "token_from_address",
|
|
16483
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16484
|
+
},
|
|
16485
|
+
{
|
|
16486
|
+
name: "token_from_amount",
|
|
16487
|
+
type: "core::integer::u256"
|
|
16488
|
+
},
|
|
16489
|
+
{
|
|
16490
|
+
name: "token_to_address",
|
|
16491
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16492
|
+
},
|
|
16493
|
+
{
|
|
16494
|
+
name: "token_to_amount",
|
|
16495
|
+
type: "core::integer::u256"
|
|
16496
|
+
},
|
|
16497
|
+
{
|
|
16498
|
+
name: "token_to_min_amount",
|
|
16499
|
+
type: "core::integer::u256"
|
|
16500
|
+
},
|
|
16501
|
+
{
|
|
16502
|
+
name: "beneficiary",
|
|
16503
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16504
|
+
},
|
|
16505
|
+
{
|
|
16506
|
+
name: "integrator_fee_amount_bps",
|
|
16507
|
+
type: "core::integer::u128"
|
|
16508
|
+
},
|
|
16509
|
+
{
|
|
16510
|
+
name: "integrator_fee_recipient",
|
|
16511
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16512
|
+
},
|
|
16513
|
+
{
|
|
16514
|
+
name: "routes",
|
|
16515
|
+
type: "core::array::Array::<strkfarm::components::swap::Route>"
|
|
16516
|
+
}
|
|
16517
|
+
]
|
|
16518
|
+
},
|
|
16519
|
+
{
|
|
16520
|
+
type: "struct",
|
|
16521
|
+
name: "strkfarm::interfaces::ERC721Strategy::Position",
|
|
16522
|
+
members: [
|
|
16523
|
+
{
|
|
16524
|
+
name: "acc1_supply_shares",
|
|
16525
|
+
type: "core::integer::u256"
|
|
16526
|
+
},
|
|
16527
|
+
{
|
|
16528
|
+
name: "acc1_borrow_shares",
|
|
16529
|
+
type: "core::integer::u256"
|
|
16530
|
+
},
|
|
16531
|
+
{
|
|
16532
|
+
name: "acc2_supply_shares",
|
|
16533
|
+
type: "core::integer::u256"
|
|
16534
|
+
},
|
|
16535
|
+
{
|
|
16536
|
+
name: "acc2_borrow_shares",
|
|
16537
|
+
type: "core::integer::u256"
|
|
16538
|
+
}
|
|
16539
|
+
]
|
|
16540
|
+
},
|
|
16541
|
+
{
|
|
16542
|
+
type: "enum",
|
|
16543
|
+
name: "core::bool",
|
|
16544
|
+
variants: [
|
|
16545
|
+
{
|
|
16546
|
+
name: "False",
|
|
16547
|
+
type: "()"
|
|
16548
|
+
},
|
|
16549
|
+
{
|
|
16550
|
+
name: "True",
|
|
16551
|
+
type: "()"
|
|
16552
|
+
}
|
|
16553
|
+
]
|
|
16554
|
+
},
|
|
16555
|
+
{
|
|
16556
|
+
type: "struct",
|
|
16557
|
+
name: "strkfarm::interfaces::ERC721Strategy::PositionDescription",
|
|
16558
|
+
members: [
|
|
16559
|
+
{
|
|
16560
|
+
name: "estimated_size",
|
|
16561
|
+
type: "core::integer::u256"
|
|
16562
|
+
},
|
|
16563
|
+
{
|
|
16564
|
+
name: "deposit1",
|
|
16565
|
+
type: "core::integer::u256"
|
|
16566
|
+
},
|
|
16567
|
+
{
|
|
16568
|
+
name: "borrow1",
|
|
16569
|
+
type: "core::integer::u256"
|
|
16570
|
+
},
|
|
16571
|
+
{
|
|
16572
|
+
name: "deposit2",
|
|
16573
|
+
type: "core::integer::u256"
|
|
16574
|
+
},
|
|
16575
|
+
{
|
|
16576
|
+
name: "borrow2",
|
|
16577
|
+
type: "core::integer::u256"
|
|
16578
|
+
}
|
|
16579
|
+
]
|
|
16580
|
+
},
|
|
16581
|
+
{
|
|
16582
|
+
type: "struct",
|
|
16583
|
+
name: "strkfarm::interfaces::oracle::IPriceOracleDispatcher",
|
|
16584
|
+
members: [
|
|
16585
|
+
{
|
|
16586
|
+
name: "contract_address",
|
|
16587
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16588
|
+
}
|
|
16589
|
+
]
|
|
16590
|
+
},
|
|
16591
|
+
{
|
|
16592
|
+
type: "struct",
|
|
16593
|
+
name: "ekubo::interfaces::core::ICoreDispatcher",
|
|
16594
|
+
members: [
|
|
16595
|
+
{
|
|
16596
|
+
name: "contract_address",
|
|
16597
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16598
|
+
}
|
|
16599
|
+
]
|
|
16600
|
+
},
|
|
16601
|
+
{
|
|
16602
|
+
type: "struct",
|
|
16603
|
+
name: "strkfarm::components::ekuboSwap::IRouterDispatcher",
|
|
16604
|
+
members: [
|
|
16605
|
+
{
|
|
16606
|
+
name: "contract_address",
|
|
16607
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16608
|
+
}
|
|
16609
|
+
]
|
|
16610
|
+
},
|
|
16611
|
+
{
|
|
16612
|
+
type: "struct",
|
|
16613
|
+
name: "strkfarm::components::ekuboSwap::EkuboSwapStruct",
|
|
16614
|
+
members: [
|
|
16615
|
+
{
|
|
16616
|
+
name: "core",
|
|
16617
|
+
type: "ekubo::interfaces::core::ICoreDispatcher"
|
|
16618
|
+
},
|
|
16619
|
+
{
|
|
16620
|
+
name: "router",
|
|
16621
|
+
type: "strkfarm::components::ekuboSwap::IRouterDispatcher"
|
|
16622
|
+
}
|
|
16623
|
+
]
|
|
16624
|
+
},
|
|
16625
|
+
{
|
|
16626
|
+
type: "struct",
|
|
16627
|
+
name: "ekubo::types::keys::PoolKey",
|
|
16628
|
+
members: [
|
|
16629
|
+
{
|
|
16630
|
+
name: "token0",
|
|
16631
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16632
|
+
},
|
|
16633
|
+
{
|
|
16634
|
+
name: "token1",
|
|
16635
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16636
|
+
},
|
|
16637
|
+
{
|
|
16638
|
+
name: "fee",
|
|
16639
|
+
type: "core::integer::u128"
|
|
16640
|
+
},
|
|
16641
|
+
{
|
|
16642
|
+
name: "tick_spacing",
|
|
16643
|
+
type: "core::integer::u128"
|
|
16644
|
+
},
|
|
16645
|
+
{
|
|
16646
|
+
name: "extension",
|
|
16647
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16648
|
+
}
|
|
16649
|
+
]
|
|
16650
|
+
},
|
|
16651
|
+
{
|
|
16652
|
+
type: "struct",
|
|
16653
|
+
name: "ekubo::interfaces::router::RouteNode",
|
|
16654
|
+
members: [
|
|
16655
|
+
{
|
|
16656
|
+
name: "pool_key",
|
|
16657
|
+
type: "ekubo::types::keys::PoolKey"
|
|
16658
|
+
},
|
|
16659
|
+
{
|
|
16660
|
+
name: "sqrt_ratio_limit",
|
|
16661
|
+
type: "core::integer::u256"
|
|
16662
|
+
},
|
|
16663
|
+
{
|
|
16664
|
+
name: "skip_ahead",
|
|
16665
|
+
type: "core::integer::u128"
|
|
16666
|
+
}
|
|
16667
|
+
]
|
|
16668
|
+
},
|
|
16669
|
+
{
|
|
16670
|
+
type: "struct",
|
|
16671
|
+
name: "strkfarm::interfaces::ERC721Strategy::Settings",
|
|
16672
|
+
members: [
|
|
16673
|
+
{
|
|
16674
|
+
name: "base_fee_percent",
|
|
16675
|
+
type: "core::integer::u128"
|
|
16676
|
+
},
|
|
16677
|
+
{
|
|
16678
|
+
name: "reward_fee_percent",
|
|
16679
|
+
type: "core::integer::u128"
|
|
16680
|
+
},
|
|
16681
|
+
{
|
|
16682
|
+
name: "fee_receiver",
|
|
16683
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16684
|
+
},
|
|
16685
|
+
{
|
|
16686
|
+
name: "min_health_factor",
|
|
16687
|
+
type: "core::integer::u32"
|
|
16688
|
+
},
|
|
16689
|
+
{
|
|
16690
|
+
name: "target_health_factor",
|
|
16691
|
+
type: "core::integer::u32"
|
|
16692
|
+
},
|
|
16693
|
+
{
|
|
16694
|
+
name: "coefs_sum1",
|
|
16695
|
+
type: "core::integer::u128"
|
|
16696
|
+
},
|
|
16697
|
+
{
|
|
16698
|
+
name: "coefs_sum2",
|
|
16699
|
+
type: "core::integer::u128"
|
|
16700
|
+
},
|
|
16701
|
+
{
|
|
16702
|
+
name: "oracle",
|
|
16703
|
+
type: "strkfarm::interfaces::oracle::IPriceOracleDispatcher"
|
|
16704
|
+
},
|
|
16705
|
+
{
|
|
16706
|
+
name: "ekubo_swap",
|
|
16707
|
+
type: "strkfarm::components::ekuboSwap::EkuboSwapStruct"
|
|
16708
|
+
},
|
|
16709
|
+
{
|
|
16710
|
+
name: "swap_routes1",
|
|
16711
|
+
type: "core::array::Array::<ekubo::interfaces::router::RouteNode>"
|
|
16712
|
+
},
|
|
16713
|
+
{
|
|
16714
|
+
name: "swap_routes2",
|
|
16715
|
+
type: "core::array::Array::<ekubo::interfaces::router::RouteNode>"
|
|
16716
|
+
},
|
|
16717
|
+
{
|
|
16718
|
+
name: "additional_shares_action_id",
|
|
16719
|
+
type: "core::integer::u8"
|
|
16720
|
+
}
|
|
16721
|
+
]
|
|
16722
|
+
},
|
|
16723
|
+
{
|
|
16724
|
+
type: "interface",
|
|
16725
|
+
name: "strkfarm::interfaces::ERC721Strategy::IStrategyCustom",
|
|
16726
|
+
items: [
|
|
16727
|
+
{
|
|
16728
|
+
type: "function",
|
|
16729
|
+
name: "deposit",
|
|
16730
|
+
inputs: [
|
|
16731
|
+
{
|
|
16732
|
+
name: "amount",
|
|
16733
|
+
type: "core::integer::u256"
|
|
16734
|
+
},
|
|
16735
|
+
{
|
|
16736
|
+
name: "receiver",
|
|
16737
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16738
|
+
}
|
|
16739
|
+
],
|
|
16740
|
+
outputs: [
|
|
16741
|
+
{
|
|
16742
|
+
type: "core::integer::u256"
|
|
16743
|
+
}
|
|
16744
|
+
],
|
|
16745
|
+
state_mutability: "external"
|
|
16746
|
+
},
|
|
16747
|
+
{
|
|
16748
|
+
type: "function",
|
|
16749
|
+
name: "health_factors",
|
|
16750
|
+
inputs: [],
|
|
16751
|
+
outputs: [
|
|
16752
|
+
{
|
|
16753
|
+
type: "(core::integer::u32, core::integer::u32)"
|
|
16754
|
+
}
|
|
16755
|
+
],
|
|
16756
|
+
state_mutability: "view"
|
|
16757
|
+
},
|
|
16758
|
+
{
|
|
16759
|
+
type: "function",
|
|
16760
|
+
name: "harvest",
|
|
16761
|
+
inputs: [
|
|
16762
|
+
{
|
|
16763
|
+
name: "protocol1_rewards_contract",
|
|
16764
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16765
|
+
},
|
|
16766
|
+
{
|
|
16767
|
+
name: "claim1",
|
|
16768
|
+
type: "strkfarm::interfaces::IEkuboDistributor::Claim"
|
|
16769
|
+
},
|
|
16770
|
+
{
|
|
16771
|
+
name: "proof1",
|
|
16772
|
+
type: "core::array::Span::<core::felt252>"
|
|
16773
|
+
},
|
|
16774
|
+
{
|
|
16775
|
+
name: "protocol2_rewards_contract",
|
|
16776
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16777
|
+
},
|
|
16778
|
+
{
|
|
16779
|
+
name: "claim2",
|
|
16780
|
+
type: "strkfarm::interfaces::IEkuboDistributor::Claim"
|
|
16781
|
+
},
|
|
16782
|
+
{
|
|
16783
|
+
name: "proof2",
|
|
16784
|
+
type: "core::array::Span::<core::felt252>"
|
|
16785
|
+
},
|
|
16786
|
+
{
|
|
16787
|
+
name: "swapInfo",
|
|
16788
|
+
type: "strkfarm::components::swap::AvnuMultiRouteSwap"
|
|
16789
|
+
}
|
|
16790
|
+
],
|
|
16791
|
+
outputs: [],
|
|
16792
|
+
state_mutability: "external"
|
|
16793
|
+
},
|
|
16794
|
+
{
|
|
16795
|
+
type: "function",
|
|
16796
|
+
name: "withdraw",
|
|
16797
|
+
inputs: [
|
|
16798
|
+
{
|
|
16799
|
+
name: "amount",
|
|
16800
|
+
type: "core::integer::u256"
|
|
16801
|
+
},
|
|
16802
|
+
{
|
|
16803
|
+
name: "receiver",
|
|
16804
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16805
|
+
},
|
|
16806
|
+
{
|
|
16807
|
+
name: "max_slippage_bps",
|
|
16808
|
+
type: "core::integer::u32"
|
|
16809
|
+
}
|
|
16810
|
+
],
|
|
16811
|
+
outputs: [],
|
|
16812
|
+
state_mutability: "external"
|
|
16813
|
+
},
|
|
16814
|
+
{
|
|
16815
|
+
type: "function",
|
|
16816
|
+
name: "get_all_shares",
|
|
16817
|
+
inputs: [],
|
|
16818
|
+
outputs: [
|
|
16819
|
+
{
|
|
16820
|
+
type: "strkfarm::interfaces::ERC721Strategy::Position"
|
|
16821
|
+
}
|
|
16822
|
+
],
|
|
16823
|
+
state_mutability: "view"
|
|
16824
|
+
},
|
|
16825
|
+
{
|
|
16826
|
+
type: "function",
|
|
16827
|
+
name: "rebalance",
|
|
16828
|
+
inputs: [
|
|
16829
|
+
{
|
|
16830
|
+
name: "amount",
|
|
16831
|
+
type: "core::integer::u256"
|
|
16832
|
+
},
|
|
16833
|
+
{
|
|
16834
|
+
name: "shouldRepay",
|
|
16835
|
+
type: "core::bool"
|
|
16836
|
+
}
|
|
16837
|
+
],
|
|
16838
|
+
outputs: [],
|
|
16839
|
+
state_mutability: "external"
|
|
16840
|
+
},
|
|
16841
|
+
{
|
|
16842
|
+
type: "function",
|
|
16843
|
+
name: "describe_position",
|
|
16844
|
+
inputs: [
|
|
16845
|
+
{
|
|
16846
|
+
name: "token_id",
|
|
16847
|
+
type: "core::felt252"
|
|
16848
|
+
}
|
|
16849
|
+
],
|
|
16850
|
+
outputs: [
|
|
16851
|
+
{
|
|
16852
|
+
type: "(strkfarm::interfaces::ERC721Strategy::Position, strkfarm::interfaces::ERC721Strategy::PositionDescription)"
|
|
16853
|
+
}
|
|
16854
|
+
],
|
|
16855
|
+
state_mutability: "view"
|
|
16856
|
+
},
|
|
16857
|
+
{
|
|
16858
|
+
type: "function",
|
|
16859
|
+
name: "set_settings",
|
|
16860
|
+
inputs: [
|
|
16861
|
+
{
|
|
16862
|
+
name: "settings",
|
|
16863
|
+
type: "strkfarm::interfaces::ERC721Strategy::Settings"
|
|
16864
|
+
}
|
|
16865
|
+
],
|
|
16866
|
+
outputs: [],
|
|
16867
|
+
state_mutability: "external"
|
|
16868
|
+
},
|
|
16869
|
+
{
|
|
16870
|
+
type: "function",
|
|
16871
|
+
name: "initialize",
|
|
16872
|
+
inputs: [],
|
|
16873
|
+
outputs: [],
|
|
16874
|
+
state_mutability: "external"
|
|
16875
|
+
}
|
|
16876
|
+
]
|
|
16877
|
+
},
|
|
16878
|
+
{
|
|
16879
|
+
type: "impl",
|
|
16880
|
+
name: "MMSettingsImpl",
|
|
16881
|
+
interface_name: "strkfarm::strats::dnmm_vesu::DeltaNeutralLoopingVesuXSTRK::IMMSettings"
|
|
16882
|
+
},
|
|
16883
|
+
{
|
|
16884
|
+
type: "struct",
|
|
16885
|
+
name: "strkfarm::components::endur::EndurSettings",
|
|
16886
|
+
members: [
|
|
16887
|
+
{
|
|
16888
|
+
name: "lst",
|
|
16889
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16890
|
+
}
|
|
16891
|
+
]
|
|
16892
|
+
},
|
|
16893
|
+
{
|
|
16894
|
+
type: "struct",
|
|
16895
|
+
name: "strkfarm::interfaces::IVesu::IStonDispatcher",
|
|
16896
|
+
members: [
|
|
16897
|
+
{
|
|
16898
|
+
name: "contract_address",
|
|
16899
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16900
|
+
}
|
|
16901
|
+
]
|
|
16902
|
+
},
|
|
16903
|
+
{
|
|
16904
|
+
type: "struct",
|
|
16905
|
+
name: "strkfarm::components::vesu::vesuStruct",
|
|
16906
|
+
members: [
|
|
16907
|
+
{
|
|
16908
|
+
name: "singleton",
|
|
16909
|
+
type: "strkfarm::interfaces::IVesu::IStonDispatcher"
|
|
16910
|
+
},
|
|
16911
|
+
{
|
|
16912
|
+
name: "pool_id",
|
|
16913
|
+
type: "core::felt252"
|
|
16914
|
+
},
|
|
16915
|
+
{
|
|
16916
|
+
name: "debt",
|
|
16917
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16918
|
+
},
|
|
16919
|
+
{
|
|
16920
|
+
name: "col",
|
|
16921
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16922
|
+
},
|
|
16923
|
+
{
|
|
16924
|
+
name: "oracle",
|
|
16925
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16926
|
+
}
|
|
16927
|
+
]
|
|
16928
|
+
},
|
|
16929
|
+
{
|
|
16930
|
+
type: "interface",
|
|
16931
|
+
name: "strkfarm::strats::dnmm_vesu::DeltaNeutralLoopingVesuXSTRK::IMMSettings",
|
|
16932
|
+
items: [
|
|
16933
|
+
{
|
|
16934
|
+
type: "function",
|
|
16935
|
+
name: "set_mm_settings",
|
|
16936
|
+
inputs: [
|
|
16937
|
+
{
|
|
16938
|
+
name: "lend_settings1",
|
|
16939
|
+
type: "strkfarm::components::endur::EndurSettings"
|
|
16940
|
+
},
|
|
16941
|
+
{
|
|
16942
|
+
name: "lend_settings2",
|
|
16943
|
+
type: "strkfarm::components::vesu::vesuStruct"
|
|
16944
|
+
}
|
|
16945
|
+
],
|
|
16946
|
+
outputs: [],
|
|
16947
|
+
state_mutability: "external"
|
|
16948
|
+
}
|
|
16949
|
+
]
|
|
16950
|
+
},
|
|
16951
|
+
{
|
|
16952
|
+
type: "impl",
|
|
16953
|
+
name: "DNMMImpl",
|
|
16954
|
+
interface_name: "strkfarm::interfaces::ERC721Strategy::IStrategy"
|
|
16955
|
+
},
|
|
16956
|
+
{
|
|
16957
|
+
type: "struct",
|
|
16958
|
+
name: "strkfarm::interfaces::ERC721Strategy::StrategyConfig",
|
|
16959
|
+
members: [
|
|
16960
|
+
{
|
|
16961
|
+
name: "main_token",
|
|
16962
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16963
|
+
},
|
|
16964
|
+
{
|
|
16965
|
+
name: "main_offset",
|
|
16966
|
+
type: "core::integer::u128"
|
|
16967
|
+
},
|
|
16968
|
+
{
|
|
16969
|
+
name: "secondary_token",
|
|
16970
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
16971
|
+
},
|
|
16972
|
+
{
|
|
16973
|
+
name: "secondary_offset",
|
|
16974
|
+
type: "core::integer::u128"
|
|
16975
|
+
}
|
|
16976
|
+
]
|
|
16977
|
+
},
|
|
16978
|
+
{
|
|
16979
|
+
type: "interface",
|
|
16980
|
+
name: "strkfarm::interfaces::ERC721Strategy::IStrategy",
|
|
16981
|
+
items: [
|
|
16982
|
+
{
|
|
16983
|
+
type: "function",
|
|
16984
|
+
name: "config",
|
|
16985
|
+
inputs: [],
|
|
16986
|
+
outputs: [
|
|
16987
|
+
{
|
|
16988
|
+
type: "strkfarm::interfaces::ERC721Strategy::StrategyConfig"
|
|
16989
|
+
}
|
|
16990
|
+
],
|
|
16991
|
+
state_mutability: "view"
|
|
16992
|
+
},
|
|
16993
|
+
{
|
|
16994
|
+
type: "function",
|
|
16995
|
+
name: "get_settings",
|
|
16996
|
+
inputs: [],
|
|
16997
|
+
outputs: [
|
|
16998
|
+
{
|
|
16999
|
+
type: "strkfarm::interfaces::ERC721Strategy::Settings"
|
|
17000
|
+
}
|
|
17001
|
+
],
|
|
17002
|
+
state_mutability: "view"
|
|
17003
|
+
}
|
|
17004
|
+
]
|
|
17005
|
+
},
|
|
17006
|
+
{
|
|
17007
|
+
type: "impl",
|
|
17008
|
+
name: "EkuboLockedImpl",
|
|
17009
|
+
interface_name: "ekubo::interfaces::core::ILocker"
|
|
17010
|
+
},
|
|
17011
|
+
{
|
|
17012
|
+
type: "interface",
|
|
17013
|
+
name: "ekubo::interfaces::core::ILocker",
|
|
17014
|
+
items: [
|
|
17015
|
+
{
|
|
17016
|
+
type: "function",
|
|
17017
|
+
name: "locked",
|
|
17018
|
+
inputs: [
|
|
17019
|
+
{
|
|
17020
|
+
name: "id",
|
|
17021
|
+
type: "core::integer::u32"
|
|
17022
|
+
},
|
|
17023
|
+
{
|
|
17024
|
+
name: "data",
|
|
17025
|
+
type: "core::array::Span::<core::felt252>"
|
|
17026
|
+
}
|
|
17027
|
+
],
|
|
17028
|
+
outputs: [
|
|
17029
|
+
{
|
|
17030
|
+
type: "core::array::Span::<core::felt252>"
|
|
17031
|
+
}
|
|
17032
|
+
],
|
|
17033
|
+
state_mutability: "external"
|
|
17034
|
+
}
|
|
17035
|
+
]
|
|
17036
|
+
},
|
|
17037
|
+
{
|
|
17038
|
+
type: "impl",
|
|
17039
|
+
name: "ERC721MixinImpl",
|
|
17040
|
+
interface_name: "openzeppelin_token::erc721::interface::ERC721ABI"
|
|
17041
|
+
},
|
|
17042
|
+
{
|
|
17043
|
+
type: "struct",
|
|
17044
|
+
name: "core::byte_array::ByteArray",
|
|
17045
|
+
members: [
|
|
17046
|
+
{
|
|
17047
|
+
name: "data",
|
|
17048
|
+
type: "core::array::Array::<core::bytes_31::bytes31>"
|
|
17049
|
+
},
|
|
17050
|
+
{
|
|
17051
|
+
name: "pending_word",
|
|
17052
|
+
type: "core::felt252"
|
|
17053
|
+
},
|
|
17054
|
+
{
|
|
17055
|
+
name: "pending_word_len",
|
|
17056
|
+
type: "core::integer::u32"
|
|
17057
|
+
}
|
|
17058
|
+
]
|
|
17059
|
+
},
|
|
17060
|
+
{
|
|
17061
|
+
type: "interface",
|
|
17062
|
+
name: "openzeppelin_token::erc721::interface::ERC721ABI",
|
|
17063
|
+
items: [
|
|
17064
|
+
{
|
|
17065
|
+
type: "function",
|
|
17066
|
+
name: "balance_of",
|
|
17067
|
+
inputs: [
|
|
17068
|
+
{
|
|
17069
|
+
name: "account",
|
|
17070
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17071
|
+
}
|
|
17072
|
+
],
|
|
17073
|
+
outputs: [
|
|
17074
|
+
{
|
|
17075
|
+
type: "core::integer::u256"
|
|
17076
|
+
}
|
|
17077
|
+
],
|
|
17078
|
+
state_mutability: "view"
|
|
17079
|
+
},
|
|
17080
|
+
{
|
|
17081
|
+
type: "function",
|
|
17082
|
+
name: "owner_of",
|
|
17083
|
+
inputs: [
|
|
17084
|
+
{
|
|
17085
|
+
name: "token_id",
|
|
17086
|
+
type: "core::integer::u256"
|
|
17087
|
+
}
|
|
17088
|
+
],
|
|
17089
|
+
outputs: [
|
|
17090
|
+
{
|
|
17091
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17092
|
+
}
|
|
17093
|
+
],
|
|
17094
|
+
state_mutability: "view"
|
|
17095
|
+
},
|
|
17096
|
+
{
|
|
17097
|
+
type: "function",
|
|
17098
|
+
name: "safe_transfer_from",
|
|
17099
|
+
inputs: [
|
|
17100
|
+
{
|
|
17101
|
+
name: "from",
|
|
17102
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17103
|
+
},
|
|
17104
|
+
{
|
|
17105
|
+
name: "to",
|
|
17106
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17107
|
+
},
|
|
17108
|
+
{
|
|
17109
|
+
name: "token_id",
|
|
17110
|
+
type: "core::integer::u256"
|
|
17111
|
+
},
|
|
17112
|
+
{
|
|
17113
|
+
name: "data",
|
|
17114
|
+
type: "core::array::Span::<core::felt252>"
|
|
17115
|
+
}
|
|
17116
|
+
],
|
|
17117
|
+
outputs: [],
|
|
17118
|
+
state_mutability: "external"
|
|
17119
|
+
},
|
|
17120
|
+
{
|
|
17121
|
+
type: "function",
|
|
17122
|
+
name: "transfer_from",
|
|
17123
|
+
inputs: [
|
|
17124
|
+
{
|
|
17125
|
+
name: "from",
|
|
17126
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17127
|
+
},
|
|
17128
|
+
{
|
|
17129
|
+
name: "to",
|
|
17130
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17131
|
+
},
|
|
17132
|
+
{
|
|
17133
|
+
name: "token_id",
|
|
17134
|
+
type: "core::integer::u256"
|
|
17135
|
+
}
|
|
17136
|
+
],
|
|
17137
|
+
outputs: [],
|
|
17138
|
+
state_mutability: "external"
|
|
17139
|
+
},
|
|
17140
|
+
{
|
|
17141
|
+
type: "function",
|
|
17142
|
+
name: "approve",
|
|
17143
|
+
inputs: [
|
|
17144
|
+
{
|
|
17145
|
+
name: "to",
|
|
17146
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17147
|
+
},
|
|
17148
|
+
{
|
|
17149
|
+
name: "token_id",
|
|
17150
|
+
type: "core::integer::u256"
|
|
17151
|
+
}
|
|
17152
|
+
],
|
|
17153
|
+
outputs: [],
|
|
17154
|
+
state_mutability: "external"
|
|
17155
|
+
},
|
|
17156
|
+
{
|
|
17157
|
+
type: "function",
|
|
17158
|
+
name: "set_approval_for_all",
|
|
17159
|
+
inputs: [
|
|
17160
|
+
{
|
|
17161
|
+
name: "operator",
|
|
17162
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17163
|
+
},
|
|
17164
|
+
{
|
|
17165
|
+
name: "approved",
|
|
17166
|
+
type: "core::bool"
|
|
17167
|
+
}
|
|
17168
|
+
],
|
|
17169
|
+
outputs: [],
|
|
17170
|
+
state_mutability: "external"
|
|
17171
|
+
},
|
|
17172
|
+
{
|
|
17173
|
+
type: "function",
|
|
17174
|
+
name: "get_approved",
|
|
17175
|
+
inputs: [
|
|
17176
|
+
{
|
|
17177
|
+
name: "token_id",
|
|
17178
|
+
type: "core::integer::u256"
|
|
17179
|
+
}
|
|
17180
|
+
],
|
|
17181
|
+
outputs: [
|
|
17182
|
+
{
|
|
17183
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17184
|
+
}
|
|
17185
|
+
],
|
|
17186
|
+
state_mutability: "view"
|
|
17187
|
+
},
|
|
17188
|
+
{
|
|
17189
|
+
type: "function",
|
|
17190
|
+
name: "is_approved_for_all",
|
|
17191
|
+
inputs: [
|
|
17192
|
+
{
|
|
17193
|
+
name: "owner",
|
|
17194
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17195
|
+
},
|
|
17196
|
+
{
|
|
17197
|
+
name: "operator",
|
|
17198
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17199
|
+
}
|
|
17200
|
+
],
|
|
17201
|
+
outputs: [
|
|
17202
|
+
{
|
|
17203
|
+
type: "core::bool"
|
|
17204
|
+
}
|
|
17205
|
+
],
|
|
17206
|
+
state_mutability: "view"
|
|
17207
|
+
},
|
|
17208
|
+
{
|
|
17209
|
+
type: "function",
|
|
17210
|
+
name: "supports_interface",
|
|
17211
|
+
inputs: [
|
|
17212
|
+
{
|
|
17213
|
+
name: "interface_id",
|
|
17214
|
+
type: "core::felt252"
|
|
17215
|
+
}
|
|
17216
|
+
],
|
|
17217
|
+
outputs: [
|
|
17218
|
+
{
|
|
17219
|
+
type: "core::bool"
|
|
17220
|
+
}
|
|
17221
|
+
],
|
|
17222
|
+
state_mutability: "view"
|
|
17223
|
+
},
|
|
17224
|
+
{
|
|
17225
|
+
type: "function",
|
|
17226
|
+
name: "name",
|
|
17227
|
+
inputs: [],
|
|
17228
|
+
outputs: [
|
|
17229
|
+
{
|
|
17230
|
+
type: "core::byte_array::ByteArray"
|
|
17231
|
+
}
|
|
17232
|
+
],
|
|
17233
|
+
state_mutability: "view"
|
|
17234
|
+
},
|
|
17235
|
+
{
|
|
17236
|
+
type: "function",
|
|
17237
|
+
name: "symbol",
|
|
17238
|
+
inputs: [],
|
|
17239
|
+
outputs: [
|
|
17240
|
+
{
|
|
17241
|
+
type: "core::byte_array::ByteArray"
|
|
17242
|
+
}
|
|
17243
|
+
],
|
|
17244
|
+
state_mutability: "view"
|
|
17245
|
+
},
|
|
17246
|
+
{
|
|
17247
|
+
type: "function",
|
|
17248
|
+
name: "token_uri",
|
|
17249
|
+
inputs: [
|
|
17250
|
+
{
|
|
17251
|
+
name: "token_id",
|
|
17252
|
+
type: "core::integer::u256"
|
|
17253
|
+
}
|
|
17254
|
+
],
|
|
17255
|
+
outputs: [
|
|
17256
|
+
{
|
|
17257
|
+
type: "core::byte_array::ByteArray"
|
|
17258
|
+
}
|
|
17259
|
+
],
|
|
17260
|
+
state_mutability: "view"
|
|
17261
|
+
},
|
|
17262
|
+
{
|
|
17263
|
+
type: "function",
|
|
17264
|
+
name: "balanceOf",
|
|
17265
|
+
inputs: [
|
|
17266
|
+
{
|
|
17267
|
+
name: "account",
|
|
17268
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17269
|
+
}
|
|
17270
|
+
],
|
|
17271
|
+
outputs: [
|
|
17272
|
+
{
|
|
17273
|
+
type: "core::integer::u256"
|
|
17274
|
+
}
|
|
17275
|
+
],
|
|
17276
|
+
state_mutability: "view"
|
|
17277
|
+
},
|
|
17278
|
+
{
|
|
17279
|
+
type: "function",
|
|
17280
|
+
name: "ownerOf",
|
|
17281
|
+
inputs: [
|
|
17282
|
+
{
|
|
17283
|
+
name: "tokenId",
|
|
17284
|
+
type: "core::integer::u256"
|
|
17285
|
+
}
|
|
17286
|
+
],
|
|
17287
|
+
outputs: [
|
|
17288
|
+
{
|
|
17289
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17290
|
+
}
|
|
17291
|
+
],
|
|
17292
|
+
state_mutability: "view"
|
|
17293
|
+
},
|
|
17294
|
+
{
|
|
17295
|
+
type: "function",
|
|
17296
|
+
name: "safeTransferFrom",
|
|
17297
|
+
inputs: [
|
|
17298
|
+
{
|
|
17299
|
+
name: "from",
|
|
17300
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17301
|
+
},
|
|
17302
|
+
{
|
|
17303
|
+
name: "to",
|
|
17304
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17305
|
+
},
|
|
17306
|
+
{
|
|
17307
|
+
name: "tokenId",
|
|
17308
|
+
type: "core::integer::u256"
|
|
17309
|
+
},
|
|
17310
|
+
{
|
|
17311
|
+
name: "data",
|
|
17312
|
+
type: "core::array::Span::<core::felt252>"
|
|
17313
|
+
}
|
|
17314
|
+
],
|
|
17315
|
+
outputs: [],
|
|
17316
|
+
state_mutability: "external"
|
|
17317
|
+
},
|
|
17318
|
+
{
|
|
17319
|
+
type: "function",
|
|
17320
|
+
name: "transferFrom",
|
|
17321
|
+
inputs: [
|
|
17322
|
+
{
|
|
17323
|
+
name: "from",
|
|
17324
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17325
|
+
},
|
|
17326
|
+
{
|
|
17327
|
+
name: "to",
|
|
17328
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17329
|
+
},
|
|
17330
|
+
{
|
|
17331
|
+
name: "tokenId",
|
|
17332
|
+
type: "core::integer::u256"
|
|
17333
|
+
}
|
|
17334
|
+
],
|
|
17335
|
+
outputs: [],
|
|
17336
|
+
state_mutability: "external"
|
|
17337
|
+
},
|
|
17338
|
+
{
|
|
17339
|
+
type: "function",
|
|
17340
|
+
name: "setApprovalForAll",
|
|
17341
|
+
inputs: [
|
|
17342
|
+
{
|
|
17343
|
+
name: "operator",
|
|
17344
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17345
|
+
},
|
|
17346
|
+
{
|
|
17347
|
+
name: "approved",
|
|
17348
|
+
type: "core::bool"
|
|
17349
|
+
}
|
|
17350
|
+
],
|
|
17351
|
+
outputs: [],
|
|
17352
|
+
state_mutability: "external"
|
|
17353
|
+
},
|
|
17354
|
+
{
|
|
17355
|
+
type: "function",
|
|
17356
|
+
name: "getApproved",
|
|
17357
|
+
inputs: [
|
|
17358
|
+
{
|
|
17359
|
+
name: "tokenId",
|
|
17360
|
+
type: "core::integer::u256"
|
|
17361
|
+
}
|
|
17362
|
+
],
|
|
17363
|
+
outputs: [
|
|
17364
|
+
{
|
|
17365
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17366
|
+
}
|
|
17367
|
+
],
|
|
17368
|
+
state_mutability: "view"
|
|
17369
|
+
},
|
|
17370
|
+
{
|
|
17371
|
+
type: "function",
|
|
17372
|
+
name: "isApprovedForAll",
|
|
17373
|
+
inputs: [
|
|
17374
|
+
{
|
|
17375
|
+
name: "owner",
|
|
17376
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17377
|
+
},
|
|
17378
|
+
{
|
|
17379
|
+
name: "operator",
|
|
17380
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17381
|
+
}
|
|
17382
|
+
],
|
|
17383
|
+
outputs: [
|
|
17384
|
+
{
|
|
17385
|
+
type: "core::bool"
|
|
17386
|
+
}
|
|
17387
|
+
],
|
|
17388
|
+
state_mutability: "view"
|
|
17389
|
+
},
|
|
17390
|
+
{
|
|
17391
|
+
type: "function",
|
|
17392
|
+
name: "tokenURI",
|
|
17393
|
+
inputs: [
|
|
17394
|
+
{
|
|
17395
|
+
name: "tokenId",
|
|
17396
|
+
type: "core::integer::u256"
|
|
17397
|
+
}
|
|
17398
|
+
],
|
|
17399
|
+
outputs: [
|
|
17400
|
+
{
|
|
17401
|
+
type: "core::byte_array::ByteArray"
|
|
17402
|
+
}
|
|
17403
|
+
],
|
|
17404
|
+
state_mutability: "view"
|
|
17405
|
+
}
|
|
17406
|
+
]
|
|
17407
|
+
},
|
|
17408
|
+
{
|
|
17409
|
+
type: "impl",
|
|
17410
|
+
name: "RewardShareImpl",
|
|
17411
|
+
interface_name: "strkfarm::components::harvester::reward_shares::IRewardShare"
|
|
17412
|
+
},
|
|
17413
|
+
{
|
|
17414
|
+
type: "struct",
|
|
17415
|
+
name: "strkfarm::components::harvester::reward_shares::UserRewardsInfo",
|
|
17416
|
+
members: [
|
|
17417
|
+
{
|
|
17418
|
+
name: "pending_round_points",
|
|
17419
|
+
type: "core::felt252"
|
|
17420
|
+
},
|
|
17421
|
+
{
|
|
17422
|
+
name: "shares_owned",
|
|
17423
|
+
type: "core::felt252"
|
|
17424
|
+
},
|
|
17425
|
+
{
|
|
17426
|
+
name: "block_number",
|
|
17427
|
+
type: "core::integer::u64"
|
|
17428
|
+
},
|
|
17429
|
+
{
|
|
17430
|
+
name: "index",
|
|
17431
|
+
type: "core::integer::u32"
|
|
17432
|
+
}
|
|
17433
|
+
]
|
|
17434
|
+
},
|
|
17435
|
+
{
|
|
17436
|
+
type: "struct",
|
|
17437
|
+
name: "strkfarm::components::harvester::reward_shares::RewardsInfo",
|
|
17438
|
+
members: [
|
|
17439
|
+
{
|
|
17440
|
+
name: "amount",
|
|
17441
|
+
type: "core::felt252"
|
|
17442
|
+
},
|
|
17443
|
+
{
|
|
17444
|
+
name: "shares",
|
|
17445
|
+
type: "core::felt252"
|
|
17446
|
+
},
|
|
17447
|
+
{
|
|
17448
|
+
name: "total_round_points",
|
|
17449
|
+
type: "core::felt252"
|
|
17450
|
+
},
|
|
17451
|
+
{
|
|
17452
|
+
name: "block_number",
|
|
17453
|
+
type: "core::integer::u64"
|
|
17454
|
+
}
|
|
17455
|
+
]
|
|
17456
|
+
},
|
|
17457
|
+
{
|
|
17458
|
+
type: "interface",
|
|
17459
|
+
name: "strkfarm::components::harvester::reward_shares::IRewardShare",
|
|
17460
|
+
items: [
|
|
17461
|
+
{
|
|
17462
|
+
type: "function",
|
|
17463
|
+
name: "get_user_reward_info",
|
|
17464
|
+
inputs: [
|
|
17465
|
+
{
|
|
17466
|
+
name: "user",
|
|
17467
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17468
|
+
}
|
|
17469
|
+
],
|
|
17470
|
+
outputs: [
|
|
17471
|
+
{
|
|
17472
|
+
type: "strkfarm::components::harvester::reward_shares::UserRewardsInfo"
|
|
17473
|
+
}
|
|
17474
|
+
],
|
|
17475
|
+
state_mutability: "view"
|
|
17476
|
+
},
|
|
17477
|
+
{
|
|
17478
|
+
type: "function",
|
|
17479
|
+
name: "get_rewards_info",
|
|
17480
|
+
inputs: [
|
|
17481
|
+
{
|
|
17482
|
+
name: "index",
|
|
17483
|
+
type: "core::integer::u32"
|
|
17484
|
+
}
|
|
17485
|
+
],
|
|
17486
|
+
outputs: [
|
|
17487
|
+
{
|
|
17488
|
+
type: "strkfarm::components::harvester::reward_shares::RewardsInfo"
|
|
17489
|
+
}
|
|
17490
|
+
],
|
|
17491
|
+
state_mutability: "view"
|
|
17492
|
+
},
|
|
17493
|
+
{
|
|
17494
|
+
type: "function",
|
|
17495
|
+
name: "get_total_rewards",
|
|
17496
|
+
inputs: [],
|
|
17497
|
+
outputs: [
|
|
17498
|
+
{
|
|
17499
|
+
type: "core::integer::u32"
|
|
17500
|
+
}
|
|
17501
|
+
],
|
|
17502
|
+
state_mutability: "view"
|
|
17503
|
+
},
|
|
17504
|
+
{
|
|
17505
|
+
type: "function",
|
|
17506
|
+
name: "get_total_unminted_shares",
|
|
17507
|
+
inputs: [],
|
|
17508
|
+
outputs: [
|
|
17509
|
+
{
|
|
17510
|
+
type: "core::felt252"
|
|
17511
|
+
}
|
|
17512
|
+
],
|
|
17513
|
+
state_mutability: "view"
|
|
17514
|
+
},
|
|
17515
|
+
{
|
|
17516
|
+
type: "function",
|
|
17517
|
+
name: "get_additional_shares",
|
|
17518
|
+
inputs: [
|
|
17519
|
+
{
|
|
17520
|
+
name: "user",
|
|
17521
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17522
|
+
}
|
|
17523
|
+
],
|
|
17524
|
+
outputs: [
|
|
17525
|
+
{
|
|
17526
|
+
type: "(core::felt252, core::integer::u64, core::felt252)"
|
|
17527
|
+
}
|
|
17528
|
+
],
|
|
17529
|
+
state_mutability: "view"
|
|
17530
|
+
}
|
|
17531
|
+
]
|
|
17532
|
+
},
|
|
17533
|
+
{
|
|
17534
|
+
type: "impl",
|
|
17535
|
+
name: "CommonCompImpl",
|
|
17536
|
+
interface_name: "strkfarm::interfaces::common::ICommon"
|
|
17537
|
+
},
|
|
17538
|
+
{
|
|
17539
|
+
type: "interface",
|
|
17540
|
+
name: "strkfarm::interfaces::common::ICommon",
|
|
17541
|
+
items: [
|
|
17542
|
+
{
|
|
17543
|
+
type: "function",
|
|
17544
|
+
name: "upgrade",
|
|
17545
|
+
inputs: [
|
|
17546
|
+
{
|
|
17547
|
+
name: "new_class",
|
|
17548
|
+
type: "core::starknet::class_hash::ClassHash"
|
|
17549
|
+
}
|
|
17550
|
+
],
|
|
17551
|
+
outputs: [],
|
|
17552
|
+
state_mutability: "external"
|
|
17553
|
+
},
|
|
17554
|
+
{
|
|
17555
|
+
type: "function",
|
|
17556
|
+
name: "pause",
|
|
17557
|
+
inputs: [],
|
|
17558
|
+
outputs: [],
|
|
17559
|
+
state_mutability: "external"
|
|
17560
|
+
},
|
|
17561
|
+
{
|
|
17562
|
+
type: "function",
|
|
17563
|
+
name: "unpause",
|
|
17564
|
+
inputs: [],
|
|
17565
|
+
outputs: [],
|
|
17566
|
+
state_mutability: "external"
|
|
17567
|
+
},
|
|
17568
|
+
{
|
|
17569
|
+
type: "function",
|
|
17570
|
+
name: "is_paused",
|
|
17571
|
+
inputs: [],
|
|
17572
|
+
outputs: [
|
|
17573
|
+
{
|
|
17574
|
+
type: "core::bool"
|
|
17575
|
+
}
|
|
17576
|
+
],
|
|
17577
|
+
state_mutability: "view"
|
|
17578
|
+
},
|
|
17579
|
+
{
|
|
17580
|
+
type: "function",
|
|
17581
|
+
name: "owner",
|
|
17582
|
+
inputs: [],
|
|
17583
|
+
outputs: [
|
|
17584
|
+
{
|
|
17585
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17586
|
+
}
|
|
17587
|
+
],
|
|
17588
|
+
state_mutability: "view"
|
|
17589
|
+
},
|
|
17590
|
+
{
|
|
17591
|
+
type: "function",
|
|
17592
|
+
name: "transfer_ownership",
|
|
17593
|
+
inputs: [
|
|
17594
|
+
{
|
|
17595
|
+
name: "new_owner",
|
|
17596
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17597
|
+
}
|
|
17598
|
+
],
|
|
17599
|
+
outputs: [],
|
|
17600
|
+
state_mutability: "external"
|
|
17601
|
+
},
|
|
17602
|
+
{
|
|
17603
|
+
type: "function",
|
|
17604
|
+
name: "renounce_ownership",
|
|
17605
|
+
inputs: [],
|
|
17606
|
+
outputs: [],
|
|
17607
|
+
state_mutability: "external"
|
|
17608
|
+
}
|
|
17609
|
+
]
|
|
17610
|
+
},
|
|
17611
|
+
{
|
|
17612
|
+
type: "constructor",
|
|
17613
|
+
name: "constructor",
|
|
17614
|
+
inputs: [
|
|
17615
|
+
{
|
|
17616
|
+
name: "name",
|
|
17617
|
+
type: "core::byte_array::ByteArray"
|
|
17618
|
+
},
|
|
17619
|
+
{
|
|
17620
|
+
name: "symbol",
|
|
17621
|
+
type: "core::byte_array::ByteArray"
|
|
17622
|
+
},
|
|
17623
|
+
{
|
|
17624
|
+
name: "base_uri",
|
|
17625
|
+
type: "core::byte_array::ByteArray"
|
|
17626
|
+
},
|
|
17627
|
+
{
|
|
17628
|
+
name: "owner",
|
|
17629
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17630
|
+
},
|
|
17631
|
+
{
|
|
17632
|
+
name: "main_token",
|
|
17633
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17634
|
+
},
|
|
17635
|
+
{
|
|
17636
|
+
name: "main_offset",
|
|
17637
|
+
type: "core::integer::u128"
|
|
17638
|
+
},
|
|
17639
|
+
{
|
|
17640
|
+
name: "secondary_token",
|
|
17641
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
17642
|
+
},
|
|
17643
|
+
{
|
|
17644
|
+
name: "secondary_offset",
|
|
17645
|
+
type: "core::integer::u128"
|
|
17646
|
+
},
|
|
17647
|
+
{
|
|
17648
|
+
name: "settings",
|
|
17649
|
+
type: "strkfarm::interfaces::ERC721Strategy::Settings"
|
|
17650
|
+
},
|
|
17651
|
+
{
|
|
17652
|
+
name: "lend_settings1",
|
|
17653
|
+
type: "strkfarm::components::endur::EndurSettings"
|
|
17654
|
+
},
|
|
17655
|
+
{
|
|
17656
|
+
name: "lend_settings2",
|
|
17657
|
+
type: "strkfarm::components::vesu::vesuStruct"
|
|
17658
|
+
}
|
|
17659
|
+
]
|
|
17660
|
+
},
|
|
17661
|
+
{
|
|
17662
|
+
type: "event",
|
|
17663
|
+
name: "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
17664
|
+
kind: "struct",
|
|
17665
|
+
members: [
|
|
17666
|
+
{
|
|
17667
|
+
name: "from",
|
|
17668
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17669
|
+
kind: "key"
|
|
17670
|
+
},
|
|
17671
|
+
{
|
|
17672
|
+
name: "to",
|
|
17673
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17674
|
+
kind: "key"
|
|
17675
|
+
},
|
|
17676
|
+
{
|
|
17677
|
+
name: "token_id",
|
|
17678
|
+
type: "core::integer::u256",
|
|
17679
|
+
kind: "key"
|
|
17680
|
+
}
|
|
17681
|
+
]
|
|
17682
|
+
},
|
|
17683
|
+
{
|
|
17684
|
+
type: "event",
|
|
17685
|
+
name: "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
17686
|
+
kind: "struct",
|
|
17687
|
+
members: [
|
|
17688
|
+
{
|
|
17689
|
+
name: "owner",
|
|
17690
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17691
|
+
kind: "key"
|
|
17692
|
+
},
|
|
17693
|
+
{
|
|
17694
|
+
name: "approved",
|
|
17695
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17696
|
+
kind: "key"
|
|
17697
|
+
},
|
|
17698
|
+
{
|
|
17699
|
+
name: "token_id",
|
|
17700
|
+
type: "core::integer::u256",
|
|
17701
|
+
kind: "key"
|
|
17702
|
+
}
|
|
17703
|
+
]
|
|
17704
|
+
},
|
|
17705
|
+
{
|
|
17706
|
+
type: "event",
|
|
17707
|
+
name: "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
17708
|
+
kind: "struct",
|
|
17709
|
+
members: [
|
|
17710
|
+
{
|
|
17711
|
+
name: "owner",
|
|
17712
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17713
|
+
kind: "key"
|
|
17714
|
+
},
|
|
17715
|
+
{
|
|
17716
|
+
name: "operator",
|
|
17717
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17718
|
+
kind: "key"
|
|
17719
|
+
},
|
|
17720
|
+
{
|
|
17721
|
+
name: "approved",
|
|
17722
|
+
type: "core::bool",
|
|
17723
|
+
kind: "data"
|
|
17724
|
+
}
|
|
17725
|
+
]
|
|
17726
|
+
},
|
|
17727
|
+
{
|
|
17728
|
+
type: "event",
|
|
17729
|
+
name: "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
17730
|
+
kind: "enum",
|
|
17731
|
+
variants: [
|
|
17732
|
+
{
|
|
17733
|
+
name: "Transfer",
|
|
17734
|
+
type: "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
17735
|
+
kind: "nested"
|
|
17736
|
+
},
|
|
17737
|
+
{
|
|
17738
|
+
name: "Approval",
|
|
17739
|
+
type: "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
17740
|
+
kind: "nested"
|
|
17741
|
+
},
|
|
17742
|
+
{
|
|
17743
|
+
name: "ApprovalForAll",
|
|
17744
|
+
type: "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
17745
|
+
kind: "nested"
|
|
17746
|
+
}
|
|
17747
|
+
]
|
|
17748
|
+
},
|
|
17749
|
+
{
|
|
17750
|
+
type: "event",
|
|
17751
|
+
name: "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
17752
|
+
kind: "enum",
|
|
17753
|
+
variants: []
|
|
17754
|
+
},
|
|
17755
|
+
{
|
|
17756
|
+
type: "event",
|
|
17757
|
+
name: "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
|
|
17758
|
+
kind: "struct",
|
|
17759
|
+
members: [
|
|
17760
|
+
{
|
|
17761
|
+
name: "class_hash",
|
|
17762
|
+
type: "core::starknet::class_hash::ClassHash",
|
|
17763
|
+
kind: "data"
|
|
17764
|
+
}
|
|
17765
|
+
]
|
|
17766
|
+
},
|
|
17767
|
+
{
|
|
17768
|
+
type: "event",
|
|
17769
|
+
name: "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
|
|
17770
|
+
kind: "enum",
|
|
17771
|
+
variants: [
|
|
17772
|
+
{
|
|
17773
|
+
name: "Upgraded",
|
|
17774
|
+
type: "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
|
|
17775
|
+
kind: "nested"
|
|
17776
|
+
}
|
|
17777
|
+
]
|
|
17778
|
+
},
|
|
17779
|
+
{
|
|
17780
|
+
type: "event",
|
|
17781
|
+
name: "openzeppelin_security::pausable::PausableComponent::Paused",
|
|
17782
|
+
kind: "struct",
|
|
17783
|
+
members: [
|
|
17784
|
+
{
|
|
17785
|
+
name: "account",
|
|
17786
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17787
|
+
kind: "data"
|
|
17788
|
+
}
|
|
17789
|
+
]
|
|
17790
|
+
},
|
|
17791
|
+
{
|
|
17792
|
+
type: "event",
|
|
17793
|
+
name: "openzeppelin_security::pausable::PausableComponent::Unpaused",
|
|
17794
|
+
kind: "struct",
|
|
17795
|
+
members: [
|
|
17796
|
+
{
|
|
17797
|
+
name: "account",
|
|
17798
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17799
|
+
kind: "data"
|
|
17800
|
+
}
|
|
17801
|
+
]
|
|
17802
|
+
},
|
|
17803
|
+
{
|
|
17804
|
+
type: "event",
|
|
17805
|
+
name: "openzeppelin_security::pausable::PausableComponent::Event",
|
|
17806
|
+
kind: "enum",
|
|
17807
|
+
variants: [
|
|
17808
|
+
{
|
|
17809
|
+
name: "Paused",
|
|
17810
|
+
type: "openzeppelin_security::pausable::PausableComponent::Paused",
|
|
17811
|
+
kind: "nested"
|
|
17812
|
+
},
|
|
17813
|
+
{
|
|
17814
|
+
name: "Unpaused",
|
|
17815
|
+
type: "openzeppelin_security::pausable::PausableComponent::Unpaused",
|
|
17816
|
+
kind: "nested"
|
|
17817
|
+
}
|
|
17818
|
+
]
|
|
17819
|
+
},
|
|
17820
|
+
{
|
|
17821
|
+
type: "event",
|
|
17822
|
+
name: "openzeppelin_security::reentrancyguard::ReentrancyGuardComponent::Event",
|
|
17823
|
+
kind: "enum",
|
|
17824
|
+
variants: []
|
|
17825
|
+
},
|
|
17826
|
+
{
|
|
17827
|
+
type: "event",
|
|
17828
|
+
name: "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
|
|
17829
|
+
kind: "struct",
|
|
17830
|
+
members: [
|
|
17831
|
+
{
|
|
17832
|
+
name: "previous_owner",
|
|
17833
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17834
|
+
kind: "key"
|
|
17835
|
+
},
|
|
17836
|
+
{
|
|
17837
|
+
name: "new_owner",
|
|
17838
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17839
|
+
kind: "key"
|
|
17840
|
+
}
|
|
17841
|
+
]
|
|
17842
|
+
},
|
|
17843
|
+
{
|
|
17844
|
+
type: "event",
|
|
17845
|
+
name: "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
|
|
17846
|
+
kind: "struct",
|
|
17847
|
+
members: [
|
|
17848
|
+
{
|
|
17849
|
+
name: "previous_owner",
|
|
17850
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17851
|
+
kind: "key"
|
|
17852
|
+
},
|
|
17853
|
+
{
|
|
17854
|
+
name: "new_owner",
|
|
17855
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17856
|
+
kind: "key"
|
|
17857
|
+
}
|
|
17858
|
+
]
|
|
17859
|
+
},
|
|
17860
|
+
{
|
|
17861
|
+
type: "event",
|
|
17862
|
+
name: "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
|
|
17863
|
+
kind: "enum",
|
|
17864
|
+
variants: [
|
|
17865
|
+
{
|
|
17866
|
+
name: "OwnershipTransferred",
|
|
17867
|
+
type: "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
|
|
17868
|
+
kind: "nested"
|
|
17869
|
+
},
|
|
17870
|
+
{
|
|
17871
|
+
name: "OwnershipTransferStarted",
|
|
17872
|
+
type: "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
|
|
17873
|
+
kind: "nested"
|
|
17874
|
+
}
|
|
17875
|
+
]
|
|
17876
|
+
},
|
|
17877
|
+
{
|
|
17878
|
+
type: "event",
|
|
17879
|
+
name: "strkfarm::components::common::CommonComp::Event",
|
|
17880
|
+
kind: "enum",
|
|
17881
|
+
variants: []
|
|
17882
|
+
},
|
|
17883
|
+
{
|
|
17884
|
+
type: "event",
|
|
17885
|
+
name: "strkfarm::components::harvester::reward_shares::RewardShareComponent::Rewards",
|
|
17886
|
+
kind: "struct",
|
|
17887
|
+
members: [
|
|
17888
|
+
{
|
|
17889
|
+
name: "index",
|
|
17890
|
+
type: "core::integer::u32",
|
|
17891
|
+
kind: "data"
|
|
17892
|
+
},
|
|
17893
|
+
{
|
|
17894
|
+
name: "info",
|
|
17895
|
+
type: "strkfarm::components::harvester::reward_shares::RewardsInfo",
|
|
17896
|
+
kind: "data"
|
|
17897
|
+
},
|
|
17898
|
+
{
|
|
17899
|
+
name: "total_reward_shares",
|
|
17900
|
+
type: "core::felt252",
|
|
17901
|
+
kind: "data"
|
|
17902
|
+
},
|
|
17903
|
+
{
|
|
17904
|
+
name: "timestamp",
|
|
17905
|
+
type: "core::integer::u64",
|
|
17906
|
+
kind: "data"
|
|
17907
|
+
}
|
|
17908
|
+
]
|
|
17909
|
+
},
|
|
17910
|
+
{
|
|
17911
|
+
type: "event",
|
|
17912
|
+
name: "strkfarm::components::harvester::reward_shares::RewardShareComponent::UserRewards",
|
|
17913
|
+
kind: "struct",
|
|
17914
|
+
members: [
|
|
17915
|
+
{
|
|
17916
|
+
name: "user",
|
|
17917
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17918
|
+
kind: "key"
|
|
17919
|
+
},
|
|
17920
|
+
{
|
|
17921
|
+
name: "info",
|
|
17922
|
+
type: "strkfarm::components::harvester::reward_shares::UserRewardsInfo",
|
|
17923
|
+
kind: "data"
|
|
17924
|
+
},
|
|
17925
|
+
{
|
|
17926
|
+
name: "total_reward_shares",
|
|
17927
|
+
type: "core::felt252",
|
|
17928
|
+
kind: "data"
|
|
17929
|
+
},
|
|
17930
|
+
{
|
|
17931
|
+
name: "timestamp",
|
|
17932
|
+
type: "core::integer::u64",
|
|
17933
|
+
kind: "data"
|
|
17934
|
+
}
|
|
17935
|
+
]
|
|
17936
|
+
},
|
|
17937
|
+
{
|
|
17938
|
+
type: "event",
|
|
17939
|
+
name: "strkfarm::components::harvester::reward_shares::RewardShareComponent::Event",
|
|
17940
|
+
kind: "enum",
|
|
17941
|
+
variants: [
|
|
17942
|
+
{
|
|
17943
|
+
name: "Rewards",
|
|
17944
|
+
type: "strkfarm::components::harvester::reward_shares::RewardShareComponent::Rewards",
|
|
17945
|
+
kind: "nested"
|
|
17946
|
+
},
|
|
17947
|
+
{
|
|
17948
|
+
name: "UserRewards",
|
|
17949
|
+
type: "strkfarm::components::harvester::reward_shares::RewardShareComponent::UserRewards",
|
|
17950
|
+
kind: "nested"
|
|
17951
|
+
}
|
|
17952
|
+
]
|
|
17953
|
+
},
|
|
17954
|
+
{
|
|
17955
|
+
type: "event",
|
|
17956
|
+
name: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::Deposit",
|
|
17957
|
+
kind: "struct",
|
|
17958
|
+
members: [
|
|
17959
|
+
{
|
|
17960
|
+
name: "sender",
|
|
17961
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17962
|
+
kind: "key"
|
|
17963
|
+
},
|
|
17964
|
+
{
|
|
17965
|
+
name: "owner",
|
|
17966
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17967
|
+
kind: "key"
|
|
17968
|
+
},
|
|
17969
|
+
{
|
|
17970
|
+
name: "assets",
|
|
17971
|
+
type: "core::integer::u256",
|
|
17972
|
+
kind: "data"
|
|
17973
|
+
},
|
|
17974
|
+
{
|
|
17975
|
+
name: "net_position",
|
|
17976
|
+
type: "strkfarm::interfaces::ERC721Strategy::Position",
|
|
17977
|
+
kind: "data"
|
|
17978
|
+
}
|
|
17979
|
+
]
|
|
17980
|
+
},
|
|
17981
|
+
{
|
|
17982
|
+
type: "event",
|
|
17983
|
+
name: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::Withdraw",
|
|
17984
|
+
kind: "struct",
|
|
17985
|
+
members: [
|
|
17986
|
+
{
|
|
17987
|
+
name: "sender",
|
|
17988
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17989
|
+
kind: "key"
|
|
17990
|
+
},
|
|
17991
|
+
{
|
|
17992
|
+
name: "receiver",
|
|
17993
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17994
|
+
kind: "key"
|
|
17995
|
+
},
|
|
17996
|
+
{
|
|
17997
|
+
name: "owner",
|
|
17998
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
17999
|
+
kind: "key"
|
|
18000
|
+
},
|
|
18001
|
+
{
|
|
18002
|
+
name: "assets",
|
|
18003
|
+
type: "core::integer::u256",
|
|
18004
|
+
kind: "data"
|
|
18005
|
+
},
|
|
18006
|
+
{
|
|
18007
|
+
name: "net_position",
|
|
18008
|
+
type: "strkfarm::interfaces::ERC721Strategy::Position",
|
|
18009
|
+
kind: "data"
|
|
18010
|
+
}
|
|
18011
|
+
]
|
|
18012
|
+
},
|
|
18013
|
+
{
|
|
18014
|
+
type: "event",
|
|
18015
|
+
name: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::Rebalance",
|
|
18016
|
+
kind: "struct",
|
|
18017
|
+
members: [
|
|
18018
|
+
{
|
|
18019
|
+
name: "caller",
|
|
18020
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
18021
|
+
kind: "key"
|
|
18022
|
+
},
|
|
18023
|
+
{
|
|
18024
|
+
name: "amount",
|
|
18025
|
+
type: "core::integer::u256",
|
|
18026
|
+
kind: "data"
|
|
18027
|
+
},
|
|
18028
|
+
{
|
|
18029
|
+
name: "shouldRepay",
|
|
18030
|
+
type: "core::bool",
|
|
18031
|
+
kind: "data"
|
|
18032
|
+
},
|
|
18033
|
+
{
|
|
18034
|
+
name: "pre_hf1",
|
|
18035
|
+
type: "core::integer::u32",
|
|
18036
|
+
kind: "data"
|
|
18037
|
+
},
|
|
18038
|
+
{
|
|
18039
|
+
name: "pre_hf2",
|
|
18040
|
+
type: "core::integer::u32",
|
|
18041
|
+
kind: "data"
|
|
18042
|
+
},
|
|
18043
|
+
{
|
|
18044
|
+
name: "hf1",
|
|
18045
|
+
type: "core::integer::u32",
|
|
18046
|
+
kind: "data"
|
|
18047
|
+
},
|
|
18048
|
+
{
|
|
18049
|
+
name: "hf2",
|
|
18050
|
+
type: "core::integer::u32",
|
|
18051
|
+
kind: "data"
|
|
18052
|
+
}
|
|
18053
|
+
]
|
|
18054
|
+
},
|
|
18055
|
+
{
|
|
18056
|
+
type: "event",
|
|
18057
|
+
name: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::ShareUpdate",
|
|
18058
|
+
kind: "struct",
|
|
18059
|
+
members: [
|
|
18060
|
+
{
|
|
18061
|
+
name: "token_id",
|
|
18062
|
+
type: "core::felt252",
|
|
18063
|
+
kind: "key"
|
|
18064
|
+
},
|
|
18065
|
+
{
|
|
18066
|
+
name: "action_id",
|
|
18067
|
+
type: "core::integer::u8",
|
|
18068
|
+
kind: "key"
|
|
18069
|
+
},
|
|
18070
|
+
{
|
|
18071
|
+
name: "user_shares",
|
|
18072
|
+
type: "core::felt252",
|
|
18073
|
+
kind: "data"
|
|
18074
|
+
},
|
|
18075
|
+
{
|
|
18076
|
+
name: "total_shares",
|
|
18077
|
+
type: "core::felt252",
|
|
18078
|
+
kind: "data"
|
|
18079
|
+
}
|
|
18080
|
+
]
|
|
18081
|
+
},
|
|
18082
|
+
{
|
|
18083
|
+
type: "event",
|
|
18084
|
+
name: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::Event",
|
|
18085
|
+
kind: "enum",
|
|
18086
|
+
variants: [
|
|
18087
|
+
{
|
|
18088
|
+
name: "Deposit",
|
|
18089
|
+
type: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::Deposit",
|
|
18090
|
+
kind: "nested"
|
|
18091
|
+
},
|
|
18092
|
+
{
|
|
18093
|
+
name: "Withdraw",
|
|
18094
|
+
type: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::Withdraw",
|
|
18095
|
+
kind: "nested"
|
|
18096
|
+
},
|
|
18097
|
+
{
|
|
18098
|
+
name: "Rebalance",
|
|
18099
|
+
type: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::Rebalance",
|
|
18100
|
+
kind: "nested"
|
|
18101
|
+
},
|
|
18102
|
+
{
|
|
18103
|
+
name: "ShareUpdate",
|
|
18104
|
+
type: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::ShareUpdate",
|
|
18105
|
+
kind: "nested"
|
|
18106
|
+
}
|
|
18107
|
+
]
|
|
18108
|
+
},
|
|
18109
|
+
{
|
|
18110
|
+
type: "event",
|
|
18111
|
+
name: "strkfarm::strats::dnmm_vesu::DeltaNeutralLoopingVesuXSTRK::Event",
|
|
18112
|
+
kind: "enum",
|
|
18113
|
+
variants: [
|
|
18114
|
+
{
|
|
18115
|
+
name: "ERC721Event",
|
|
18116
|
+
type: "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
18117
|
+
kind: "flat"
|
|
18118
|
+
},
|
|
18119
|
+
{
|
|
18120
|
+
name: "SRC5Event",
|
|
18121
|
+
type: "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
18122
|
+
kind: "flat"
|
|
18123
|
+
},
|
|
18124
|
+
{
|
|
18125
|
+
name: "UpgradeableEvent",
|
|
18126
|
+
type: "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
|
|
18127
|
+
kind: "flat"
|
|
18128
|
+
},
|
|
18129
|
+
{
|
|
18130
|
+
name: "PausableEvent",
|
|
18131
|
+
type: "openzeppelin_security::pausable::PausableComponent::Event",
|
|
18132
|
+
kind: "flat"
|
|
18133
|
+
},
|
|
18134
|
+
{
|
|
18135
|
+
name: "ReentrancyGuardEvent",
|
|
18136
|
+
type: "openzeppelin_security::reentrancyguard::ReentrancyGuardComponent::Event",
|
|
18137
|
+
kind: "flat"
|
|
18138
|
+
},
|
|
18139
|
+
{
|
|
18140
|
+
name: "OwnableEvent",
|
|
18141
|
+
type: "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
|
|
18142
|
+
kind: "flat"
|
|
18143
|
+
},
|
|
18144
|
+
{
|
|
18145
|
+
name: "CommonCompEvent",
|
|
18146
|
+
type: "strkfarm::components::common::CommonComp::Event",
|
|
18147
|
+
kind: "flat"
|
|
18148
|
+
},
|
|
18149
|
+
{
|
|
18150
|
+
name: "RewardShareEvent",
|
|
18151
|
+
type: "strkfarm::components::harvester::reward_shares::RewardShareComponent::Event",
|
|
18152
|
+
kind: "flat"
|
|
18153
|
+
},
|
|
18154
|
+
{
|
|
18155
|
+
name: "DeltaNeutralLoopingEvent",
|
|
18156
|
+
type: "strkfarm::components::delta_neutral_component::DeltaNeutralLoopingCom::Event",
|
|
18157
|
+
kind: "flat"
|
|
18158
|
+
}
|
|
18159
|
+
]
|
|
18160
|
+
}
|
|
18161
|
+
];
|
|
18162
|
+
|
|
18163
|
+
// src/strategies/sensei.ts
|
|
18164
|
+
var SenseiVault = class extends BaseStrategy {
|
|
18165
|
+
constructor(config, pricer, metadata) {
|
|
18166
|
+
super(config);
|
|
18167
|
+
this.getSettings = async () => {
|
|
18168
|
+
const settings = await this.contract.call("get_settings", []);
|
|
18169
|
+
logger.verbose("getSettings", settings);
|
|
18170
|
+
return settings;
|
|
18171
|
+
};
|
|
18172
|
+
this.address = metadata.address;
|
|
18173
|
+
this.pricer = pricer;
|
|
18174
|
+
this.metadata = metadata;
|
|
18175
|
+
this.contract = new import_starknet10.Contract(sensei_abi_default, this.address.address, this.config.provider);
|
|
18176
|
+
if (metadata.depositTokens.length === 0) {
|
|
18177
|
+
throw new Error("Deposit tokens are not defined in metadata");
|
|
18178
|
+
}
|
|
18179
|
+
}
|
|
18180
|
+
async getUserTVL(user) {
|
|
18181
|
+
const result = await this.contract.call(
|
|
18182
|
+
"describe_position",
|
|
18183
|
+
[user.address]
|
|
18184
|
+
);
|
|
18185
|
+
const amount = Web3Number.fromWei(
|
|
18186
|
+
import_starknet10.uint256.uint256ToBN(result[1].estimated_size).toString(),
|
|
18187
|
+
this.metadata.depositTokens[0].decimals
|
|
18188
|
+
);
|
|
18189
|
+
const price = await this.pricer.getPrice(
|
|
18190
|
+
this.metadata.depositTokens[0].symbol
|
|
18191
|
+
);
|
|
18192
|
+
return {
|
|
18193
|
+
usdValue: Number(amount.toFixed(6)) * price.price,
|
|
18194
|
+
amount,
|
|
18195
|
+
tokenInfo: this.metadata.depositTokens[0]
|
|
18196
|
+
};
|
|
18197
|
+
}
|
|
18198
|
+
async getTVL() {
|
|
18199
|
+
try {
|
|
18200
|
+
const {
|
|
18201
|
+
collateralXSTRK,
|
|
18202
|
+
collateralUSDValue,
|
|
18203
|
+
debtSTRK,
|
|
18204
|
+
debtUSDValue,
|
|
18205
|
+
xSTRKPrice,
|
|
18206
|
+
collateralInSTRK
|
|
18207
|
+
} = await this.getPositionInfo();
|
|
18208
|
+
const usdValue = Number(collateralUSDValue.toFixed(6)) - Number(debtUSDValue.toFixed(6));
|
|
18209
|
+
return {
|
|
18210
|
+
usdValue,
|
|
18211
|
+
amount: new Web3Number(
|
|
18212
|
+
(collateralInSTRK - Number(debtSTRK.toFixed(6))).toFixed(6),
|
|
18213
|
+
collateralXSTRK.decimals
|
|
18214
|
+
),
|
|
18215
|
+
tokenInfo: this.metadata.depositTokens[0]
|
|
18216
|
+
};
|
|
18217
|
+
} catch (error) {
|
|
18218
|
+
console.error("Error fetching TVL:", error);
|
|
18219
|
+
return {
|
|
18220
|
+
usdValue: 0,
|
|
18221
|
+
amount: new Web3Number("0", this.metadata.depositTokens[0].decimals),
|
|
18222
|
+
tokenInfo: this.metadata.depositTokens[0]
|
|
18223
|
+
};
|
|
18224
|
+
}
|
|
18225
|
+
}
|
|
18226
|
+
async depositCall(amountInfo, receiver) {
|
|
18227
|
+
const mainTokenContract = new import_starknet10.Contract(
|
|
18228
|
+
erc20_abi_default,
|
|
18229
|
+
this.metadata.depositTokens[0].address.address,
|
|
18230
|
+
this.config.provider
|
|
18231
|
+
);
|
|
18232
|
+
const call1 = mainTokenContract.populate("approve", [
|
|
18233
|
+
this.address.address,
|
|
18234
|
+
import_starknet10.uint256.bnToUint256(amountInfo.amount.toWei())
|
|
18235
|
+
]);
|
|
18236
|
+
const call2 = this.contract.populate("deposit", [
|
|
18237
|
+
import_starknet10.uint256.bnToUint256(amountInfo.amount.toWei()),
|
|
18238
|
+
receiver.address
|
|
18239
|
+
]);
|
|
18240
|
+
const calls = [call1, call2];
|
|
18241
|
+
return calls;
|
|
18242
|
+
}
|
|
18243
|
+
async withdrawCall(amountInfo, receiver, owner) {
|
|
18244
|
+
const call = this.contract.populate("withdraw", [
|
|
18245
|
+
import_starknet10.uint256.bnToUint256(amountInfo.amount.toWei()),
|
|
18246
|
+
receiver.address,
|
|
18247
|
+
300
|
|
18248
|
+
// 3% max slippage
|
|
18249
|
+
]);
|
|
18250
|
+
return [call];
|
|
18251
|
+
}
|
|
18252
|
+
async getPositionInfo() {
|
|
18253
|
+
const CACHE_KEY = "positionInfo";
|
|
18254
|
+
if (this.isCacheValid(CACHE_KEY)) {
|
|
18255
|
+
return this.getCache(CACHE_KEY);
|
|
18256
|
+
}
|
|
18257
|
+
const resp = await fetch(
|
|
18258
|
+
`${getTrovesEndpoint()}/vesu/positions?walletAddress=${this.address.address}`
|
|
18259
|
+
);
|
|
18260
|
+
const data = await resp.json();
|
|
18261
|
+
if (!data.data || data.data.length == 0) {
|
|
18262
|
+
throw new Error("No positions found");
|
|
18263
|
+
}
|
|
18264
|
+
const collateralXSTRK = Web3Number.fromWei(
|
|
18265
|
+
data.data[0].collateral.value,
|
|
18266
|
+
data.data[0].collateral.decimals
|
|
18267
|
+
);
|
|
18268
|
+
const collateralUSDValue = Web3Number.fromWei(
|
|
18269
|
+
data.data[0].collateral.usdPrice.value,
|
|
18270
|
+
data.data[0].collateral.usdPrice.decimals
|
|
18271
|
+
);
|
|
18272
|
+
const debtSTRK = Web3Number.fromWei(
|
|
18273
|
+
data.data[0].debt.value,
|
|
18274
|
+
data.data[0].debt.decimals
|
|
18275
|
+
);
|
|
18276
|
+
const debtUSDValue = Web3Number.fromWei(
|
|
18277
|
+
data.data[0].debt.usdPrice.value,
|
|
18278
|
+
data.data[0].debt.usdPrice.decimals
|
|
18279
|
+
);
|
|
18280
|
+
const xSTRKPrice = await this.getSecondaryTokenPriceRelativeToMain();
|
|
18281
|
+
const collateralInSTRK = Number(collateralXSTRK.toFixed(6)) * xSTRKPrice;
|
|
18282
|
+
const STRKUSDPrice = Number(debtUSDValue.toFixed(6)) / Number(debtSTRK.toFixed(6));
|
|
18283
|
+
const actualCollateralUSDValue = collateralInSTRK * STRKUSDPrice;
|
|
18284
|
+
const cacheData = {
|
|
18285
|
+
collateralXSTRK,
|
|
18286
|
+
collateralUSDValue: new Web3Number(
|
|
18287
|
+
actualCollateralUSDValue.toFixed(6),
|
|
18288
|
+
collateralUSDValue.decimals
|
|
18289
|
+
),
|
|
18290
|
+
debtSTRK,
|
|
18291
|
+
debtUSDValue,
|
|
18292
|
+
xSTRKPrice,
|
|
18293
|
+
collateralInSTRK
|
|
18294
|
+
};
|
|
18295
|
+
this.setCache(CACHE_KEY, cacheData);
|
|
18296
|
+
return cacheData;
|
|
18297
|
+
}
|
|
18298
|
+
async getSecondaryTokenPriceRelativeToMain(retry = 0) {
|
|
18299
|
+
const CACHE_KEY = "xSTRKPrice";
|
|
18300
|
+
if (this.isCacheValid(CACHE_KEY)) {
|
|
18301
|
+
return this.getCache(CACHE_KEY);
|
|
18302
|
+
}
|
|
18303
|
+
const params = {
|
|
18304
|
+
sellTokenAddress: this.metadata.additionalInfo.secondaryToken.address.address,
|
|
18305
|
+
buyTokenAddress: this.metadata.additionalInfo.mainToken.address.address,
|
|
18306
|
+
sellAmount: BigInt(new Web3Number("1", 18).toWei()),
|
|
18307
|
+
takerAddress: this.address.address
|
|
18308
|
+
};
|
|
18309
|
+
logger.verbose("getSecondaryTokenPriceRelativeToMain [1]", params);
|
|
18310
|
+
let avnu = new AvnuWrapper();
|
|
18311
|
+
const quote = await avnu.getQuotes(
|
|
18312
|
+
params.sellTokenAddress,
|
|
18313
|
+
params.buyTokenAddress,
|
|
18314
|
+
params.sellAmount?.toString() || "0",
|
|
18315
|
+
params.takerAddress
|
|
18316
|
+
);
|
|
18317
|
+
if (!quote) {
|
|
18318
|
+
throw new Error("No quotes found to compute secondary token price relative to main token");
|
|
18319
|
+
}
|
|
18320
|
+
const firstQuote = quote;
|
|
18321
|
+
const price = Number(
|
|
18322
|
+
Web3Number.fromWei(firstQuote.buyAmount.toString(), 18).toFixed(
|
|
18323
|
+
6
|
|
18324
|
+
)
|
|
18325
|
+
);
|
|
18326
|
+
logger.verbose("getSecondaryTokenPriceRelativeToMain [2]", price);
|
|
18327
|
+
this.setCache(CACHE_KEY, price);
|
|
18328
|
+
return price;
|
|
18329
|
+
}
|
|
18330
|
+
};
|
|
18331
|
+
var senseiDescription = `Deposit your {{token1}} to automatically loop your funds via Endur ({{token2}}) and Vesu to create a delta neutral position. This strategy is designed to maximize your yield on {{token1}}. Your position is automatically adjusted periodically to maintain a healthy health factor. You receive a NFT as representation for your stake on Troves. You can withdraw anytime by redeeming your NFT for {{token1}}.`;
|
|
18332
|
+
var vesuProtocol = {
|
|
18333
|
+
name: "Vesu",
|
|
18334
|
+
logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
|
|
18335
|
+
};
|
|
18336
|
+
var endurProtocol = {
|
|
18337
|
+
name: "Endur",
|
|
18338
|
+
logo: "https://app.endur.fi/logo.png"
|
|
18339
|
+
};
|
|
18340
|
+
var _riskFactor3 = [
|
|
18341
|
+
{ type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25, reason: "Audited by CSC" },
|
|
18342
|
+
{ type: "Depeg Risk" /* DEPEG_RISK */, value: 0.25, weight: 25, reason: "Depending on prevailing market conditions and trading activity, xSTRK may lose its peg to the underlying asset." },
|
|
18343
|
+
{ type: "Liquidation Risk" /* LIQUIDATION_RISK */, value: 0.1, weight: 10, reason: "Liquidation risk is low due to the nature of the Re7 Pool on Vesu" },
|
|
18344
|
+
{ type: "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */, value: 0.5, weight: 50, reason: "xSTRK can be sometimes illiquid near true price" }
|
|
18345
|
+
];
|
|
18346
|
+
var FAQS = [
|
|
18347
|
+
{
|
|
18348
|
+
question: "What is xSTRK Sensei?",
|
|
18349
|
+
answer: "xSTRK Sensei is a leveraged looping strategy involving xSTRK and STRK. It uses xSTRK as collateral on Vesu, borrows STRK, and buys more xSTRK with it to create up to 4x leverage and boost yields."
|
|
18350
|
+
},
|
|
18351
|
+
{
|
|
18352
|
+
question: "What is the benefit of using xSTRK Sensei?",
|
|
18353
|
+
answer: "The strategy amplifies your xSTRK exposure and yield through leverage. It also helps you accumulate more Endur points faster."
|
|
18354
|
+
},
|
|
18355
|
+
{
|
|
18356
|
+
question: "What is the maximum leverage possible?",
|
|
18357
|
+
answer: "The strategy may allow up to ~4x leverage, depending on your collateral ratio and market conditions on Vesu. This strategy tries to maintain a health factor of 1.1 on Vesu"
|
|
18358
|
+
},
|
|
18359
|
+
{
|
|
18360
|
+
question: "Isn't 1.1 health factor risky?",
|
|
18361
|
+
answer: "Based on Re7's xSTRK pool configuration on Vesu, xSTRK uses STRK price as its oracle source. This means collateral and debt will always move in the same direction, making 1.1 HF safe. However, if debt increases too much (over months), liquidation may occur, which we try to avoid by actively monitoring the position."
|
|
18362
|
+
},
|
|
18363
|
+
{
|
|
18364
|
+
question: "Are there any risks involved?",
|
|
18365
|
+
answer: "Yes. The major risks are related to xSTRK's illiquidity and price volatility. During volatility or low liquidity, exiting a position can result in loss."
|
|
18366
|
+
},
|
|
18367
|
+
{
|
|
18368
|
+
question: "Does the position always grow?",
|
|
18369
|
+
answer: "No. While xSTRK's true value increases over time, its DEX price may not grow continuously and can fluctuate or move in discrete steps."
|
|
18370
|
+
},
|
|
18371
|
+
{
|
|
18372
|
+
question: "Can I lose money using this strategy?",
|
|
18373
|
+
answer: "Yes. If the xSTRK price drops sharply or becomes illiquid, you may face slippage or loss when trying to exit the looped position."
|
|
18374
|
+
},
|
|
18375
|
+
{
|
|
18376
|
+
question: "What affects the DEX price of xSTRK?",
|
|
18377
|
+
answer: "xSTRK's DEX price depends on supply, demand, and liquidity. Unlike its true value which grows steadily, the DEX price can fluctuate due to market activity."
|
|
18378
|
+
},
|
|
18379
|
+
{
|
|
18380
|
+
question: "Why is xSTRK considered illiquid?",
|
|
18381
|
+
answer: "Since xSTRK is a evolving LST with limited trading volume, sudden large trades can cause high slippage, making it harder to enter or exit positions efficiently. Such conditions normalize over time. Enter and exit positions with caution."
|
|
18382
|
+
},
|
|
18383
|
+
{
|
|
18384
|
+
question: "Do I earn Endur points on looped xSTRK?",
|
|
18385
|
+
answer: "Yes. All xSTRK in the looped position contributes to your Endur points, allowing you to farm points more effectively with leverage. Visit endur.fi/leaderboard to see your points."
|
|
18386
|
+
}
|
|
18387
|
+
];
|
|
18388
|
+
var SenseiStrategies = [
|
|
18389
|
+
{
|
|
18390
|
+
name: "xSTRK Sensei",
|
|
18391
|
+
description: highlightTextWithLinks(
|
|
18392
|
+
senseiDescription.replaceAll("{{token1}}", "STRK").replaceAll("{{token2}}", "xSTRK"),
|
|
18393
|
+
[{
|
|
18394
|
+
highlight: "Endur",
|
|
18395
|
+
link: "https://endur.fi"
|
|
18396
|
+
}, {
|
|
18397
|
+
highlight: "Vesu",
|
|
18398
|
+
link: "https://vesu.xyz"
|
|
18399
|
+
}, {
|
|
18400
|
+
highlight: "delta neutral position",
|
|
18401
|
+
link: "https://www.investopedia.com/terms/d/deltaneutral.asp"
|
|
18402
|
+
}]
|
|
18403
|
+
),
|
|
18404
|
+
address: ContractAddr.from(
|
|
18405
|
+
"0x7023a5cadc8a5db80e4f0fde6b330cbd3c17bbbf9cb145cbabd7bd5e6fb7b0b"
|
|
18406
|
+
),
|
|
18407
|
+
launchBlock: 1053811,
|
|
18408
|
+
type: "Other",
|
|
18409
|
+
depositTokens: [
|
|
18410
|
+
Global.getDefaultTokens().find((t) => t.symbol === "STRK")
|
|
18411
|
+
],
|
|
18412
|
+
protocols: [endurProtocol, vesuProtocol],
|
|
18413
|
+
maxTVL: new Web3Number("1500000", 18),
|
|
18414
|
+
risk: {
|
|
18415
|
+
riskFactor: _riskFactor3,
|
|
18416
|
+
netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
|
|
18417
|
+
notARisks: getNoRiskTags(_riskFactor3)
|
|
18418
|
+
},
|
|
18419
|
+
additionalInfo: {
|
|
18420
|
+
mainToken: Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
18421
|
+
secondaryToken: Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"),
|
|
18422
|
+
targetHfBps: 11e3,
|
|
18423
|
+
// 1.1 health factor
|
|
18424
|
+
feeBps: 2e3
|
|
18425
|
+
// 2% fee on profits
|
|
18426
|
+
},
|
|
18427
|
+
faqs: FAQS,
|
|
18428
|
+
contractDetails: [],
|
|
18429
|
+
investmentSteps: [
|
|
18430
|
+
"Swap STRK for xSTRK",
|
|
18431
|
+
"Deposit xSTRK to Vesu's Re7 xSTRK Pool",
|
|
18432
|
+
"Borrow STRK against your xSTRK collateral",
|
|
18433
|
+
"Buy more xSTRK with borrowed STRK",
|
|
18434
|
+
"Repeat the process to loop your position",
|
|
18435
|
+
"Claim DeFi spring (STRK) rewards weekly and reinvest"
|
|
18436
|
+
]
|
|
18437
|
+
}
|
|
18438
|
+
];
|
|
18439
|
+
|
|
18440
|
+
// src/notifs/telegram.ts
|
|
18441
|
+
var import_node_telegram_bot_api = __toESM(require("node-telegram-bot-api"));
|
|
18442
|
+
var TelegramNotif = class {
|
|
18443
|
+
constructor(token, shouldPoll) {
|
|
18444
|
+
this.subscribers = [
|
|
18445
|
+
// '6820228303',
|
|
18446
|
+
"1505578076",
|
|
18447
|
+
// '5434736198', // maaza
|
|
18448
|
+
"1356705582",
|
|
18449
|
+
// langs
|
|
18450
|
+
"1388729514",
|
|
18451
|
+
// hwashere
|
|
18452
|
+
"6020162572",
|
|
18453
|
+
//minato
|
|
18454
|
+
"985902592"
|
|
18455
|
+
];
|
|
18456
|
+
this.bot = new import_node_telegram_bot_api.default(token, { polling: shouldPoll });
|
|
18457
|
+
}
|
|
18458
|
+
// listen to start msgs, register chatId and send registered msg
|
|
18459
|
+
activateChatBot() {
|
|
18460
|
+
this.bot.on("message", (msg) => {
|
|
18461
|
+
const chatId = msg.chat.id;
|
|
18462
|
+
let text = msg.text.toLowerCase().trim();
|
|
18463
|
+
logger.verbose(`Tg: IncomingMsg: ID: ${chatId}, msg: ${text}`);
|
|
18464
|
+
if (text == "start") {
|
|
18465
|
+
this.bot.sendMessage(chatId, "Registered");
|
|
18466
|
+
this.subscribers.push(chatId);
|
|
18467
|
+
logger.verbose(`Tg: New subscriber: ${chatId}`);
|
|
18468
|
+
} else {
|
|
18469
|
+
this.bot.sendMessage(chatId, "Unrecognized command. Supported commands: start");
|
|
18470
|
+
}
|
|
18471
|
+
});
|
|
18472
|
+
}
|
|
18473
|
+
// send a given msg to all registered users
|
|
18474
|
+
sendMessage(msg) {
|
|
18475
|
+
logger.verbose(`Tg: Sending message: ${msg}`);
|
|
18476
|
+
for (let chatId of this.subscribers) {
|
|
18477
|
+
this.bot.sendMessage(chatId, msg).catch((err) => {
|
|
18478
|
+
logger.error(`Tg: Error sending msg to ${chatId}`);
|
|
18479
|
+
logger.error(`Tg: Error sending message: ${err.message}`);
|
|
18480
|
+
}).then(() => {
|
|
18481
|
+
logger.verbose(`Tg: Message sent to ${chatId}`);
|
|
18482
|
+
});
|
|
18483
|
+
}
|
|
18484
|
+
}
|
|
18485
|
+
};
|
|
18486
|
+
|
|
18487
|
+
// src/node/pricer-redis.ts
|
|
18488
|
+
var import_redis = require("redis");
|
|
18489
|
+
var PricerRedis = class extends Pricer {
|
|
18490
|
+
constructor(config, tokens2) {
|
|
18491
|
+
super(config, tokens2);
|
|
18492
|
+
this.redisClient = null;
|
|
18493
|
+
}
|
|
18494
|
+
/** Reads prices from Pricer._loadPrices and uses a callback to set prices in redis */
|
|
18495
|
+
async startWithRedis(redisUrl) {
|
|
18496
|
+
await this.initRedis(redisUrl);
|
|
18497
|
+
logger.info(`Starting Pricer with Redis`);
|
|
18498
|
+
this._loadPrices(this._setRedisPrices.bind(this));
|
|
18499
|
+
setInterval(() => {
|
|
18500
|
+
this._loadPrices(this._setRedisPrices.bind(this));
|
|
18501
|
+
}, 3e4);
|
|
18502
|
+
}
|
|
18503
|
+
async close() {
|
|
18504
|
+
if (this.redisClient) {
|
|
18505
|
+
await this.redisClient.disconnect();
|
|
18506
|
+
}
|
|
18507
|
+
}
|
|
18508
|
+
async initRedis(redisUrl) {
|
|
18509
|
+
logger.info(`Initialising Redis Client`);
|
|
18510
|
+
this.redisClient = await (0, import_redis.createClient)({
|
|
18511
|
+
url: redisUrl
|
|
18512
|
+
});
|
|
18513
|
+
this.redisClient.on("error", (err) => console.log("Redis Client Error", err)).connect();
|
|
18514
|
+
logger.info(`Redis Client Initialised`);
|
|
18515
|
+
}
|
|
18516
|
+
/** sets current local price in redis */
|
|
18517
|
+
_setRedisPrices(tokenSymbol) {
|
|
18518
|
+
if (!this.redisClient) {
|
|
18519
|
+
throw new FatalError(`Redis client not initialised`);
|
|
18520
|
+
}
|
|
18521
|
+
this.redisClient.set(`Price:${tokenSymbol}`, JSON.stringify(this.prices[tokenSymbol])).catch((err) => {
|
|
18522
|
+
logger.warn(`Error setting price in redis for ${tokenSymbol}`);
|
|
18523
|
+
});
|
|
18524
|
+
}
|
|
18525
|
+
/** Returns price from redis */
|
|
18526
|
+
async getPrice(tokenSymbol) {
|
|
18527
|
+
const STALE_TIME = 6e4;
|
|
18528
|
+
if (!this.redisClient) {
|
|
18529
|
+
throw new FatalError(`Redis client not initialised`);
|
|
18530
|
+
}
|
|
18531
|
+
const data = await this.redisClient.get(`Price:${tokenSymbol}`);
|
|
18532
|
+
if (!data) {
|
|
18533
|
+
throw new FatalError(`Redis:Price of ${tokenSymbol} not found`);
|
|
18534
|
+
}
|
|
18535
|
+
logger.verbose(`Redis:Price of ${tokenSymbol} is ${data}`);
|
|
18536
|
+
const priceInfo = JSON.parse(data);
|
|
18537
|
+
priceInfo.timestamp = new Date(priceInfo.timestamp);
|
|
18538
|
+
const isStale = (/* @__PURE__ */ new Date()).getTime() - priceInfo.timestamp.getTime() > STALE_TIME;
|
|
18539
|
+
Global.assert(!isStale, `Price of ${tokenSymbol} is stale`);
|
|
18540
|
+
return priceInfo;
|
|
18541
|
+
}
|
|
18542
|
+
};
|
|
18543
|
+
|
|
18544
|
+
// src/utils/store.ts
|
|
18545
|
+
var import_fs = __toESM(require("fs"));
|
|
18546
|
+
var import_starknet11 = require("starknet");
|
|
16454
18547
|
var crypto2 = __toESM(require("crypto"));
|
|
16455
18548
|
|
|
16456
18549
|
// src/utils/encrypt.ts
|
|
@@ -16535,7 +18628,7 @@ var Store = class _Store {
|
|
|
16535
18628
|
logger.warn(`This not stored anywhere, please you backup this password for future use`);
|
|
16536
18629
|
logger.warn(`\u26A0\uFE0F=========================================\u26A0\uFE0F`);
|
|
16537
18630
|
}
|
|
16538
|
-
getAccount(accountKey, txVersion =
|
|
18631
|
+
getAccount(accountKey, txVersion = import_starknet11.constants.TRANSACTION_VERSION.V2) {
|
|
16539
18632
|
const accounts = this.loadAccounts();
|
|
16540
18633
|
logger.verbose(`nAccounts loaded for network: ${Object.keys(accounts).length}`);
|
|
16541
18634
|
const data = accounts[accountKey];
|
|
@@ -16544,7 +18637,7 @@ var Store = class _Store {
|
|
|
16544
18637
|
}
|
|
16545
18638
|
logger.verbose(`Account loaded: ${accountKey} from network: ${this.config.network}`);
|
|
16546
18639
|
logger.verbose(`Address: ${data.address}`);
|
|
16547
|
-
const acc = new
|
|
18640
|
+
const acc = new import_starknet11.Account(this.config.provider, data.address, data.pk, void 0, txVersion);
|
|
16548
18641
|
return acc;
|
|
16549
18642
|
}
|
|
16550
18643
|
addAccount(accountKey, address, pk) {
|
|
@@ -16627,6 +18720,8 @@ var Store = class _Store {
|
|
|
16627
18720
|
PricerFromApi,
|
|
16628
18721
|
PricerRedis,
|
|
16629
18722
|
RiskType,
|
|
18723
|
+
SenseiStrategies,
|
|
18724
|
+
SenseiVault,
|
|
16630
18725
|
Store,
|
|
16631
18726
|
TelegramNotif,
|
|
16632
18727
|
VesuRebalance,
|
|
@@ -16640,6 +18735,7 @@ var Store = class _Store {
|
|
|
16640
18735
|
getNoRiskTags,
|
|
16641
18736
|
getRiskColor,
|
|
16642
18737
|
getRiskExplaination,
|
|
18738
|
+
getTrovesEndpoint,
|
|
16643
18739
|
highlightTextWithLinks,
|
|
16644
18740
|
logger
|
|
16645
18741
|
});
|