diff --git a/test/Counter.t.sol b/test/Counter.t.sol index 2693cbb..ea1d4ee 100644 --- a/test/Counter.t.sol +++ b/test/Counter.t.sol @@ -23,8 +23,13 @@ contract CounterTest is Test { targetContract(address(proxy)); - targetSender(makeAddr("alice")); - targetSender(makeAddr("bob")); + address alice = makeAddr("alice"); + address bob = makeAddr("bob"); + vm.deal(alice, 100 ether); + vm.deal(bob, 100 ether); + + targetSender(alice); + targetSender(bob); } function invariant_assume() public view { diff --git a/test/TestHandler.sol b/test/TestHandler.sol index 8ae510d..99bf1bc 100644 --- a/test/TestHandler.sol +++ b/test/TestHandler.sol @@ -21,8 +21,9 @@ contract TestHandler is Test, Initializable, UUPSUpgradeable { function fuzzHandler(address addr, uint256 amount_) external { amount_ = _bound(amount_, 500001, type(uint256).max); + addr = _boundAddress(addr); vm.startPrank(msg.sender); - this.otherExternalFunction(amount_, _boundAddress(addr)); + this.otherExternalFunction{value: 1000}(amount_, addr); vm.stopPrank(); console.log("finished execution"); } @@ -36,7 +37,7 @@ contract TestHandler is Test, Initializable, UUPSUpgradeable { return addr; } - function otherExternalFunction(uint256 amount_, address addr) external { + function otherExternalFunction(uint256 amount_, address addr) external payable { amount = amount_; test = addr; }