Skip to content

Commit

Permalink
fix field
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvanipa committed May 14, 2024
1 parent 7092fb2 commit d621095
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/hardhat/contracts/Game.sol
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ contract Game is IOptionalSystemHook {
isGameStarted = true;
gameEndBlock = block.number + numBlocksToEnd;

emit GameNotif("Game has started!");
emit GameNotif(address(0), "Game has started!");
}

function setMatchArea(VoxelCoord memory lowerSouthwestCorner, VoxelCoord memory size) external {
Expand Down Expand Up @@ -247,7 +247,7 @@ contract Game is IOptionalSystemHook {

alivePlayers.push(player);

emit GameNotif(string.concat("Player ", Strings.toHexString(player), " has joined the game"));
emit GameNotif(address(0), string.concat("Player ", Strings.toHexString(player), " has joined the game"));
}

function updateAlivePlayers(address msgSender) internal returns (uint256, bool) {
Expand All @@ -269,7 +269,7 @@ contract Game is IOptionalSystemHook {
}
}
if (!markedDead) {
emit GameNotif(string.concat("Player ", Strings.toHexString(alivePlayers[i]), " has died"));
emit GameNotif(address(0), string.concat("Player ", Strings.toHexString(alivePlayers[i]), " has died"));
deadPlayers.push(alivePlayers[i]);
}
} else {
Expand Down Expand Up @@ -369,7 +369,7 @@ contract Game is IOptionalSystemHook {
require(sent, "Failed to send Ether");
}

emit GameNotif("Game has ended. Reward pool has been distributed.");
emit GameNotif(address(0), "Game has ended. Reward pool has been distributed.");

// reset the game state
resetGame();
Expand Down
6 changes: 6 additions & 0 deletions packages/nextjs/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ const deployedContracts = {
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "player",
type: "address",
},
{
indexed: false,
internalType: "string",
Expand Down

0 comments on commit d621095

Please sign in to comment.