Skip to content

Commit

Permalink
Adding info in vara-man events (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
MedovTimur authored Nov 18, 2024
1 parent 1f26b32 commit d91bf25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions contracts/vara-man/app/src/services/game/funcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ pub async fn finish_single_game(
maximum_possible_points,
maximum_number_gold_coins: storage.config.max_number_gold_coins,
maximum_number_silver_coins: storage.config.max_number_silver_coins,
player_address: msg_src
})
}

Expand Down Expand Up @@ -447,6 +448,7 @@ pub fn record_tournament_result(
maximum_possible_points,
maximum_number_gold_coins: storage.config.max_number_gold_coins,
maximum_number_silver_coins: storage.config.max_number_silver_coins,
player_address: msg_src,
})
}

Expand Down
2 changes: 2 additions & 0 deletions contracts/vara-man/app/src/services/game/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub enum Event {
maximum_number_gold_coins: u16,
maximum_number_silver_coins: u16,
prize: u128,
player_address: ActorId,
},
NewTournamentCreated {
tournament_name: String,
Expand Down Expand Up @@ -83,6 +84,7 @@ pub enum Event {
maximum_possible_points: u128,
maximum_number_gold_coins: u16,
maximum_number_silver_coins: u16,
player_address: ActorId,
},
GameStarted,
AdminAdded(ActorId),
Expand Down
4 changes: 2 additions & 2 deletions contracts/vara-man/wasm/vara-man.idl
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ service VaraMan {

events {
GameFinished: struct { winners: vec actor_id, participants: vec struct { actor_id, Player }, prize: u128 };
SingleGameFinished: struct { gold_coins: u16, silver_coins: u16, points: u128, maximum_possible_points: u128, maximum_number_gold_coins: u16, maximum_number_silver_coins: u16, prize: u128 };
SingleGameFinished: struct { gold_coins: u16, silver_coins: u16, points: u128, maximum_possible_points: u128, maximum_number_gold_coins: u16, maximum_number_silver_coins: u16, prize: u128, player_address: actor_id };
NewTournamentCreated: struct { tournament_name: str, name: str, level: Level, bid: u128 };
PlayerRegistered: struct { admin_id: actor_id, name: str, bid: u128 };
RegisterCanceled;
TournamentCanceled: struct { admin_id: actor_id };
PlayerDeleted: struct { player_id: actor_id };
ResultTournamentRecorded: struct { gold_coins: u16, silver_coins: u16, time: u128, points: u128, maximum_possible_points: u128, maximum_number_gold_coins: u16, maximum_number_silver_coins: u16 };
ResultTournamentRecorded: struct { gold_coins: u16, silver_coins: u16, time: u128, points: u128, maximum_possible_points: u128, maximum_number_gold_coins: u16, maximum_number_silver_coins: u16, player_address: actor_id };
GameStarted;
AdminAdded: actor_id;
StatusChanged: Status;
Expand Down

0 comments on commit d91bf25

Please sign in to comment.