fbnhnsl commited on
Commit
e05f117
·
verified ·
1 Parent(s): 5bc0f37

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -21
README.md CHANGED
@@ -15,38 +15,28 @@ This Dataset consists of 4,134 unique Solidity files. The files were gathered fr
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,
 
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
+ The entry "secure" is 0 for vulnerable contracts and 1 for secure 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.
19
  ```Solidity
20
+ // WARNING Optimization Issue (immutable-states | ID: 21fb30b): DYORNFA._feeAddrWallet1 should be immutable
21
+ // Recommendation for 21fb30b: Add the ’immutable attribute to state variables that never change or are set only in the constructor.
 
 
 
 
 
 
22
  address payable private _feeAddrWallet1;
23
+
24
+ // WARNING Vulnerability (unused-return | severity: Medium | ID: 3032186): AlcoholicApe.createUniswapPair() ignores return value by IERC20(_pair).approve(address(_uniswap),type()(uint256).max)
25
+ // Recommendation for 3032186: Ensure that all the return values of the function calls are used.
 
 
 
 
 
 
 
26
  function createUniswapPair() external onlyOwner {
27
  require(!_canTrade, "Trading is already open");
28
  _approve(address(this), address(_uniswap), _tTotal);
29
  _pair = IUniswapV2Factory(_uniswap.factory()).createPair(
30
+ address(this),
31
+ _uniswap.WETH()
32
  );
33
  // unused-return | ID: 3032186
34
  IERC20(_pair).approve(address(_uniswap), type(uint).max);
35
  }
36
  ```
37
+ - Step 4 "Splitting": Each file was splitted according to the definitions (i.e. contract, interface or library) it contains. The required imports were added to the splitted files accordingly.
38
+ - Step 5 "Similarity Check": Duplicate and very similar contracts were removed.
39
+ - Step 6 "Solhint Fixes": Some of the best practice issues detected by Solhint were fixed in the files.
40
 
41
  ```latex
42
  @misc{hensel2025preprocessed_solidity_dataset_v1,