Skip to content

Commit

Permalink
Dev (#17)
Browse files Browse the repository at this point in the history
* fix

Co-authored-by: oxmmty <[email protected]>

* fix

Co-authored-by: oxmmty <[email protected]>

* fix

Co-authored-by: oxmmty <[email protected]>

* change state.rs file
  • Loading branch information
oxmmty authored Sep 18, 2024
1 parent 9e55b67 commit ac533af
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ pub enum GameStatus {

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct GlobalState {
// pub count: u64,
// pub owner: Addr
pub count: u64,
pub owner: Addr
}


#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct GameState {
pub ticket_price: u64,
pub sold_ticket_count: u64,
// pub total_ticket_count: u64,
pub total_ticket_count: u64,
pub raffle_status: u8,
// pub nft_contract_addr: Addr,
pub nft_contract_addr: Addr,
pub nft_token_id: String,
// pub owner: Addr,
pub owner: Addr,
pub collection_wallet: Addr, // Collection wallet address to send tokens after the game finished
// pub end_time: u64,
pub end_time: u64,
}

// pub const GLOBAL_STATE: Item<GlobalState> = Item::new("global_state");
// pub const GAME_STATE: Map<u64, GameState> = Map::new("game_state");
// pub const TICKET_STATUS: Map<(u64, u64), Addr> = Map::new("ticket_status");
// pub const WALLET_TICKETS: Map<(u64, Addr), Vec<u64>> = Map::new("wallet_tickets");
pub const GLOBAL_STATE: Item<GlobalState> = Item::new("global_state");
pub const GAME_STATE: Map<u64, GameState> = Map::new("game_state");
pub const TICKET_STATUS: Map<(u64, u64), Addr> = Map::new("ticket_status");
pub const WALLET_TICKETS: Map<(u64, Addr), Vec<u64>> = Map::new("wallet_tickets");

0 comments on commit ac533af

Please sign in to comment.