use cosmwasm_schema::{cw_serde, QueryResponses};
use cosmwasm_std::Uint128;
use cw20::Cw20ReceiveMsg;
#[cw_serde]
pub struct InstantiateMsg {
/// litium-core CW-20 contract address
pub cw20_contract: String,
/// Token subdenom (native denom will be factory/{this_contract}/{subdenom})
pub token_subdenom: String,
/// Admin address (defaults to sender)
pub admin: Option<String>,
}
#[cw_serde]
pub enum ExecuteMsg {
/// Receive CW-20 tokens (wraps CW-20 โ native). Called by litium-core CW-20.
Receive(Cw20ReceiveMsg),
/// Unwrap native โ CW-20. Send native LI in funds.
UnwrapNative {},
/// Update config. Admin only.
UpdateConfig {
cw20_contract: Option<String>,
admin: Option<String>,
},
/// Testing helper: mutate critical runtime state in-place (admin only).
ApplyTestingOverrides { overrides: TestingOverrides },
}
#[cw_serde]
pub struct TestingOverrides {
pub wrapped_supply: Option<Uint128>,
}
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(ConfigResponse)]
Config {},
#[returns(WrappedSupplyResponse)]
WrappedSupply {},
}
#[cw_serde]
pub struct ConfigResponse {
pub cw20_contract: String,
pub native_denom: String,
pub admin: String,
}
#[cw_serde]
pub struct WrappedSupplyResponse {
pub wrapped_supply: Uint128,
}
cw-cyber/contracts/litium-wrap/src/msg.rs
ฯ 0.0%
use ;
use Uint128;
use Cw20ReceiveMsg;