1- use cosmwasm_schema:: cw_serde;
1+ use cosmwasm_schema:: { cw_serde, QueryResponses } ;
22use cosmwasm_std:: Binary ;
33use cw721:: Expiration ;
44
@@ -72,29 +72,30 @@ pub struct MintMsg<T> {
7272}
7373
7474#[ cw_serde]
75+ #[ derive( QueryResponses ) ]
7576pub enum QueryMsg < Q > {
7677 /// Return the owner of the given token, error if token does not exist
77- /// Return type: OwnerOfResponse
78+ # [ returns ( cw721 :: OwnerOfResponse ) ]
7879 OwnerOf {
7980 token_id : String ,
8081 /// unset or false will filter out expired approvals, you must set to true to see them
8182 include_expired : Option < bool > ,
8283 } ,
8384 /// Return operator that can access all of the owner's tokens.
84- /// Return type: ` ApprovalResponse`
85+ # [ returns ( cw721 :: ApprovalResponse ) ]
8586 Approval {
8687 token_id : String ,
8788 spender : String ,
8889 include_expired : Option < bool > ,
8990 } ,
9091 /// Return approvals that a token has
91- /// Return type: ` ApprovalsResponse`
92+ # [ returns ( cw721 :: ApprovalsResponse ) ]
9293 Approvals {
9394 token_id : String ,
9495 include_expired : Option < bool > ,
9596 } ,
9697 /// List all operators that can access all of the owner's tokens
97- /// Return type: ` OperatorsResponse`
98+ # [ returns ( cw721 :: OperatorsResponse ) ]
9899 AllOperators {
99100 owner : String ,
100101 /// unset or false will filter out expired items, you must set to true to see them
@@ -103,20 +104,21 @@ pub enum QueryMsg<Q> {
103104 limit : Option < u32 > ,
104105 } ,
105106 /// Total number of tokens issued
107+ #[ returns( cw721:: NumTokensResponse ) ]
106108 NumTokens { } ,
107109
108110 /// With MetaData Extension.
109- /// Returns top-level metadata about the contract: ` ContractInfoResponse`
111+ # [ returns ( cw721 :: ContractInfoResponse ) ]
110112 ContractInfo { } ,
111113 /// With MetaData Extension.
112114 /// Returns metadata about one particular token, based on *ERC721 Metadata JSON Schema*
113- /// but directly from the contract: `NftInfoResponse`
114- NftInfo {
115- token_id : String ,
116- } ,
115+ /// but directly from the contract
116+ #[ returns( cw721:: NftInfoResponse ) ]
117+ NftInfo { token_id : String } ,
117118 /// With MetaData Extension.
118119 /// Returns the result of both `NftInfo` and `OwnerOf` as one query as an optimization
119- /// for clients: `AllNftInfo`
120+ /// for clients
121+ #[ returns( cw721:: AllNftInfoResponse ) ]
120122 AllNftInfo {
121123 token_id : String ,
122124 /// unset or false will filter out expired approvals, you must set to true to see them
@@ -125,27 +127,26 @@ pub enum QueryMsg<Q> {
125127
126128 /// With Enumerable extension.
127129 /// Returns all tokens owned by the given address, [] if unset.
128- /// Return type: TokensResponse.
130+ # [ returns ( cw721 :: TokensResponse ) ]
129131 Tokens {
130132 owner : String ,
131133 start_after : Option < String > ,
132134 limit : Option < u32 > ,
133135 } ,
134136 /// With Enumerable extension.
135137 /// Requires pagination. Lists all token_ids controlled by the contract.
136- /// Return type: TokensResponse.
138+ # [ returns ( cw721 :: TokensResponse ) ]
137139 AllTokens {
138140 start_after : Option < String > ,
139141 limit : Option < u32 > ,
140142 } ,
141143
142- // Return the minter
144+ # [ returns ( crate :: msg :: MinterResponse ) ]
143145 Minter { } ,
144146
145147 /// Extension query
146- Extension {
147- msg : Q ,
148- } ,
148+ #[ returns( ( ) ) ]
149+ Extension { msg : Q } ,
149150}
150151
151152/// Shows who can mint these tokens
0 commit comments