crytic / crytic/slither

Slither Reports Uninitialized Map as uninitialized state variable

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

Description

Slither reports a warning about a map being uninitialized, however, a map in Solidity is initialized by writing values into it, which is frequently not the correct initialization behavior for how a map should be used.

For example, if you want an empty map, you do not initialize it as an empty map, you just write to/read from it when ready.

https://stackoverflow.com/questions/69593720/how-to-initialize-a-mapping-in-solidity-what-is-the-best-practice

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.