Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
Dask
License:
DISL / README.md
GGmorello's picture
Upload dataset
ef68cc8 verified
|
raw
history blame
2.89 kB
metadata
language:
  - en
license: mit
size_categories:
  - 1M<n<10M
task_categories:
  - text-generation
paperswithcode_id: disl
pretty_name: 'DISL: Fueling Research with A Large Dataset of Solidity Smart Contracts'
configs:
  - config_name: decomposed
    data_files: data/decomposed/*
  - config_name: default
    data_files:
      - split: train
        path: require/train-*
  - config_name: raw
    data_files: data/raw/*
tags:
  - code
  - solidity
  - smart contracts
  - webdataset
dataset_info:
  features:
    - name: contract_name
      dtype: string
    - name: file_path
      dtype: string
    - name: contract_address
      dtype: string
    - name: language
      dtype: string
    - name: source_code
      dtype: string
    - name: abi
      dtype: string
    - name: compiler_version
      dtype: string
    - name: optimization_used
      dtype: bool
    - name: runs
      dtype: float64
    - name: constructor_arguments
      dtype: string
    - name: evm_version
      dtype: string
    - name: library
      dtype: string
    - name: license_type
      dtype: string
    - name: proxy
      dtype: bool
    - name: implementation
      dtype: string
    - name: swarm_source
      dtype: string
  splits:
    - name: train
      num_bytes: 9578369426
      num_examples: 514506
  download_size: 2249641931
  dataset_size: 9578369426

DISL

The DISL dataset features a collection of 514506 unique Solidity files that have been deployed to Ethereum mainnet. It caters to the need for a large and diverse dataset of real-world smart contracts. DISL serves as a resource for developing machine learning systems and for benchmarking software engineering tools designed for smart contracts.

Content

It contains two subset:

  • the raw subset has full contracts source code and it's not deduplicated, it has 3,298,271 smart contracts
  • the decomposed subset contains Solidity files, it is derived from raw, it is deduplicated using Jaccard similarity with a threshold of 0.9, it has 514,506 Solidity files

If you use DISL, please cite the following tech report:

@techreport{disl2403.16861,
 title = {DISL: Fueling Research with A Large Dataset of Solidity Smart Contracts},
 year = {2024},
 author = {Gabriele Morello and Mojtaba Eshghie and Sofia Bobadilla and Martin Monperrus},
 url = {http://arxiv.org/pdf/2403.16861},
 number = {2403.16861},
 institution = {arXiv},
}
  • Curated by: Gabriele Morello

Instructions to explore the dataset

from datasets import load_dataset

# Load the raw dataset
dataset = load_dataset("ASSERT-KTH/DISL", "raw")

# OR

# Load the decomposed dataset
dataset = load_dataset("ASSERT-KTH/DISL", "decomposed")

# number of rows and columns
num_rows = len(dataset["train"])
num_columns = len(dataset["train"].column_names)

# random row
import random
random_row = random.choice(dataset["train"])

# random source code
random_sc = random.choice(dataset["train"])['source_code']
print(random_sc)