@strkfarm/sdk 2.0.0-staging.49 → 2.0.0-staging.50
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 +18 -1155
- package/dist/index.browser.mjs +18 -1157
- package/dist/index.d.ts +6 -3
- package/dist/index.js +18 -1157
- package/dist/index.mjs +18 -1157
- package/package.json +1 -1
- package/src/strategies/yoloVault.ts +25 -16
- package/src/data/yoloVault.abi.json +0 -1141
|
@@ -115895,1149 +115895,6 @@ spurious results.`);
|
|
|
115895
115895
|
}
|
|
115896
115896
|
];
|
|
115897
115897
|
|
|
115898
|
-
// src/data/yoloVault.abi.json
|
|
115899
|
-
var yoloVault_abi_default = [
|
|
115900
|
-
{
|
|
115901
|
-
type: "impl",
|
|
115902
|
-
name: "YoloERC20Impl",
|
|
115903
|
-
interface_name: "openzeppelin_token::erc20::interface::IERC20Mixin"
|
|
115904
|
-
},
|
|
115905
|
-
{
|
|
115906
|
-
type: "struct",
|
|
115907
|
-
name: "core::integer::u256",
|
|
115908
|
-
members: [
|
|
115909
|
-
{
|
|
115910
|
-
name: "low",
|
|
115911
|
-
type: "core::integer::u128"
|
|
115912
|
-
},
|
|
115913
|
-
{
|
|
115914
|
-
name: "high",
|
|
115915
|
-
type: "core::integer::u128"
|
|
115916
|
-
}
|
|
115917
|
-
]
|
|
115918
|
-
},
|
|
115919
|
-
{
|
|
115920
|
-
type: "enum",
|
|
115921
|
-
name: "core::bool",
|
|
115922
|
-
variants: [
|
|
115923
|
-
{
|
|
115924
|
-
name: "False",
|
|
115925
|
-
type: "()"
|
|
115926
|
-
},
|
|
115927
|
-
{
|
|
115928
|
-
name: "True",
|
|
115929
|
-
type: "()"
|
|
115930
|
-
}
|
|
115931
|
-
]
|
|
115932
|
-
},
|
|
115933
|
-
{
|
|
115934
|
-
type: "struct",
|
|
115935
|
-
name: "core::byte_array::ByteArray",
|
|
115936
|
-
members: [
|
|
115937
|
-
{
|
|
115938
|
-
name: "data",
|
|
115939
|
-
type: "core::array::Array::<core::bytes_31::bytes31>"
|
|
115940
|
-
},
|
|
115941
|
-
{
|
|
115942
|
-
name: "pending_word",
|
|
115943
|
-
type: "core::felt252"
|
|
115944
|
-
},
|
|
115945
|
-
{
|
|
115946
|
-
name: "pending_word_len",
|
|
115947
|
-
type: "core::integer::u32"
|
|
115948
|
-
}
|
|
115949
|
-
]
|
|
115950
|
-
},
|
|
115951
|
-
{
|
|
115952
|
-
type: "interface",
|
|
115953
|
-
name: "openzeppelin_token::erc20::interface::IERC20Mixin",
|
|
115954
|
-
items: [
|
|
115955
|
-
{
|
|
115956
|
-
type: "function",
|
|
115957
|
-
name: "total_supply",
|
|
115958
|
-
inputs: [],
|
|
115959
|
-
outputs: [
|
|
115960
|
-
{
|
|
115961
|
-
type: "core::integer::u256"
|
|
115962
|
-
}
|
|
115963
|
-
],
|
|
115964
|
-
state_mutability: "view"
|
|
115965
|
-
},
|
|
115966
|
-
{
|
|
115967
|
-
type: "function",
|
|
115968
|
-
name: "balance_of",
|
|
115969
|
-
inputs: [
|
|
115970
|
-
{
|
|
115971
|
-
name: "account",
|
|
115972
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
115973
|
-
}
|
|
115974
|
-
],
|
|
115975
|
-
outputs: [
|
|
115976
|
-
{
|
|
115977
|
-
type: "core::integer::u256"
|
|
115978
|
-
}
|
|
115979
|
-
],
|
|
115980
|
-
state_mutability: "view"
|
|
115981
|
-
},
|
|
115982
|
-
{
|
|
115983
|
-
type: "function",
|
|
115984
|
-
name: "allowance",
|
|
115985
|
-
inputs: [
|
|
115986
|
-
{
|
|
115987
|
-
name: "owner",
|
|
115988
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
115989
|
-
},
|
|
115990
|
-
{
|
|
115991
|
-
name: "spender",
|
|
115992
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
115993
|
-
}
|
|
115994
|
-
],
|
|
115995
|
-
outputs: [
|
|
115996
|
-
{
|
|
115997
|
-
type: "core::integer::u256"
|
|
115998
|
-
}
|
|
115999
|
-
],
|
|
116000
|
-
state_mutability: "view"
|
|
116001
|
-
},
|
|
116002
|
-
{
|
|
116003
|
-
type: "function",
|
|
116004
|
-
name: "transfer",
|
|
116005
|
-
inputs: [
|
|
116006
|
-
{
|
|
116007
|
-
name: "recipient",
|
|
116008
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116009
|
-
},
|
|
116010
|
-
{
|
|
116011
|
-
name: "amount",
|
|
116012
|
-
type: "core::integer::u256"
|
|
116013
|
-
}
|
|
116014
|
-
],
|
|
116015
|
-
outputs: [
|
|
116016
|
-
{
|
|
116017
|
-
type: "core::bool"
|
|
116018
|
-
}
|
|
116019
|
-
],
|
|
116020
|
-
state_mutability: "external"
|
|
116021
|
-
},
|
|
116022
|
-
{
|
|
116023
|
-
type: "function",
|
|
116024
|
-
name: "transfer_from",
|
|
116025
|
-
inputs: [
|
|
116026
|
-
{
|
|
116027
|
-
name: "sender",
|
|
116028
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116029
|
-
},
|
|
116030
|
-
{
|
|
116031
|
-
name: "recipient",
|
|
116032
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116033
|
-
},
|
|
116034
|
-
{
|
|
116035
|
-
name: "amount",
|
|
116036
|
-
type: "core::integer::u256"
|
|
116037
|
-
}
|
|
116038
|
-
],
|
|
116039
|
-
outputs: [
|
|
116040
|
-
{
|
|
116041
|
-
type: "core::bool"
|
|
116042
|
-
}
|
|
116043
|
-
],
|
|
116044
|
-
state_mutability: "external"
|
|
116045
|
-
},
|
|
116046
|
-
{
|
|
116047
|
-
type: "function",
|
|
116048
|
-
name: "approve",
|
|
116049
|
-
inputs: [
|
|
116050
|
-
{
|
|
116051
|
-
name: "spender",
|
|
116052
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116053
|
-
},
|
|
116054
|
-
{
|
|
116055
|
-
name: "amount",
|
|
116056
|
-
type: "core::integer::u256"
|
|
116057
|
-
}
|
|
116058
|
-
],
|
|
116059
|
-
outputs: [
|
|
116060
|
-
{
|
|
116061
|
-
type: "core::bool"
|
|
116062
|
-
}
|
|
116063
|
-
],
|
|
116064
|
-
state_mutability: "external"
|
|
116065
|
-
},
|
|
116066
|
-
{
|
|
116067
|
-
type: "function",
|
|
116068
|
-
name: "name",
|
|
116069
|
-
inputs: [],
|
|
116070
|
-
outputs: [
|
|
116071
|
-
{
|
|
116072
|
-
type: "core::byte_array::ByteArray"
|
|
116073
|
-
}
|
|
116074
|
-
],
|
|
116075
|
-
state_mutability: "view"
|
|
116076
|
-
},
|
|
116077
|
-
{
|
|
116078
|
-
type: "function",
|
|
116079
|
-
name: "symbol",
|
|
116080
|
-
inputs: [],
|
|
116081
|
-
outputs: [
|
|
116082
|
-
{
|
|
116083
|
-
type: "core::byte_array::ByteArray"
|
|
116084
|
-
}
|
|
116085
|
-
],
|
|
116086
|
-
state_mutability: "view"
|
|
116087
|
-
},
|
|
116088
|
-
{
|
|
116089
|
-
type: "function",
|
|
116090
|
-
name: "decimals",
|
|
116091
|
-
inputs: [],
|
|
116092
|
-
outputs: [
|
|
116093
|
-
{
|
|
116094
|
-
type: "core::integer::u8"
|
|
116095
|
-
}
|
|
116096
|
-
],
|
|
116097
|
-
state_mutability: "view"
|
|
116098
|
-
},
|
|
116099
|
-
{
|
|
116100
|
-
type: "function",
|
|
116101
|
-
name: "totalSupply",
|
|
116102
|
-
inputs: [],
|
|
116103
|
-
outputs: [
|
|
116104
|
-
{
|
|
116105
|
-
type: "core::integer::u256"
|
|
116106
|
-
}
|
|
116107
|
-
],
|
|
116108
|
-
state_mutability: "view"
|
|
116109
|
-
},
|
|
116110
|
-
{
|
|
116111
|
-
type: "function",
|
|
116112
|
-
name: "balanceOf",
|
|
116113
|
-
inputs: [
|
|
116114
|
-
{
|
|
116115
|
-
name: "account",
|
|
116116
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116117
|
-
}
|
|
116118
|
-
],
|
|
116119
|
-
outputs: [
|
|
116120
|
-
{
|
|
116121
|
-
type: "core::integer::u256"
|
|
116122
|
-
}
|
|
116123
|
-
],
|
|
116124
|
-
state_mutability: "view"
|
|
116125
|
-
},
|
|
116126
|
-
{
|
|
116127
|
-
type: "function",
|
|
116128
|
-
name: "transferFrom",
|
|
116129
|
-
inputs: [
|
|
116130
|
-
{
|
|
116131
|
-
name: "sender",
|
|
116132
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116133
|
-
},
|
|
116134
|
-
{
|
|
116135
|
-
name: "recipient",
|
|
116136
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116137
|
-
},
|
|
116138
|
-
{
|
|
116139
|
-
name: "amount",
|
|
116140
|
-
type: "core::integer::u256"
|
|
116141
|
-
}
|
|
116142
|
-
],
|
|
116143
|
-
outputs: [
|
|
116144
|
-
{
|
|
116145
|
-
type: "core::bool"
|
|
116146
|
-
}
|
|
116147
|
-
],
|
|
116148
|
-
state_mutability: "external"
|
|
116149
|
-
}
|
|
116150
|
-
]
|
|
116151
|
-
},
|
|
116152
|
-
{
|
|
116153
|
-
type: "impl",
|
|
116154
|
-
name: "YoloVaultImpl",
|
|
116155
|
-
interface_name: "contracts_private::strategies::yolo_vault::interface::IYoloVault"
|
|
116156
|
-
},
|
|
116157
|
-
{
|
|
116158
|
-
type: "struct",
|
|
116159
|
-
name: "strkfarm_contracts::components::swap::Route",
|
|
116160
|
-
members: [
|
|
116161
|
-
{
|
|
116162
|
-
name: "token_from",
|
|
116163
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116164
|
-
},
|
|
116165
|
-
{
|
|
116166
|
-
name: "token_to",
|
|
116167
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116168
|
-
},
|
|
116169
|
-
{
|
|
116170
|
-
name: "exchange_address",
|
|
116171
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116172
|
-
},
|
|
116173
|
-
{
|
|
116174
|
-
name: "percent",
|
|
116175
|
-
type: "core::integer::u128"
|
|
116176
|
-
},
|
|
116177
|
-
{
|
|
116178
|
-
name: "additional_swap_params",
|
|
116179
|
-
type: "core::array::Array::<core::felt252>"
|
|
116180
|
-
}
|
|
116181
|
-
]
|
|
116182
|
-
},
|
|
116183
|
-
{
|
|
116184
|
-
type: "struct",
|
|
116185
|
-
name: "strkfarm_contracts::components::swap::AvnuMultiRouteSwap",
|
|
116186
|
-
members: [
|
|
116187
|
-
{
|
|
116188
|
-
name: "token_from_address",
|
|
116189
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116190
|
-
},
|
|
116191
|
-
{
|
|
116192
|
-
name: "token_from_amount",
|
|
116193
|
-
type: "core::integer::u256"
|
|
116194
|
-
},
|
|
116195
|
-
{
|
|
116196
|
-
name: "token_to_address",
|
|
116197
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116198
|
-
},
|
|
116199
|
-
{
|
|
116200
|
-
name: "token_to_amount",
|
|
116201
|
-
type: "core::integer::u256"
|
|
116202
|
-
},
|
|
116203
|
-
{
|
|
116204
|
-
name: "token_to_min_amount",
|
|
116205
|
-
type: "core::integer::u256"
|
|
116206
|
-
},
|
|
116207
|
-
{
|
|
116208
|
-
name: "beneficiary",
|
|
116209
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116210
|
-
},
|
|
116211
|
-
{
|
|
116212
|
-
name: "integrator_fee_amount_bps",
|
|
116213
|
-
type: "core::integer::u128"
|
|
116214
|
-
},
|
|
116215
|
-
{
|
|
116216
|
-
name: "integrator_fee_recipient",
|
|
116217
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116218
|
-
},
|
|
116219
|
-
{
|
|
116220
|
-
name: "routes",
|
|
116221
|
-
type: "core::array::Array::<strkfarm_contracts::components::swap::Route>"
|
|
116222
|
-
}
|
|
116223
|
-
]
|
|
116224
|
-
},
|
|
116225
|
-
{
|
|
116226
|
-
type: "struct",
|
|
116227
|
-
name: "contracts_private::strategies::yolo_vault::interface::YoloFeeSettings",
|
|
116228
|
-
members: [
|
|
116229
|
-
{
|
|
116230
|
-
name: "swap_fee_bps",
|
|
116231
|
-
type: "core::integer::u256"
|
|
116232
|
-
},
|
|
116233
|
-
{
|
|
116234
|
-
name: "performance_fee_bps",
|
|
116235
|
-
type: "core::integer::u256"
|
|
116236
|
-
},
|
|
116237
|
-
{
|
|
116238
|
-
name: "fee_receiver",
|
|
116239
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116240
|
-
}
|
|
116241
|
-
]
|
|
116242
|
-
},
|
|
116243
|
-
{
|
|
116244
|
-
type: "struct",
|
|
116245
|
-
name: "contracts_private::strategies::yolo_vault::interface::YoloVaultStatus",
|
|
116246
|
-
members: [
|
|
116247
|
-
{
|
|
116248
|
-
name: "current_epoch",
|
|
116249
|
-
type: "core::integer::u256"
|
|
116250
|
-
},
|
|
116251
|
-
{
|
|
116252
|
-
name: "total_epochs",
|
|
116253
|
-
type: "core::integer::u256"
|
|
116254
|
-
},
|
|
116255
|
-
{
|
|
116256
|
-
name: "remaining_base",
|
|
116257
|
-
type: "core::integer::u256"
|
|
116258
|
-
},
|
|
116259
|
-
{
|
|
116260
|
-
name: "total_second_tokens",
|
|
116261
|
-
type: "core::integer::u256"
|
|
116262
|
-
},
|
|
116263
|
-
{
|
|
116264
|
-
name: "global_second_token_index",
|
|
116265
|
-
type: "core::integer::u256"
|
|
116266
|
-
},
|
|
116267
|
-
{
|
|
116268
|
-
name: "cumulative_spend_index",
|
|
116269
|
-
type: "core::integer::u256"
|
|
116270
|
-
},
|
|
116271
|
-
{
|
|
116272
|
-
name: "total_shares",
|
|
116273
|
-
type: "core::integer::u256"
|
|
116274
|
-
},
|
|
116275
|
-
{
|
|
116276
|
-
name: "base_token_assets_per_share",
|
|
116277
|
-
type: "core::integer::u256"
|
|
116278
|
-
}
|
|
116279
|
-
]
|
|
116280
|
-
},
|
|
116281
|
-
{
|
|
116282
|
-
type: "struct",
|
|
116283
|
-
name: "contracts_private::strategies::yolo_vault::interface::UserYoloInfo",
|
|
116284
|
-
members: [
|
|
116285
|
-
{
|
|
116286
|
-
name: "shares",
|
|
116287
|
-
type: "core::integer::u256"
|
|
116288
|
-
},
|
|
116289
|
-
{
|
|
116290
|
-
name: "claimable_second_tokens",
|
|
116291
|
-
type: "core::integer::u256"
|
|
116292
|
-
},
|
|
116293
|
-
{
|
|
116294
|
-
name: "base_token_balance",
|
|
116295
|
-
type: "core::integer::u256"
|
|
116296
|
-
},
|
|
116297
|
-
{
|
|
116298
|
-
name: "base_token_consumed",
|
|
116299
|
-
type: "core::integer::u256"
|
|
116300
|
-
},
|
|
116301
|
-
{
|
|
116302
|
-
name: "base_consumed_last_index",
|
|
116303
|
-
type: "core::integer::u256"
|
|
116304
|
-
},
|
|
116305
|
-
{
|
|
116306
|
-
name: "second_token_last_index",
|
|
116307
|
-
type: "core::integer::u256"
|
|
116308
|
-
},
|
|
116309
|
-
{
|
|
116310
|
-
name: "second_token_balance",
|
|
116311
|
-
type: "core::integer::u256"
|
|
116312
|
-
}
|
|
116313
|
-
]
|
|
116314
|
-
},
|
|
116315
|
-
{
|
|
116316
|
-
type: "struct",
|
|
116317
|
-
name: "contracts_private::strategies::yolo_vault::interface::YoloSettings",
|
|
116318
|
-
members: [
|
|
116319
|
-
{
|
|
116320
|
-
name: "base_token",
|
|
116321
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116322
|
-
},
|
|
116323
|
-
{
|
|
116324
|
-
name: "second_token",
|
|
116325
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116326
|
-
},
|
|
116327
|
-
{
|
|
116328
|
-
name: "total_epochs",
|
|
116329
|
-
type: "core::integer::u256"
|
|
116330
|
-
},
|
|
116331
|
-
{
|
|
116332
|
-
name: "min_time_per_epoch",
|
|
116333
|
-
type: "core::integer::u64"
|
|
116334
|
-
},
|
|
116335
|
-
{
|
|
116336
|
-
name: "max_spend_units_per_epoch",
|
|
116337
|
-
type: "core::integer::u256"
|
|
116338
|
-
},
|
|
116339
|
-
{
|
|
116340
|
-
name: "base_token_assets_per_share",
|
|
116341
|
-
type: "core::integer::u256"
|
|
116342
|
-
},
|
|
116343
|
-
{
|
|
116344
|
-
name: "oracle",
|
|
116345
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116346
|
-
}
|
|
116347
|
-
]
|
|
116348
|
-
},
|
|
116349
|
-
{
|
|
116350
|
-
type: "interface",
|
|
116351
|
-
name: "contracts_private::strategies::yolo_vault::interface::IYoloVault",
|
|
116352
|
-
items: [
|
|
116353
|
-
{
|
|
116354
|
-
type: "function",
|
|
116355
|
-
name: "deposit",
|
|
116356
|
-
inputs: [
|
|
116357
|
-
{
|
|
116358
|
-
name: "base_token_amount",
|
|
116359
|
-
type: "core::integer::u256"
|
|
116360
|
-
},
|
|
116361
|
-
{
|
|
116362
|
-
name: "receiver",
|
|
116363
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116364
|
-
}
|
|
116365
|
-
],
|
|
116366
|
-
outputs: [],
|
|
116367
|
-
state_mutability: "external"
|
|
116368
|
-
},
|
|
116369
|
-
{
|
|
116370
|
-
type: "function",
|
|
116371
|
-
name: "redeem",
|
|
116372
|
-
inputs: [
|
|
116373
|
-
{
|
|
116374
|
-
name: "shares",
|
|
116375
|
-
type: "core::integer::u256"
|
|
116376
|
-
},
|
|
116377
|
-
{
|
|
116378
|
-
name: "receiver",
|
|
116379
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116380
|
-
}
|
|
116381
|
-
],
|
|
116382
|
-
outputs: [],
|
|
116383
|
-
state_mutability: "external"
|
|
116384
|
-
},
|
|
116385
|
-
{
|
|
116386
|
-
type: "function",
|
|
116387
|
-
name: "deposit_combined",
|
|
116388
|
-
inputs: [
|
|
116389
|
-
{
|
|
116390
|
-
name: "underlying_amount",
|
|
116391
|
-
type: "core::integer::u256"
|
|
116392
|
-
},
|
|
116393
|
-
{
|
|
116394
|
-
name: "receiver",
|
|
116395
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116396
|
-
}
|
|
116397
|
-
],
|
|
116398
|
-
outputs: [],
|
|
116399
|
-
state_mutability: "external"
|
|
116400
|
-
},
|
|
116401
|
-
{
|
|
116402
|
-
type: "function",
|
|
116403
|
-
name: "redeem_combined",
|
|
116404
|
-
inputs: [
|
|
116405
|
-
{
|
|
116406
|
-
name: "shares",
|
|
116407
|
-
type: "core::integer::u256"
|
|
116408
|
-
},
|
|
116409
|
-
{
|
|
116410
|
-
name: "receiver",
|
|
116411
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116412
|
-
}
|
|
116413
|
-
],
|
|
116414
|
-
outputs: [],
|
|
116415
|
-
state_mutability: "external"
|
|
116416
|
-
},
|
|
116417
|
-
{
|
|
116418
|
-
type: "function",
|
|
116419
|
-
name: "execute_swap",
|
|
116420
|
-
inputs: [
|
|
116421
|
-
{
|
|
116422
|
-
name: "spend_units",
|
|
116423
|
-
type: "core::integer::u256"
|
|
116424
|
-
},
|
|
116425
|
-
{
|
|
116426
|
-
name: "swap_params",
|
|
116427
|
-
type: "strkfarm_contracts::components::swap::AvnuMultiRouteSwap"
|
|
116428
|
-
}
|
|
116429
|
-
],
|
|
116430
|
-
outputs: [],
|
|
116431
|
-
state_mutability: "external"
|
|
116432
|
-
},
|
|
116433
|
-
{
|
|
116434
|
-
type: "function",
|
|
116435
|
-
name: "update_fee_settings",
|
|
116436
|
-
inputs: [
|
|
116437
|
-
{
|
|
116438
|
-
name: "new_settings",
|
|
116439
|
-
type: "contracts_private::strategies::yolo_vault::interface::YoloFeeSettings"
|
|
116440
|
-
}
|
|
116441
|
-
],
|
|
116442
|
-
outputs: [],
|
|
116443
|
-
state_mutability: "external"
|
|
116444
|
-
},
|
|
116445
|
-
{
|
|
116446
|
-
type: "function",
|
|
116447
|
-
name: "update_max_spend_units",
|
|
116448
|
-
inputs: [
|
|
116449
|
-
{
|
|
116450
|
-
name: "new_max",
|
|
116451
|
-
type: "core::integer::u256"
|
|
116452
|
-
}
|
|
116453
|
-
],
|
|
116454
|
-
outputs: [],
|
|
116455
|
-
state_mutability: "external"
|
|
116456
|
-
},
|
|
116457
|
-
{
|
|
116458
|
-
type: "function",
|
|
116459
|
-
name: "get_swap_amounts",
|
|
116460
|
-
inputs: [
|
|
116461
|
-
{
|
|
116462
|
-
name: "spend_units",
|
|
116463
|
-
type: "core::integer::u256"
|
|
116464
|
-
}
|
|
116465
|
-
],
|
|
116466
|
-
outputs: [
|
|
116467
|
-
{
|
|
116468
|
-
type: "(core::integer::u256, core::integer::u256, core::bool)"
|
|
116469
|
-
}
|
|
116470
|
-
],
|
|
116471
|
-
state_mutability: "view"
|
|
116472
|
-
},
|
|
116473
|
-
{
|
|
116474
|
-
type: "function",
|
|
116475
|
-
name: "get_user_claimable_second_tokens",
|
|
116476
|
-
inputs: [
|
|
116477
|
-
{
|
|
116478
|
-
name: "user",
|
|
116479
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116480
|
-
}
|
|
116481
|
-
],
|
|
116482
|
-
outputs: [
|
|
116483
|
-
{
|
|
116484
|
-
type: "core::integer::u256"
|
|
116485
|
-
}
|
|
116486
|
-
],
|
|
116487
|
-
state_mutability: "view"
|
|
116488
|
-
},
|
|
116489
|
-
{
|
|
116490
|
-
type: "function",
|
|
116491
|
-
name: "get_user_base_token_consumed",
|
|
116492
|
-
inputs: [
|
|
116493
|
-
{
|
|
116494
|
-
name: "user",
|
|
116495
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116496
|
-
}
|
|
116497
|
-
],
|
|
116498
|
-
outputs: [
|
|
116499
|
-
{
|
|
116500
|
-
type: "core::integer::u256"
|
|
116501
|
-
}
|
|
116502
|
-
],
|
|
116503
|
-
state_mutability: "view"
|
|
116504
|
-
},
|
|
116505
|
-
{
|
|
116506
|
-
type: "function",
|
|
116507
|
-
name: "get_user_base_token_balance",
|
|
116508
|
-
inputs: [
|
|
116509
|
-
{
|
|
116510
|
-
name: "user",
|
|
116511
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116512
|
-
}
|
|
116513
|
-
],
|
|
116514
|
-
outputs: [
|
|
116515
|
-
{
|
|
116516
|
-
type: "core::integer::u256"
|
|
116517
|
-
}
|
|
116518
|
-
],
|
|
116519
|
-
state_mutability: "view"
|
|
116520
|
-
},
|
|
116521
|
-
{
|
|
116522
|
-
type: "function",
|
|
116523
|
-
name: "get_vault_status",
|
|
116524
|
-
inputs: [],
|
|
116525
|
-
outputs: [
|
|
116526
|
-
{
|
|
116527
|
-
type: "contracts_private::strategies::yolo_vault::interface::YoloVaultStatus"
|
|
116528
|
-
}
|
|
116529
|
-
],
|
|
116530
|
-
state_mutability: "view"
|
|
116531
|
-
},
|
|
116532
|
-
{
|
|
116533
|
-
type: "function",
|
|
116534
|
-
name: "get_user_info",
|
|
116535
|
-
inputs: [
|
|
116536
|
-
{
|
|
116537
|
-
name: "user",
|
|
116538
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116539
|
-
}
|
|
116540
|
-
],
|
|
116541
|
-
outputs: [
|
|
116542
|
-
{
|
|
116543
|
-
type: "contracts_private::strategies::yolo_vault::interface::UserYoloInfo"
|
|
116544
|
-
}
|
|
116545
|
-
],
|
|
116546
|
-
state_mutability: "view"
|
|
116547
|
-
},
|
|
116548
|
-
{
|
|
116549
|
-
type: "function",
|
|
116550
|
-
name: "get_settings",
|
|
116551
|
-
inputs: [],
|
|
116552
|
-
outputs: [
|
|
116553
|
-
{
|
|
116554
|
-
type: "contracts_private::strategies::yolo_vault::interface::YoloSettings"
|
|
116555
|
-
}
|
|
116556
|
-
],
|
|
116557
|
-
state_mutability: "view"
|
|
116558
|
-
},
|
|
116559
|
-
{
|
|
116560
|
-
type: "function",
|
|
116561
|
-
name: "get_fee_settings",
|
|
116562
|
-
inputs: [],
|
|
116563
|
-
outputs: [
|
|
116564
|
-
{
|
|
116565
|
-
type: "contracts_private::strategies::yolo_vault::interface::YoloFeeSettings"
|
|
116566
|
-
}
|
|
116567
|
-
],
|
|
116568
|
-
state_mutability: "view"
|
|
116569
|
-
},
|
|
116570
|
-
{
|
|
116571
|
-
type: "function",
|
|
116572
|
-
name: "get_shares_on_deposit",
|
|
116573
|
-
inputs: [
|
|
116574
|
-
{
|
|
116575
|
-
name: "base_token_amount",
|
|
116576
|
-
type: "core::integer::u256"
|
|
116577
|
-
}
|
|
116578
|
-
],
|
|
116579
|
-
outputs: [
|
|
116580
|
-
{
|
|
116581
|
-
type: "core::integer::u256"
|
|
116582
|
-
}
|
|
116583
|
-
],
|
|
116584
|
-
state_mutability: "view"
|
|
116585
|
-
}
|
|
116586
|
-
]
|
|
116587
|
-
},
|
|
116588
|
-
{
|
|
116589
|
-
type: "impl",
|
|
116590
|
-
name: "CommonCompImpl",
|
|
116591
|
-
interface_name: "strkfarm_contracts::interfaces::common::ICommon"
|
|
116592
|
-
},
|
|
116593
|
-
{
|
|
116594
|
-
type: "interface",
|
|
116595
|
-
name: "strkfarm_contracts::interfaces::common::ICommon",
|
|
116596
|
-
items: [
|
|
116597
|
-
{
|
|
116598
|
-
type: "function",
|
|
116599
|
-
name: "upgrade",
|
|
116600
|
-
inputs: [
|
|
116601
|
-
{
|
|
116602
|
-
name: "new_class",
|
|
116603
|
-
type: "core::starknet::class_hash::ClassHash"
|
|
116604
|
-
}
|
|
116605
|
-
],
|
|
116606
|
-
outputs: [],
|
|
116607
|
-
state_mutability: "external"
|
|
116608
|
-
},
|
|
116609
|
-
{
|
|
116610
|
-
type: "function",
|
|
116611
|
-
name: "pause",
|
|
116612
|
-
inputs: [],
|
|
116613
|
-
outputs: [],
|
|
116614
|
-
state_mutability: "external"
|
|
116615
|
-
},
|
|
116616
|
-
{
|
|
116617
|
-
type: "function",
|
|
116618
|
-
name: "unpause",
|
|
116619
|
-
inputs: [],
|
|
116620
|
-
outputs: [],
|
|
116621
|
-
state_mutability: "external"
|
|
116622
|
-
},
|
|
116623
|
-
{
|
|
116624
|
-
type: "function",
|
|
116625
|
-
name: "is_paused",
|
|
116626
|
-
inputs: [],
|
|
116627
|
-
outputs: [
|
|
116628
|
-
{
|
|
116629
|
-
type: "core::bool"
|
|
116630
|
-
}
|
|
116631
|
-
],
|
|
116632
|
-
state_mutability: "view"
|
|
116633
|
-
},
|
|
116634
|
-
{
|
|
116635
|
-
type: "function",
|
|
116636
|
-
name: "access_control",
|
|
116637
|
-
inputs: [],
|
|
116638
|
-
outputs: [
|
|
116639
|
-
{
|
|
116640
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116641
|
-
}
|
|
116642
|
-
],
|
|
116643
|
-
state_mutability: "view"
|
|
116644
|
-
}
|
|
116645
|
-
]
|
|
116646
|
-
},
|
|
116647
|
-
{
|
|
116648
|
-
type: "constructor",
|
|
116649
|
-
name: "constructor",
|
|
116650
|
-
inputs: [
|
|
116651
|
-
{
|
|
116652
|
-
name: "name",
|
|
116653
|
-
type: "core::byte_array::ByteArray"
|
|
116654
|
-
},
|
|
116655
|
-
{
|
|
116656
|
-
name: "symbol",
|
|
116657
|
-
type: "core::byte_array::ByteArray"
|
|
116658
|
-
},
|
|
116659
|
-
{
|
|
116660
|
-
name: "access_control",
|
|
116661
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116662
|
-
},
|
|
116663
|
-
{
|
|
116664
|
-
name: "base_token",
|
|
116665
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116666
|
-
},
|
|
116667
|
-
{
|
|
116668
|
-
name: "second_token",
|
|
116669
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116670
|
-
},
|
|
116671
|
-
{
|
|
116672
|
-
name: "total_epochs",
|
|
116673
|
-
type: "core::integer::u256"
|
|
116674
|
-
},
|
|
116675
|
-
{
|
|
116676
|
-
name: "min_time_per_epoch",
|
|
116677
|
-
type: "core::integer::u64"
|
|
116678
|
-
},
|
|
116679
|
-
{
|
|
116680
|
-
name: "max_spend_units_per_epoch",
|
|
116681
|
-
type: "core::integer::u256"
|
|
116682
|
-
},
|
|
116683
|
-
{
|
|
116684
|
-
name: "base_token_assets_per_share",
|
|
116685
|
-
type: "core::integer::u256"
|
|
116686
|
-
},
|
|
116687
|
-
{
|
|
116688
|
-
name: "oracle",
|
|
116689
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116690
|
-
},
|
|
116691
|
-
{
|
|
116692
|
-
name: "swap_fee_bps",
|
|
116693
|
-
type: "core::integer::u256"
|
|
116694
|
-
},
|
|
116695
|
-
{
|
|
116696
|
-
name: "performance_fee_bps",
|
|
116697
|
-
type: "core::integer::u256"
|
|
116698
|
-
},
|
|
116699
|
-
{
|
|
116700
|
-
name: "fee_receiver",
|
|
116701
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
116702
|
-
}
|
|
116703
|
-
]
|
|
116704
|
-
},
|
|
116705
|
-
{
|
|
116706
|
-
type: "event",
|
|
116707
|
-
name: "openzeppelin_security::reentrancyguard::ReentrancyGuardComponent::Event",
|
|
116708
|
-
kind: "enum",
|
|
116709
|
-
variants: []
|
|
116710
|
-
},
|
|
116711
|
-
{
|
|
116712
|
-
type: "event",
|
|
116713
|
-
name: "openzeppelin_token::erc20::erc20::ERC20Component::Transfer",
|
|
116714
|
-
kind: "struct",
|
|
116715
|
-
members: [
|
|
116716
|
-
{
|
|
116717
|
-
name: "from",
|
|
116718
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116719
|
-
kind: "key"
|
|
116720
|
-
},
|
|
116721
|
-
{
|
|
116722
|
-
name: "to",
|
|
116723
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116724
|
-
kind: "key"
|
|
116725
|
-
},
|
|
116726
|
-
{
|
|
116727
|
-
name: "value",
|
|
116728
|
-
type: "core::integer::u256",
|
|
116729
|
-
kind: "data"
|
|
116730
|
-
}
|
|
116731
|
-
]
|
|
116732
|
-
},
|
|
116733
|
-
{
|
|
116734
|
-
type: "event",
|
|
116735
|
-
name: "openzeppelin_token::erc20::erc20::ERC20Component::Approval",
|
|
116736
|
-
kind: "struct",
|
|
116737
|
-
members: [
|
|
116738
|
-
{
|
|
116739
|
-
name: "owner",
|
|
116740
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116741
|
-
kind: "key"
|
|
116742
|
-
},
|
|
116743
|
-
{
|
|
116744
|
-
name: "spender",
|
|
116745
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116746
|
-
kind: "key"
|
|
116747
|
-
},
|
|
116748
|
-
{
|
|
116749
|
-
name: "value",
|
|
116750
|
-
type: "core::integer::u256",
|
|
116751
|
-
kind: "data"
|
|
116752
|
-
}
|
|
116753
|
-
]
|
|
116754
|
-
},
|
|
116755
|
-
{
|
|
116756
|
-
type: "event",
|
|
116757
|
-
name: "openzeppelin_token::erc20::erc20::ERC20Component::Event",
|
|
116758
|
-
kind: "enum",
|
|
116759
|
-
variants: [
|
|
116760
|
-
{
|
|
116761
|
-
name: "Transfer",
|
|
116762
|
-
type: "openzeppelin_token::erc20::erc20::ERC20Component::Transfer",
|
|
116763
|
-
kind: "nested"
|
|
116764
|
-
},
|
|
116765
|
-
{
|
|
116766
|
-
name: "Approval",
|
|
116767
|
-
type: "openzeppelin_token::erc20::erc20::ERC20Component::Approval",
|
|
116768
|
-
kind: "nested"
|
|
116769
|
-
}
|
|
116770
|
-
]
|
|
116771
|
-
},
|
|
116772
|
-
{
|
|
116773
|
-
type: "event",
|
|
116774
|
-
name: "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
116775
|
-
kind: "enum",
|
|
116776
|
-
variants: []
|
|
116777
|
-
},
|
|
116778
|
-
{
|
|
116779
|
-
type: "event",
|
|
116780
|
-
name: "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
|
|
116781
|
-
kind: "struct",
|
|
116782
|
-
members: [
|
|
116783
|
-
{
|
|
116784
|
-
name: "class_hash",
|
|
116785
|
-
type: "core::starknet::class_hash::ClassHash",
|
|
116786
|
-
kind: "data"
|
|
116787
|
-
}
|
|
116788
|
-
]
|
|
116789
|
-
},
|
|
116790
|
-
{
|
|
116791
|
-
type: "event",
|
|
116792
|
-
name: "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
|
|
116793
|
-
kind: "enum",
|
|
116794
|
-
variants: [
|
|
116795
|
-
{
|
|
116796
|
-
name: "Upgraded",
|
|
116797
|
-
type: "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
|
|
116798
|
-
kind: "nested"
|
|
116799
|
-
}
|
|
116800
|
-
]
|
|
116801
|
-
},
|
|
116802
|
-
{
|
|
116803
|
-
type: "event",
|
|
116804
|
-
name: "openzeppelin_security::pausable::PausableComponent::Paused",
|
|
116805
|
-
kind: "struct",
|
|
116806
|
-
members: [
|
|
116807
|
-
{
|
|
116808
|
-
name: "account",
|
|
116809
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116810
|
-
kind: "data"
|
|
116811
|
-
}
|
|
116812
|
-
]
|
|
116813
|
-
},
|
|
116814
|
-
{
|
|
116815
|
-
type: "event",
|
|
116816
|
-
name: "openzeppelin_security::pausable::PausableComponent::Unpaused",
|
|
116817
|
-
kind: "struct",
|
|
116818
|
-
members: [
|
|
116819
|
-
{
|
|
116820
|
-
name: "account",
|
|
116821
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116822
|
-
kind: "data"
|
|
116823
|
-
}
|
|
116824
|
-
]
|
|
116825
|
-
},
|
|
116826
|
-
{
|
|
116827
|
-
type: "event",
|
|
116828
|
-
name: "openzeppelin_security::pausable::PausableComponent::Event",
|
|
116829
|
-
kind: "enum",
|
|
116830
|
-
variants: [
|
|
116831
|
-
{
|
|
116832
|
-
name: "Paused",
|
|
116833
|
-
type: "openzeppelin_security::pausable::PausableComponent::Paused",
|
|
116834
|
-
kind: "nested"
|
|
116835
|
-
},
|
|
116836
|
-
{
|
|
116837
|
-
name: "Unpaused",
|
|
116838
|
-
type: "openzeppelin_security::pausable::PausableComponent::Unpaused",
|
|
116839
|
-
kind: "nested"
|
|
116840
|
-
}
|
|
116841
|
-
]
|
|
116842
|
-
},
|
|
116843
|
-
{
|
|
116844
|
-
type: "event",
|
|
116845
|
-
name: "strkfarm_contracts::components::common::CommonComp::Event",
|
|
116846
|
-
kind: "enum",
|
|
116847
|
-
variants: []
|
|
116848
|
-
},
|
|
116849
|
-
{
|
|
116850
|
-
type: "event",
|
|
116851
|
-
name: "contracts_private::strategies::yolo_vault::interface::Deposit",
|
|
116852
|
-
kind: "struct",
|
|
116853
|
-
members: [
|
|
116854
|
-
{
|
|
116855
|
-
name: "user",
|
|
116856
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116857
|
-
kind: "key"
|
|
116858
|
-
},
|
|
116859
|
-
{
|
|
116860
|
-
name: "receiver",
|
|
116861
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116862
|
-
kind: "data"
|
|
116863
|
-
},
|
|
116864
|
-
{
|
|
116865
|
-
name: "base_amount",
|
|
116866
|
-
type: "core::integer::u256",
|
|
116867
|
-
kind: "data"
|
|
116868
|
-
},
|
|
116869
|
-
{
|
|
116870
|
-
name: "shares",
|
|
116871
|
-
type: "core::integer::u256",
|
|
116872
|
-
kind: "data"
|
|
116873
|
-
}
|
|
116874
|
-
]
|
|
116875
|
-
},
|
|
116876
|
-
{
|
|
116877
|
-
type: "event",
|
|
116878
|
-
name: "contracts_private::strategies::yolo_vault::interface::Redeem",
|
|
116879
|
-
kind: "struct",
|
|
116880
|
-
members: [
|
|
116881
|
-
{
|
|
116882
|
-
name: "user",
|
|
116883
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116884
|
-
kind: "key"
|
|
116885
|
-
},
|
|
116886
|
-
{
|
|
116887
|
-
name: "receiver",
|
|
116888
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116889
|
-
kind: "data"
|
|
116890
|
-
},
|
|
116891
|
-
{
|
|
116892
|
-
name: "shares",
|
|
116893
|
-
type: "core::integer::u256",
|
|
116894
|
-
kind: "data"
|
|
116895
|
-
},
|
|
116896
|
-
{
|
|
116897
|
-
name: "base_out",
|
|
116898
|
-
type: "core::integer::u256",
|
|
116899
|
-
kind: "data"
|
|
116900
|
-
},
|
|
116901
|
-
{
|
|
116902
|
-
name: "second_out",
|
|
116903
|
-
type: "core::integer::u256",
|
|
116904
|
-
kind: "data"
|
|
116905
|
-
},
|
|
116906
|
-
{
|
|
116907
|
-
name: "performance_fee",
|
|
116908
|
-
type: "core::integer::u256",
|
|
116909
|
-
kind: "data"
|
|
116910
|
-
}
|
|
116911
|
-
]
|
|
116912
|
-
},
|
|
116913
|
-
{
|
|
116914
|
-
type: "event",
|
|
116915
|
-
name: "contracts_private::strategies::yolo_vault::interface::SwapExecuted",
|
|
116916
|
-
kind: "struct",
|
|
116917
|
-
members: [
|
|
116918
|
-
{
|
|
116919
|
-
name: "epoch",
|
|
116920
|
-
type: "core::integer::u256",
|
|
116921
|
-
kind: "data"
|
|
116922
|
-
},
|
|
116923
|
-
{
|
|
116924
|
-
name: "spend_units",
|
|
116925
|
-
type: "core::integer::u256",
|
|
116926
|
-
kind: "data"
|
|
116927
|
-
},
|
|
116928
|
-
{
|
|
116929
|
-
name: "gross_spend",
|
|
116930
|
-
type: "core::integer::u256",
|
|
116931
|
-
kind: "data"
|
|
116932
|
-
},
|
|
116933
|
-
{
|
|
116934
|
-
name: "swap_fee",
|
|
116935
|
-
type: "core::integer::u256",
|
|
116936
|
-
kind: "data"
|
|
116937
|
-
},
|
|
116938
|
-
{
|
|
116939
|
-
name: "net_spend",
|
|
116940
|
-
type: "core::integer::u256",
|
|
116941
|
-
kind: "data"
|
|
116942
|
-
},
|
|
116943
|
-
{
|
|
116944
|
-
name: "second_tokens_acquired",
|
|
116945
|
-
type: "core::integer::u256",
|
|
116946
|
-
kind: "data"
|
|
116947
|
-
},
|
|
116948
|
-
{
|
|
116949
|
-
name: "new_global_index",
|
|
116950
|
-
type: "core::integer::u256",
|
|
116951
|
-
kind: "data"
|
|
116952
|
-
},
|
|
116953
|
-
{
|
|
116954
|
-
name: "cumulative_spend_index",
|
|
116955
|
-
type: "core::integer::u256",
|
|
116956
|
-
kind: "data"
|
|
116957
|
-
}
|
|
116958
|
-
]
|
|
116959
|
-
},
|
|
116960
|
-
{
|
|
116961
|
-
type: "event",
|
|
116962
|
-
name: "contracts_private::strategies::yolo_vault::interface::FeeSettingsUpdated",
|
|
116963
|
-
kind: "struct",
|
|
116964
|
-
members: [
|
|
116965
|
-
{
|
|
116966
|
-
name: "swap_fee_bps",
|
|
116967
|
-
type: "core::integer::u256",
|
|
116968
|
-
kind: "data"
|
|
116969
|
-
},
|
|
116970
|
-
{
|
|
116971
|
-
name: "performance_fee_bps",
|
|
116972
|
-
type: "core::integer::u256",
|
|
116973
|
-
kind: "data"
|
|
116974
|
-
},
|
|
116975
|
-
{
|
|
116976
|
-
name: "fee_receiver",
|
|
116977
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
116978
|
-
kind: "data"
|
|
116979
|
-
}
|
|
116980
|
-
]
|
|
116981
|
-
},
|
|
116982
|
-
{
|
|
116983
|
-
type: "event",
|
|
116984
|
-
name: "contracts_private::strategies::yolo_vault::yolo_vault::YoloVault::Event",
|
|
116985
|
-
kind: "enum",
|
|
116986
|
-
variants: [
|
|
116987
|
-
{
|
|
116988
|
-
name: "ReentrancyGuardEvent",
|
|
116989
|
-
type: "openzeppelin_security::reentrancyguard::ReentrancyGuardComponent::Event",
|
|
116990
|
-
kind: "flat"
|
|
116991
|
-
},
|
|
116992
|
-
{
|
|
116993
|
-
name: "ERC20Event",
|
|
116994
|
-
type: "openzeppelin_token::erc20::erc20::ERC20Component::Event",
|
|
116995
|
-
kind: "flat"
|
|
116996
|
-
},
|
|
116997
|
-
{
|
|
116998
|
-
name: "SRC5Event",
|
|
116999
|
-
type: "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
117000
|
-
kind: "flat"
|
|
117001
|
-
},
|
|
117002
|
-
{
|
|
117003
|
-
name: "UpgradeableEvent",
|
|
117004
|
-
type: "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
|
|
117005
|
-
kind: "flat"
|
|
117006
|
-
},
|
|
117007
|
-
{
|
|
117008
|
-
name: "PausableEvent",
|
|
117009
|
-
type: "openzeppelin_security::pausable::PausableComponent::Event",
|
|
117010
|
-
kind: "flat"
|
|
117011
|
-
},
|
|
117012
|
-
{
|
|
117013
|
-
name: "CommonCompEvent",
|
|
117014
|
-
type: "strkfarm_contracts::components::common::CommonComp::Event",
|
|
117015
|
-
kind: "flat"
|
|
117016
|
-
},
|
|
117017
|
-
{
|
|
117018
|
-
name: "Deposit",
|
|
117019
|
-
type: "contracts_private::strategies::yolo_vault::interface::Deposit",
|
|
117020
|
-
kind: "nested"
|
|
117021
|
-
},
|
|
117022
|
-
{
|
|
117023
|
-
name: "Redeem",
|
|
117024
|
-
type: "contracts_private::strategies::yolo_vault::interface::Redeem",
|
|
117025
|
-
kind: "nested"
|
|
117026
|
-
},
|
|
117027
|
-
{
|
|
117028
|
-
name: "SwapExecuted",
|
|
117029
|
-
type: "contracts_private::strategies::yolo_vault::interface::SwapExecuted",
|
|
117030
|
-
kind: "nested"
|
|
117031
|
-
},
|
|
117032
|
-
{
|
|
117033
|
-
name: "FeeSettingsUpdated",
|
|
117034
|
-
type: "contracts_private::strategies::yolo_vault::interface::FeeSettingsUpdated",
|
|
117035
|
-
kind: "nested"
|
|
117036
|
-
}
|
|
117037
|
-
]
|
|
117038
|
-
}
|
|
117039
|
-
];
|
|
117040
|
-
|
|
117041
115898
|
// src/strategies/yoloVault.ts
|
|
117042
115899
|
var import_react = __toESM(require_react());
|
|
117043
115900
|
var YoLoVault = class extends BaseStrategy {
|
|
@@ -117047,17 +115904,19 @@ spurious results.`);
|
|
|
117047
115904
|
withdrawInputMode: "dual"
|
|
117048
115905
|
});
|
|
117049
115906
|
this.getSettings = async () => {
|
|
117050
|
-
const settings2 = await this.contract.call("get_settings", []);
|
|
115907
|
+
const settings2 = await (await this.contract).call("get_settings", []);
|
|
117051
115908
|
return settings2;
|
|
117052
115909
|
};
|
|
117053
115910
|
this.address = metadata.address;
|
|
117054
115911
|
this.pricer = pricer;
|
|
117055
115912
|
this.metadata = metadata;
|
|
117056
|
-
this.contract =
|
|
117057
|
-
|
|
117058
|
-
|
|
117059
|
-
|
|
117060
|
-
|
|
115913
|
+
this.contract = this.config.provider.getClassAt(this.address.address).then(
|
|
115914
|
+
(cls) => new Contract({
|
|
115915
|
+
abi: cls.abi,
|
|
115916
|
+
address: this.address.address,
|
|
115917
|
+
providerOrAccount: this.config.provider
|
|
115918
|
+
})
|
|
115919
|
+
);
|
|
117061
115920
|
if (metadata.depositTokens.length < 1) {
|
|
117062
115921
|
throw new Error("Deposit tokens are not fully defined in metadata");
|
|
117063
115922
|
}
|
|
@@ -117071,9 +115930,11 @@ spurious results.`);
|
|
|
117071
115930
|
secondUnderlying: ai.secondUnderlying
|
|
117072
115931
|
};
|
|
117073
115932
|
}
|
|
115933
|
+
/** Underlying (or base token) used for pricing / swap sell leg when base is ERC-4626. */
|
|
117074
115934
|
tokenForPrimaryPricing() {
|
|
117075
115935
|
return this.erc4626.isBaseERC4626 && this.erc4626.baseUnderlying ? this.erc4626.baseUnderlying : this.primaryToken;
|
|
117076
115936
|
}
|
|
115937
|
+
/** Underlying (or second token) for price ratios when second leg is ERC-4626 (e.g. STRK for xSTRK). */
|
|
117077
115938
|
tokenForSecondaryPricing() {
|
|
117078
115939
|
return this.erc4626.isSecondERC4626 && this.erc4626.secondUnderlying ? this.erc4626.secondUnderlying : this.secondaryToken;
|
|
117079
115940
|
}
|
|
@@ -117101,7 +115962,7 @@ spurious results.`);
|
|
|
117101
115962
|
// return formattedAmount;
|
|
117102
115963
|
// }
|
|
117103
115964
|
async getNormalizedUserInfo(user, blockIdentifier = "latest") {
|
|
117104
|
-
const userInfo = await this.contract.call("get_user_info", [user.address], {
|
|
115965
|
+
const userInfo = await (await this.contract).call("get_user_info", [user.address], {
|
|
117105
115966
|
blockIdentifier
|
|
117106
115967
|
});
|
|
117107
115968
|
const {
|
|
@@ -117343,6 +116204,7 @@ spurious results.`);
|
|
|
117343
116204
|
}
|
|
117344
116205
|
async depositCall(amountInfo, receiver) {
|
|
117345
116206
|
try {
|
|
116207
|
+
const vault = await this.contract;
|
|
117346
116208
|
if (this.erc4626.isBaseERC4626) {
|
|
117347
116209
|
if (!this.erc4626.baseUnderlying) {
|
|
117348
116210
|
throw new Error("baseUnderlying missing for ERC-4626 base YOLO vault");
|
|
@@ -117352,7 +116214,7 @@ spurious results.`);
|
|
|
117352
116214
|
this.address.address,
|
|
117353
116215
|
amountInfo.amount
|
|
117354
116216
|
);
|
|
117355
|
-
const depositCall2 =
|
|
116217
|
+
const depositCall2 = vault.populate("deposit_combined", [
|
|
117356
116218
|
uint256_exports.bnToUint256(amountInfo.amount.toWei()),
|
|
117357
116219
|
receiver.address
|
|
117358
116220
|
]);
|
|
@@ -117360,7 +116222,7 @@ spurious results.`);
|
|
|
117360
116222
|
}
|
|
117361
116223
|
const primaryToken = amountInfo.tokenInfo;
|
|
117362
116224
|
const approvalCall = new ERC20(this.config).approve(primaryToken.address.address, this.address.address, amountInfo.amount);
|
|
117363
|
-
const depositCall =
|
|
116225
|
+
const depositCall = vault.populate("deposit", [
|
|
117364
116226
|
uint256_exports.bnToUint256(amountInfo.amount.toWei()),
|
|
117365
116227
|
receiver.address
|
|
117366
116228
|
]);
|
|
@@ -117371,7 +116233,7 @@ spurious results.`);
|
|
|
117371
116233
|
}
|
|
117372
116234
|
}
|
|
117373
116235
|
async getVaultStatus() {
|
|
117374
|
-
const vaultStatus = await this.contract.call("get_vault_status", []);
|
|
116236
|
+
const vaultStatus = await (await this.contract).call("get_vault_status", []);
|
|
117375
116237
|
return vaultStatus;
|
|
117376
116238
|
}
|
|
117377
116239
|
async matchInputAmounts(amountInfo, user) {
|
|
@@ -117435,7 +116297,8 @@ spurious results.`);
|
|
|
117435
116297
|
}
|
|
117436
116298
|
const requiredShares = userShares.multipliedBy(withdrawRequest.sharesUsedFactor).floor();
|
|
117437
116299
|
const redeemFn = this.erc4626.isBaseERC4626 ? "redeem_combined" : "redeem";
|
|
117438
|
-
|
|
116300
|
+
const vault = await this.contract;
|
|
116301
|
+
let withdrawCall = vault.populate(redeemFn, [
|
|
117439
116302
|
uint256_exports.bnToUint256(requiredShares.toString()),
|
|
117440
116303
|
receiver.address
|
|
117441
116304
|
]);
|
|
@@ -117449,7 +116312,7 @@ spurious results.`);
|
|
|
117449
116312
|
return "\u{1F919}YOLO";
|
|
117450
116313
|
}
|
|
117451
116314
|
async getSwapAmounts(spendUnits) {
|
|
117452
|
-
const swapAmounts = await this.contract.call("get_swap_amounts", [spendUnits.toUint256()]);
|
|
116315
|
+
const swapAmounts = await (await this.contract).call("get_swap_amounts", [spendUnits.toUint256()]);
|
|
117453
116316
|
console.log("swapAmounts", swapAmounts);
|
|
117454
116317
|
return {
|
|
117455
116318
|
grossSpend: Web3Number.fromWei(swapAmounts[0].toString(), this.primaryToken.decimals),
|