zellic-audit
Initial commit
f998fcd
|
raw
history blame
3.12 kB
metadata
language:
  - en
tags:
  - solidity
  - blockchain
  - ethereum
  - smart-contract
pretty_name: Zellic Smart Contract Source Index
size_categories:
  - 100K<n<1M

Zellic 2023 Smart Contract Source Index

Zellic is making publicly available a dataset of known Ethereum mainnet smart contract source code.

Our aim is to provide a contract source code dataset that is readily available to the public to download in bulk. We believe this dataset will help advance the frontier of smart contract security research. Applications include static analysis, machine learning, and more. This effort is part of Zellic’s mission to create a world with no smart contract hacks.

We used a custom fork of Geth to accumulate a list of all deployed contracts on Ethereum mainnet as of block 16860349. This list does not include contracts that are selfdestructed. Next, we deduplicated contract addresses by runtime bytecode. Finally, we cross-referenced this list with online sources of contract source code. All data was obtained from publicly available sources.

Dataset Structure

Index

The address_bytecodehash_index file contains a list of known smart contract addresses mapped to the Keccak256 hash of their EVM bytecode.

Look up the smart contract address in this file to find the source. This file also serves as a list of all deployed smart contracts as of block 16860349.

Contract Sources

Smart Contract sources are organized by folder in the organized_contracts directory.

For example, a contract with the bytecode hash beef3d7d1884c4fee50548cfe762415fe494e3feb1e6ca181352ef023ba1ff7a would be in the directory organized_contracts/be/beef3d7d1884c4fee50548cfe762415fe494e3feb1e6ca181352ef023ba1ff7a/.

Each folder for a smart contract contains the source files as well as a metadata.json that contains information about the contract such as the compiler version and optimizations used. These settings can be used to attempt to reproduce the build.

Source Formats

Contracts may come in one of three source formats. Single file, multiple files, and Solidity Compiler JSON.

For single and multiple file contacts, each .sol file will be included in the directory. Single file contracts will be named main.sol.

For Solidity Compiler Input JSON, the compiler input will be stored in contract.json.

Notices

The smart contract source code in this dataset were obtained from publicly available sources. You should always abide by the appropriate code and software licenses, as well as all applicable copyright law.

THE DATASET/SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DATASET/SOFTWARE OR THE USE OR OTHER DEALINGS IN THE DATASET/SOFTWARE.