diff --git a/test/gatekeeper/Gatekeeper.t.sol b/test/gatekeeper/Gatekeeper.t.sol index 0e392cf..57f3b87 100644 --- a/test/gatekeeper/Gatekeeper.t.sol +++ b/test/gatekeeper/Gatekeeper.t.sol @@ -35,6 +35,16 @@ contract GatekeeperTest is Test { assertEq(gatekeeper.ghostedSupply(), ghostedSupply + ghostAmount); } + function test_couldNotGhostTokensFromArbitraryAddress(address someone) public { + vm.assume(someone != alice); + bytes32 receiver = bytes32(abi.encodePacked(alice)); + + vm.expectRevert(); + vm.prank(someone); + gatekeeper.ghost(receiver, 69); + assertEq(gatekeeper.ghostedSupply(), 0); + } + function test_ghostTokensEmitsEvent(uint256 ghostAmount) public { vm.assume(ghostAmount > 0); bytes32 receiver = bytes32(abi.encodePacked(alice));