1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
use crate::state::{CollectionConfig, Config};
use cosmwasm_schema::{cw_serde, QueryResponses};
use cosmwasm_std::Binary;
use cw721::CustomMsg;
use komple_framework_metadata_module::msg::InstantiateMsg as MetadataInstantiateMsg;
use komple_framework_types::modules::mint::Collections;
use komple_framework_types::modules::token::{Locks, SubModules};
use komple_framework_types::shared::query::ResponseWrapper;
use komple_framework_whitelist_module::msg::InstantiateMsg as WhitelistInstantiateMsg;
#[cw_serde]
pub struct TokenInfo {
pub symbol: String,
pub minter: String,
}
#[cw_serde]
pub struct MetadataInfo {
pub instantiate_msg: MetadataInstantiateMsg,
pub code_id: u64,
}
#[cw_serde]
pub struct InstantiateMsg {
pub creator: String,
pub token_info: TokenInfo,
pub collection_name: String,
pub collection_type: Collections,
pub collection_config: CollectionConfig,
pub metadata_info: MetadataInfo,
}
#[cw_serde]
pub enum ExecuteMsg {
TransferNft {
recipient: String,
token_id: String,
},
SendNft {
contract: String,
token_id: String,
msg: Binary,
},
Mint {
owner: String,
metadata_id: Option<u32>,
},
Burn {
token_id: String,
},
UpdateModuleOperators {
addrs: Vec<String>,
},
AdminTransferNft {
recipient: String,
token_id: String,
},
UpdateLocks {
locks: Locks,
},
UpdateTokenLocks {
token_id: String,
locks: Locks,
},
UpdateCollectionConfig {
collection_config: CollectionConfig,
},
InitWhitelistContract {
code_id: u64,
instantiate_msg: WhitelistInstantiateMsg,
},
}
impl CustomMsg for ExecuteMsg {}
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(ResponseWrapper<Locks>)]
Locks {},
#[returns(ResponseWrapper<Locks>)]
TokenLocks { token_id: String },
#[returns(ResponseWrapper<u32>)]
MintedTokensPerAddress { address: String },
#[returns(ResponseWrapper<SubModules>)]
SubModules {},
#[returns(ResponseWrapper<Config>)]
Config {},
#[returns(ResponseWrapper<Vec<String>>)]
ModuleOperators {},
}
impl CustomMsg for QueryMsg {}
#[cw_serde]
pub struct LocksReponse {
pub locks: Locks,
}
#[cw_serde]
pub struct MintedTokenAmountResponse {
pub amount: u32,
}
#[cw_serde]
pub struct MigrateMsg {}