Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
json
Languages:
English
Size:
10K - 100K
Tags:
code
License:
| license: mit | |
| task_categories: | |
| - text-generation | |
| language: | |
| - en | |
| tags: | |
| - code | |
| pretty_name: Slither Analyzed Solidity Dataset | |
| size_categories: | |
| - 10K<n<100K | |
| This dataset consists of 40,272 Slither analyzed Solidity files. The files were gathered from three sources: Etherscan, Github and DISL dataset. Three preprocessing steps were applied: | |
| - Step 1 "Cleaning": Unnecessary parts such as comments or blank lines were removed from each file. | |
| - Step 2 "Formatting": Each file was converted with Prettier and the corresponding Solidity-plugin. | |
| - Step 3 "Slither Analysis": Each file has been checked for security vulnerabilities and gas consumption issues. Annotations are added to the line or construct in which | |
| the vulnerability or optimization issue was detected. The entry "vulnerability" is 0 for secure contracts (2,410 contracts), 1 for contracts with only at least one gas consumption issue (2,870 contracts), | |
| 2 for contracts with only at least one low severity vulnerability (5,110 contracts), 3 for contracts with only at least one medium severity vulnerability (2,514 contracts) and 4 for contracts with at least one | |
| high severity vulnerability (27,368 contracts). The following Solidity code snippet shows an annotation example. The exact position of the vulnerability, the vulnerability and a recommendation how to avoid it are given. | |
| ```Solidity | |
| // WARNING Optimization Issue (immutable-states | ID: 21fb30b): DYORNFA._feeAddrWallet1 should be immutable | |
| // Recommendation for 21fb30b: Add the ’immutable’ attribute to state variables that never change or are set only in the constructor. | |
| address payable private _feeAddrWallet1; | |
| // WARNING Vulnerability (unused-return | severity: Medium | ID: 3032186): AlcoholicApe.createUniswapPair() ignores return value by IERC20(_pair).approve(address(_uniswap),type()(uint256).max) | |
| // Recommendation for 3032186: Ensure that all the return values of the function calls are used. | |
| function createUniswapPair() external onlyOwner { | |
| require(!_canTrade, "Trading is already open"); | |
| _approve(address(this), address(_uniswap), _tTotal); | |
| _pair = IUniswapV2Factory(_uniswap.factory()).createPair( | |
| address(this), | |
| _uniswap.WETH() | |
| ); | |
| // unused-return | ID: 3032186 | |
| IERC20(_pair).approve(address(_uniswap), type(uint).max); | |
| } | |
| ``` | |
| No deduplication, file splitting or Solhint fixing was performed here. | |
| If you wish to use this dataset, you can cite it as follows: | |
| ```latex | |
| @misc{hensel2025slither_analyzed_solidity_dataset, | |
| title = {Slither Analyzed Solidity Dataset}, | |
| author={Fabian Hensel}, | |
| year={2025} | |
| } | |
| ``` |