Skip to content

Commit

Permalink
feat(docs): change struct comment to be displayed on generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Oct 19, 2022
1 parent 8eae25d commit 7bdf548
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contracts/cw-template/src/msg.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
use cosmwasm_schema::{cw_serde, QueryResponses};

/// Instantiate messages
#[cw_serde]
pub struct InstantiateMsg {
pub count: i32,
}

/// Execute messages
#[cw_serde]
pub enum ExecuteMsg {
Increment {},
Reset { count: i32 },
}

/// Query messages
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
// GetCount returns the current count as a json-encoded number
/// GetCount returns the current count as a json-encoded number
#[returns(GetCountResponse)]
GetCount {},
}

// We define a custom struct for each query response
/// We define a custom struct for each query response
#[cw_serde]
pub struct GetCountResponse {
pub count: i32,
Expand Down

0 comments on commit 7bdf548

Please sign in to comment.