Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence all warnings in forge build #396

Closed
lumtis opened this issue Oct 16, 2024 · 0 comments · Fixed by #399
Closed

Silence all warnings in forge build #396

lumtis opened this issue Oct 16, 2024 · 0 comments · Fixed by #399
Assignees

Comments

@lumtis
Copy link
Member

lumtis commented Oct 16, 2024

It seems all these warning can be silenced

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.26;"
--> test/fuzz/ERC20CustodyEchidnaTest.sol

Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.26;"
--> test/fuzz/GatewayEVMEchidnaTest.sol

Warning (6321): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
  --> test/utils/ReceiverEVM.sol:82:18:
   |
82 |         returns (bytes memory)
   |                  ^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/evm/ZetaConnectorNative.sol:35:9:
   |
35 |         bytes32 internalSendHash
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/evm/ZetaConnectorNative.sol:57:9:
   |
57 |         bytes32 internalSendHash
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/evm/ZetaConnectorNative.sol:85:9:
   |
85 |         bytes32 internalSendHash,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> test/utils/ReceiverEVM.sol:77:9:
   |
77 |         MessageContext calldata messageContext,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> test/utils/ReceiverEVM.sol:78:9:
   |
78 |         bytes calldata message
   |         ^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> test/ERC20Custody.t.sol:527:9:
    |
527 |         uint256 tssZetaBalanceBefore = zeta.balanceOf(tssAddress);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> test/utils/TestUniversalContract.sol:33:9:
   |
33 |         address zrc20,
   |         ^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> test/utils/TestUniversalContract.sol:34:9:
   |
34 |         uint256 amount,
   |         ^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> test/GatewayZEVM.t.sol:545:9:
    |
545 |         uint256 ownerBalanceBefore = zetaToken.balanceOf(owner);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> test/GatewayZEVM.t.sol:546:9:
    |
546 |         uint256 gatewayBalanceBefore = zetaToken.balanceOf(address(gateway));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> test/GatewayZEVM.t.sol:547:9:
    |
547 |         uint256 protocolAddressBalanceBefore = protocolAddress.balance;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
    --> test/GatewayZEVM.t.sol:1008:9:
     |
1008 |         uint256 destinationBalanceBefore = address(testUniversalContract).balance;
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> test/ZRC20.t.sol:226:10:
    |
226 |         (address gasZRC20, uint256 gasFee) = zrc20.withdrawGasFee();
    |          ^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> test/ZRC20.t.sol:226:28:
    |
226 |         (address gasZRC20, uint256 gasFee) = zrc20.withdrawGasFee();
    |                            ^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> test/ZRC20.t.sol:234:10:
    |
234 |         (address gasZRC20, uint256 gasFee) = zrc20.withdrawGasFee();
    |          ^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> test/ZRC20.t.sol:234:28:
    |
234 |         (address gasZRC20, uint256 gasFee) = zrc20.withdrawGasFee();
    |                            ^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> test/utils/upgrades/ZetaConnectorNativeUpgradeTest.sol:39:9:
   |
39 |         bytes32 internalSendHash
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> test/utils/upgrades/ZetaConnectorNativeUpgradeTest.sol:61:9:
   |
61 |         bytes32 internalSendHash
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> test/utils/upgrades/ZetaConnectorNativeUpgradeTest.sol:89:9:
   |
89 |         bytes32 internalSendHash,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2018): Function state mutability can be restricted to view
  --> test/ZRC20.t.sol:52:5:
   |
52 |     function testZRC20BasicInfo() public {
   |     ^ (Relevant source part starts here and spans across multiple lines).
@lumtis lumtis self-assigned this Oct 16, 2024
@lumtis lumtis linked a pull request Oct 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant