state.rs

 avatar
unknown
rust
3 years ago
525 B
4
Indexable
use std::{collections::HashMap, hash::Hash};

use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use cosmwasm_std::{Timestamp};
use cw_storage_plus::Item;

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct State {
    pub owner: String,
    pub cards: HashMap<u32, HashMap<String, u32>>,
    pub uris: HashMap<u32, String>,
    pub allowances: HashMap<String, HashMap<String, Timestamp>>,
    pub total: u32
}

pub const STATE: Item<State> = Item::new("state");
Editor is loading...