crytic / crytic/slither

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

Open
#1,778 2 comments 0 reactions 0 assignees View on GitHub
false-positive
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

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

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

```text
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:

```solidity
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:

- macOS@13.2.1
- Slither from `master` branch (commit `776dcab4`)

### Relevant log output:

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.