1- use cosmwasm_schema:: cw_serde;
1+ use cosmwasm_schema:: { QueryResponses , cw_serde} ;
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 :: msg :: 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 :: msg :: 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 :: msg :: 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 :: msg :: 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,23 @@ pub enum QueryMsg<Q> {
103104 limit : Option < u32 > ,
104105 } ,
105106 /// Total number of tokens issued
107+ #[ returns( cw721:: msg:: NumTokensResponse ) ]
106108 NumTokens { } ,
107109
108110 /// With MetaData Extension.
109- /// Returns top-level metadata about the contract: ` ContractInfoResponse`
111+ # [ returns ( cw721 :: msg :: 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`
115+ /// but directly from the contract
116+ #[ returns( cw721:: msg:: NftInfoResponse ) ]
114117 NftInfo {
115118 token_id : String ,
116119 } ,
117120 /// With MetaData Extension.
118121 /// Returns the result of both `NftInfo` and `OwnerOf` as one query as an optimization
119- /// for clients: `AllNftInfo`
122+ /// for clients
123+ #[ returns( cw721:: msg:: AllNftInfoResponse ) ]
120124 AllNftInfo {
121125 token_id : String ,
122126 /// unset or false will filter out expired approvals, you must set to true to see them
@@ -125,15 +129,15 @@ pub enum QueryMsg<Q> {
125129
126130 /// With Enumerable extension.
127131 /// Returns all tokens owned by the given address, [] if unset.
128- /// Return type: TokensResponse.
132+ # [ returns ( cw721 :: msg :: TokensResponse ) ]
129133 Tokens {
130134 owner : String ,
131135 start_after : Option < String > ,
132136 limit : Option < u32 > ,
133137 } ,
134138 /// With Enumerable extension.
135139 /// Requires pagination. Lists all token_ids controlled by the contract.
136- /// Return type: TokensResponse.
140+ # [ returns ( cw721 :: msg :: TokensResponse ) ]
137141 AllTokens {
138142 start_after : Option < String > ,
139143 limit : Option < u32 > ,
0 commit comments