Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
Dask
License:
Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
contract_name
stringlengths
1
238
file_path
stringlengths
4
23.2k
contract_address
stringlengths
42
42
language
stringclasses
2 values
source_code
stringlengths
1
896k
abi
stringlengths
2
46.2k
compiler_version
stringclasses
297 values
optimization_used
bool
2 classes
runs
float64
1
1,000M
constructor_arguments
stringlengths
0
214k
evm_version
stringclasses
11 values
library
stringclasses
376 values
license_type
stringclasses
16 values
proxy
bool
2 classes
implementation
stringlengths
0
42
swarm_source
stringlengths
0
71
UserWallet
UserWallet.sol
0x84dabbb8999f508ce1cbb7057d260c74c6c9815c
Solidity
pragma solidity ^0.4.10; // Copyright 2017 Bittrex contract AbstractSweeper { function sweep(address token, uint amount) returns (bool); function () { throw; } Controller controller; function AbstractSweeper(address _controller) { controller = Controller(_controller); } ...
[{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"sweep","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"...
v0.4.11+commit.68ef5810
true
200
000000000000000000000000a3C1E324CA1ce40db73eD6026c4A177F099B5770
Default
false
bzzr://4cdd69fdcf3cf6cbee9677fe380fa5f044048aa9e060ec5619a21ca5a5bd4cd1
Forwarder
Forwarder.sol
0x17be21ab0d0a5255d5cd4ce387f42d95b81f88ea
Solidity
pragma solidity ^0.4.14; /** * Contract that exposes the needed erc20 token functions */ contract ERC20Interface { // Send _value amount of tokens to address _to function transfer(address _to, uint256 _value) returns (bool success); // Get the account balance of another account with address _owner ...
[{"constant":true,"inputs":[],"name":"parentAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"tokenContractAddress","type":"address"}],"name":"flushTokens","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"flush"...
v0.4.16-nightly.2017.8.11+commit.c84de7fa
true
200
Default
false
bzzr://d0f8838ba17108a895d34ae8ef3bff4e0dc9d639c3c51921fee1d17eaa803721
OwnableDelegateProxy
OwnableDelegateProxy.sol
0x1994c717ec123fe2830399fe4f0f3054c8e69ebc
Solidity
contract OwnedUpgradeabilityStorage { // Current implementation address internal _implementation; // Owner of the contract address private _upgradeabilityOwner; /** * @dev Tells the address of the owner * @return the address of the owner */ function upgradeabilityOwner() public view ...
[{"constant":true,"inputs":[],"name":"proxyOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"implementation","type":"address"}],"name":"upgradeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}...
v0.4.23+commit.124ca40d
true
200
00000000000000000000000074451193ccf4d1c9182c973538d9d2339350ee1a000000000000000000000000f9e266af4bca5890e2781812cc6a6e89495a79f200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044485cc95500000000000000000000000074451193ccf4d1c9182c973538d9d233...
Default
MIT
false
bzzr://5f26049bbc794226b505f589b2ee1130db54310d79dd8a635c6f6c61e305a777
Proxy
Proxy.sol
0xeb623971dac04d3ac48dd97583dda06808fc691a
Solidity
pragma solidity ^0.5.3; /// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract. /// @author Stefan George - <stefan@gnosis.io> /// @author Richard Meissner - <richard@gnosis.io> contract Proxy { // masterCopy always needs to be first declared var...
[{"inputs":[{"internalType":"address","name":"_masterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]
v0.5.14+commit.1f1aaa4
false
200
00000000000000000000000034cfac646f301356faa8b21e94227e3583fe3f5f
Default
MIT
false
bzzr://d8a00dc4fe6bf675a9d7416fc2d00bb3433362aa8186b750f76c4027269667ff
Forwarder
Forwarder.sol
0x14bee40a811044821e8b546e7c8de502c4f7c90e
Solidity
pragma solidity 0.7.5; /* The MIT License (MIT) Copyright (c) 2018 Murray Software, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including ...
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"ForwarderDeposited","type":"event"},{"stateMutability":"payabl...
v0.7.5+commit.eb77ed08
false
200
Default
Apache-2.0
false
ipfs://934a7b5f246917d20f5e049b9344e4f3d923110c9d150ea2a4118848dd414bc3
DSProxy
DSProxy.sol
0x980cfcab781f1e6b1ea7c6a58097d8c6734a0de8
Solidity
// proxy.sol - execute actions atomically through the proxy's identity // Copyright (C) 2017 DappHub, LLC // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the Lice...
[{"constant":false,"inputs":[{"name":"owner_","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"_data","type":"bytes"}],"name":"execute","outputs":[{"name":"response","type":"bytes3...
v0.4.23+commit.124ca40d
true
200
000000000000000000000000271293c67e2d3140a0e9381eff1f9b01e07b0795
Default
false
bzzr://e498874c9ba9e75028e0c84f1b1d83b2dad5de910c59b837b32e5a190794c5e1
UniswapV2Pair
contracts/interfaces/IERC20.sol
0x3368341174e92df8eab9c8243102a6eb2bdd5786
Solidity
pragma solidity >=0.5.0; interface IERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string me...
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","...
v0.5.16+commit.9c3226ce
true
999,999
Default
GNU GPLv3
false
bzzr://7dca18479e58487606bf70c79e44d8dee62353c9ee6d01f9a9d70885b8765f22
ReversibleDemo
ReversibleDemo.sol
0xf24b424fe9aeb87baad995aa807decae29bf91c2
Solidity
// `interface` would make a nice keyword ;) contract TheDaoHardForkOracle { // `ran()` manually verified true on both ETH and ETC chains function forked() constant returns (bool); } // demostrates calling own function in a "reversible" manner /* important lines are marked by multi-line comments */ cont...
[{"constant":true,"inputs":[],"name":"numsuccesses","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"numfails","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"numcalls","outputs":[{"name":"","type":"uint256"}],"type":"funct...
v0.3.5-2016-08-07-f7af7de
true
200
Default
false
USDOGE
USDOGE.sol
0xcdb8ceabf7f5ca49039404f6a20f54421aca983e
Solidity
/* */ // SPDX-License-Identifier: MIT pragma solidity >=0.5.0 <0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence ...
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"ow...
v0.7.3+commit.9bfce1f6
true
200
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000314dc6448d9338c15b0a00000000000000000000000000000000000000000000000000000000000000000000000d416d65726963616e20446f676500000000000000000000000000000000000000...
Default
MIT
false
ipfs://121516d17af92dafa3dc013dc4b17a9775e25e0efa479afa06727954b2554f48
MethodVaultV2
contracts/methodNFT/MethodVaultV2.sol
0x6401e2ff943722e8583d0f7b99987e7b39f9cc75
Solidity
// SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.7.6; pragma abicoder v2; import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {IERC721Receive...
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":...
v0.7.6+commit.7338295f
true
1,000
Default
false
MethodVaultV2
@openzeppelin/contracts/math/SafeMath.sol
0x6401e2ff943722e8583d0f7b99987e7b39f9cc75
Solidity
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error,...
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":...
v0.7.6+commit.7338295f
true
1,000
Default
false
MethodVaultV2
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x6401e2ff943722e8583d0f7b99987e7b39f9cc75
Solidity
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC721.sol"; import "./IERC721Metadata.sol"; import "./IERC721Enumerable.sol"; import "./IERC721Receiver.sol"; import "../../introspection/ERC165.sol"; import "../../math/SafeMath.sol"; import "../../utils/Add...
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":...
v0.7.6+commit.7338295f
true
1,000
Default
false
End of preview. Expand in Data Studio

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

  • 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
  • the cuttoff date is January 15, 2024, approx at block 19010000

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)
Downloads last month
1,186

Paper for ASSERT-KTH/DISL