遇见数据集

Verified Smart Contract Code Comments

收藏
Figshare2023-08-09 更新2026-04-28 收录
官方服务:

资源简介:

Artifact DescriptionVerified Smart Contracts Code Comments is a dataset of real Ethereum smart contract functions, containing "code, comment" pairs of both Solidity and Vyper source code. The dataset is based on every deployed Ethereum smart contract as of 1st of April 2022, whose been verified on Etherscan and has a least one transaction. A total of 1,541,370 smart contract functions are provided, parsed from 186,397 unique smart contracts, filtered down from 2,217,692 smart contracts.The dataset contains three folders: "train", "validation" and "test". Each folder contains several enumerated files in the Apache Parquet data file format.Environment SetupThe Pandas library for Python is required to load the dataset. Both Unix-based and Windows systems are supported.Getting StartedThe following code snippet demonstrates how to load the dataset into a Pandas DataFrame.>>> import pandas as pd>>> df = pd.read_parquet("path/to/data")LicenseAll Smart Contracts in the dataset are publicly available, obtained by using Etherscan APIs, and subject to their own original licenses.

数据集说明 已验证智能合约代码注释(Verified Smart Contracts Code Comments)数据集是一组真实以太坊智能合约函数数据集,包含Solidity与Vyper两种源代码的「代码-注释」配对样本。 该数据集以2022年4月1日已部署的、已在Etherscan平台完成验证且至少发生过一笔交易的所有以太坊智能合约为基础构建。本次共提供1,541,370个智能合约函数,其源自对2,217,692个智能合约进行筛选后得到的186,397个唯一智能合约的解析结果。 该数据集包含三个文件夹:`train`、`validation`与`test`,每个文件夹内均包含若干采用编号命名的Apache Parquet格式数据文件。 环境配置 加载该数据集需依赖Python的Pandas库,支持基于Unix的操作系统与Windows系统。 快速上手 以下代码示例展示了如何将数据集加载至Pandas DataFrame中: >>> import pandas as pd >>> df = pd.read_parquet("path/to/data") 许可声明 本数据集内的所有智能合约均为公开获取内容,通过Etherscan API抓取得到,其版权受各合约原有的原始许可协议约束。

创建时间:
2023-08-09
二维码
社区交流群
二维码
科研交流群
商业服务