use cw20::Cw20ReceiveMsg;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use cosmwasm_std::Uint128;
use crate::{
ratio_pool_factory::handle_msg::RatioPoolSettings,
stable_pool::handle_msg::DisabledActionsPerAssetSettings,
standard_pool::handle_msg::DirectStaking,
};
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
Receive(Cw20ReceiveMsg),
UpdateConfig {
pool_settings: Option<RatioPoolSettings>,
owner_settings: Option<OwnerSettings>,
},
UpdateDisabledActionsPerAssetSettings {
disabled_actions_per_asset_settings: Option<DisabledActionsPerAssetSettings>,
},
UpdatePermissions {
is_deposit_enabled: bool,
is_swap_enabled: bool,
},
ReceiveLockupMetrics {
assets_fee_amount: Vec<Uint128>,
},
UpdateCashback {
cashback: Option<String>,
},
Deposit {
assets_amount: [Uint128; 2],
receiver: Option<String>,
direct_staking: Option<DirectStaking>,
expected_return: Option<Uint128>, },
Swap {
to: Option<String>,
expected_return: Option<Uint128>,
},
SelfCallback {
message: SelfHookMsg,
},
}
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum SelfHookMsg {
DirectStaking {
from: String,
amount: Uint128,
not_claim_rewards: Option<bool>,
notify: Option<bool>,
},
}
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum Cw20HookMsg {
Swap {
to: Option<String>,
expected_return: Option<Uint128>,
},
WithdrawalToLockup(RatioWithdrawalToLockupInputs), }
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)]
pub struct RatioWithdrawalToLockupInputs {
pub to: Option<String>, pub is_instant_withdrawal: Option<bool>, pub expected_return: Option<Vec<Uint128>>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)]
pub struct OwnerSettings {
pub is_deposit_enabled: bool,
pub is_withdrawal_to_lockup_enabled: bool,
pub is_swap_enabled: bool,
}
#[derive(Serialize, Deserialize, JsonSchema)]
pub struct MigrateMsg {}