crytic / crytic/slither

Detector Request: Implicit Typecast

Open
#2,273 2 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

### Describe the desired feature

It would be great to have a detector that checks for an implicit typecast in the code.

Example:

```solidity
uint64 a = 12345;
uint64 b = 1e18;

uint256 x = a * b;
```

This would revert since `a * b` happens in the `uint64` space then gets upcasted to `uint256` but won't be detected either by Solidity or Slither.

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.