Skip to content

chore: fix compilation warnings in Foundry's Solidity test suite #10577

Open
@zerosnacks

Description

@zerosnacks

We have a ton of compilation warnings (unused variables, shadowing builtins, unused return values etc..) in Foundry's test suite

To start fixing them:

cd testdata

temporarily comment out solc = "0.8.18" in foundry.toml

and run forge build --ignored-error-codes=2018

Note we permit Warning (2018): Function state mutability can be restricted to pure.

You will be presented with a long list of warnings

Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> fixtures/SolidityGeneration/GeneratedFastLane.sol

Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> fixtures/SolidityGeneration/GeneratedGaugeController.sol

Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> fixtures/SolidityGeneration/GeneratedLiquidityGaugeV4.sol

Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> fixtures/SolidityGeneration/GeneratedNamedInterface.sol

Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> fixtures/SolidityGeneration/GeneratedUnnamedInterface.sol

Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> fixtures/SolidityGeneration/WithStructs.sol

Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> multi-version/Counter.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.30;"
--> fixtures/SolidityGeneration/GeneratedFastLane.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.30;"
--> fixtures/SolidityGeneration/GeneratedGaugeController.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.30;"
--> fixtures/SolidityGeneration/GeneratedLiquidityGaugeV4.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.30;"
--> fixtures/SolidityGeneration/GeneratedNamedInterface.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.30;"
--> fixtures/SolidityGeneration/GeneratedUnnamedInterface.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.30;"
--> fixtures/SolidityGeneration/WithStructs.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.30;"
--> multi-version/Counter.sol

Warning (2319): This declaration shadows a builtin symbol.
   --> default/cheats/Fork2.t.sol:101:9:
    |
101 |         uint256 block = 16261704;
    |         ^^^^^^^^^^^^^

Warning (2319): This declaration shadows a builtin symbol.
   --> default/cheats/Fork2.t.sol:108:9:
    |
108 |         bytes32 tx = 0x67cbad73764049e228495a3f90144aab4a37cb4b5fd697dffc234aa5ed811ace;
    |         ^^^^^^^^^^

Warning (2319): This declaration shadows a builtin symbol.
   --> default/cheats/Fork2.t.sol:159:9:
    |
159 |         string memory msg = dummy.hello();
    |         ^^^^^^^^^^^^^^^^^

Warning (2519): This declaration shadows an existing declaration.
 --> default/fuzz/invariant/common/InvariantCustomError.t.sol:8:5:
  |
8 |     error InvariantCustomError(uint256, string);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: The shadowed declaration is here:
  --> default/fuzz/invariant/common/InvariantCustomError.t.sol:27:1:
   |
27 | contract InvariantCustomError is DSTest {
   | ^ (Relevant source part starts here and spans across multiple lines).

Warning (2519): This declaration shadows an existing declaration.
  --> default/fuzz/invariant/common/InvariantHandlerFailure.t.sol:24:9:
   |
24 |         bytes4[] memory selectors = new bytes4[](1);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
Note: The shadowed declaration is here:
  --> default/fuzz/invariant/common/InvariantHandlerFailure.t.sol:18:5:
   |
18 |     bytes4[] internal selectors;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2519): This declaration shadows an existing declaration.
  --> default/repros/Issue8383.t.sol:31:13:
   |
31 |             uint256 r = uint256(keccak256(abi.encode(payload, "2")));
   |             ^^^^^^^^^
Note: The shadowed declaration is here:
  --> default/repros/Issue8383.t.sol:24:47:
   |
24 |     function _verifyViaVerifier(bytes32 hash, bytes32 r, bytes32 s, bytes32 x, bytes32 y) internal returns (bool) {
   |                                               ^^^^^^^^^

Warning (2319): This declaration shadows a builtin symbol.
  --> paris/fork/Transact.t.sol:26:9:
   |
26 |         bytes32 tx = 0xaf6201d435b216a858c580e20512a16136916d894aa33260650e164e3238c771;
   |         ^^^^^^^^^^

Warning (2319): This declaration shadows a builtin symbol.
  --> paris/fork/Transact.t.sol:55:9:
   |
55 |         bytes32 tx = 0x33350512fec589e635865cbdb38fa3a20a2aa160c52611f1783d0ba24ad13c8c;
   |         ^^^^^^^^^^

Warning (9302): Return value of low-level calls not used.
  --> default/cheats/ExpectCall.t.sol:59:9:
   |
59 |         address(simpleCall).delegatecall(abi.encodeWithSignature("call()"));
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (9302): Return value of low-level calls not used.
   --> default/cheats/ExpectEmit.t.sol:112:9:
    |
112 |         address(this).call(abi.encodeWithSignature("g()"));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2462): Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
  --> default/cheats/Fork2.t.sol:16:5:
   |
