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

[Bug-Candidate]: custom errors in require statements trigger error when used inside a modifier #2594

Open
Sergei-Liakh opened this issue Oct 21, 2024 · 2 comments
Labels
bug-candidate Bugs reports that are not yet confirmed

Comments

@Sergei-Liakh
Copy link

Sergei-Liakh commented Oct 21, 2024

Describe the issue:

Custom errors within require statements work correctly when used inside functions, but they trigger an error when placed inside a modifier.

Code example to reproduce the issue:

pragma solidity 0.8.27;

error SomeError();

contract Test {
    modifier onlySomething() {
        require(false, SomeError());
        _;
    }
}

Version:

0.10.4

Relevant log output:

ERROR:ContractSolcParsing:Missing modifier Variable not found: require(bool,error) (context Test src/Test.sol#5-11 (1 - 0))
@Sergei-Liakh Sergei-Liakh added the bug-candidate Bugs reports that are not yet confirmed label Oct 21, 2024
@smonicas
Copy link
Contributor

Support for custom errors in a require statement has been added in #2550. It's merged in the dev branch and will be in the next slither release. If you need it right now please use slither from the dev branch.

@igorroncevic
Copy link

Support for custom errors in a require statement has been added in #2550. It's merged in the dev branch and will be in the next slither release. If you need it right now please use slither from the dev branch.

When's the official release coming? It's been a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-candidate Bugs reports that are not yet confirmed
Projects
None yet
Development

No branches or pull requests

4 participants
@igorroncevic @smonicas @Sergei-Liakh and others