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

Warnings during hardhat tests #22

Open
dd23 opened this issue Jul 18, 2024 · 0 comments
Open

Warnings during hardhat tests #22

dd23 opened this issue Jul 18, 2024 · 0 comments

Comments

@dd23
Copy link
Member

dd23 commented Jul 18, 2024

When running tests, there are several warnings that show up, that should probably be addressed:

Warning: Transient storage as defined by EIP-1153 can break the composability of smart contracts: Since transient storage is cleared only at the end of the transaction and not at the end of the outermost call frame to the contract within a transaction, your contract may unintentionally misbehave when invoked multiple times in a complex transaction. To avoid this, be sure to clear all transient storage at the end of any call to your contract. The use of transient storage for reentrancy guards that are cleared at the end of the call is safe.
   --> lib/KMSVerifier.sol:167:13:
    |
167 |             tstore(location, value)
    |             ^^^^^^


Warning: Unreachable code.
   --> examples/Governor/GovernorZama.sol:326:39:
    |
326 |             if (isDefeated(proposal)) {
    |                                       ^ (Relevant source part starts here and spans across multiple lines).


Warning: Unreachable code.
   --> examples/Governor/GovernorZama.sol:328:20:
    |
328 |             } else {
    |                    ^ (Relevant source part starts here and spans across multiple lines).


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
   --> examples/Governor/GovernorZama.sol:299:25:
    |
299 |     function isDefeated(Proposal storage proposal) private view returns (bool) {
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^


Warning: Function state mutability can be restricted to pure
   --> examples/Governor/GovernorZama.sol:299:5:
    |
299 |     function isDefeated(Proposal storage proposal) private view returns (bool) {
    |     ^ (Relevant source part starts here and spans across multiple lines).
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

No branches or pull requests

1 participant