Skip to content

Commit

Permalink
stop the pranks
Browse files Browse the repository at this point in the history
  • Loading branch information
d10r committed Jan 22, 2024
1 parent 466a379 commit 2088538
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/foundry/FOTToken.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contract FOTTokenTest is Test {
address public alice = address(0x421);
address public bob = address(0x422);
address public dan = address(0x423);

constructor() {
vm.etch(ERC1820RegistryCompiled.at, ERC1820RegistryCompiled.bin);
SuperfluidFrameworkDeployer sfDeployer = new SuperfluidFrameworkDeployer();
Expand Down Expand Up @@ -49,6 +49,7 @@ contract FOTTokenTest is Test {
vm.startPrank(dan);
vm.expectRevert("SuperToken: transfer amount exceeds allowance");
fotToken.transferFrom(alice, bob, 1 ether);
vm.stopPrank();

// give allowance
vm.prank(alice);
Expand All @@ -58,6 +59,7 @@ contract FOTTokenTest is Test {
vm.startPrank(dan);
vm.expectRevert("SuperToken: transfer amount exceeds allowance");
fotToken.transferFrom(alice, bob, 1 ether);
vm.stopPrank();

// add the fee amount
vm.prank(alice);
Expand All @@ -80,11 +82,13 @@ contract FOTTokenTest is Test {
vm.expectRevert("Ownable: caller is not the owner"); // dan isn't the owner
// casting to payable needed because the proxy contains a payable fallback function
fotToken.setFeeConfig(newTxFee, dan);
vm.stopPrank();

vm.startPrank(admin);
fotToken.setFeeConfig(newTxFee, dan);

deal(address(fotToken), alice, 100 ether);
vm.stopPrank();

vm.startPrank(alice);
fotToken.transfer(bob, 1 ether);
Expand Down

0 comments on commit 2088538

Please sign in to comment.