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

[False-Positive]: unimplemented-functions for mappings that contain custom types and directly implement interfaces #1778

Open
PaulRBerg opened this issue Mar 18, 2023 · 2 comments

Comments

@PaulRBerg
Copy link
Contributor

Describe the false alarm that Slither raise and how you know it's inaccurate:

Slither throws the following detector, when it shouldn't:

MyContract (...) does not implement functions:
	- MyInterface.myMapping(IERC20) (...)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unimplemented-functions

Frequency

Very Frequently

Code example to reproduce the issue:

pragma solidity >=0.8.19;

interface IERC20 {
    function balanceOf(address) external view returns (uint256);
}

interface MyInterface {
    function myMapping(IERC20 token) external view returns (uint256 value);
}

contract MyContract is MyInterface {
    mapping(IERC20 token=> uint256 value) public override myMapping;
}

Version:

Environment:

Relevant log output:

No response

@0xalpharush
Copy link
Contributor

I cannot reproduce this. Do you have another example?

@PaulRBerg
Copy link
Contributor Author

It's possible that this isn't an issue with the latest version of Slither.

not able to repro now as I'm fully tied up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants