diff --git a/packages/hardhat/contracts/Game.sol b/packages/hardhat/contracts/Game.sol index de7835a7..b9459cf6 100644 --- a/packages/hardhat/contracts/Game.sol +++ b/packages/hardhat/contracts/Game.sol @@ -165,6 +165,8 @@ contract Game is ICustomUnregisterDelegation, IOptionalSystemHook { } require(!isAllowed, "Already allowed to drop items"); allowedItemDrops.push(msgSender); + + emit GameNotif(delegatorAddress, "A new player has been added to allowed item drops"); } function dropItem(bytes32 toolEntityId) external { @@ -188,6 +190,8 @@ contract Game is ICustomUnregisterDelegation, IOptionalSystemHook { bytes memory dropCallData = abi.encodeCall(IDropSystem.dropTool, (toolEntityId, dropCoord)); IWorld(biomeWorldAddress).callFrom(delegatorAddress, DropSystemId, dropCallData); + + emit GameNotif(delegatorAddress, "Item dropped"); } // Getters diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 05f5339a..be63e096 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; const deployedContracts = { 31337: { Game: { - address: "0xaC47e91215fb80462139756f43438402998E4A3a", + address: "0x54B8d8E2455946f2A5B8982283f2359812e815ce", abi: [ { inputs: [ @@ -46,6 +46,25 @@ const deployedContracts = { name: "Slice_OutOfBounds", type: "error", }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "player", + type: "address", + }, + { + indexed: false, + internalType: "string", + name: "message", + type: "string", + }, + ], + name: "GameNotif", + type: "event", + }, { inputs: [ {