Update README.md
Browse files
README.md
CHANGED
|
@@ -8,4 +8,50 @@ tags:
|
|
| 8 |
- code
|
| 9 |
size_categories:
|
| 10 |
- 1K<n<10K
|
| 11 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
- code
|
| 9 |
size_categories:
|
| 10 |
- 1K<n<10K
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
This Dataset consists of 4,134 unique Solidity files. The files were gathered from three sources: Etherscan, Github and DISL Dataset. Six preprocessing steps were applied:
|
| 14 |
+
|
| 15 |
+
- Step 1 "Cleaning": Unnecessary parts such as comments or blank lines were removed from each file.
|
| 16 |
+
- Step 2 "Formatting": Each file was converted with Prettier (and the corresponding Solidity-plugin) so that the final model only generates code in a correct format.
|
| 17 |
+
- 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.
|
| 18 |
+
|
| 19 |
+
```Solidity
|
| 20 |
+
/**
|
| 21 |
+
* WARNING Optimization Issue (immutable-states | ID: 21fb30b):
|
| 22 |
+
* DYORNFA._feeAddrWallet1 should be immutable
|
| 23 |
+
*
|
| 24 |
+
* Recommendation for 21fb30b: Add the ’immutable’ attribute to
|
| 25 |
+
* state variables that never change or are set only in the
|
| 26 |
+
* constructor.
|
| 27 |
+
*/
|
| 28 |
+
address payable private _feeAddrWallet1;
|
| 29 |
+
/**
|
| 30 |
+
* WARNING Vulnerability (unused-return | severity: Medium |
|
| 31 |
+
* ID: 3032186):
|
| 32 |
+
* AlcoholicApe.createUniswapPair() ignores
|
| 33 |
+
return value by
|
| 34 |
+
* IERC20(_pair).approve(address(_uniswap),type()(uint256).max)
|
| 35 |
+
*
|
| 36 |
+
* Recommendation for 3032186: Ensure that all the return values
|
| 37 |
+
* of the function calls are used.
|
| 38 |
+
*/
|
| 39 |
+
function createUniswapPair() external onlyOwner {
|
| 40 |
+
require(!_canTrade, "Trading is already open");
|
| 41 |
+
_approve(address(this), address(_uniswap), _tTotal);
|
| 42 |
+
_pair = IUniswapV2Factory(_uniswap.factory()).createPair(
|
| 43 |
+
address(this),
|
| 44 |
+
_uniswap.WETH()
|
| 45 |
+
);
|
| 46 |
+
// unused-return | ID: 3032186
|
| 47 |
+
IERC20(_pair).approve(address(_uniswap), type(uint).max);
|
| 48 |
+
}
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
```latex
|
| 52 |
+
@misc{hensel2025preprocessed_solidity_dataset_v1,
|
| 53 |
+
title = {Preprocessed Solidity Dataset},
|
| 54 |
+
author={Fabian Hensel},
|
| 55 |
+
year={2025}
|
| 56 |
+
}
|
| 57 |
+
```
|