cw1155_base/state.rs
1use cosmwasm_std::{Addr, Uint128};
2use cw1155::Expiration;
3use cw_storage_plus::{Item, Map};
4
5/// Store the minter address who have permission to mint new tokens.
6pub const MINTER: Item<Addr> = Item::new("minter");
7/// Store the balance map, `(owner, token_id) -> balance`
8pub const BALANCES: Map<(&Addr, &str), Uint128> = Map::new("balances");
9/// Store the approval status, `(owner, spender) -> expiration`
10pub const APPROVES: Map<(&Addr, &Addr), Expiration> = Map::new("approves");
11/// Store the tokens metadata url, also supports enumerating tokens,
12/// An entry for token_id must exist as long as there's tokens in circulation.
13pub const TOKENS: Map<&str, String> = Map::new("tokens");