From d6210952eed20ac1fc900e6341a786c87dc60773 Mon Sep 17 00:00:00 2001 From: Dhvani Patel Date: Tue, 14 May 2024 17:29:01 +0100 Subject: [PATCH] fix field --- packages/hardhat/contracts/Game.sol | 8 ++++---- packages/nextjs/contracts/deployedContracts.ts | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/hardhat/contracts/Game.sol b/packages/hardhat/contracts/Game.sol index 89572494..f961ff6c 100644 --- a/packages/hardhat/contracts/Game.sol +++ b/packages/hardhat/contracts/Game.sol @@ -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 { @@ -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) { @@ -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 { @@ -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(); diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 95581e4e..288c1df8 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -93,6 +93,12 @@ const deployedContracts = { { anonymous: false, inputs: [ + { + indexed: false, + internalType: "address", + name: "player", + type: "address", + }, { indexed: false, internalType: "string",