16 |     constructor(uint256 _forkId) public {
   |     ^ (Relevant source part starts here and spans across multiple lines).

Warning (9302): Return value of low-level calls not used.
   --> default/cheats/Prank.t.sol:204:9:
    |
204 |         address(impl).delegatecall(abi.encodeWithSignature("assertCorrectCaller(address)", alice));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5159): "selfdestruct" has been deprecated. Note that, starting from the Cancun hard fork, the underlying opcode no longer deletes the code and data associated with an account and only transfers its Ether to the beneficiary, unless executed in the same transaction in which the contract was created (see EIP-6780). Any use in newly deployed contracts is strongly discouraged even if the new behavior is taken into account. Future changes to the EVM might further reduce the functionality of the opcode.
  --> default/cheats/RecordAccountAccesses.t.sol:52:9:
   |
52 |         selfdestruct(payable(target));
   |         ^^^^^^^^^^^^

Warning (9302): Return value of low-level calls not used.
   --> default/cheats/RecordAccountAccesses.t.sol:229:9:
    |
229 |         address(proxy).call(abi.encodeCall(StorageAccessor.read, bytes32(uint256(1234))));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (9302): Return value of low-level calls not used.
  --> default/fuzz/invariant/common/InvariantReentrancy.t.sol:10:9:
   |
10 |         payable(msg.sender).call("");
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (9302): Return value of low-level calls not used.
  --> default/repros/Issue6293.t.sol:13:9:
   |
13 |         payable(address(1)).call{value: 1}("");
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (9302): Return value of low-level calls not used.
  --> default/repros/Issue7481.t.sol:18:9:
   |
18 |         payable(address(0x5C60cD7a3D50877Bfebd484750FBeb245D936dAD)).call{value: 1}("");
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5159): "selfdestruct" has been deprecated. Note that, starting from the Cancun hard fork, the underlying opcode no longer deletes the code and data associated with an account and only transfers its Ether to the beneficiary, unless executed in the same transaction in which the contract was created (see EIP-6780). Any use in newly deployed contracts is strongly discouraged even if the new behavior is taken into account. Future changes to the EVM might further reduce the functionality of the opcode.
 --> paris/core/BeforeTest.t.sol:8:9:
  |
8 |         selfdestruct(payable(msg.sender));
  |         ^^^^^^^^^^^^

Warning (6321): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
  --> default/cheats/Broadcast.t.sol:25:36:
   |
