Updated PlayerRegistered event to the CTF contract

frontend
Bazsalanszky 2022-12-06 22:32:24 +01:00
parent cb4cabd600
commit 856b568780
No known key found for this signature in database
GPG Key ID: B40814F4EFE23F96
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,7 @@ contract CCTF9 is Verifier {
event FlagAdded(uint256 indexed flagId, Hash flagHash); event FlagAdded(uint256 indexed flagId, Hash flagHash);
event FlagRemoved(uint256 indexed flagId); event FlagRemoved(uint256 indexed flagId);
event FlagSolved(uint256 indexed flagId, address indexed solver); event FlagSolved(uint256 indexed flagId, address indexed solver);
event PlayerRegistered(address playerAddress);
constructor(uint256 _volMaxPoints) { constructor(uint256 _volMaxPoints) {
admin = msg.sender; admin = msg.sender;
@ -89,6 +90,7 @@ contract CCTF9 is Verifier {
"Already registered or banned" "Already registered or banned"
); );
players[msg.sender].status = PlayerStatus.Verified; players[msg.sender].status = PlayerStatus.Verified;
emit PlayerRegistered(msg.sender);
} }
/// sets the player's status either to Unverified, Verified or Banned /// sets the player's status either to Unverified, Verified or Banned