From 81b0c8737de6aec22c877d6cfe8ed76486333f16 Mon Sep 17 00:00:00 2001 From: Pano Skylakis Date: Fri, 12 Apr 2024 17:12:00 +1200 Subject: [PATCH] Feat: add earnGem call after deployment test --- script/games/gems/DeployGemGame.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/script/games/gems/DeployGemGame.sol b/script/games/gems/DeployGemGame.sol index a7714249..bade8ce6 100644 --- a/script/games/gems/DeployGemGame.sol +++ b/script/games/gems/DeployGemGame.sol @@ -37,6 +37,8 @@ struct GemGameContractArgs { } contract DeployGemGame is Test { + event GemEarned(address indexed account, uint256 timestamp); + function testDeploy() external { /// @dev Fork the Immutable zkEVM testnet for this test string memory rpcURL = "https://rpc.testnet.immutable.com"; @@ -71,6 +73,11 @@ contract DeployGemGame is Test { assertEq( false, deployedGemGameContract.hasRole(deployedGemGameContract.DEFAULT_ADMIN_ROLE(), deploymentArgs.signer) ); + + // Earn a gem + vm.expectEmit(true, true, false, false); + emit GemEarned(address(this), block.timestamp); + deployedGemGameContract.earnGem(); } function deploy() external {