white_whale_std/pool_network/frontend_helper.rs
1use cosmwasm_schema::{cw_serde, QueryResponses};
2use cosmwasm_std::{Addr, Decimal};
3
4use super::asset::Asset;
5
6#[cw_serde]
7pub struct InstantiateMsg {
8 /// The address of the incentive factory.
9 pub incentive_factory: String,
10}
11
12#[cw_serde]
13pub enum ExecuteMsg {
14 /// Deposits assets into a pair pool and opens or expands a position on the respective incentive
15 /// contract with the received LP tokens.
16 Deposit {
17 /// The address of the pair to deposit.
18 pair_address: String,
19 /// The assets to deposit into the pair.
20 assets: [Asset; 2],
21 /// The
22 slippage_tolerance: Option<Decimal>,
23 /// The amount of time in seconds to unbond tokens for when incentivizing.
24 unbonding_duration: u64,
25 },
26 /// Updates the configuration of the frontend helper.
27 UpdateConfig {
28 /// The new incentive_factory_addr.
29 incentive_factory_addr: Option<String>,
30 /// The new owner.
31 owner: Option<String>,
32 },
33}
34
35#[cw_serde]
36pub struct MigrateMsg {}
37
38#[cw_serde]
39#[derive(QueryResponses)]
40pub enum QueryMsg {
41 /// Retrieves the current contract configuration.
42 #[returns(ConfigResponse)]
43 Config {},
44}
45
46pub type ConfigResponse = Config;
47
48/// Stores the configuration of the frontend helper.
49#[cw_serde]
50pub struct Config {
51 /// The address of the incentive factory.
52 pub incentive_factory_addr: Addr,
53 /// The owner of the of the frontend helper.
54 pub owner: Addr,
55}
56
57#[cw_serde]
58pub struct TempState {
59 /// The amount of time in seconds to unbond tokens for when incentivizing.
60 pub unbonding_duration: u64,
61 /// The person who is creating the position after depositing.
62 pub receiver: Addr,
63 /// The address that is being deposited to.
64 pub pair_addr: Addr,
65}