๐ฆ๐ด๐ด๐ด๐ฆ A home for ethereum smart contracts. ๐
Smart Contract Sanctuary - MultiRepo / Index
โ ๏ธUPDATE: Repo layout changed! see #13 (v1-layout)
Smart Contract Sanctuary
๐ฆ๐ด๐ด๐ด๐ฆ A home for ethereum smart contracts verified on Etherscan. ๐โ This is the index repository for the smart-contract-sanctuary. ๐ Bookmark this repo.
โ Chain-specific sub-repos and the index are updated twice a day.
โ Expect a full, recursive check-out to take 2GB+ disk space.
Usage
The repo is configured for use with git+ssh (much more stable and faster).
First time - clone the index and checkout all chain-specific sub repositories from scratch:
โ git clone --recursive --depth=1 git@github.com:tintinweb/smart-contract-sanctuary.git
also see https://git-scm.com/docs/git-submodule for more options
Existing repository but submodules never initialized - checkout submodules and update all chain-specific sub repositories:
โ git submodule update --init --remote --depth=1 --progress
Existing repository with submodules - update all chain-specific sub repositories:
โ git submodule update --remote --progress
Layout
| Folder | Description | | ------------ | ------------- | | _docs | autogenerated stats; static github page | | <chain>/contracts | Chain specific smart contracts | | โณ ethereum/contracts | Git SubModule ๐ https://github.com/tintinweb/smart-contract-sanctuary-ethereum | | โณ arbitrum/contracts | Git SubModule ๐ https://github.com/tintinweb/smart-contract-sanctuary-arbitrum| | โณ avalanche/contracts | Git SubModule ๐ https://github.com/tintinweb/smart-contract-sanctuary-avalanche| | โณ bsc/contracts | Git SubModule ๐ https://github.com/tintinweb/smart-contract-sanctuary-bsc| | โณ fantom/contracts | Git SubModule ๐ https://github.com/tintinweb/smart-contract-sanctuary-fantom| | โณ polygon/contracts | Git SubModule ๐ https://github.com/tintinweb/smart-contract-sanctuary-polygon| | โณ tron/contracts | Git SubModule ๐ https://github.com/tintinweb/smart-contract-sanctuary-tron| | โณ optimism/contracts | Git SubModule ๐ https://github.com/tintinweb/smart-contract-sanctuary-optimism| | โณ celo/contracts | Git SubModule ๐ https://github.com/tintinweb/smart-contract-sanctuary-celo| | <chain>/utils | Chain specific support scripts |
๐ <chain>/contracts
Contains smart contract sources for various networks, grouped by the first two chars of the contract address. Files are named in the format <address><sourceunitname>, e.g. 0f0c3fedb6226cd5a18826ce23bec92d18336a98URToken.sol
Some contracts are listed in contracts.json, but the file-system may contain more files than what is listed in this summary. Rely on the folder/file structure for a full list. This repo used to auto submit contracts to 4byte.directory.
๐ <chain>/utils
Support scripts for various activies like dumping smart contracts from public sources (etherscan.io, etherchain.com)
requires: pip install -r requirements.txt
Dev Notes
To use List of Verified Contract addresses with an OpenSource license, you can download the csv file, add it to the util folder, and run parsedownloadcontractsetherscan_io.py (with your etherscan API). This will add the new contracts to the appropriate folder
๐ฉโ๐ฌ Data Science Tools
- ๐ง SolGrep - A scriptable semantic grep utility for solidity (crunch numbers, find specific contracts, extract data)
- ๐ semgrep - Semgrep is a fast, open-source, static analysis tool for finding bugs and enforcing code standards at editor, commit, and CI time, and now supports Solidity! โค๏ธ Thanks @JoranHonig for contributing the semgrep solidity parser.
๐ Citation
If you are using this dataset in your research and paper, here's how you can cite this dataset:
- APA6
Ortner, M., Eskandari, S. (n.d.). Smart Contract Sanctuary. Retrieved from https://github.com/tintinweb/smart-contract-sanctuary.
- LateX (Bib)
@article{smartcontractsanctuary,
title={Smart Contract Sanctuary},
url={https://github.com/tintinweb/smart-contract-sanctuary},
author={Ortner, Martin and Eskandari, Shayan}}