use cosmwasm_std::{Addr, Decimal, Uint128, Uint64};
use cw20::Cw20ReceiveMsg;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
pub owner: String,
pub astro_token: String,
pub tokens_per_block: Uint128,
pub start_block: Uint64,
pub allowed_reward_proxies: Vec<String>,
pub vesting_contract: String,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
UpdateConfig {
vesting_contract: Option<String>,
},
Add {
lp_token: String,
alloc_point: Uint64,
has_asset_rewards: bool,
reward_proxy: Option<String>,
},
Set {
lp_token: String,
alloc_point: Uint64,
has_asset_rewards: bool,
},
MassUpdatePools {},
UpdatePool {
lp_token: String,
},
Withdraw {
lp_token: String,
amount: Uint128,
},
EmergencyWithdraw {
lp_token: String,
},
SetAllowedRewardProxies {
proxies: Vec<String>,
},
SendOrphanProxyReward {
recipient: String,
lp_token: String,
},
Receive(Cw20ReceiveMsg),
SetTokensPerBlock {
amount: Uint128,
},
ProposeNewOwner {
owner: String,
expires_in: u64,
},
DropOwnershipProposal {},
ClaimOwnership {},
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
PoolLength {},
Deposit { lp_token: String, user: String },
PendingToken { lp_token: String, user: String },
Config {},
RewardInfo { lp_token: String },
OrphanProxyRewards { lp_token: String },
PoolInfo { lp_token: String },
SimulateFutureReward { lp_token: String, future_block: u64 },
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct PoolLengthResponse {
pub length: usize,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct PendingTokenResponse {
pub pending: Uint128,
pub pending_on_proxy: Option<Uint128>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct RewardInfoResponse {
pub base_reward_token: Addr,
pub proxy_reward_token: Option<Addr>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct PoolInfoResponse {
pub alloc_point: Uint64,
pub astro_tokens_per_block: Uint128,
pub last_reward_block: u64,
pub current_block: u64,
pub accumulated_rewards_per_share: Decimal,
pub pending_astro_rewards: Uint128,
pub reward_proxy: Option<Addr>,
pub pending_proxy_rewards: Option<Uint128>,
pub accumulated_proxy_rewards_per_share: Decimal,
pub proxy_reward_balance_before_update: Uint128,
pub orphan_proxy_rewards: Uint128,
pub lp_supply: Uint128,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct ConfigResponse {
pub owner: Addr,
pub astro_token: Addr,
pub tokens_per_block: Uint128,
pub total_alloc_point: Uint64,
pub start_block: Uint64,
pub allowed_reward_proxies: Vec<Addr>,
pub vesting_contract: Addr,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct MigrateMsg {}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum Cw20HookMsg {
Deposit {},
DepositFor(Addr),
}