bs721_base/
lib.rs

1mod contract_tests;
2mod error;
3mod execute;
4pub mod helpers;
5pub mod msg;
6mod query;
7pub mod state;
8
9pub use crate::error::ContractError;
10pub use crate::msg::{ExecuteMsg, InstantiateMsg, MintMsg, MinterResponse, QueryMsg};
11pub use crate::state::Bs721Contract;
12use cosmwasm_std::Empty;
13
14// This is a simple type to let us handle empty extensions
15pub type Extension = Option<Empty>;
16
17pub mod entry {
18    use super::*;
19
20    #[cfg(not(feature = "library"))]
21    use cosmwasm_std::entry_point;
22    use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult};
23
24    // This makes a conscious choice on the various generics used by the contract
25    #[cfg_attr(not(feature = "library"), entry_point)]
26    pub fn instantiate(
27        deps: DepsMut,
28        env: Env,
29        info: MessageInfo,
30        msg: InstantiateMsg,
31    ) -> StdResult<Response> {
32        let tract = Bs721Contract::<Extension, Empty, Empty, Empty>::default();
33        tract.instantiate(deps, env, info, msg)
34    }
35
36    #[cfg_attr(not(feature = "library"), entry_point)]
37    pub fn execute(
38        deps: DepsMut,
39        env: Env,
40        info: MessageInfo,
41        msg: ExecuteMsg<Extension, Empty>,
42    ) -> Result<Response, ContractError> {
43        let tract = Bs721Contract::<Extension, Empty, Empty, Empty>::default();
44        tract.execute(deps, env, info, msg)
45    }
46
47    #[cfg_attr(not(feature = "library"), entry_point)]
48    pub fn query(deps: Deps, env: Env, msg: QueryMsg<Empty>) -> StdResult<Binary> {
49        let tract = Bs721Contract::<Extension, Empty, Empty, Empty>::default();
50        tract.query(deps, env, msg)
51    }
52}