marbu_customization_module/
state.rs

1use cosmwasm_schema::cw_serde;
2use cosmwasm_std::{Addr, Binary};
3use cw_storage_plus::{Item, Map};
4
5use komple_framework_types::shared::{
6    CONFIG_NAMESPACE, EXECUTE_LOCK_NAMESPACE, PARENT_ADDR_NAMESPACE,
7};
8
9#[cw_serde]
10pub struct Config {
11    pub admin: Addr,
12}
13pub const CONFIG: Item<Config> = Item::new(CONFIG_NAMESPACE);
14
15/// Hub module address.
16pub const HUB_ADDR: Item<Addr> = Item::new(PARENT_ADDR_NAMESPACE);
17
18/// Lock for the execute entry point.
19pub const EXECUTE_LOCK: Item<bool> = Item::new(EXECUTE_LOCK_NAMESPACE);
20
21// The smallest unit of data.
22// It is a key-value pair.
23// The key is a string and the value is a binary for any arbitrary data.
24#[cw_serde]
25pub struct Data {
26    pub key: String,
27    pub value: Binary,
28}
29// The data map for.
30// It is a map of string to binary.
31pub const DATA_MAP: Map<String, Binary> = Map::new("data");