diff --git a/test/ERC20.t.sol b/test/ERC20.t.sol index 11c55ba..4b6798d 100644 --- a/test/ERC20.t.sol +++ b/test/ERC20.t.sol @@ -6,9 +6,8 @@ import {SymTest} from "halmos-cheatcodes/SymTest.sol"; import {ERC20OpenZeppelin} from "@src/ERC20OpenZeppelin.sol"; import {ERC20Solady} from "@src/ERC20Solady.sol"; import {ERC20Solmate} from "@src/ERC20Solmate.sol"; -import {MockERC20} from "@solmate/test/utils/mocks/MockERC20.sol"; -/// @custom:halmos --storage-layout=generic --array-lengths senders=2 --loop 256 +/// @custom:halmos --storage-layout=generic --array-lengths senders=2 --array-lengths staticcalls=2 --loop 256 contract ERC20Test is Test, SymTest { ERC20OpenZeppelin public openzeppelin; ERC20Solady public solady; @@ -23,15 +22,13 @@ contract ERC20Test is Test, SymTest { solmate = new ERC20Solmate("Token", "TOK", 6); } - function check_differential_erc20(address[] memory senders, uint256 calls, uint256 staticcalls) public { - vm.assume(senders.length == calls); - + function check_differential_erc20(address[] memory senders, uint256[] memory staticcalls) public { address[3] memory contracts = [address(openzeppelin), address(solady), address(solmate)]; bytes[] memory results; - results = new bytes[](calls); - for (uint256 j = 0; j < calls; j++) { + results = new bytes[](senders.length); + for (uint256 j = 0; j < senders.length; j++) { for (uint256 i = 0; i < contracts.length; i++) { vm.prank(senders[j]); (bool _success, bytes memory _result) = contracts[i].call(svm.createCalldata("MockERC20")); @@ -44,8 +41,8 @@ contract ERC20Test is Test, SymTest { } } - results = new bytes[](staticcalls); - for (uint256 j = 0; j < staticcalls; j++) { + results = new bytes[](staticcalls.length); + for (uint256 j = 0; j < staticcalls.length; j++) { for (uint256 i = 0; i < contracts.length; i++) { (bool _success, bytes memory _result) = contracts[i].staticcall(svm.createCalldata("MockERC20", true)); require(_success);