-
Notifications
You must be signed in to change notification settings - Fork 12
/
msg.rs
36 lines (31 loc) · 836 Bytes
/
msg.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use cosmwasm_schema::{cw_serde, QueryResponses};
#[cw_serde]
pub struct InstantiateMsg {}
#[cw_serde]
pub enum ExecuteMsg {
Increment { channel: String },
}
#[cw_serde]
pub enum IbcExecuteMsg {
Increment {},
}
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
// GetCount returns the current count as a json-encoded number
#[returns(crate::msg::GetCountResponse)]
GetCount {
// The ID of the LOCAL channel you'd like to query the count
// for.
channel: String,
},
// GetTimeoutCount returns the number of timeouts have occured on
// the LOCAL channel `channel`.
#[returns(crate::msg::GetCountResponse)]
GetTimeoutCount { channel: String },
}
// We define a custom struct for each query response
#[cw_serde]
pub struct GetCountResponse {
pub count: u32,
}