Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrust committed Sep 6, 2024
1 parent 01c1e47 commit 50bf4bd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions contracts/test/StorageContractTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ contract StorageContractTest is Test {
assertEq(miner.balance, reward);
}

function testReentrancy() public {
vm.pauseGasMetering();
function testReentrancy() public noGasMetering {
uint256 prefund = 1000;
// Without reentrancy protection, the fund could be drained by 29 times re-entrances given current params.
vm.deal(address(storageContract), prefund);
Expand Down Expand Up @@ -97,10 +96,7 @@ contract StorageContractTest is Test {
}
}

contract Attacker {
// cannot access imported vm directly
address internal constant VM_ADDRESS = address(uint160(uint256(keccak256("hevm cheat code"))));
Vm vm = Vm(VM_ADDRESS);
contract Attacker is Test {
TestStorageContract storageContract;
uint256 blockNumber = 1;
uint256 count = 0;
Expand Down

0 comments on commit 50bf4bd

Please sign in to comment.