komple_framework_mint_module/
state.rs1use cosmwasm_schema::cw_serde;
2use komple_framework_types::shared::{
3 CONFIG_NAMESPACE, EXECUTE_LOCK_NAMESPACE, OPERATORS_NAMESPACE, PARENT_ADDR_NAMESPACE,
4};
5
6use cosmwasm_std::Addr;
7use cw_storage_plus::{Item, Map};
8use komple_framework_types::modules::fee::{FundInfo, FUND_INFO_NAMESPACE};
9use komple_framework_types::modules::mint::{
10 Collections, BLACKLIST_COLLECTION_ADDRS_NAMESPACE, COLLECTION_ADDRS_NAMESPACE,
11 COLLECTION_ID_NAMESPACE, COLLECTION_INFO_NAMESPACE, CREATORS_NAMESPACE,
12 LINKED_COLLECTIONS_NAMESPACE, MINT_LOCKS_NAMESPACE,
13};
14
15#[cw_serde]
16pub struct Config {
17 pub admin: Addr,
18 pub public_collection_creation: bool,
19 pub mint_lock: bool,
20}
21pub const CONFIG: Item<Config> = Item::new(CONFIG_NAMESPACE);
22
23#[cw_serde]
25pub struct CollectionInfo {
26 pub collection_type: Collections,
27 pub name: String,
28 pub description: String,
29 pub image: String,
30 pub external_link: Option<String>,
31}
32pub const COLLECTION_INFO: Map<u32, CollectionInfo> = Map::new(COLLECTION_INFO_NAMESPACE);
34
35pub const COLLECTION_ADDRS: Map<u32, Addr> = Map::new(COLLECTION_ADDRS_NAMESPACE);
37
38pub const COLLECTION_ID: Item<u32> = Item::new(COLLECTION_ID_NAMESPACE);
40
41pub const HUB_ADDR: Item<Addr> = Item::new(PARENT_ADDR_NAMESPACE);
43
44pub const OPERATORS: Item<Vec<Addr>> = Item::new(OPERATORS_NAMESPACE);
46
47pub const LINKED_COLLECTIONS: Map<u32, Vec<u32>> = Map::new(LINKED_COLLECTIONS_NAMESPACE);
52
53pub const BLACKLIST_COLLECTION_ADDRS: Map<u32, Addr> =
58 Map::new(BLACKLIST_COLLECTION_ADDRS_NAMESPACE);
59
60pub const EXECUTE_LOCK: Item<bool> = Item::new(EXECUTE_LOCK_NAMESPACE);
62
63pub const CREATORS: Item<Vec<Addr>> = Item::new(CREATORS_NAMESPACE);
65
66pub const MINT_LOCKS: Map<u32, bool> = Map::new(MINT_LOCKS_NAMESPACE);
68
69pub const COLLECTION_FUND_INFO: Map<u32, FundInfo> = Map::new(FUND_INFO_NAMESPACE);