cw_boolean_contract/
state.rs

1//! What's stored in the contract state. For this simple contract, that's just a boolean.
2
3use cosmwasm_schema::cw_serde;
4use cw_storage_plus::Item;
5
6/// The state that's stored.
7/// Simply an `is_true` key of type `boolean`.
8#[cw_serde]
9pub struct Config {
10    pub is_true: bool,
11}
12
13// We might as well shorten it to "c" instead of "config"
14/// We're using [`cw-storage-plus`](https://crates.io/crates/cw-storage-plus)'s [`Item`](cw_storage_plus::Item)
15pub const CONFIG: Item<Config> = Item::new("c");