Datasets
Standard Dataset
Dataset of smart contract code search
- Citation Author(s):
- Submitted by:
- chaochen shi
- Last updated:
- Fri, 01/03/2025 - 23:44
- DOI:
- 10.21227/9nar-4116
- License:
- Categories:
- Keywords:
Abstract
This dataset is specifically designed for smart contract code search, aiming to facilitate research and development in this domain. To construct the dataset, we collected annotated Solidity smart contract code from two major sources: GitHub and Etherscan. In total, we compiled approximately 470K raw (code, docstring) pairs, ensuring a diverse and comprehensive dataset. Among these, around 11.3K contracts (24%) were sourced from GitHub, reflecting the contributions of open-source developers, while the majority, approximately 35.7K contracts (76%), were gathered from Etherscan, providing a rich repository of on-chain contract data. This dataset bridges academic and real-world contexts, supporting advanced code analysis.
We provide 6 datasets:
-
contracts_full.csv: The complete 470K dataset, including function name, function codes, function tokens (tokenized function codes), and docstring tokens.
-
contracts_multimodalities.csv: The deduplicated dataset with additional columns (API sequence and graph structure).
-
contracts_deduplicated.csv: The deduplicated dataset.
-
train.csv, test.csv, val.csv: Split data for training, testing, and validation. Split ratio: 8:1:1.
Dataset Files
- contracts_deduplicated.csv (33.41 MB)
- contracts_multimodalities.csv (69.24 MB)
- test.csv (7.05 MB)
- train.csv (55.14 MB)
- val.csv (7.05 MB)
- contracts_full.csv (3.20 GB)