Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #65

Merged
merged 64 commits into from
Oct 2, 2024
Merged

Dev #65

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
28c5ba8
fix
oxmmty Sep 17, 2024
de214b2
fix
oxmmty Sep 17, 2024
6cdbdb4
fix
oxmmty Sep 17, 2024
af939bf
Merge branch 'main' into dev
oxmmty Sep 17, 2024
cd0f594
change state.rs file
oxmmty Sep 18, 2024
cc083e1
change state.rs file
oxmmty Sep 18, 2024
baaea0f
change TimeOver
oxmmty Sep 19, 2024
3fdb404
change cw_storage_plus
oxmmty Sep 19, 2024
a2153c4
Merge branch 'main' into dev
oxmmty Sep 19, 2024
cedb251
change cw_stoage_plus
oxmmty Sep 20, 2024
95f8488
Merge branch 'main' into dev
oxmmty Sep 20, 2024
33ef316
change DepsMut parameter
oxmmty Sep 21, 2024
17cd1b3
changed InstantiateMsg
oxmmty Sep 21, 2024
0ec028b
Merge branch 'main' into dev
oxmmty Sep 21, 2024
2de3776
change MessageInfo
oxmmty Sep 23, 2024
72eabf5
change InstantiateMsg
oxmmty Sep 23, 2024
fcf2adf
Merge branch 'main' into dev
oxmmty Sep 23, 2024
a19f7d2
change try_receive_nft funcion
oxmmty Sep 23, 2024
c49590f
Merge branch 'main' into dev
oxmmty Sep 23, 2024
363e71e
change info and tichet_price
oxmmty Sep 23, 2024
5dd7112
change nft_contract addr
oxmmty Sep 23, 2024
18d4f90
Merge branch 'main' into dev
oxmmty Sep 23, 2024
2f77626
change raffle_status
oxmmty Sep 25, 2024
81ba76f
Merge branch 'main' into dev
oxmmty Sep 25, 2024
364b4e2
change game_state
oxmmty Sep 25, 2024
f45dd37
Merge branch 'main' into dev
oxmmty Sep 25, 2024
5ac44bb
change ticke_price and total_ticket_count
oxmmty Sep 26, 2024
81918d9
change token_id
oxmmty Sep 26, 2024
7f54413
Merge branch 'main' into dev
oxmmty Sep 26, 2024
2c719ff
change collection_wallet
oxmmty Sep 26, 2024
61112ff
Merge branch 'main' into dev
oxmmty Sep 26, 2024
81f1fbd
cnange game_state
oxmmty Sep 27, 2024
d18bffb
Merge branch 'main' into dev
oxmmty Sep 27, 2024
5d68d17
change sold_ticket_count
oxmmty Sep 27, 2024
60bf778
change totla_ticket_count
oxmmty Sep 27, 2024
442cbef
Merge branch 'main' into dev
oxmmty Sep 27, 2024
f7f7420
change raffle_status
oxmmty Sep 27, 2024
54f1613
Merge branch 'main' into dev
oxmmty Sep 27, 2024
b6bc925
change game_state.raffle_statue
oxmmty Sep 27, 2024
7d20426
Merge branch 'main' into dev
oxmmty Sep 27, 2024
cdc83bf
change nft_contract_add
oxmmty Sep 28, 2024
441c9d1
Merge branch 'main' into dev
oxmmty Sep 28, 2024
c74690d
change nft_token_id
oxmmty Sep 28, 2024
9b0c3e0
change game_state.owner
oxmmty Sep 28, 2024
ae1c18f
Merge branch 'main' into dev
oxmmty Sep 28, 2024
23e4a33
change game_state.collection_wallet
oxmmty Sep 28, 2024
ea0e10b
Merge branch 'main' into dev
oxmmty Sep 28, 2024
23724da
change game_state.end_time
oxmmty Sep 28, 2024
9a24116
Merge branch 'main' into dev
oxmmty Sep 28, 2024
62f4daf
change query_game_info function
oxmmty Sep 28, 2024
0a13eb9
change query_game_info
oxmmty Sep 28, 2024
ad9145f
Merge branch 'main' into dev
oxmmty Sep 28, 2024
11d02d4
change wrongGameId
oxmmty Sep 29, 2024
8d4e30d
Merge branch 'main' into dev
oxmmty Sep 29, 2024
88a4797
change raffleNoteActive
oxmmty Oct 1, 2024
832c17e
change raffleSoldOut
oxmmty Oct 1, 2024
66c98d9
change CantFinishGame
oxmmty Oct 1, 2024
064f7d8
change CantAccessPrize
oxmmty Oct 1, 2024
4529bc0
change IncorrectFunds
oxmmty Oct 1, 2024
4cf4924
change PayError
oxmmty Oct 1, 2024
4e054a9
change NoParticipants
oxmmty Oct 1, 2024
a4852f9
change missingNftContractAddr
oxmmty Oct 1, 2024
60142a2
change customerr
oxmmty Oct 2, 2024
e93fd45
change wronggameid
oxmmty Oct 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,25 +367,15 @@ fn query_game_info(deps: Deps, game_id: u64) -> StdResult<GameResponse> {
.map_err(|_| StdError::generic_err("Game with provided ID does not exist"))?;

Ok(GameResponse {

ticket_price: game_state.ticket_price,
sold_ticket_count: game_state.sold_ticket_count,
total_ticket_count: game_state.total_ticket_count,
raffle_status: game_state.raffle_status,

nft_contract_addr: game_state.nft_contract_addr,

nft_token_id: game_state.nft_token_id,

owner: game_state.owner,


collection_wallet: game_state.collection_wallet,


end_time: game_state.end_time,


})
}

Expand Down
40 changes: 20 additions & 20 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,35 @@ pub enum ContractError {
#[error("Wrong Game Id")]
WrongGameId {},

#[error("Raffle already ended")]
RaffleEnded {},
// #[error("Raffle already ended")]
// RaffleEnded {},

#[error("Raffle Time Over")]
RaffleTimeOver {},
// #[error("Raffle Time Over")]
// RaffleTimeOver {},

#[error("Raffle not started yet")]
RaffleNotActive {},
// #[error("Raffle not started yet")]
// RaffleNotActive {},

#[error("All raffle tickets was sold.")]
RaffleSoldOut {},
// #[error("All raffle tickets was sold.")]
// RaffleSoldOut {},

#[error("It is not the end time of the game")]
CantFinishGame {},
// #[error("It is not the end time of the game")]
// CantFinishGame {},

#[error("Can not access prize NFT")]
CantAccessPrize {},
// #[error("Can not access prize NFT")]
// CantAccessPrize {},

#[error("Incorrect Funds")]
IncorrectFunds {},
// #[error("Incorrect Funds")]
// IncorrectFunds {},

#[error("Must send exactly {ticket_price} SEI to enter the raffle")]
PayError { ticket_price: u64 },
// #[error("Must send exactly {ticket_price} SEI to enter the raffle")]
// PayError { ticket_price: u64 },

#[error("No participants in the raffle")]
NoParticipants {},
// #[error("No participants in the raffle")]
// NoParticipants {},

#[error("Missing NFT contract address")]
MissingNftContractAddr {},
// #[error("Missing NFT contract address")]
// MissingNftContractAddr {},

#[error("Can not transfer tokens until raffle is finished")]
CantTransferTokens {},
Expand Down
Loading