Skip to content

Commit

Permalink
feat: add custome errors in test_game
Browse files Browse the repository at this point in the history
  • Loading branch information
od-hunter committed Oct 5, 2024
1 parent b567262 commit a701e43
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions onchain/src/systems/player_actions.cairo
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use starknet::{ContractAddress};
use starkludo::models::{player::{Player, PlayerTrait}};

mod Errors {
const ADDRESS_ZERO: felt252 = 'Cannot create from zero address';
const USERNAME_TAKEN: felt252 = 'username already taken';
const USERNAME_NOT_FOUND: felt252 = 'player with username not found';
const USERNAME_EXIST: felt252 = 'username already exist';
const ONLY_OWNER_USERNAME: felt252 = 'only user can udpate username';
pub mod Errors {
pub const ADDRESS_ZERO: felt252 = 'Cannot create from zero address';
pub const USERNAME_TAKEN: felt252 = 'username already taken';
pub const USERNAME_NOT_FOUND: felt252 = 'player with username not found';
pub const USERNAME_EXIST: felt252 = 'username already exist';
pub const ONLY_OWNER_USERNAME: felt252 = 'only user can udpate username';
}

#[dojo::interface]
Expand Down

0 comments on commit a701e43

Please sign in to comment.