├── .gitignore ├── README.md ├── .gitmodules ├── foundry.toml ├── src ├── fixtures │ └── GetCode │ │ ├── WorkingContract.sol │ │ └── UnlinkedContract.sol ├── core │ ├── Reverting.t.sol │ ├── DSStyle.t.sol │ ├── FailingSetup.t.sol │ ├── SetupConsistency.t.sol │ ├── LibraryLinking.t.sol │ └── DappToolsParity.t.sol ├── cheats │ ├── Label.t.sol │ ├── Assume.t.sol │ ├── Etch.t.sol │ ├── Fee.t.sol │ ├── Warp.t.sol │ ├── Addr.t.sol │ ├── Sign.t.sol │ ├── Deal.t.sol │ ├── Ffi.t.sol │ ├── Load.t.sol │ ├── Roll.t.sol │ ├── Store.t.sol │ ├── GetCode.t.sol │ ├── Record.t.sol │ ├── ExpectCall.t.sol │ ├── MockCall.t.sol │ ├── Cheats.sol │ ├── ExpectRevert.t.sol │ ├── ExpectEmit.t.sol │ └── Prank.t.sol ├── fuzz │ ├── Fuzz.t.sol │ └── FuzzNumbers.t.sol ├── logs │ ├── DebugLogs.t.sol │ └── HardhatLogs.t.sol └── trace │ ├── ConflictingSignatures.t.sol │ └── Trace.t.sol └── .github └── workflows └── CI.yml /.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | cache/ 3 | .env 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | These tests have now been moved upstream 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/ds-test"] 2 | path = lib/ds-test 3 | url = https://github.com/dapphub/ds-test 4 | -------------------------------------------------------------------------------- /foundry.toml: -------------------------------------------------------------------------------- 1 | [default] 2 | solc_version = "0.8.10" 3 | autodetect_solc = false 4 | remappings = [ 5 | "ds-test/=lib/ds-test/src/" 6 | ] 7 | ffi = true 8 | -------------------------------------------------------------------------------- /src/fixtures/GetCode/WorkingContract.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | contract WorkingContract { 5 | uint256 constant public secret = 42; 6 | } 7 | -------------------------------------------------------------------------------- /src/core/Reverting.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | contract RevertingTest { 5 | function testFailRevert() public pure { 6 | require(false, "should revert here"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/cheats/Label.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract LabelTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testLabel() public { 11 | cheats.label(address(1), "Sir Address the 1st"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/cheats/Assume.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract AssumeTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testAssume(uint8 x) public { 11 | cheats.assume(x < 2 ** 7); 12 | assertTrue(x < 2 ** 7, "did not discard inputs"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/core/DSStyle.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | 6 | contract DSStyleTest is DSTest { 7 | function testFailingAssertions() public { 8 | emit log_string("assertionOne"); 9 | assertEq(uint(1), uint(2)); 10 | emit log_string("assertionTwo"); 11 | assertEq(uint(3), uint(4)); 12 | emit log_string("done"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/fixtures/GetCode/UnlinkedContract.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | library SmolLibrary { 5 | function add(uint256 a, uint256 b) public pure returns (uint256 c) { 6 | c = a + b; 7 | } 8 | } 9 | 10 | contract UnlinkedContract { 11 | function complicated(uint256 a, uint256 b, uint256 c) public pure returns (uint256 d) { 12 | d = SmolLibrary.add(SmolLibrary.add(a, b), c); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: 5 | - master 6 | pull_request: 7 | 8 | jobs: 9 | run-ci: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | with: 14 | submodules: recursive 15 | 16 | - name: Install Foundry 17 | uses: onbjerg/foundry-toolchain@v1 18 | with: 19 | version: nightly 20 | 21 | - name: Run tests 22 | run: forge test 23 | -------------------------------------------------------------------------------- /src/core/FailingSetup.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | 6 | contract FailingSetupTest is DSTest { 7 | event Test(uint256 n); 8 | 9 | function setUp() public { 10 | emit Test(42); 11 | require(false, "setup failed predictably"); 12 | } 13 | 14 | function testFailShouldBeMarkedAsFailedBecauseOfSetup() public { 15 | emit log("setup did not fail"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/cheats/Etch.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract EtchTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testEtch() public { 11 | address target = address(10); 12 | bytes memory code = hex"1010"; 13 | cheats.etch(target, code); 14 | assertEq(string(code), string(target.code)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/cheats/Fee.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract FeeTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testFee() public { 11 | cheats.fee(10); 12 | assertEq(block.basefee, 10, "fee failed"); 13 | } 14 | 15 | function testFeeFuzzed(uint256 fee) public { 16 | cheats.fee(fee); 17 | assertEq(block.basefee, fee, "fee failed"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/cheats/Warp.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract WarpTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testWarp() public { 11 | cheats.warp(10); 12 | assertEq(block.timestamp, 10, "warp failed"); 13 | } 14 | 15 | function testWarpFuzzed(uint128 jump) public { 16 | uint pre = block.timestamp; 17 | cheats.warp(block.timestamp + jump); 18 | assertEq(block.timestamp, pre + jump, "warp failed"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/fuzz/Fuzz.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | 6 | contract FuzzTest is DSTest { 7 | constructor() { 8 | emit log("constructor"); 9 | } 10 | 11 | function setUp() public { 12 | emit log("setUp"); 13 | } 14 | 15 | function testFailFuzz(uint8 x) public { 16 | emit log("testFailFuzz"); 17 | require(x == 5, "should revert"); 18 | } 19 | 20 | function testSuccessfulFuzz(uint128 a, uint128 b) public { 21 | emit log("testSuccessfulFuzz"); 22 | assertEq(uint256(a) + uint256(b), uint256(a) + uint256(b)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/cheats/Addr.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract AddrTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testFailPrivKeyZero() public { 11 | cheats.addr(0); 12 | } 13 | 14 | function testAddr() public { 15 | uint pk = 77814517325470205911140941194401928579557062014761831930645393041380819009408; 16 | address expected = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; 17 | 18 | assertEq(cheats.addr(pk), expected, "expected address did not match"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/core/SetupConsistency.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | 6 | contract SetupConsistencyCheck is DSTest { 7 | uint256 two; 8 | uint256 four; 9 | uint256 result; 10 | 11 | function setUp() public { 12 | two = 2; 13 | four = 4; 14 | result = 0; 15 | } 16 | 17 | function testAdd() public { 18 | assertEq(result, 0); 19 | result = two + four; 20 | assertEq(result, 6); 21 | } 22 | 23 | function testMultiply() public { 24 | assertEq(result, 0); 25 | result = two * four; 26 | assertEq(result, 8); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/cheats/Sign.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract SignTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testSignDigest(uint248 pk, bytes32 digest) public { 11 | cheats.assume(pk != 0); 12 | 13 | (uint8 v, bytes32 r, bytes32 s) = cheats.sign(pk, digest); 14 | address expected = cheats.addr(pk); 15 | address actual = ecrecover(digest, v, r, s); 16 | 17 | assertEq(actual, expected, "digest signer did not match"); 18 | } 19 | 20 | function testSignMessage(uint248 pk, bytes memory message) public { 21 | testSignDigest(pk, keccak256(message)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/cheats/Deal.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract DealTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testDeal(uint256 amount) public { 11 | address target = address(1); 12 | assertEq(target.balance, 0, "initial balance incorrect"); 13 | 14 | // Give half the amount 15 | cheats.deal(target, amount / 2); 16 | assertEq(target.balance, amount / 2, "half balance is incorrect"); 17 | 18 | // Give the entire amount to check that deal is not additive 19 | cheats.deal(target, amount); 20 | assertEq(target.balance, amount, "deal did not overwrite balance"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/cheats/Ffi.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract FfiTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testFfi() public { 11 | string[] memory inputs = new string[](3); 12 | inputs[0] = "echo"; 13 | inputs[1] = "-n"; 14 | inputs[2] = "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000966666920776f726b730000000000000000000000000000000000000000000000"; 15 | 16 | bytes memory res = cheats.ffi(inputs); 17 | (string memory output) = abi.decode(res, (string)); 18 | assertEq(output, "ffi works", "ffi failed"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/logs/DebugLogs.t.sol: -------------------------------------------------------------------------------- 1 | pragma solidity >=0.8.0; 2 | 3 | import "ds-test/test.sol"; 4 | 5 | contract DebugLogsTest is DSTest { 6 | constructor() { 7 | emit log_uint(0); 8 | } 9 | 10 | function setUp() public { 11 | emit log_uint(1); 12 | } 13 | 14 | function test1() public { 15 | emit log_uint(2); 16 | } 17 | 18 | function test2() public { 19 | emit log_uint(3); 20 | } 21 | 22 | function testFailWithRevert() public { 23 | Fails fails = new Fails(); 24 | emit log_uint(4); 25 | fails.failure(); 26 | } 27 | 28 | function testFailWithRequire() public { 29 | emit log_uint(5); 30 | require(false); 31 | } 32 | } 33 | 34 | contract Fails is DSTest { 35 | function failure() public { 36 | emit log_uint(100); 37 | revert(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/cheats/Load.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract Storage { 8 | uint256 slot0 = 10; 9 | } 10 | 11 | contract LoadTest is DSTest { 12 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 13 | uint256 slot0 = 20; 14 | Storage store; 15 | 16 | function setUp() public { 17 | store = new Storage(); 18 | } 19 | 20 | function testLoadOwnStorage() public { 21 | uint slot; 22 | assembly { 23 | slot := slot0.slot 24 | } 25 | uint val = uint(cheats.load(address(this), bytes32(slot))); 26 | assertEq(val, 20, "load failed"); 27 | } 28 | 29 | function testLoadOtherStorage() public { 30 | uint val = uint(cheats.load(address(store), bytes32(0))); 31 | assertEq(val, 10, "load failed"); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/cheats/Roll.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract RollTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testRoll() public { 11 | cheats.roll(10); 12 | assertEq(block.number, 10, "roll failed"); 13 | } 14 | 15 | function testRollFuzzed(uint128 jump) public { 16 | uint pre = block.number; 17 | cheats.roll(block.number + jump); 18 | assertEq(block.number, pre + jump, "roll failed"); 19 | } 20 | 21 | function testRollHash() public { 22 | assertEq(blockhash(block.number), keccak256(abi.encodePacked(block.number)), "initial block hash is incorrect"); 23 | 24 | cheats.roll(5); 25 | bytes32 hash = blockhash(5); 26 | assertTrue(blockhash(5) != 0x0, "new block hash is incorrect"); 27 | 28 | cheats.roll(10); 29 | assertTrue(blockhash(5) != blockhash(10), "block hash collision"); 30 | 31 | cheats.roll(5); 32 | assertEq(blockhash(5), hash, "block 5 changed hash"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/trace/ConflictingSignatures.t.sol: -------------------------------------------------------------------------------- 1 | pragma solidity >=0.8.0; 2 | 3 | import "ds-test/test.sol"; 4 | import "../cheats/Cheats.sol"; 5 | 6 | contract ReturnsNothing { 7 | function func() public pure {} 8 | } 9 | 10 | contract ReturnsString { 11 | function func() public pure returns (string memory) { 12 | return "string"; 13 | } 14 | } 15 | 16 | contract ReturnsUint { 17 | function func() public pure returns (uint256) { 18 | return 1; 19 | } 20 | } 21 | 22 | contract ConflictingSignaturesTest is DSTest { 23 | ReturnsNothing retsNothing; 24 | ReturnsString retsString; 25 | ReturnsUint retsUint; 26 | 27 | function setUp() public { 28 | retsNothing = new ReturnsNothing(); 29 | retsString = new ReturnsString(); 30 | retsUint = new ReturnsUint(); 31 | } 32 | 33 | /// Tests that traces are decoded properly when multiple 34 | /// functions have the same 4byte signature, but different 35 | /// return values. 36 | function testTraceWithConflictingSignatures() public { 37 | retsNothing.func(); 38 | retsString.func(); 39 | retsUint.func(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/core/LibraryLinking.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | 6 | library Lib { 7 | function plus100(uint256 a) public pure returns (uint256) { 8 | return a + 100; 9 | } 10 | } 11 | 12 | library NestedLib { 13 | function nestedPlus100Plus1(uint256 a) public pure returns (uint256) { 14 | return Lib.plus100(a) + 1; 15 | } 16 | } 17 | 18 | contract LibraryConsumer { 19 | function consume(uint256 a) public pure returns (uint256) { 20 | return Lib.plus100(a); 21 | } 22 | 23 | function consumeNested(uint256 a) public pure returns (uint256) { 24 | return NestedLib.nestedPlus100Plus1(a); 25 | } 26 | } 27 | 28 | contract LibraryLinkingTest is DSTest { 29 | LibraryConsumer consumer; 30 | 31 | function setUp() public { 32 | consumer = new LibraryConsumer(); 33 | } 34 | 35 | function testDirect() public { 36 | assertEq(consumer.consume(1), 101, "library call failed"); 37 | } 38 | 39 | function testNested() public { 40 | assertEq(consumer.consumeNested(1), 102, "nested library call failed"); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/fuzz/FuzzNumbers.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | 6 | // See https://github.com/gakonst/foundry/pull/735 for context 7 | contract FuzzNumbersTest is DSTest { 8 | function testPositive(uint256) public { 9 | assertTrue(true); 10 | } 11 | 12 | function testNegativeHalf(uint256 val) public { 13 | assertTrue(val < 2 ** 128 - 1); 14 | } 15 | 16 | function testNegative0(uint256 val) public { 17 | assertTrue(val != 0); 18 | } 19 | 20 | function testNegative2(uint256 val) public { 21 | assertTrue(val != 2); 22 | } 23 | 24 | function testNegative2Max(uint256 val) public { 25 | assertTrue(val != type(uint256).max - 2); 26 | } 27 | 28 | function testNegativeMax(uint256 val) public { 29 | assertTrue(val != type(uint256).max); 30 | } 31 | 32 | function testEquality(uint256 x, uint256 y) public { 33 | uint256 xy; 34 | 35 | unchecked { 36 | xy = x * y; 37 | } 38 | 39 | if ((x != 0 && xy / x != y)) return; 40 | 41 | assertEq(((xy - 1) / 1e18) + 1, (xy - 1) / (1e18 + 1)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/core/DappToolsParity.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | 6 | contract DSStyleTest is DSTest { 7 | function chainId() internal view returns (uint256 id) { 8 | assembly { 9 | id := chainid() 10 | } 11 | } 12 | 13 | function testAddresses() public { 14 | assertEq(msg.sender, 0x00a329c0648769A73afAc7F9381E08FB43dBEA72, "sender account is incorrect"); 15 | assertEq(tx.origin, 0x00a329c0648769A73afAc7F9381E08FB43dBEA72, "origin account is incorrect"); 16 | assertEq(address(this), 0xb4c79daB8f259C7Aee6E5b2Aa729821864227e84, "test contract address is incorrect"); 17 | } 18 | 19 | function testEnvironment() public { 20 | assertEq(chainId(), 99, "chain id is incorrect"); 21 | assertEq(block.number, 0); 22 | assertEq( 23 | blockhash(block.number), 24 | keccak256(abi.encodePacked(block.number)), 25 | "blockhash is incorrect" 26 | ); 27 | assertEq(block.coinbase, 0x0000000000000000000000000000000000000000, "coinbase is incorrect"); 28 | assertEq(block.timestamp, 0, "timestamp is incorrect"); 29 | assertEq(block.difficulty, 0, "difficulty is incorrect"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/cheats/Store.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract Storage { 8 | uint public slot0 = 10; 9 | uint public slot1 = 20; 10 | } 11 | 12 | contract StoreTest is DSTest { 13 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 14 | Storage store; 15 | 16 | function setUp() public { 17 | store = new Storage(); 18 | } 19 | 20 | function testStore() public { 21 | assertEq(store.slot0(), 10, "initial value for slot 0 is incorrect"); 22 | assertEq(store.slot1(), 20, "initial value for slot 1 is incorrect"); 23 | 24 | cheats.store(address(store), bytes32(0), bytes32(uint(1))); 25 | assertEq(store.slot0(), 1, "store failed"); 26 | assertEq(store.slot1(), 20, "store failed"); 27 | } 28 | 29 | function testStoreFuzzed(uint256 slot0, uint256 slot1) public { 30 | assertEq(store.slot0(), 10, "initial value for slot 0 is incorrect"); 31 | assertEq(store.slot1(), 20, "initial value for slot 1 is incorrect"); 32 | 33 | cheats.store(address(store), bytes32(0), bytes32(slot0)); 34 | cheats.store(address(store), bytes32(uint(1)), bytes32(slot1)); 35 | assertEq(store.slot0(), slot0, "store failed"); 36 | assertEq(store.slot1(), slot1, "store failed"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/cheats/GetCode.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract GetCodeTest is DSTest { 8 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 9 | 10 | function testGetCode() public { 11 | bytes memory fullPath = cheats.getCode("./out/WorkingContract.sol/WorkingContract.json"); 12 | bytes memory fileOnly = cheats.getCode("WorkingContract.sol"); 13 | bytes memory fileAndContractName = cheats.getCode("WorkingContract.sol:WorkingContract"); 14 | 15 | string memory expected = string(bytes(hex"6080604052348015600f57600080fd5b50607c8061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063d1efd30d14602d575b600080fd5b6034602a81565b60405190815260200160405180910390f3fea26469706673582212206740fcc626175d58a151da7fbfca1775ea4d3ababf7f3168347dab89488f6a4264736f6c634300080a0033")); 16 | assertEq( 17 | string(fullPath), 18 | expected, 19 | "code for full path was incorrect" 20 | ); 21 | assertEq( 22 | string(fileOnly), 23 | expected, 24 | "code for file name only was incorrect" 25 | ); 26 | assertEq( 27 | string(fileAndContractName), 28 | expected, 29 | "code for full path was incorrect" 30 | ); 31 | } 32 | 33 | function testFailGetUnlinked() public { 34 | cheats.getCode("UnlinkedContract.sol"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/cheats/Record.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract RecordAccess { 8 | function record() public returns (NestedRecordAccess) { 9 | assembly { 10 | sstore(1, add(sload(1), 1)) 11 | } 12 | 13 | NestedRecordAccess inner = new NestedRecordAccess(); 14 | inner.record(); 15 | 16 | return inner; 17 | } 18 | } 19 | 20 | contract NestedRecordAccess { 21 | function record() public { 22 | assembly { 23 | sstore(2, add(sload(2), 1)) 24 | } 25 | } 26 | } 27 | 28 | contract RecordTest is DSTest { 29 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 30 | 31 | function testRecordAccess() public { 32 | RecordAccess target = new RecordAccess(); 33 | 34 | // Start recording 35 | cheats.record(); 36 | NestedRecordAccess inner = target.record(); 37 | 38 | // Verify Records 39 | (bytes32[] memory reads, bytes32[] memory writes) = cheats.accesses(address(target)); 40 | (bytes32[] memory innerReads, bytes32[] memory innerWrites) = cheats.accesses(address(inner)); 41 | 42 | assertEq(reads.length, 2, "number of reads is incorrect"); 43 | assertEq(reads[0], bytes32(uint256(1)), "key for read 0 is incorrect"); 44 | assertEq(reads[1], bytes32(uint256(1)), "key for read 1 is incorrect"); 45 | 46 | assertEq(writes.length, 1, "number of writes is incorrect"); 47 | assertEq(writes[0], bytes32(uint256(1)), "key for write is incorrect"); 48 | 49 | assertEq(innerReads.length, 2, "number of nested reads is incorrect"); 50 | assertEq(innerReads[0], bytes32(uint256(2)), "key for nested read 0 is incorrect"); 51 | assertEq(innerReads[1], bytes32(uint256(2)), "key for nested read 1 is incorrect"); 52 | 53 | assertEq(innerWrites.length, 1, "number of nested writes is incorrect"); 54 | assertEq(innerWrites[0], bytes32(uint256(2)), "key for nested write is incorrect"); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/trace/Trace.t.sol: -------------------------------------------------------------------------------- 1 | pragma solidity >=0.8.0; 2 | 3 | import "ds-test/test.sol"; 4 | import "../cheats/Cheats.sol"; 5 | 6 | contract RecursiveCall { 7 | TraceTest factory; 8 | 9 | event Depth(uint256 depth); 10 | event ChildDepth(uint256 childDepth); 11 | event CreatedChild(uint256 childDepth); 12 | 13 | constructor(address _factory) { 14 | factory = TraceTest(_factory); 15 | } 16 | 17 | function recurseCall(uint256 neededDepth, uint256 depth) public returns (uint256) { 18 | if (depth == neededDepth) { 19 | this.negativeNum(); 20 | return neededDepth; 21 | } 22 | 23 | uint256 childDepth = this.recurseCall(neededDepth, depth + 1); 24 | emit ChildDepth(childDepth); 25 | 26 | this.someCall(); 27 | emit Depth(depth); 28 | 29 | return depth; 30 | } 31 | 32 | function recurseCreate(uint256 neededDepth, uint256 depth) public returns (uint256) { 33 | if (depth == neededDepth) { 34 | return neededDepth; 35 | } 36 | 37 | RecursiveCall child = factory.create(); 38 | emit CreatedChild(depth + 1); 39 | 40 | uint256 childDepth = child.recurseCreate(neededDepth, depth + 1); 41 | emit ChildDepth(childDepth); 42 | emit Depth(depth); 43 | 44 | return depth; 45 | } 46 | 47 | function someCall() public pure {} 48 | 49 | function negativeNum() public pure returns (int256) { 50 | return -1000000000; 51 | } 52 | } 53 | 54 | contract TraceTest is DSTest { 55 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 56 | 57 | uint256 nodeId = 0; 58 | RecursiveCall first; 59 | 60 | function setUp() public { 61 | first = this.create(); 62 | } 63 | 64 | function create() public returns (RecursiveCall) { 65 | RecursiveCall node = new RecursiveCall(address(this)); 66 | cheats.label( 67 | address(node), 68 | string(abi.encodePacked("Node ", uintToString(nodeId++))) 69 | ); 70 | 71 | return node; 72 | } 73 | 74 | function testRecurseCall() public { 75 | first.recurseCall(8, 0); 76 | } 77 | 78 | function testRecurseCreate() public { 79 | first.recurseCreate(8, 0); 80 | } 81 | } 82 | 83 | function uintToString(uint256 value) pure returns (string memory) { 84 | // Taken from OpenZeppelin 85 | if (value == 0) { 86 | return "0"; 87 | } 88 | uint256 temp = value; 89 | uint256 digits; 90 | while (temp != 0) { 91 | digits++; 92 | temp /= 10; 93 | } 94 | bytes memory buffer = new bytes(digits); 95 | while (value != 0) { 96 | digits -= 1; 97 | buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); 98 | value /= 10; 99 | } 100 | return string(buffer); 101 | } 102 | -------------------------------------------------------------------------------- /src/cheats/ExpectCall.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract Contract { 8 | function numberA() public pure returns (uint256) { 9 | return 1; 10 | } 11 | 12 | function numberB() public pure returns (uint256) { 13 | return 2; 14 | } 15 | 16 | function add(uint256 a, uint256 b) public pure returns (uint256) { 17 | return a + b; 18 | } 19 | } 20 | 21 | contract NestedContract { 22 | Contract private inner; 23 | 24 | constructor(Contract _inner) { 25 | inner = _inner; 26 | } 27 | 28 | function sum() public view returns (uint256) { 29 | return inner.numberA() + inner.numberB(); 30 | } 31 | 32 | function hello() public pure returns (string memory) { 33 | return "hi"; 34 | } 35 | } 36 | 37 | contract ExpectCallTest is DSTest { 38 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 39 | 40 | function testExpectCallWithData() public { 41 | Contract target = new Contract(); 42 | cheats.expectCall( 43 | address(target), 44 | abi.encodeWithSelector(target.add.selector, 1, 2) 45 | ); 46 | target.add(1, 2); 47 | } 48 | 49 | function testFailExpectCallWithData() public { 50 | Contract target = new Contract(); 51 | cheats.expectCall( 52 | address(target), 53 | abi.encodeWithSelector(target.add.selector, 1, 2) 54 | ); 55 | target.add(3, 3); 56 | } 57 | 58 | function testExpectInnerCall() public { 59 | Contract inner = new Contract(); 60 | NestedContract target = new NestedContract(inner); 61 | 62 | cheats.expectCall( 63 | address(inner), 64 | abi.encodeWithSelector(inner.numberB.selector) 65 | ); 66 | target.sum(); 67 | } 68 | 69 | function testFailExpectInnerCall() public { 70 | Contract inner = new Contract(); 71 | NestedContract target = new NestedContract(inner); 72 | 73 | cheats.expectCall( 74 | address(inner), 75 | abi.encodeWithSelector(inner.numberB.selector) 76 | ); 77 | 78 | // this function does not call inner 79 | target.hello(); 80 | } 81 | 82 | function testExpectSelectorCall() public { 83 | Contract target = new Contract(); 84 | cheats.expectCall( 85 | address(target), 86 | abi.encodeWithSelector(target.add.selector) 87 | ); 88 | target.add(5, 5); 89 | } 90 | 91 | function testFailExpectSelectorCall() public { 92 | Contract target = new Contract(); 93 | cheats.expectCall( 94 | address(target), 95 | abi.encodeWithSelector(target.add.selector) 96 | ); 97 | } 98 | 99 | function testFailExpectCallWithMoreParameters() public { 100 | Contract target = new Contract(); 101 | cheats.expectCall( 102 | address(target), 103 | abi.encodeWithSelector(target.add.selector, 3, 3, 3) 104 | ); 105 | target.add(3, 3); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/cheats/MockCall.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract Mock { 8 | function numberA() public pure returns (uint256) { 9 | return 1; 10 | } 11 | 12 | function numberB() public pure returns (uint256) { 13 | return 2; 14 | } 15 | 16 | function add(uint256 a, uint256 b) public pure returns (uint256) { 17 | return a + b; 18 | } 19 | } 20 | 21 | contract NestedMock { 22 | Mock private inner; 23 | 24 | constructor(Mock _inner) { 25 | inner = _inner; 26 | } 27 | 28 | function sum() public view returns (uint256) { 29 | return inner.numberA() + inner.numberB(); 30 | } 31 | } 32 | 33 | contract MockCallTest is DSTest { 34 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 35 | 36 | function testMockGetters() public { 37 | Mock target = new Mock(); 38 | 39 | // pre-mock 40 | assertEq(target.numberA(), 1); 41 | assertEq(target.numberB(), 2); 42 | 43 | cheats.mockCall( 44 | address(target), 45 | abi.encodeWithSelector(target.numberB.selector), 46 | abi.encode(10) 47 | ); 48 | 49 | // post-mock 50 | assertEq(target.numberA(), 1); 51 | assertEq(target.numberB(), 10); 52 | } 53 | 54 | function testMockNested() public { 55 | Mock inner = new Mock(); 56 | NestedMock target = new NestedMock(inner); 57 | 58 | // pre-mock 59 | assertEq(target.sum(), 3); 60 | 61 | cheats.mockCall( 62 | address(inner), 63 | abi.encodeWithSelector(inner.numberB.selector), 64 | abi.encode(9) 65 | ); 66 | 67 | // post-mock 68 | assertEq(target.sum(), 10); 69 | } 70 | 71 | function testMockSelector() public { 72 | Mock target = new Mock(); 73 | assertEq(target.add(5, 5), 10); 74 | 75 | cheats.mockCall( 76 | address(target), 77 | abi.encodeWithSelector(target.add.selector), 78 | abi.encode(11) 79 | ); 80 | 81 | assertEq(target.add(5, 5), 11); 82 | } 83 | 84 | function testMockCalldata() public { 85 | Mock target = new Mock(); 86 | assertEq(target.add(5, 5), 10); 87 | assertEq(target.add(6, 4), 10); 88 | 89 | cheats.mockCall( 90 | address(target), 91 | abi.encodeWithSelector(target.add.selector, 5, 5), 92 | abi.encode(11) 93 | ); 94 | 95 | assertEq(target.add(5, 5), 11); 96 | assertEq(target.add(6, 4), 10); 97 | } 98 | 99 | function testClearMockedCalls() public { 100 | Mock target = new Mock(); 101 | 102 | cheats.mockCall( 103 | address(target), 104 | abi.encodeWithSelector(target.numberB.selector), 105 | abi.encode(10) 106 | ); 107 | 108 | assertEq(target.numberA(), 1); 109 | assertEq(target.numberB(), 10); 110 | 111 | cheats.clearMockedCalls(); 112 | 113 | assertEq(target.numberA(), 1); 114 | assertEq(target.numberB(), 2); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/cheats/Cheats.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | interface Cheats { 5 | // Set block.timestamp (newTimestamp) 6 | function warp(uint256) external; 7 | // Set block.height (newHeight) 8 | function roll(uint256) external; 9 | // Set block.basefee (newBasefee) 10 | function fee(uint256) external; 11 | // Loads a storage slot from an address (who, slot) 12 | function load(address,bytes32) external returns (bytes32); 13 | // Stores a value to an address' storage slot, (who, slot, value) 14 | function store(address,bytes32,bytes32) external; 15 | // Signs data, (privateKey, digest) => (v, r, s) 16 | function sign(uint256,bytes32) external returns (uint8,bytes32,bytes32); 17 | // Gets address for a given private key, (privateKey) => (address) 18 | function addr(uint256) external returns (address); 19 | // Performs a foreign function call via terminal, (stringInputs) => (result) 20 | function ffi(string[] calldata) external returns (bytes memory); 21 | // Sets the *next* call's msg.sender to be the input address 22 | function prank(address) external; 23 | // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called 24 | function startPrank(address) external; 25 | // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input 26 | function prank(address,address) external; 27 | // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input 28 | function startPrank(address,address) external; 29 | // Resets subsequent calls' msg.sender to be `address(this)` 30 | function stopPrank() external; 31 | // Sets an address' balance, (who, newBalance) 32 | function deal(address, uint256) external; 33 | // Sets an address' code, (who, newCode) 34 | function etch(address, bytes calldata) external; 35 | // Expects an error on next call 36 | function expectRevert(bytes calldata) external; 37 | function expectRevert(bytes4) external; 38 | // Record all storage reads and writes 39 | function record() external; 40 | // Gets all accessed reads and write slot from a recording session, for a given address 41 | function accesses(address) external returns (bytes32[] memory reads, bytes32[] memory writes); 42 | // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData). 43 | // Call this function, then emit an event, then call a function. Internally after the call, we check if 44 | // logs were emitted in the expected order with the expected topics and data (as specified by the booleans) 45 | function expectEmit(bool,bool,bool,bool) external; 46 | // Mocks a call to an address, returning specified data. 47 | // Calldata can either be strict or a partial match, e.g. if you only 48 | // pass a Solidity selector to the expected calldata, then the entire Solidity 49 | // function will be mocked. 50 | function mockCall(address,bytes calldata,bytes calldata) external; 51 | // Clears all mocked calls 52 | function clearMockedCalls() external; 53 | // Expect a call to an address with the specified calldata. 54 | // Calldata can either be strict or a partial match 55 | function expectCall(address,bytes calldata) external; 56 | // Gets the code from an artifact file. Takes in the relative path to the json file 57 | function getCode(string calldata) external returns (bytes memory); 58 | // Labels an address in call traces 59 | function label(address, string calldata) external; 60 | // If the condition is false, discard this run's fuzz inputs and generate new ones 61 | function assume(bool) external; 62 | } 63 | -------------------------------------------------------------------------------- /src/cheats/ExpectRevert.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract Reverter { 8 | error CustomError(); 9 | 10 | function revertWithMessage(string memory message) public pure { 11 | require(false, message); 12 | } 13 | 14 | function doNotRevert() public pure {} 15 | 16 | function panic() public pure returns (uint256) { 17 | return uint256(100) - uint256(101); 18 | } 19 | 20 | function revertWithCustomError() public pure { 21 | revert CustomError(); 22 | } 23 | 24 | function nestedRevert(Reverter inner, string memory message) public pure { 25 | inner.revertWithMessage(message); 26 | } 27 | 28 | function callThenRevert(Dummy dummy, string memory message) public pure { 29 | dummy.callMe(); 30 | require(false, message); 31 | } 32 | 33 | function revertWithoutReason() public pure { 34 | revert(); 35 | } 36 | } 37 | 38 | contract ConstructorReverter { 39 | constructor(string memory message) { 40 | require(false, message); 41 | } 42 | } 43 | 44 | contract Dummy { 45 | function callMe() public pure returns (string memory) { 46 | return "thanks for calling"; 47 | } 48 | } 49 | 50 | contract ExpectRevertTest is DSTest { 51 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 52 | 53 | function testExpectRevertString() public { 54 | Reverter reverter = new Reverter(); 55 | cheats.expectRevert("revert"); 56 | reverter.revertWithMessage("revert"); 57 | } 58 | 59 | function testExpectRevertConstructor() public { 60 | cheats.expectRevert("constructor revert"); 61 | new ConstructorReverter("constructor revert"); 62 | } 63 | 64 | function testExpectRevertBuiltin() public { 65 | Reverter reverter = new Reverter(); 66 | cheats.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x11)); 67 | reverter.panic(); 68 | } 69 | 70 | function testExpectRevertCustomError() public { 71 | Reverter reverter = new Reverter(); 72 | cheats.expectRevert(abi.encodePacked(Reverter.CustomError.selector)); 73 | reverter.revertWithCustomError(); 74 | } 75 | 76 | function testExpectRevertNested() public { 77 | Reverter reverter = new Reverter(); 78 | Reverter inner = new Reverter(); 79 | cheats.expectRevert("nested revert"); 80 | reverter.nestedRevert(inner, "nested revert"); 81 | } 82 | 83 | function testExpectRevertCallsThenReverts() public { 84 | Reverter reverter = new Reverter(); 85 | Dummy dummy = new Dummy(); 86 | cheats.expectRevert("called a function and then reverted"); 87 | reverter.callThenRevert(dummy, "called a function and then reverted"); 88 | } 89 | 90 | function testFailExpectRevertErrorDoesNotMatch() public { 91 | Reverter reverter = new Reverter(); 92 | cheats.expectRevert("should revert with this message"); 93 | reverter.revertWithMessage("but reverts with this message"); 94 | } 95 | 96 | function testFailExpectRevertDidNotRevert() public { 97 | Reverter reverter = new Reverter(); 98 | cheats.expectRevert("does not revert, but we think it should"); 99 | reverter.doNotRevert(); 100 | } 101 | 102 | function testExpectRevertNoReason() public { 103 | Reverter reverter = new Reverter(); 104 | cheats.expectRevert(bytes("")); 105 | reverter.revertWithoutReason(); 106 | cheats.expectRevert(); 107 | reverter.revertWithoutReason(); 108 | } 109 | 110 | function testFailExpectRevertDangling() public { 111 | cheats.expectRevert("dangling"); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /src/cheats/ExpectEmit.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract Emitter { 8 | event Something( 9 | uint256 indexed topic1, 10 | uint256 indexed topic2, 11 | uint256 indexed topic3, 12 | uint256 data 13 | ); 14 | 15 | function emitEvent( 16 | uint256 topic1, 17 | uint256 topic2, 18 | uint256 topic3, 19 | uint256 data 20 | ) public { 21 | emit Something(topic1, topic2, topic3, data); 22 | } 23 | 24 | function emitMultiple( 25 | uint256[2] memory topic1, 26 | uint256[2] memory topic2, 27 | uint256[2] memory topic3, 28 | uint256[2] memory data 29 | ) public { 30 | emit Something(topic1[0], topic2[0], topic3[0], data[0]); 31 | emit Something(topic1[1], topic2[1], topic3[1], data[1]); 32 | } 33 | 34 | function emitNested( 35 | Emitter inner, 36 | uint256 topic1, 37 | uint256 topic2, 38 | uint256 topic3, 39 | uint256 data 40 | ) public { 41 | inner.emitEvent(topic1, topic2, topic3, data); 42 | } 43 | } 44 | 45 | contract ExpectEmitTest is DSTest { 46 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 47 | Emitter emitter; 48 | 49 | event Something( 50 | uint256 indexed topic1, 51 | uint256 indexed topic2, 52 | uint256 indexed topic3, 53 | uint256 data 54 | ); 55 | 56 | function setUp() public { 57 | emitter = new Emitter(); 58 | } 59 | 60 | function testFailExpectEmitDanglingNoReference() public { 61 | cheats.expectEmit(false, false, false, false); 62 | } 63 | 64 | function testFailExpectEmitDanglingWithReference() public { 65 | cheats.expectEmit(false, false, false, false); 66 | emit Something(1, 2, 3, 4); 67 | } 68 | 69 | /// The topics that are not checked are altered to be incorrect 70 | /// compared to the reference. 71 | function testExpectEmit( 72 | bool checkTopic1, 73 | bool checkTopic2, 74 | bool checkTopic3, 75 | bool checkData, 76 | uint128 topic1, 77 | uint128 topic2, 78 | uint128 topic3, 79 | uint128 data 80 | ) public { 81 | uint256 transformedTopic1 = checkTopic1 ? uint256(topic1) : uint256(topic1) + 1; 82 | uint256 transformedTopic2 = checkTopic2 ? uint256(topic2) : uint256(topic2) + 1; 83 | uint256 transformedTopic3 = checkTopic3 ? uint256(topic3) : uint256(topic3) + 1; 84 | uint256 transformedData = checkData ? uint256(data) : uint256(data) + 1; 85 | 86 | cheats.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData); 87 | 88 | emit Something(topic1, topic2, topic3, data); 89 | emitter.emitEvent(transformedTopic1, transformedTopic2, transformedTopic3, transformedData); 90 | } 91 | 92 | /// The topics that are checked are altered to be incorrect 93 | /// compared to the reference. 94 | function testFailExpectEmit( 95 | bool checkTopic1, 96 | bool checkTopic2, 97 | bool checkTopic3, 98 | bool checkData, 99 | uint128 topic1, 100 | uint128 topic2, 101 | uint128 topic3, 102 | uint128 data 103 | ) public { 104 | cheats.assume(checkTopic1 || checkTopic2 || checkTopic3 || checkData); 105 | 106 | uint256 transformedTopic1 = checkTopic1 ? uint256(topic1) + 1 : uint256(topic1); 107 | uint256 transformedTopic2 = checkTopic2 ? uint256(topic2) + 1 : uint256(topic2); 108 | uint256 transformedTopic3 = checkTopic3 ? uint256(topic3) + 1 : uint256(topic3); 109 | uint256 transformedData = checkData ? uint256(data) + 1 : uint256(data); 110 | 111 | cheats.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData); 112 | 113 | emit Something(topic1, topic2, topic3, data); 114 | emitter.emitEvent(transformedTopic1, transformedTopic2, transformedTopic3, transformedData); 115 | } 116 | 117 | /// The topics that are checked are altered to be incorrect 118 | /// compared to the reference. 119 | function testExpectEmitNested( 120 | bool checkTopic1, 121 | bool checkTopic2, 122 | bool checkTopic3, 123 | bool checkData, 124 | uint128 topic1, 125 | uint128 topic2, 126 | uint128 topic3, 127 | uint128 data 128 | ) public { 129 | Emitter inner = new Emitter(); 130 | 131 | uint256 transformedTopic1 = checkTopic1 ? uint256(topic1) : uint256(topic1) + 1; 132 | uint256 transformedTopic2 = checkTopic2 ? uint256(topic2) : uint256(topic2) + 1; 133 | uint256 transformedTopic3 = checkTopic3 ? uint256(topic3) : uint256(topic3) + 1; 134 | uint256 transformedData = checkData ? uint256(data) : uint256(data) + 1; 135 | 136 | cheats.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData); 137 | 138 | emit Something(topic1, topic2, topic3, data); 139 | emitter.emitNested(inner, transformedTopic1, transformedTopic2, transformedTopic3, transformedData); 140 | } 141 | 142 | /// The topics that are checked are altered to be incorrect 143 | /// compared to the reference. 144 | function testFailExpectEmitNested( 145 | bool checkTopic1, 146 | bool checkTopic2, 147 | bool checkTopic3, 148 | bool checkData, 149 | uint128 topic1, 150 | uint128 topic2, 151 | uint128 topic3, 152 | uint128 data 153 | ) public { 154 | cheats.assume(checkTopic1 || checkTopic2 || checkTopic3 || checkData); 155 | Emitter inner = new Emitter(); 156 | 157 | uint256 transformedTopic1 = checkTopic1 ? uint256(topic1) + 1 : uint256(topic1); 158 | uint256 transformedTopic2 = checkTopic2 ? uint256(topic2) + 1 : uint256(topic2); 159 | uint256 transformedTopic3 = checkTopic3 ? uint256(topic3) + 1 : uint256(topic3); 160 | uint256 transformedData = checkData ? uint256(data) + 1 : uint256(data); 161 | 162 | cheats.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData); 163 | 164 | emit Something(topic1, topic2, topic3, data); 165 | emitter.emitNested(inner, transformedTopic1, transformedTopic2, transformedTopic3, transformedData); 166 | } 167 | 168 | function testExpectEmitMultiple() public { 169 | cheats.expectEmit(true, true, true, true); 170 | emit Something(1, 2, 3, 4); 171 | cheats.expectEmit(true, true, true, true); 172 | emit Something(5, 6, 7, 8); 173 | 174 | emitter.emitMultiple( 175 | [uint256(1), uint256(5)], 176 | [uint256(2), uint256(6)], 177 | [uint256(3), uint256(7)], 178 | [uint256(4), uint256(8)] 179 | ); 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /src/cheats/Prank.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | import "ds-test/test.sol"; 5 | import "./Cheats.sol"; 6 | 7 | contract Victim { 8 | function assertCallerAndOrigin( 9 | address expectedSender, 10 | string memory senderMessage, 11 | address expectedOrigin, 12 | string memory originMessage 13 | ) public view { 14 | require(msg.sender == expectedSender, senderMessage); 15 | require(tx.origin == expectedOrigin, originMessage); 16 | } 17 | } 18 | 19 | contract ConstructorVictim is Victim { 20 | constructor( 21 | address expectedSender, 22 | string memory senderMessage, 23 | address expectedOrigin, 24 | string memory originMessage 25 | ) { 26 | require(msg.sender == expectedSender, senderMessage); 27 | require(tx.origin == expectedOrigin, originMessage); 28 | } 29 | } 30 | 31 | contract NestedVictim { 32 | Victim innerVictim; 33 | 34 | constructor(Victim victim) { 35 | innerVictim = victim; 36 | } 37 | 38 | function assertCallerAndOrigin( 39 | address expectedSender, 40 | string memory senderMessage, 41 | address expectedOrigin, 42 | string memory originMessage 43 | ) public view { 44 | require(msg.sender == expectedSender, senderMessage); 45 | require(tx.origin == expectedOrigin, originMessage); 46 | innerVictim.assertCallerAndOrigin( 47 | address(this), 48 | "msg.sender was incorrectly set for nested victim", 49 | expectedOrigin, 50 | "tx.origin was incorrectly set for nested victim" 51 | ); 52 | } 53 | } 54 | 55 | contract NestedPranker { 56 | Cheats constant cheats = Cheats( 57 | address(bytes20(uint160(uint256(keccak256('hevm cheat code'))))) 58 | ); 59 | 60 | address newSender; 61 | address newOrigin; 62 | address oldOrigin; 63 | 64 | constructor( 65 | address _newSender, 66 | address _newOrigin 67 | ) { 68 | newSender = _newSender; 69 | newOrigin = _newOrigin; 70 | oldOrigin = tx.origin; 71 | } 72 | 73 | function incompletePrank() public { 74 | cheats.startPrank(newSender, newOrigin); 75 | } 76 | 77 | function completePrank(NestedVictim victim) public { 78 | victim.assertCallerAndOrigin( 79 | newSender, 80 | "msg.sender was not set in nested prank", 81 | newOrigin, 82 | "tx.origin was not set in nested prank" 83 | ); 84 | cheats.stopPrank(); 85 | 86 | // Ensure we cleaned up correctly 87 | victim.assertCallerAndOrigin( 88 | address(this), 89 | "msg.sender was not cleaned up in nested prank", 90 | oldOrigin, 91 | "tx.origin was not cleaned up in nested prank" 92 | ); 93 | } 94 | } 95 | 96 | contract PrankTest is DSTest { 97 | Cheats constant cheats = Cheats(HEVM_ADDRESS); 98 | 99 | function testPrankSender(address sender) public { 100 | // Perform the prank 101 | Victim victim = new Victim(); 102 | cheats.prank(sender); 103 | victim.assertCallerAndOrigin( 104 | sender, 105 | "msg.sender was not set during prank", 106 | tx.origin, 107 | "tx.origin invariant failed" 108 | ); 109 | 110 | // Ensure we cleaned up correctly 111 | victim.assertCallerAndOrigin( 112 | address(this), 113 | "msg.sender was not cleaned up", 114 | tx.origin, 115 | "tx.origin invariant failed" 116 | ); 117 | } 118 | 119 | function testPrankOrigin(address sender, address origin) public { 120 | address oldOrigin = tx.origin; 121 | 122 | // Perform the prank 123 | Victim victim = new Victim(); 124 | cheats.prank(sender, origin); 125 | victim.assertCallerAndOrigin( 126 | sender, 127 | "msg.sender was not set during prank", 128 | origin, 129 | "tx.origin was not set during prank" 130 | ); 131 | 132 | // Ensure we cleaned up correctly 133 | victim.assertCallerAndOrigin( 134 | address(this), 135 | "msg.sender was not cleaned up", 136 | oldOrigin, 137 | "tx.origin was not cleaned up" 138 | ); 139 | } 140 | 141 | function testPrankConstructorSender(address sender) public { 142 | cheats.prank(sender); 143 | ConstructorVictim victim = new ConstructorVictim( 144 | sender, 145 | "msg.sender was not set during prank", 146 | tx.origin, 147 | "tx.origin invariant failed" 148 | ); 149 | 150 | // Ensure we cleaned up correctly 151 | victim.assertCallerAndOrigin( 152 | address(this), 153 | "msg.sender was not cleaned up", 154 | tx.origin, 155 | "tx.origin invariant failed" 156 | ); 157 | } 158 | 159 | function testPrankConstructorOrigin(address sender, address origin) public { 160 | // Perform the prank 161 | cheats.prank(sender, origin); 162 | ConstructorVictim victim = new ConstructorVictim( 163 | sender, 164 | "msg.sender was not set during prank", 165 | origin, 166 | "tx.origin was not set during prank" 167 | ); 168 | 169 | // Ensure we cleaned up correctly 170 | victim.assertCallerAndOrigin( 171 | address(this), 172 | "msg.sender was not cleaned up", 173 | tx.origin, 174 | "tx.origin was not cleaned up" 175 | ); 176 | } 177 | 178 | function testPrankStartStop(address sender, address origin) public { 179 | address oldOrigin = tx.origin; 180 | 181 | // Perform the prank 182 | Victim victim = new Victim(); 183 | cheats.startPrank(sender, origin); 184 | victim.assertCallerAndOrigin( 185 | sender, 186 | "msg.sender was not set during prank", 187 | origin, 188 | "tx.origin was not set during prank" 189 | ); 190 | victim.assertCallerAndOrigin( 191 | sender, 192 | "msg.sender was not set during prank (call 2)", 193 | origin, 194 | "tx.origin was not set during prank (call 2)" 195 | ); 196 | cheats.stopPrank(); 197 | 198 | // Ensure we cleaned up correctly 199 | victim.assertCallerAndOrigin( 200 | address(this), 201 | "msg.sender was not cleaned up", 202 | oldOrigin, 203 | "tx.origin was not cleaned up" 204 | ); 205 | } 206 | 207 | function testPrankStartStopConstructor(address sender, address origin) public { 208 | // Perform the prank 209 | cheats.startPrank(sender, origin); 210 | ConstructorVictim victim = new ConstructorVictim( 211 | sender, 212 | "msg.sender was not set during prank", 213 | origin, 214 | "tx.origin was not set during prank" 215 | ); 216 | new ConstructorVictim( 217 | sender, 218 | "msg.sender was not set during prank (call 2)", 219 | origin, 220 | "tx.origin was not set during prank (call 2)" 221 | ); 222 | cheats.stopPrank(); 223 | 224 | // Ensure we cleaned up correctly 225 | victim.assertCallerAndOrigin( 226 | address(this), 227 | "msg.sender was not cleaned up", 228 | tx.origin, 229 | "tx.origin was not cleaned up" 230 | ); 231 | } 232 | 233 | /// This test checks that depth is working correctly with respect 234 | /// to the `startPrank` and `stopPrank` cheatcodes. 235 | /// 236 | /// The nested pranker calls `startPrank` but does not call 237 | /// `stopPrank` at first. 238 | /// 239 | /// Then, we call our victim from the main test: this call 240 | /// should NOT have altered `msg.sender` or `tx.origin`. 241 | /// 242 | /// Then, the nested pranker will complete their prank: this call 243 | /// SHOULD have altered `msg.sender` and `tx.origin`. 244 | /// 245 | /// Each call to the victim calls yet another victim. The expected 246 | /// behavior for this call is that `tx.origin` is altered when 247 | /// the nested pranker calls, otherwise not. In both cases, 248 | /// `msg.sender` should be the address of the first victim. 249 | /// 250 | /// Success case: 251 | /// 252 | /// ┌────┐ ┌───────┐ ┌──────┐ ┌──────┐ ┌────────────┐ 253 | /// │Test│ │Pranker│ │Cheats│ │Victim│ │Inner Victim│ 254 | /// └─┬──┘ └───┬───┘ └──┬───┘ └──┬───┘ └─────┬──────┘ 255 | /// │ │ │ │ │ 256 | /// │incompletePrank()│ │ │ │ 257 | /// │────────────────>│ │ │ │ 258 | /// │ │ │ │ │ 259 | /// │ │startPrank()│ │ │ 260 | /// │ │───────────>│ │ │ 261 | /// │ │ │ │ │ 262 | /// │ should not be pranked│ │ │ 263 | /// │──────────────────────────────────────>│ │ 264 | /// │ │ │ │ │ 265 | /// │ │ │ │ should not be pranked │ 266 | /// │ │ │ │────────────────────────>│ 267 | /// │ │ │ │ │ 268 | /// │ completePrank() │ │ │ │ 269 | /// │────────────────>│ │ │ │ 270 | /// │ │ │ │ │ 271 | /// │ │ should be pranked │ │ 272 | /// │ │────────────────────>│ │ 273 | /// │ │ │ │ │ 274 | /// │ │ │ │only tx.origin is pranked│ 275 | /// │ │ │ │────────────────────────>│ 276 | /// │ │ │ │ │ 277 | /// │ │stopPrank() │ │ │ 278 | /// │ │───────────>│ │ │ 279 | /// │ │ │ │ │ 280 | /// │ │should not be pranked│ │ 281 | /// │ │────────────────────>│ │ 282 | /// │ │ │ │ │ 283 | /// │ │ │ │ should not be pranked │ 284 | /// │ │ │ │────────────────────────>│ 285 | /// ┌─┴──┐ ┌───┴───┐ ┌──┴───┐ ┌──┴───┐ ┌─────┴──────┐ 286 | /// │Test│ │Pranker│ │Cheats│ │Victim│ │Inner Victim│ 287 | /// └────┘ └───────┘ └──────┘ └──────┘ └────────────┘ 288 | /// If this behavior is incorrectly implemented then the victim 289 | /// will be pranked the first time it is called. 290 | function testPrankComplex(address sender, address origin) public { 291 | address oldOrigin = tx.origin; 292 | 293 | NestedPranker pranker = new NestedPranker(sender, origin); 294 | Victim innerVictim = new Victim(); 295 | NestedVictim victim = new NestedVictim(innerVictim); 296 | 297 | pranker.incompletePrank(); 298 | victim.assertCallerAndOrigin( 299 | address(this), 300 | "msg.sender was altered at an incorrect depth", 301 | oldOrigin, 302 | "tx.origin was altered at an incorrect depth" 303 | ); 304 | 305 | pranker.completePrank(victim); 306 | } 307 | } 308 | -------------------------------------------------------------------------------- /src/logs/HardhatLogs.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Unlicense 2 | pragma solidity >=0.8.0; 3 | 4 | contract HardhatLogsTest { 5 | constructor() { 6 | console.log("constructor"); 7 | } 8 | 9 | function testInts() public view { 10 | console.log(0); 11 | console.log(1); 12 | console.log(2); 13 | console.log(3); 14 | } 15 | 16 | function testStrings() public view { 17 | console.log("testStrings"); 18 | } 19 | 20 | function testMisc() public view { 21 | console.log("testMisc", address(1)); 22 | console.log("testMisc", 42); 23 | } 24 | } 25 | 26 | library console { 27 | address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); 28 | 29 | function _sendLogPayload(bytes memory payload) private view { 30 | uint256 payloadLength = payload.length; 31 | address consoleAddress = CONSOLE_ADDRESS; 32 | assembly { 33 | let payloadStart := add(payload, 32) 34 | let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) 35 | } 36 | } 37 | 38 | function log() internal view { 39 | _sendLogPayload(abi.encodeWithSignature("log()")); 40 | } 41 | 42 | function logInt(int p0) internal view { 43 | _sendLogPayload(abi.encodeWithSignature("log(int)", p0)); 44 | } 45 | 46 | function logUint(uint p0) internal view { 47 | _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); 48 | } 49 | 50 | function logString(string memory p0) internal view { 51 | _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); 52 | } 53 | 54 | function logBool(bool p0) internal view { 55 | _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); 56 | } 57 | 58 | function logAddress(address p0) internal view { 59 | _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); 60 | } 61 | 62 | function logBytes(bytes memory p0) internal view { 63 | _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); 64 | } 65 | 66 | function logBytes1(bytes1 p0) internal view { 67 | _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); 68 | } 69 | 70 | function logBytes2(bytes2 p0) internal view { 71 | _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); 72 | } 73 | 74 | function logBytes3(bytes3 p0) internal view { 75 | _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); 76 | } 77 | 78 | function logBytes4(bytes4 p0) internal view { 79 | _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); 80 | } 81 | 82 | function logBytes5(bytes5 p0) internal view { 83 | _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); 84 | } 85 | 86 | function logBytes6(bytes6 p0) internal view { 87 | _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); 88 | } 89 | 90 | function logBytes7(bytes7 p0) internal view { 91 | _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); 92 | } 93 | 94 | function logBytes8(bytes8 p0) internal view { 95 | _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); 96 | } 97 | 98 | function logBytes9(bytes9 p0) internal view { 99 | _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); 100 | } 101 | 102 | function logBytes10(bytes10 p0) internal view { 103 | _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); 104 | } 105 | 106 | function logBytes11(bytes11 p0) internal view { 107 | _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); 108 | } 109 | 110 | function logBytes12(bytes12 p0) internal view { 111 | _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); 112 | } 113 | 114 | function logBytes13(bytes13 p0) internal view { 115 | _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); 116 | } 117 | 118 | function logBytes14(bytes14 p0) internal view { 119 | _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); 120 | } 121 | 122 | function logBytes15(bytes15 p0) internal view { 123 | _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); 124 | } 125 | 126 | function logBytes16(bytes16 p0) internal view { 127 | _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); 128 | } 129 | 130 | function logBytes17(bytes17 p0) internal view { 131 | _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); 132 | } 133 | 134 | function logBytes18(bytes18 p0) internal view { 135 | _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); 136 | } 137 | 138 | function logBytes19(bytes19 p0) internal view { 139 | _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); 140 | } 141 | 142 | function logBytes20(bytes20 p0) internal view { 143 | _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); 144 | } 145 | 146 | function logBytes21(bytes21 p0) internal view { 147 | _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); 148 | } 149 | 150 | function logBytes22(bytes22 p0) internal view { 151 | _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); 152 | } 153 | 154 | function logBytes23(bytes23 p0) internal view { 155 | _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); 156 | } 157 | 158 | function logBytes24(bytes24 p0) internal view { 159 | _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); 160 | } 161 | 162 | function logBytes25(bytes25 p0) internal view { 163 | _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); 164 | } 165 | 166 | function logBytes26(bytes26 p0) internal view { 167 | _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); 168 | } 169 | 170 | function logBytes27(bytes27 p0) internal view { 171 | _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); 172 | } 173 | 174 | function logBytes28(bytes28 p0) internal view { 175 | _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); 176 | } 177 | 178 | function logBytes29(bytes29 p0) internal view { 179 | _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); 180 | } 181 | 182 | function logBytes30(bytes30 p0) internal view { 183 | _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); 184 | } 185 | 186 | function logBytes31(bytes31 p0) internal view { 187 | _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); 188 | } 189 | 190 | function logBytes32(bytes32 p0) internal view { 191 | _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); 192 | } 193 | 194 | function log(uint p0) internal view { 195 | _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); 196 | } 197 | 198 | function log(string memory p0) internal view { 199 | _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); 200 | } 201 | 202 | function log(bool p0) internal view { 203 | _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); 204 | } 205 | 206 | function log(address p0) internal view { 207 | _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); 208 | } 209 | 210 | function log(uint p0, uint p1) internal view { 211 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1)); 212 | } 213 | 214 | function log(uint p0, string memory p1) internal view { 215 | _sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1)); 216 | } 217 | 218 | function log(uint p0, bool p1) internal view { 219 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1)); 220 | } 221 | 222 | function log(uint p0, address p1) internal view { 223 | _sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1)); 224 | } 225 | 226 | function log(string memory p0, uint p1) internal view { 227 | _sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1)); 228 | } 229 | 230 | function log(string memory p0, string memory p1) internal view { 231 | _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); 232 | } 233 | 234 | function log(string memory p0, bool p1) internal view { 235 | _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); 236 | } 237 | 238 | function log(string memory p0, address p1) internal view { 239 | _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); 240 | } 241 | 242 | function log(bool p0, uint p1) internal view { 243 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1)); 244 | } 245 | 246 | function log(bool p0, string memory p1) internal view { 247 | _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); 248 | } 249 | 250 | function log(bool p0, bool p1) internal view { 251 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); 252 | } 253 | 254 | function log(bool p0, address p1) internal view { 255 | _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); 256 | } 257 | 258 | function log(address p0, uint p1) internal view { 259 | _sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1)); 260 | } 261 | 262 | function log(address p0, string memory p1) internal view { 263 | _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); 264 | } 265 | 266 | function log(address p0, bool p1) internal view { 267 | _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); 268 | } 269 | 270 | function log(address p0, address p1) internal view { 271 | _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); 272 | } 273 | 274 | function log(uint p0, uint p1, uint p2) internal view { 275 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2)); 276 | } 277 | 278 | function log(uint p0, uint p1, string memory p2) internal view { 279 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2)); 280 | } 281 | 282 | function log(uint p0, uint p1, bool p2) internal view { 283 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2)); 284 | } 285 | 286 | function log(uint p0, uint p1, address p2) internal view { 287 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2)); 288 | } 289 | 290 | function log(uint p0, string memory p1, uint p2) internal view { 291 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2)); 292 | } 293 | 294 | function log(uint p0, string memory p1, string memory p2) internal view { 295 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2)); 296 | } 297 | 298 | function log(uint p0, string memory p1, bool p2) internal view { 299 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2)); 300 | } 301 | 302 | function log(uint p0, string memory p1, address p2) internal view { 303 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2)); 304 | } 305 | 306 | function log(uint p0, bool p1, uint p2) internal view { 307 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2)); 308 | } 309 | 310 | function log(uint p0, bool p1, string memory p2) internal view { 311 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2)); 312 | } 313 | 314 | function log(uint p0, bool p1, bool p2) internal view { 315 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2)); 316 | } 317 | 318 | function log(uint p0, bool p1, address p2) internal view { 319 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2)); 320 | } 321 | 322 | function log(uint p0, address p1, uint p2) internal view { 323 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2)); 324 | } 325 | 326 | function log(uint p0, address p1, string memory p2) internal view { 327 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2)); 328 | } 329 | 330 | function log(uint p0, address p1, bool p2) internal view { 331 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2)); 332 | } 333 | 334 | function log(uint p0, address p1, address p2) internal view { 335 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2)); 336 | } 337 | 338 | function log(string memory p0, uint p1, uint p2) internal view { 339 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2)); 340 | } 341 | 342 | function log(string memory p0, uint p1, string memory p2) internal view { 343 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2)); 344 | } 345 | 346 | function log(string memory p0, uint p1, bool p2) internal view { 347 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2)); 348 | } 349 | 350 | function log(string memory p0, uint p1, address p2) internal view { 351 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2)); 352 | } 353 | 354 | function log(string memory p0, string memory p1, uint p2) internal view { 355 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2)); 356 | } 357 | 358 | function log(string memory p0, string memory p1, string memory p2) internal view { 359 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); 360 | } 361 | 362 | function log(string memory p0, string memory p1, bool p2) internal view { 363 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); 364 | } 365 | 366 | function log(string memory p0, string memory p1, address p2) internal view { 367 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); 368 | } 369 | 370 | function log(string memory p0, bool p1, uint p2) internal view { 371 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2)); 372 | } 373 | 374 | function log(string memory p0, bool p1, string memory p2) internal view { 375 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); 376 | } 377 | 378 | function log(string memory p0, bool p1, bool p2) internal view { 379 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); 380 | } 381 | 382 | function log(string memory p0, bool p1, address p2) internal view { 383 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); 384 | } 385 | 386 | function log(string memory p0, address p1, uint p2) internal view { 387 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2)); 388 | } 389 | 390 | function log(string memory p0, address p1, string memory p2) internal view { 391 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); 392 | } 393 | 394 | function log(string memory p0, address p1, bool p2) internal view { 395 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); 396 | } 397 | 398 | function log(string memory p0, address p1, address p2) internal view { 399 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); 400 | } 401 | 402 | function log(bool p0, uint p1, uint p2) internal view { 403 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2)); 404 | } 405 | 406 | function log(bool p0, uint p1, string memory p2) internal view { 407 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2)); 408 | } 409 | 410 | function log(bool p0, uint p1, bool p2) internal view { 411 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2)); 412 | } 413 | 414 | function log(bool p0, uint p1, address p2) internal view { 415 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2)); 416 | } 417 | 418 | function log(bool p0, string memory p1, uint p2) internal view { 419 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2)); 420 | } 421 | 422 | function log(bool p0, string memory p1, string memory p2) internal view { 423 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); 424 | } 425 | 426 | function log(bool p0, string memory p1, bool p2) internal view { 427 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); 428 | } 429 | 430 | function log(bool p0, string memory p1, address p2) internal view { 431 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); 432 | } 433 | 434 | function log(bool p0, bool p1, uint p2) internal view { 435 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2)); 436 | } 437 | 438 | function log(bool p0, bool p1, string memory p2) internal view { 439 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); 440 | } 441 | 442 | function log(bool p0, bool p1, bool p2) internal view { 443 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); 444 | } 445 | 446 | function log(bool p0, bool p1, address p2) internal view { 447 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); 448 | } 449 | 450 | function log(bool p0, address p1, uint p2) internal view { 451 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2)); 452 | } 453 | 454 | function log(bool p0, address p1, string memory p2) internal view { 455 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); 456 | } 457 | 458 | function log(bool p0, address p1, bool p2) internal view { 459 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); 460 | } 461 | 462 | function log(bool p0, address p1, address p2) internal view { 463 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); 464 | } 465 | 466 | function log(address p0, uint p1, uint p2) internal view { 467 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2)); 468 | } 469 | 470 | function log(address p0, uint p1, string memory p2) internal view { 471 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2)); 472 | } 473 | 474 | function log(address p0, uint p1, bool p2) internal view { 475 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2)); 476 | } 477 | 478 | function log(address p0, uint p1, address p2) internal view { 479 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2)); 480 | } 481 | 482 | function log(address p0, string memory p1, uint p2) internal view { 483 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2)); 484 | } 485 | 486 | function log(address p0, string memory p1, string memory p2) internal view { 487 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); 488 | } 489 | 490 | function log(address p0, string memory p1, bool p2) internal view { 491 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); 492 | } 493 | 494 | function log(address p0, string memory p1, address p2) internal view { 495 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); 496 | } 497 | 498 | function log(address p0, bool p1, uint p2) internal view { 499 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2)); 500 | } 501 | 502 | function log(address p0, bool p1, string memory p2) internal view { 503 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); 504 | } 505 | 506 | function log(address p0, bool p1, bool p2) internal view { 507 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); 508 | } 509 | 510 | function log(address p0, bool p1, address p2) internal view { 511 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); 512 | } 513 | 514 | function log(address p0, address p1, uint p2) internal view { 515 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2)); 516 | } 517 | 518 | function log(address p0, address p1, string memory p2) internal view { 519 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); 520 | } 521 | 522 | function log(address p0, address p1, bool p2) internal view { 523 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); 524 | } 525 | 526 | function log(address p0, address p1, address p2) internal view { 527 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); 528 | } 529 | 530 | function log(uint p0, uint p1, uint p2, uint p3) internal view { 531 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3)); 532 | } 533 | 534 | function log(uint p0, uint p1, uint p2, string memory p3) internal view { 535 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3)); 536 | } 537 | 538 | function log(uint p0, uint p1, uint p2, bool p3) internal view { 539 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3)); 540 | } 541 | 542 | function log(uint p0, uint p1, uint p2, address p3) internal view { 543 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3)); 544 | } 545 | 546 | function log(uint p0, uint p1, string memory p2, uint p3) internal view { 547 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3)); 548 | } 549 | 550 | function log(uint p0, uint p1, string memory p2, string memory p3) internal view { 551 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3)); 552 | } 553 | 554 | function log(uint p0, uint p1, string memory p2, bool p3) internal view { 555 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3)); 556 | } 557 | 558 | function log(uint p0, uint p1, string memory p2, address p3) internal view { 559 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3)); 560 | } 561 | 562 | function log(uint p0, uint p1, bool p2, uint p3) internal view { 563 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3)); 564 | } 565 | 566 | function log(uint p0, uint p1, bool p2, string memory p3) internal view { 567 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3)); 568 | } 569 | 570 | function log(uint p0, uint p1, bool p2, bool p3) internal view { 571 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3)); 572 | } 573 | 574 | function log(uint p0, uint p1, bool p2, address p3) internal view { 575 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3)); 576 | } 577 | 578 | function log(uint p0, uint p1, address p2, uint p3) internal view { 579 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3)); 580 | } 581 | 582 | function log(uint p0, uint p1, address p2, string memory p3) internal view { 583 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3)); 584 | } 585 | 586 | function log(uint p0, uint p1, address p2, bool p3) internal view { 587 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3)); 588 | } 589 | 590 | function log(uint p0, uint p1, address p2, address p3) internal view { 591 | _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3)); 592 | } 593 | 594 | function log(uint p0, string memory p1, uint p2, uint p3) internal view { 595 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3)); 596 | } 597 | 598 | function log(uint p0, string memory p1, uint p2, string memory p3) internal view { 599 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3)); 600 | } 601 | 602 | function log(uint p0, string memory p1, uint p2, bool p3) internal view { 603 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3)); 604 | } 605 | 606 | function log(uint p0, string memory p1, uint p2, address p3) internal view { 607 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3)); 608 | } 609 | 610 | function log(uint p0, string memory p1, string memory p2, uint p3) internal view { 611 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3)); 612 | } 613 | 614 | function log(uint p0, string memory p1, string memory p2, string memory p3) internal view { 615 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3)); 616 | } 617 | 618 | function log(uint p0, string memory p1, string memory p2, bool p3) internal view { 619 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3)); 620 | } 621 | 622 | function log(uint p0, string memory p1, string memory p2, address p3) internal view { 623 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3)); 624 | } 625 | 626 | function log(uint p0, string memory p1, bool p2, uint p3) internal view { 627 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3)); 628 | } 629 | 630 | function log(uint p0, string memory p1, bool p2, string memory p3) internal view { 631 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3)); 632 | } 633 | 634 | function log(uint p0, string memory p1, bool p2, bool p3) internal view { 635 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3)); 636 | } 637 | 638 | function log(uint p0, string memory p1, bool p2, address p3) internal view { 639 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3)); 640 | } 641 | 642 | function log(uint p0, string memory p1, address p2, uint p3) internal view { 643 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3)); 644 | } 645 | 646 | function log(uint p0, string memory p1, address p2, string memory p3) internal view { 647 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3)); 648 | } 649 | 650 | function log(uint p0, string memory p1, address p2, bool p3) internal view { 651 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3)); 652 | } 653 | 654 | function log(uint p0, string memory p1, address p2, address p3) internal view { 655 | _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3)); 656 | } 657 | 658 | function log(uint p0, bool p1, uint p2, uint p3) internal view { 659 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3)); 660 | } 661 | 662 | function log(uint p0, bool p1, uint p2, string memory p3) internal view { 663 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3)); 664 | } 665 | 666 | function log(uint p0, bool p1, uint p2, bool p3) internal view { 667 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3)); 668 | } 669 | 670 | function log(uint p0, bool p1, uint p2, address p3) internal view { 671 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3)); 672 | } 673 | 674 | function log(uint p0, bool p1, string memory p2, uint p3) internal view { 675 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3)); 676 | } 677 | 678 | function log(uint p0, bool p1, string memory p2, string memory p3) internal view { 679 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3)); 680 | } 681 | 682 | function log(uint p0, bool p1, string memory p2, bool p3) internal view { 683 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3)); 684 | } 685 | 686 | function log(uint p0, bool p1, string memory p2, address p3) internal view { 687 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3)); 688 | } 689 | 690 | function log(uint p0, bool p1, bool p2, uint p3) internal view { 691 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3)); 692 | } 693 | 694 | function log(uint p0, bool p1, bool p2, string memory p3) internal view { 695 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3)); 696 | } 697 | 698 | function log(uint p0, bool p1, bool p2, bool p3) internal view { 699 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3)); 700 | } 701 | 702 | function log(uint p0, bool p1, bool p2, address p3) internal view { 703 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3)); 704 | } 705 | 706 | function log(uint p0, bool p1, address p2, uint p3) internal view { 707 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3)); 708 | } 709 | 710 | function log(uint p0, bool p1, address p2, string memory p3) internal view { 711 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3)); 712 | } 713 | 714 | function log(uint p0, bool p1, address p2, bool p3) internal view { 715 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3)); 716 | } 717 | 718 | function log(uint p0, bool p1, address p2, address p3) internal view { 719 | _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3)); 720 | } 721 | 722 | function log(uint p0, address p1, uint p2, uint p3) internal view { 723 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3)); 724 | } 725 | 726 | function log(uint p0, address p1, uint p2, string memory p3) internal view { 727 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3)); 728 | } 729 | 730 | function log(uint p0, address p1, uint p2, bool p3) internal view { 731 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3)); 732 | } 733 | 734 | function log(uint p0, address p1, uint p2, address p3) internal view { 735 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3)); 736 | } 737 | 738 | function log(uint p0, address p1, string memory p2, uint p3) internal view { 739 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3)); 740 | } 741 | 742 | function log(uint p0, address p1, string memory p2, string memory p3) internal view { 743 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3)); 744 | } 745 | 746 | function log(uint p0, address p1, string memory p2, bool p3) internal view { 747 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3)); 748 | } 749 | 750 | function log(uint p0, address p1, string memory p2, address p3) internal view { 751 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3)); 752 | } 753 | 754 | function log(uint p0, address p1, bool p2, uint p3) internal view { 755 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3)); 756 | } 757 | 758 | function log(uint p0, address p1, bool p2, string memory p3) internal view { 759 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3)); 760 | } 761 | 762 | function log(uint p0, address p1, bool p2, bool p3) internal view { 763 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3)); 764 | } 765 | 766 | function log(uint p0, address p1, bool p2, address p3) internal view { 767 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3)); 768 | } 769 | 770 | function log(uint p0, address p1, address p2, uint p3) internal view { 771 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3)); 772 | } 773 | 774 | function log(uint p0, address p1, address p2, string memory p3) internal view { 775 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3)); 776 | } 777 | 778 | function log(uint p0, address p1, address p2, bool p3) internal view { 779 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3)); 780 | } 781 | 782 | function log(uint p0, address p1, address p2, address p3) internal view { 783 | _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3)); 784 | } 785 | 786 | function log(string memory p0, uint p1, uint p2, uint p3) internal view { 787 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3)); 788 | } 789 | 790 | function log(string memory p0, uint p1, uint p2, string memory p3) internal view { 791 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3)); 792 | } 793 | 794 | function log(string memory p0, uint p1, uint p2, bool p3) internal view { 795 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3)); 796 | } 797 | 798 | function log(string memory p0, uint p1, uint p2, address p3) internal view { 799 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3)); 800 | } 801 | 802 | function log(string memory p0, uint p1, string memory p2, uint p3) internal view { 803 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3)); 804 | } 805 | 806 | function log(string memory p0, uint p1, string memory p2, string memory p3) internal view { 807 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3)); 808 | } 809 | 810 | function log(string memory p0, uint p1, string memory p2, bool p3) internal view { 811 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3)); 812 | } 813 | 814 | function log(string memory p0, uint p1, string memory p2, address p3) internal view { 815 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3)); 816 | } 817 | 818 | function log(string memory p0, uint p1, bool p2, uint p3) internal view { 819 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3)); 820 | } 821 | 822 | function log(string memory p0, uint p1, bool p2, string memory p3) internal view { 823 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3)); 824 | } 825 | 826 | function log(string memory p0, uint p1, bool p2, bool p3) internal view { 827 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3)); 828 | } 829 | 830 | function log(string memory p0, uint p1, bool p2, address p3) internal view { 831 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3)); 832 | } 833 | 834 | function log(string memory p0, uint p1, address p2, uint p3) internal view { 835 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3)); 836 | } 837 | 838 | function log(string memory p0, uint p1, address p2, string memory p3) internal view { 839 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3)); 840 | } 841 | 842 | function log(string memory p0, uint p1, address p2, bool p3) internal view { 843 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3)); 844 | } 845 | 846 | function log(string memory p0, uint p1, address p2, address p3) internal view { 847 | _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3)); 848 | } 849 | 850 | function log(string memory p0, string memory p1, uint p2, uint p3) internal view { 851 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3)); 852 | } 853 | 854 | function log(string memory p0, string memory p1, uint p2, string memory p3) internal view { 855 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3)); 856 | } 857 | 858 | function log(string memory p0, string memory p1, uint p2, bool p3) internal view { 859 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3)); 860 | } 861 | 862 | function log(string memory p0, string memory p1, uint p2, address p3) internal view { 863 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3)); 864 | } 865 | 866 | function log(string memory p0, string memory p1, string memory p2, uint p3) internal view { 867 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3)); 868 | } 869 | 870 | function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view { 871 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); 872 | } 873 | 874 | function log(string memory p0, string memory p1, string memory p2, bool p3) internal view { 875 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); 876 | } 877 | 878 | function log(string memory p0, string memory p1, string memory p2, address p3) internal view { 879 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); 880 | } 881 | 882 | function log(string memory p0, string memory p1, bool p2, uint p3) internal view { 883 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3)); 884 | } 885 | 886 | function log(string memory p0, string memory p1, bool p2, string memory p3) internal view { 887 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); 888 | } 889 | 890 | function log(string memory p0, string memory p1, bool p2, bool p3) internal view { 891 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); 892 | } 893 | 894 | function log(string memory p0, string memory p1, bool p2, address p3) internal view { 895 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); 896 | } 897 | 898 | function log(string memory p0, string memory p1, address p2, uint p3) internal view { 899 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3)); 900 | } 901 | 902 | function log(string memory p0, string memory p1, address p2, string memory p3) internal view { 903 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); 904 | } 905 | 906 | function log(string memory p0, string memory p1, address p2, bool p3) internal view { 907 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); 908 | } 909 | 910 | function log(string memory p0, string memory p1, address p2, address p3) internal view { 911 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); 912 | } 913 | 914 | function log(string memory p0, bool p1, uint p2, uint p3) internal view { 915 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3)); 916 | } 917 | 918 | function log(string memory p0, bool p1, uint p2, string memory p3) internal view { 919 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3)); 920 | } 921 | 922 | function log(string memory p0, bool p1, uint p2, bool p3) internal view { 923 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3)); 924 | } 925 | 926 | function log(string memory p0, bool p1, uint p2, address p3) internal view { 927 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3)); 928 | } 929 | 930 | function log(string memory p0, bool p1, string memory p2, uint p3) internal view { 931 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3)); 932 | } 933 | 934 | function log(string memory p0, bool p1, string memory p2, string memory p3) internal view { 935 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); 936 | } 937 | 938 | function log(string memory p0, bool p1, string memory p2, bool p3) internal view { 939 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); 940 | } 941 | 942 | function log(string memory p0, bool p1, string memory p2, address p3) internal view { 943 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); 944 | } 945 | 946 | function log(string memory p0, bool p1, bool p2, uint p3) internal view { 947 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3)); 948 | } 949 | 950 | function log(string memory p0, bool p1, bool p2, string memory p3) internal view { 951 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); 952 | } 953 | 954 | function log(string memory p0, bool p1, bool p2, bool p3) internal view { 955 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); 956 | } 957 | 958 | function log(string memory p0, bool p1, bool p2, address p3) internal view { 959 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); 960 | } 961 | 962 | function log(string memory p0, bool p1, address p2, uint p3) internal view { 963 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3)); 964 | } 965 | 966 | function log(string memory p0, bool p1, address p2, string memory p3) internal view { 967 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); 968 | } 969 | 970 | function log(string memory p0, bool p1, address p2, bool p3) internal view { 971 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); 972 | } 973 | 974 | function log(string memory p0, bool p1, address p2, address p3) internal view { 975 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); 976 | } 977 | 978 | function log(string memory p0, address p1, uint p2, uint p3) internal view { 979 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3)); 980 | } 981 | 982 | function log(string memory p0, address p1, uint p2, string memory p3) internal view { 983 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3)); 984 | } 985 | 986 | function log(string memory p0, address p1, uint p2, bool p3) internal view { 987 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3)); 988 | } 989 | 990 | function log(string memory p0, address p1, uint p2, address p3) internal view { 991 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3)); 992 | } 993 | 994 | function log(string memory p0, address p1, string memory p2, uint p3) internal view { 995 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3)); 996 | } 997 | 998 | function log(string memory p0, address p1, string memory p2, string memory p3) internal view { 999 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); 1000 | } 1001 | 1002 | function log(string memory p0, address p1, string memory p2, bool p3) internal view { 1003 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); 1004 | } 1005 | 1006 | function log(string memory p0, address p1, string memory p2, address p3) internal view { 1007 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); 1008 | } 1009 | 1010 | function log(string memory p0, address p1, bool p2, uint p3) internal view { 1011 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3)); 1012 | } 1013 | 1014 | function log(string memory p0, address p1, bool p2, string memory p3) internal view { 1015 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); 1016 | } 1017 | 1018 | function log(string memory p0, address p1, bool p2, bool p3) internal view { 1019 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); 1020 | } 1021 | 1022 | function log(string memory p0, address p1, bool p2, address p3) internal view { 1023 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); 1024 | } 1025 | 1026 | function log(string memory p0, address p1, address p2, uint p3) internal view { 1027 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3)); 1028 | } 1029 | 1030 | function log(string memory p0, address p1, address p2, string memory p3) internal view { 1031 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); 1032 | } 1033 | 1034 | function log(string memory p0, address p1, address p2, bool p3) internal view { 1035 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); 1036 | } 1037 | 1038 | function log(string memory p0, address p1, address p2, address p3) internal view { 1039 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); 1040 | } 1041 | 1042 | function log(bool p0, uint p1, uint p2, uint p3) internal view { 1043 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3)); 1044 | } 1045 | 1046 | function log(bool p0, uint p1, uint p2, string memory p3) internal view { 1047 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3)); 1048 | } 1049 | 1050 | function log(bool p0, uint p1, uint p2, bool p3) internal view { 1051 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3)); 1052 | } 1053 | 1054 | function log(bool p0, uint p1, uint p2, address p3) internal view { 1055 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3)); 1056 | } 1057 | 1058 | function log(bool p0, uint p1, string memory p2, uint p3) internal view { 1059 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3)); 1060 | } 1061 | 1062 | function log(bool p0, uint p1, string memory p2, string memory p3) internal view { 1063 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3)); 1064 | } 1065 | 1066 | function log(bool p0, uint p1, string memory p2, bool p3) internal view { 1067 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3)); 1068 | } 1069 | 1070 | function log(bool p0, uint p1, string memory p2, address p3) internal view { 1071 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3)); 1072 | } 1073 | 1074 | function log(bool p0, uint p1, bool p2, uint p3) internal view { 1075 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3)); 1076 | } 1077 | 1078 | function log(bool p0, uint p1, bool p2, string memory p3) internal view { 1079 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3)); 1080 | } 1081 | 1082 | function log(bool p0, uint p1, bool p2, bool p3) internal view { 1083 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3)); 1084 | } 1085 | 1086 | function log(bool p0, uint p1, bool p2, address p3) internal view { 1087 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3)); 1088 | } 1089 | 1090 | function log(bool p0, uint p1, address p2, uint p3) internal view { 1091 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3)); 1092 | } 1093 | 1094 | function log(bool p0, uint p1, address p2, string memory p3) internal view { 1095 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3)); 1096 | } 1097 | 1098 | function log(bool p0, uint p1, address p2, bool p3) internal view { 1099 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3)); 1100 | } 1101 | 1102 | function log(bool p0, uint p1, address p2, address p3) internal view { 1103 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3)); 1104 | } 1105 | 1106 | function log(bool p0, string memory p1, uint p2, uint p3) internal view { 1107 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3)); 1108 | } 1109 | 1110 | function log(bool p0, string memory p1, uint p2, string memory p3) internal view { 1111 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3)); 1112 | } 1113 | 1114 | function log(bool p0, string memory p1, uint p2, bool p3) internal view { 1115 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3)); 1116 | } 1117 | 1118 | function log(bool p0, string memory p1, uint p2, address p3) internal view { 1119 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3)); 1120 | } 1121 | 1122 | function log(bool p0, string memory p1, string memory p2, uint p3) internal view { 1123 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3)); 1124 | } 1125 | 1126 | function log(bool p0, string memory p1, string memory p2, string memory p3) internal view { 1127 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); 1128 | } 1129 | 1130 | function log(bool p0, string memory p1, string memory p2, bool p3) internal view { 1131 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); 1132 | } 1133 | 1134 | function log(bool p0, string memory p1, string memory p2, address p3) internal view { 1135 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); 1136 | } 1137 | 1138 | function log(bool p0, string memory p1, bool p2, uint p3) internal view { 1139 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3)); 1140 | } 1141 | 1142 | function log(bool p0, string memory p1, bool p2, string memory p3) internal view { 1143 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); 1144 | } 1145 | 1146 | function log(bool p0, string memory p1, bool p2, bool p3) internal view { 1147 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); 1148 | } 1149 | 1150 | function log(bool p0, string memory p1, bool p2, address p3) internal view { 1151 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); 1152 | } 1153 | 1154 | function log(bool p0, string memory p1, address p2, uint p3) internal view { 1155 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3)); 1156 | } 1157 | 1158 | function log(bool p0, string memory p1, address p2, string memory p3) internal view { 1159 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); 1160 | } 1161 | 1162 | function log(bool p0, string memory p1, address p2, bool p3) internal view { 1163 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); 1164 | } 1165 | 1166 | function log(bool p0, string memory p1, address p2, address p3) internal view { 1167 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); 1168 | } 1169 | 1170 | function log(bool p0, bool p1, uint p2, uint p3) internal view { 1171 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3)); 1172 | } 1173 | 1174 | function log(bool p0, bool p1, uint p2, string memory p3) internal view { 1175 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3)); 1176 | } 1177 | 1178 | function log(bool p0, bool p1, uint p2, bool p3) internal view { 1179 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3)); 1180 | } 1181 | 1182 | function log(bool p0, bool p1, uint p2, address p3) internal view { 1183 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3)); 1184 | } 1185 | 1186 | function log(bool p0, bool p1, string memory p2, uint p3) internal view { 1187 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3)); 1188 | } 1189 | 1190 | function log(bool p0, bool p1, string memory p2, string memory p3) internal view { 1191 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); 1192 | } 1193 | 1194 | function log(bool p0, bool p1, string memory p2, bool p3) internal view { 1195 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); 1196 | } 1197 | 1198 | function log(bool p0, bool p1, string memory p2, address p3) internal view { 1199 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); 1200 | } 1201 | 1202 | function log(bool p0, bool p1, bool p2, uint p3) internal view { 1203 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3)); 1204 | } 1205 | 1206 | function log(bool p0, bool p1, bool p2, string memory p3) internal view { 1207 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); 1208 | } 1209 | 1210 | function log(bool p0, bool p1, bool p2, bool p3) internal view { 1211 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); 1212 | } 1213 | 1214 | function log(bool p0, bool p1, bool p2, address p3) internal view { 1215 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); 1216 | } 1217 | 1218 | function log(bool p0, bool p1, address p2, uint p3) internal view { 1219 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3)); 1220 | } 1221 | 1222 | function log(bool p0, bool p1, address p2, string memory p3) internal view { 1223 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); 1224 | } 1225 | 1226 | function log(bool p0, bool p1, address p2, bool p3) internal view { 1227 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); 1228 | } 1229 | 1230 | function log(bool p0, bool p1, address p2, address p3) internal view { 1231 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); 1232 | } 1233 | 1234 | function log(bool p0, address p1, uint p2, uint p3) internal view { 1235 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3)); 1236 | } 1237 | 1238 | function log(bool p0, address p1, uint p2, string memory p3) internal view { 1239 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3)); 1240 | } 1241 | 1242 | function log(bool p0, address p1, uint p2, bool p3) internal view { 1243 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3)); 1244 | } 1245 | 1246 | function log(bool p0, address p1, uint p2, address p3) internal view { 1247 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3)); 1248 | } 1249 | 1250 | function log(bool p0, address p1, string memory p2, uint p3) internal view { 1251 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3)); 1252 | } 1253 | 1254 | function log(bool p0, address p1, string memory p2, string memory p3) internal view { 1255 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); 1256 | } 1257 | 1258 | function log(bool p0, address p1, string memory p2, bool p3) internal view { 1259 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); 1260 | } 1261 | 1262 | function log(bool p0, address p1, string memory p2, address p3) internal view { 1263 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); 1264 | } 1265 | 1266 | function log(bool p0, address p1, bool p2, uint p3) internal view { 1267 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3)); 1268 | } 1269 | 1270 | function log(bool p0, address p1, bool p2, string memory p3) internal view { 1271 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); 1272 | } 1273 | 1274 | function log(bool p0, address p1, bool p2, bool p3) internal view { 1275 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); 1276 | } 1277 | 1278 | function log(bool p0, address p1, bool p2, address p3) internal view { 1279 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); 1280 | } 1281 | 1282 | function log(bool p0, address p1, address p2, uint p3) internal view { 1283 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3)); 1284 | } 1285 | 1286 | function log(bool p0, address p1, address p2, string memory p3) internal view { 1287 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); 1288 | } 1289 | 1290 | function log(bool p0, address p1, address p2, bool p3) internal view { 1291 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); 1292 | } 1293 | 1294 | function log(bool p0, address p1, address p2, address p3) internal view { 1295 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); 1296 | } 1297 | 1298 | function log(address p0, uint p1, uint p2, uint p3) internal view { 1299 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3)); 1300 | } 1301 | 1302 | function log(address p0, uint p1, uint p2, string memory p3) internal view { 1303 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3)); 1304 | } 1305 | 1306 | function log(address p0, uint p1, uint p2, bool p3) internal view { 1307 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3)); 1308 | } 1309 | 1310 | function log(address p0, uint p1, uint p2, address p3) internal view { 1311 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3)); 1312 | } 1313 | 1314 | function log(address p0, uint p1, string memory p2, uint p3) internal view { 1315 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3)); 1316 | } 1317 | 1318 | function log(address p0, uint p1, string memory p2, string memory p3) internal view { 1319 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3)); 1320 | } 1321 | 1322 | function log(address p0, uint p1, string memory p2, bool p3) internal view { 1323 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3)); 1324 | } 1325 | 1326 | function log(address p0, uint p1, string memory p2, address p3) internal view { 1327 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3)); 1328 | } 1329 | 1330 | function log(address p0, uint p1, bool p2, uint p3) internal view { 1331 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3)); 1332 | } 1333 | 1334 | function log(address p0, uint p1, bool p2, string memory p3) internal view { 1335 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3)); 1336 | } 1337 | 1338 | function log(address p0, uint p1, bool p2, bool p3) internal view { 1339 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3)); 1340 | } 1341 | 1342 | function log(address p0, uint p1, bool p2, address p3) internal view { 1343 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3)); 1344 | } 1345 | 1346 | function log(address p0, uint p1, address p2, uint p3) internal view { 1347 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3)); 1348 | } 1349 | 1350 | function log(address p0, uint p1, address p2, string memory p3) internal view { 1351 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3)); 1352 | } 1353 | 1354 | function log(address p0, uint p1, address p2, bool p3) internal view { 1355 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3)); 1356 | } 1357 | 1358 | function log(address p0, uint p1, address p2, address p3) internal view { 1359 | _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3)); 1360 | } 1361 | 1362 | function log(address p0, string memory p1, uint p2, uint p3) internal view { 1363 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3)); 1364 | } 1365 | 1366 | function log(address p0, string memory p1, uint p2, string memory p3) internal view { 1367 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3)); 1368 | } 1369 | 1370 | function log(address p0, string memory p1, uint p2, bool p3) internal view { 1371 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3)); 1372 | } 1373 | 1374 | function log(address p0, string memory p1, uint p2, address p3) internal view { 1375 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3)); 1376 | } 1377 | 1378 | function log(address p0, string memory p1, string memory p2, uint p3) internal view { 1379 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3)); 1380 | } 1381 | 1382 | function log(address p0, string memory p1, string memory p2, string memory p3) internal view { 1383 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); 1384 | } 1385 | 1386 | function log(address p0, string memory p1, string memory p2, bool p3) internal view { 1387 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); 1388 | } 1389 | 1390 | function log(address p0, string memory p1, string memory p2, address p3) internal view { 1391 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); 1392 | } 1393 | 1394 | function log(address p0, string memory p1, bool p2, uint p3) internal view { 1395 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3)); 1396 | } 1397 | 1398 | function log(address p0, string memory p1, bool p2, string memory p3) internal view { 1399 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); 1400 | } 1401 | 1402 | function log(address p0, string memory p1, bool p2, bool p3) internal view { 1403 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); 1404 | } 1405 | 1406 | function log(address p0, string memory p1, bool p2, address p3) internal view { 1407 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); 1408 | } 1409 | 1410 | function log(address p0, string memory p1, address p2, uint p3) internal view { 1411 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3)); 1412 | } 1413 | 1414 | function log(address p0, string memory p1, address p2, string memory p3) internal view { 1415 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); 1416 | } 1417 | 1418 | function log(address p0, string memory p1, address p2, bool p3) internal view { 1419 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); 1420 | } 1421 | 1422 | function log(address p0, string memory p1, address p2, address p3) internal view { 1423 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); 1424 | } 1425 | 1426 | function log(address p0, bool p1, uint p2, uint p3) internal view { 1427 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3)); 1428 | } 1429 | 1430 | function log(address p0, bool p1, uint p2, string memory p3) internal view { 1431 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3)); 1432 | } 1433 | 1434 | function log(address p0, bool p1, uint p2, bool p3) internal view { 1435 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3)); 1436 | } 1437 | 1438 | function log(address p0, bool p1, uint p2, address p3) internal view { 1439 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3)); 1440 | } 1441 | 1442 | function log(address p0, bool p1, string memory p2, uint p3) internal view { 1443 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3)); 1444 | } 1445 | 1446 | function log(address p0, bool p1, string memory p2, string memory p3) internal view { 1447 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); 1448 | } 1449 | 1450 | function log(address p0, bool p1, string memory p2, bool p3) internal view { 1451 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); 1452 | } 1453 | 1454 | function log(address p0, bool p1, string memory p2, address p3) internal view { 1455 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); 1456 | } 1457 | 1458 | function log(address p0, bool p1, bool p2, uint p3) internal view { 1459 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3)); 1460 | } 1461 | 1462 | function log(address p0, bool p1, bool p2, string memory p3) internal view { 1463 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); 1464 | } 1465 | 1466 | function log(address p0, bool p1, bool p2, bool p3) internal view { 1467 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); 1468 | } 1469 | 1470 | function log(address p0, bool p1, bool p2, address p3) internal view { 1471 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); 1472 | } 1473 | 1474 | function log(address p0, bool p1, address p2, uint p3) internal view { 1475 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3)); 1476 | } 1477 | 1478 | function log(address p0, bool p1, address p2, string memory p3) internal view { 1479 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); 1480 | } 1481 | 1482 | function log(address p0, bool p1, address p2, bool p3) internal view { 1483 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); 1484 | } 1485 | 1486 | function log(address p0, bool p1, address p2, address p3) internal view { 1487 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); 1488 | } 1489 | 1490 | function log(address p0, address p1, uint p2, uint p3) internal view { 1491 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3)); 1492 | } 1493 | 1494 | function log(address p0, address p1, uint p2, string memory p3) internal view { 1495 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3)); 1496 | } 1497 | 1498 | function log(address p0, address p1, uint p2, bool p3) internal view { 1499 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3)); 1500 | } 1501 | 1502 | function log(address p0, address p1, uint p2, address p3) internal view { 1503 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3)); 1504 | } 1505 | 1506 | function log(address p0, address p1, string memory p2, uint p3) internal view { 1507 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3)); 1508 | } 1509 | 1510 | function log(address p0, address p1, string memory p2, string memory p3) internal view { 1511 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); 1512 | } 1513 | 1514 | function log(address p0, address p1, string memory p2, bool p3) internal view { 1515 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); 1516 | } 1517 | 1518 | function log(address p0, address p1, string memory p2, address p3) internal view { 1519 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); 1520 | } 1521 | 1522 | function log(address p0, address p1, bool p2, uint p3) internal view { 1523 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3)); 1524 | } 1525 | 1526 | function log(address p0, address p1, bool p2, string memory p3) internal view { 1527 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); 1528 | } 1529 | 1530 | function log(address p0, address p1, bool p2, bool p3) internal view { 1531 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); 1532 | } 1533 | 1534 | function log(address p0, address p1, bool p2, address p3) internal view { 1535 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); 1536 | } 1537 | 1538 | function log(address p0, address p1, address p2, uint p3) internal view { 1539 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3)); 1540 | } 1541 | 1542 | function log(address p0, address p1, address p2, string memory p3) internal view { 1543 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); 1544 | } 1545 | 1546 | function log(address p0, address p1, address p2, bool p3) internal view { 1547 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); 1548 | } 1549 | 1550 | function log(address p0, address p1, address p2, address p3) internal view { 1551 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); 1552 | } 1553 | } 1554 | --------------------------------------------------------------------------------