InstantiateMsg
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct InstantiateMsg {
pub owner: Option<String>,
pub positions_contract: String,
pub osmosis_proxy: String,
pub accepted_LPs: Vec<u64>, //Assumption that the LP is 50:50
}
* = optional
ExecuteMsg
Deposit
Deposit accepted LP share token into the contract
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
Deposit { }
}
Withdraw
Withdraw LPs from the contract
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
Withdraw {
withdrawal_assets: Vec<Asset>, //in GAMM share tokens (AssetInfo::NativeToken)
}
}
ChangeOwner
Change contract owner
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
ChangeOwner {
owner: String,
}
}
EditAcceptedLPs
Edit LPs accepted for deposits
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
EditAcceptedLPs {
pool_ids: Vec<u64>,
remove: bool,
}
}
ToggleDeposits
Enable or disable deposits
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
ToggleDeposits { enable: bool },
}
QueryMsg
Config
Returns contract configuration
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
Config { }
}
pub struct Config {
pub owner: Addr,
pub positions_contract: Addr,
pub osmosis_proxy: Addr,
pub accepted_LPs: Vec<LPPoolInfo>,
pub deposits_enabled: bool,
}
User
Returns User deposit information
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
User {
user: String,
minimum_deposit_time: Option<u64>, //in days
}
}
pub struct UserResponse {
pub user: String,
pub deposits: Vec<VaultedLP>,
pub discount_value: Uint128,
}
Deposits
Returns subset of all deposits
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
Deposits {
limit: Option<u64>, //User limit
start_after: Option<String>, //user
}
}
* = optional