From a701e434de588e68c9f5aa8c1504b787330e94ae Mon Sep 17 00:00:00 2001 From: Hunter001 <146340502+od-hunter@users.noreply.github.com> Date: Sat, 5 Oct 2024 21:48:24 +0000 Subject: [PATCH] feat: add custome errors in test_game --- onchain/src/systems/player_actions.cairo | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/onchain/src/systems/player_actions.cairo b/onchain/src/systems/player_actions.cairo index b43b0f1..eec2ba1 100644 --- a/onchain/src/systems/player_actions.cairo +++ b/onchain/src/systems/player_actions.cairo @@ -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]