25 |     function inc() public returns (uint256) {
   |                                    ^^^^^^^

Warning (6321): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
   --> default/cheats/Broadcast.t.sol:565:98:
    |
565 |     function verifySignature(bytes32 digest, uint8 v, bytes32 r, bytes32 s) public view returns (bool) {
    |                                                                                                  ^^^^

Warning (5740): Unreachable code.
  --> default/repros/Issue3723.t.sol:15:9:
   |
15 |         vm.expectRevert();
   |         ^ (Relevant source part starts here and spans across multiple lines).

Warning (2072): Unused local variable.
  --> default/cheats/Broadcast.t.sol:49:9:
   |
49 |         uint256 b = test.t(4);
   |         ^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Broadcast.t.sol:63:9:
   |
63 |         Test test = new Test();
   |         ^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Broadcast.t.sol:66:9:
   |
66 |         Test test2 = new Test();
   |         ^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Broadcast.t.sol:80:9:
   |
80 |         Test test = new Test();
   |         ^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Broadcast.t.sol:85:9:
   |
85 |         Test test = new Test();
   |         ^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Broadcast.t.sol:93:9:
   |
93 |         Test test2 = new Test();
   |         ^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Broadcast.t.sol:98:9:
   |
98 |         Test tmptest = new Test();
   |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:116:9:
    |
116 |         Test tmptest2 = new Test();
    |         ^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:150:9:
    |
150 |         Test test1 = new Test();
    |         ^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:152:9:
    |
152 |         Test test2 = new Test();
    |         ^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:208:13:
    |
208 |             NoLink test9 = new NoLink();
    |             ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:218:9:
    |
218 |         NoLink test2 = new NoLink();
    |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:244:9:
    |
244 |         NoLink test2 = new NoLink();
    |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:268:9:
    |
268 |         NoLink test11 = new NoLink();
    |         ^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:275:9:
    |
275 |         NoLink no = new NoLink();
    |         ^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:285:9:
    |
285 |         NoLink test3 = new NoLink();
    |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:294:9:
    |
294 |         NoLink test5 = new NoLink();
    |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:297:9:
    |
297 |         INoLink test6 = INoLink(address(new NoLink()));
    |         ^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:300:9:
    |
300 |         NoLink test7 = new NoLink();
    |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:303:9:
    |
303 |         NoLink test8 = new NoLink();
    |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:306:9:
    |
306 |         NoLink test9 = new NoLink();
    |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Broadcast.t.sol:309:9:
    |
309 |         NoLink test10 = new NoLink();
    |         ^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:557:9:
    |
557 |         string memory value = "true, false";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:593:9:
    |
593 |         string memory value = "0," "115792089237316195423570985008687907853269984665640564039457584007913129639935,"
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:634:9:
    |
634 |         string memory value = "-57896044618658097711785492504343953926634992332820282019728792003956564819968,"
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:673:9:
    |
673 |         string memory value = "0x7109709ECfa91a80626fF3989D68f67F5b1DD12D," "0x0000000000000000000000000000000000000000";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:711:9:
    |
711 |         string memory value = "0x463df98a03418e6196421718c1b96779a6d4f0bcff1702a9e8f2323bb49f6811,"
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:750:9:
    |
750 |         string memory value = "hello, world!|" "0x7109709ECfa91a80626fF3989D68f67F5b1DD12D";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:786:9:
    |
786 |         string memory value = "0x463df98a03418e6196421718c1b96779a6d4f0bcff1702a9e8f2323bb49f6811," "0x00";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:818:9:
    |
818 |         string memory value = "";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:847:9:
    |
847 |         string memory value = "";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:876:9:
    |
876 |         string memory value = "";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:905:9:
    |
905 |         string memory value = "";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:934:9:
    |
934 |         string memory value = "";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:965:9:
    |
965 |         string memory value = "";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:983:9:
    |
983 |         bytes[] memory defaultValues = new bytes[](0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Env.t.sol:998:9:
    |
998 |         string memory value = "";
    |         ^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
    --> default/cheats/Env.t.sol:1000:9:
     |
1000 |         bytes[] memory defaultValues = new bytes[](0);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
   --> default/cheats/ExpectCall.t.sol:338:56:
    |
338 |     function exposed_callTargetNTimes(Contract target, uint256 a, uint256 b, uint256 times) public {
    |                                                        ^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
   --> default/cheats/ExpectCall.t.sol:338:67:
    |
338 |     function exposed_callTargetNTimes(Contract target, uint256 a, uint256 b, uint256 times) public {
    |                                                                   ^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Fork2.t.sol:67:9:
   |
67 |         uint256 num = block.number;
   |         ^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Fork2.t.sol:70:9:
   |
70 |         uint256 num2 = block.number;
   |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Fork2.t.sol:104:9:
    |
104 |         uint256 fork = vm.createSelectFork("mainnet", block - 1);
    |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Fork2.t.sol:159:9:
    |
159 |         string memory msg = dummy.hello();
    |         ^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Fork2.t.sol:167:9:
    |
167 |         string memory msg2 = dummy.hello();
    |         ^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/GasMetering.t.sol:71:9:
   |
71 |         B b = new B();
   |         ^^^

Warning (2072): Unused local variable.
  --> default/cheats/GetChain.t.sol:37:9:
   |
37 |         Vm.Chain memory arbitrum = vm.getChain("42161222");
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Json.t.sol:430:9:
    |
430 |         notSimpleJson memory decodedData = abi.decode(data, (notSimpleJson));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/cheats/MemSafety.t.sol:76:48:
   |
76 |     function testExpectSafeMemory_CALLDATACOPY(uint256 _x) public {
   |                                                ^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/MemSafety.t.sol:240:9:
    |
240 |         uint256 b = a + 1;
    |         ^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/MemSafety.t.sol:257:9:
    |
257 |         uint256 b = a + 1;
    |         ^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/MemSafety.t.sol:275:9:
    |
275 |         uint256 b = a + 1;
    |         ^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Prank.t.sol:344:9:
    |
344 |         address oldOrigin = tx.origin;
    |         ^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Prank.t.sol:345:9:
    |
345 |         Victim victim = new Victim();
    |         ^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Prank.t.sol:355:9:
    |
355 |         address oldOrigin = tx.origin;
    |         ^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Prank.t.sol:541:9:
    |
541 |         address oldSender = msg.sender;
    |         ^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> default/cheats/Prank.t.sol:542:9:
    |
542 |         address oldOrigin = tx.origin;
    |         ^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Prompt.t.sol:20:9:
   |
20 |         uint256 test = vm.promptSecretUint("test");
   |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Prompt.t.sol:25:9:
   |
25 |         address test = vm.promptAddress("test");
   |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/Prompt.t.sol:30:9:
   |
30 |         uint256 test = vm.promptUint("test");
   |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/RandomCheatcodes.t.sol:37:9:
   |
37 |         uint256 val = vm.randomUint(type(uint256).max);
   |         ^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/RandomCheatcodes.t.sol:73:9:
   |
73 |         bytes memory val = vm.randomBytes(type(uint256).max);
   |         ^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/RpcUrls.t.sol:19:9:
   |
19 |         string memory url = vm.rpcUrl("rpcUrlEnv");
   |         ^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/cheats/RpcUrls.t.sol:26:9:
   |
26 |         string[2][] memory _urls = vm.rpcUrls();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/cheats/Skip.t.sol:22:27:
   |
22 |     function testFuzzSkip(uint256 x) public {
   |                           ^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/cheats/Skip.t.sol:28:35:
   |
28 |     function testRevertIfFuzzSkip(uint256 x) public {
   |                                   ^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/fork/ForkSame_1.t.sol:18:9:
   |
18 |         uint256 balance = WETH_TOKEN_ADDR.balance;
   |         ^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/fork/ForkSame_2.t.sol:18:9:
   |
18 |         uint256 balance = WETH_TOKEN_ADDR.balance;
   |         ^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/fuzz/FuzzFailurePersist.t.sol:18:9:
   |
18 |         address addr,
   |         ^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/fuzz/FuzzFailurePersist.t.sol:19:9:
   |
19 |         bool cond,
   |         ^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/fuzz/FuzzFailurePersist.t.sol:20:9:
   |
20 |         string calldata test,
   |         ^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/fuzz/FuzzFailurePersist.t.sol:21:9:
   |
21 |         TestTuple calldata tuple,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/fuzz/FuzzFailurePersist.t.sol:22:9:
   |
22 |         address[] calldata addresses
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
 --> default/fuzz/FuzzPositive.t.sol:7:33:
  |
7 |     function testSuccessChecker(uint256 val) public {
  |                                 ^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/inline/FuzzInlineConf.t.sol:11:33:
   |
11 |     function testInlineConfFuzz(uint8 x) public {
   |                                 ^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/inline/FuzzInlineConf.t.sol:19:34:
   |
19 |     function testInlineConfFuzz1(uint8 x) public {
   |                                  ^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/inline/FuzzInlineConf.t.sol:23:34:
   |
23 |     function testInlineConfFuzz2(uint8 x) public {
   |                                  ^^^^^^^

Warning (2072): Unused local variable.
  --> default/repros/Issue2984.t.sol:23:9:
   |
23 |         uint256 fork2 = vm.createSelectFork("avaxTestnet", 12880749);
   |         ^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/repros/Issue3189.t.sol:30:9:
   |
30 |         uint256 fooRet = user.foo(123);
   |         ^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/repros/Issue3703.t.sol:12:9:
   |
12 |         uint256 fork =
   |         ^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/repros/Issue3708.t.sol:14:9:
   |
14 |         uint256 forkId = vm.createSelectFork("optimism");
   |         ^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/repros/Issue5808.t.sol:14:9:
   |
14 |         int256[] memory ints1 = vm.parseJsonIntArray(str1, "");
   |         ^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/repros/Issue6070.t.sol:16:9:
   |
16 |         uint256 x = vm.envUint("__FOUNDRY_ISSUE_6066");
   |         ^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/repros/Issue6115.t.sol:28:44:
   |
28 |     function testFuzz_SetNumber(uint256 x, bytes4 test) public {
   |                                            ^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/repros/Issue6115.t.sol:34:45:
   |
34 |     function testFuzz_SetNumber2(uint256 x, bytes8 test) public {
   |                                             ^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/repros/Issue6115.t.sol:40:45:
   |
40 |     function testFuzz_SetNumber3(uint256 x, bytes12 test) public {
   |                                             ^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/repros/Issue8287.t.sol:12:9:
   |
12 |         uint256 f2 = vm.createSelectFork("mainnet", 10);
   |         ^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/repros/Issue8287.t.sol:19:9:
   |
19 |         uint256 f2 = vm.createSelectFork("mainnet", 10);
   |         ^^^^^^^^^^

Warning (2072): Unused local variable.
  --> default/repros/Issue8383.t.sol:41:10:
   |
41 |         (bool success, bytes memory result) = _verifier.call(payload);
   |          ^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> default/repros/Issue8639.t.sol:15:24:
   |
15 |     function setNumber(uint256 newNumber) public {
   |                        ^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> paris/core/BeforeTest.t.sol:87:20:
   |
87 |     function testC(uint256 h) public {
   |                    ^^^^^^^^^

Warning (4591): There are more than 256 warnings. Ignoring the rest.
Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> multi-version/Counter.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.18;"
--> multi-version/Counter.sol

Warning (2072): Unused local variable.
  --> default/cheats/GetArtifactPath.t.sol:13:9:
   |
13 |         DummyForGetArtifactPath dummy = new DummyForGetArtifactPath();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> multi-version/Counter.sol

Warning (1878): SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> multi-version/Importer.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.17;"
--> multi-version/Counter.sol

Metadata

Metadata

Assignees

Labels

A-internalsArea: internalsP-lowPriority: lowfirst issueA good way to start contributing

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions