@@ -8,43 +8,44 @@ pub mod state;
88pub use crate :: error:: ContractError ;
99pub use crate :: msg:: { ExecuteMsg , InstantiateMsg , MintMsg , MinterResponse , QueryMsg } ;
1010pub use crate :: state:: Cw721Contract ;
11+ use cosmwasm_std:: Empty ;
1112
13+ // This is a simple type to let us handle empty extensions
14+ pub type Extension = Option < Empty > ;
15+
16+ #[ cfg( not( feature = "library" ) ) ]
1217pub mod entry {
1318 use super :: * ;
1419
15- #[ cfg( not( feature = "library" ) ) ]
1620 use cosmwasm_std:: entry_point;
17- use cosmwasm_std:: { Binary , Deps , DepsMut , Empty , Env , MessageInfo , Response , StdResult } ;
18-
19- // This is a simple type to let us handle empty extensions
20- pub type Extension = Option < Empty > ;
21+ use cosmwasm_std:: { Binary , Deps , DepsMut , Env , MessageInfo , Response , StdResult } ;
2122
2223 // This makes a conscious choice on the various generics used by the contract
23- #[ cfg_attr ( not ( feature = "library" ) , entry_point) ]
24+ #[ entry_point]
2425 pub fn instantiate (
2526 deps : DepsMut ,
2627 env : Env ,
2728 info : MessageInfo ,
28- msg : msg :: InstantiateMsg ,
29+ msg : InstantiateMsg ,
2930 ) -> StdResult < Response > {
30- let tract = state :: Cw721Contract :: < Extension , Empty > :: default ( ) ;
31+ let tract = Cw721Contract :: < Extension , Empty > :: default ( ) ;
3132 tract. instantiate ( deps, env, info, msg)
3233 }
3334
34- #[ cfg_attr ( not ( feature = "library" ) , entry_point) ]
35+ #[ entry_point]
3536 pub fn execute (
3637 deps : DepsMut ,
3738 env : Env ,
3839 info : MessageInfo ,
39- msg : msg :: ExecuteMsg < Extension > ,
40+ msg : ExecuteMsg < Extension > ,
4041 ) -> Result < Response , ContractError > {
41- let tract = state :: Cw721Contract :: < Extension , Empty > :: default ( ) ;
42+ let tract = Cw721Contract :: < Extension , Empty > :: default ( ) ;
4243 tract. execute ( deps, env, info, msg)
4344 }
4445
45- #[ cfg_attr ( not ( feature = "library" ) , entry_point) ]
46- pub fn query ( deps : Deps , env : Env , msg : msg :: QueryMsg ) -> StdResult < Binary > {
47- let tract = state :: Cw721Contract :: < Extension , Empty > :: default ( ) ;
46+ #[ entry_point]
47+ pub fn query ( deps : Deps , env : Env , msg : QueryMsg ) -> StdResult < Binary > {
48+ let tract = Cw721Contract :: < Extension , Empty > :: default ( ) ;
4849 tract. query ( deps, env, msg)
4950 }
5051}
0 commit comments