mwritescode/slither-audited-smart-contracts
收藏资源简介:
该数据集包含经过Slither静态分析框架验证的Solidity智能合约的源代码和部署的字节码,并对其漏洞进行了分类。数据集支持的任务包括文本分类、文本生成和图像分类。数据集的创建目的是为了提供一个大规模的开源数据集,用于检测和分类已验证的Solidity智能合约的漏洞。数据集的语言为英语,源代码为Solidity。数据集的结构包括数据实例、数据字段和数据分割。数据集的创建过程包括初始数据收集和标准化,使用了Smart Contract Sanctuary和Etherscan等资源,并通过Slither静态分析框架进行分析。
This dataset contains the source code and deployed bytecode of Solidity smart contracts verified by the Slither static analysis framework, along with their vulnerability classifications. The tasks supported by this dataset include text classification, text generation, and image classification. The purpose of creating this dataset is to provide a large-scale open-source dataset for detecting and classifying vulnerabilities in verified Solidity smart contracts. This dataset uses English as its descriptive language and Solidity as the source code language. The dataset structure includes data instances, data fields, and data splits. The dataset creation process includes initial data collection and standardization, utilizing resources such as Smart Contract Sanctuary and Etherscan, and conducting analysis via the Slither static analysis framework.
数据集概述
数据集名称
- 名称: Slither Audited Smart Contracts
- 别名: Slither Audited Smart Contracts Dataset
数据集基本信息
- 语言: 英语
- 许可证: MIT
- 多语言性: 单语种
- 数据集大小: 100K<n<1M
- 源数据: 原始数据
- 任务类别: 文本分类, 文本生成
- 任务ID: 多标签分类, 多输入文本分类, 语言建模
数据集描述
- 概述: 该数据集包含经过Slither静态分析框架验证的Solidity智能合约的源代码和部署字节码,以及根据Slither分类的漏洞。
- 支持任务:
- 文本分类: 用于训练模型对智能合约字节码和源代码进行二元和多标签文本分类。
- 文本生成: 用于训练Solidity编程语言的语言模型。
- 图像分类: 通过预处理字节码数据获取RGB图像,用于训练卷积神经网络进行代码漏洞检测和分类。
- 语言: 语言注释为英语,所有源代码为Solidity。
数据集结构
- 数据实例: 每个数据实例包含地址、源代码和字节码。标签有两种配置,一种是Slither工具输出的清理后的文本版本,另一种是多标签版本,由代表特定漏洞类的整数列表组成。标签4表示合约安全。
- 数据字段:
- 地址: 字符串,表示在以太坊主网上部署的智能合约地址。
- 源代码: Solidity智能合约代码库的扁平化版本。
- 字节码: 字符串,表示智能合约的字节码,通过调用
web3.eth.getCode()获得。 - slither: Slither的JSON输出清理版本或类标签列表。
- 数据分割: 数据集有6种配置,其中不包含
all-的配置提供训练、测试和验证分割,测试和验证分割各约占总数据的15%。
数据集创建
- 采集理由: 为了提供一个用于检测和分类已验证Solidity智能合约漏洞的大规模免费数据集。
- 源数据: 数据集构建自Smart Contract Sanctuary提供的已验证智能合约列表,源代码和字节码通过Etherscan和Web3.py库下载,使用Slither进行分析。
附加信息
-
数据集创建者: Martina Rossini
-
许可证信息: 除智能合约的Solidity源代码外,所有文件均遵循MIT许可证。
-
引用信息: 如在研究中使用此数据集,可按以下方式引用:
@misc{rossini2022slitherauditedcontracts, title = {Slither Audited Smart Contracts Dataset}, author={Martina Rossini}, year={2022} }




