arbitrary address could not ghost tokens
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
		
							parent
							
								
									2a012ef8e2
								
							
						
					
					
						commit
						00a7dea8fb
					
				| @ -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)); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user