msg.rs
unknown
rust
4 years ago
1.6 kB
6
Indexable
use cosmwasm_std::Timestamp;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use cosmwasm_std::Binary;
use std::vec;
// #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
// pub struct InstantiateMsg {
// }
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
SendFrom {
from: String,
to: String,
token_id: u32,
value: u32,
msg: Option<Binary>
},
BatchSendFrom {
from: String,
to: String,
batch: Vec<(u32,u32)>,
msg: Option<Binary>
},
Mint {
to: String,
token_id: u32,
value: u32,
msg: Option<Binary>
},
BatchMint {
to: String,
batch: Vec<(u32,u32)>,
msg: Option<Binary>
},
Burn {
from: String,
token_id: u32,
value: u32
},
BatchBurn {
from: String,
batch: Vec<(u32, u32)>,
},
ApproveAll {
operator: String,
expires: Timestamp
},
RevokeAll {
operator: String
}
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
Balance {
owner: String,
token_id: u32,
},
BatchBalance {
owner: String,
token_ids: Vec<u32>
},
ApprovedForAll {
owner: String,
include_expired: bool,
start_afer: u32,
limit: u32
},
TokenInfo{
token_id: u32
},
}Editor is loading...