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

Japy69 - Wrong pragma #19

Open
sherlock-admin3 opened this issue Nov 23, 2024 · 2 comments
Open

Japy69 - Wrong pragma #19

sherlock-admin3 opened this issue Nov 23, 2024 · 2 comments
Labels
Will Fix The sponsor confirmed this issue will be fixed

Comments

@sherlock-admin3
Copy link

sherlock-admin3 commented Nov 23, 2024

Japy69

Medium

Wrong pragma

Summary

The pragma used in HatsSignerGate.sol is:

pragma solidity >=0.8.13;

But the usage of transient keyword makes the pragma wrong.

Root Cause

In HatsSignerGate.sol:2, the pragma is false since the compiler will not understand the transient keyword for solidity versions <0.8.27

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

The compiler will not be able to compile depending on the pragma version.

PoC

No response

Mitigation

Change pragma to:

pragma solidity >=0.8.27;

For judging:

Some people will invalidate because of this rule:

Using Solidity versions that support EVM opcodes that don't work on networks on which the protocol is deployed is not a valid issue because one can manage compilation flags to compile for past EVM versions on newer Solidity versions.

But note that here it is different: the compiler will not work for most of compiler versions. It is not due to opcodes that don't work on networks on which the protocol is deployed.

@sherlock-admin2 sherlock-admin2 changed the title Proper Champagne Raven - Wrong pragma Japy69 - Wrong pragma Nov 27, 2024
@sherlock-admin3 sherlock-admin3 added the Will Fix The sponsor confirmed this issue will be fixed label Nov 29, 2024
@spengrah
Copy link

spengrah commented Dec 3, 2024

fix PR: Hats-Protocol/hats-zodiac#83

@sherlock-admin2
Copy link

The protocol team fixed this issue in the following PRs/commits:
Hats-Protocol/hats-zodiac#83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Will Fix The sponsor confirmed this issue will be fixed
Projects
None yet
Development

No branches or pull requests

3 participants