use cosmwasm_std::{Coin, HumanAddr, Uint128};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use cw0::Duration;
use cw20::Denom;
pub use cw_controllers::ClaimsResponse;
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
pub struct InstantiateMsg {
pub denom: Denom,
pub tokens_per_weight: Uint128,
pub min_bond: Uint128,
pub unbonding_period: Duration,
pub admin: Option<HumanAddr>,
}
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
Bond {},
Unbond { tokens: Uint128 },
Claim {},
UpdateAdmin { admin: Option<HumanAddr> },
AddHook { addr: HumanAddr },
RemoveHook { addr: HumanAddr },
}
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
Claims {
address: HumanAddr,
},
Staked {
address: HumanAddr,
},
Admin {},
TotalWeight {},
ListMembers {
start_after: Option<HumanAddr>,
limit: Option<u32>,
},
Member {
addr: HumanAddr,
at_height: Option<u64>,
},
Hooks {},
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct StakedResponse {
pub stake: Coin,
}