{"id":20997514,"url":"https://github.com/cdump/evmole-datasets","last_synced_at":"2026-06-28T21:31:11.513Z","repository":{"id":213807124,"uuid":"734725059","full_name":"cdump/evmole-datasets","owner":"cdump","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-15T14:50:48.000Z","size":39,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T19:30:09.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdump.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-22T12:49:43.000Z","updated_at":"2025-02-25T08:20:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"b25b062a-6172-46cb-ac66-4da741cbea68","html_url":"https://github.com/cdump/evmole-datasets","commit_stats":null,"previous_names":["cdump/evmole-datasets"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cdump/evmole-datasets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdump%2Fevmole-datasets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdump%2Fevmole-datasets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdump%2Fevmole-datasets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdump%2Fevmole-datasets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdump","download_url":"https://codeload.github.com/cdump/evmole-datasets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdump%2Fevmole-datasets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34905180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T07:40:01.371Z","updated_at":"2026-06-28T21:31:11.489Z","avatar_url":"https://github.com/cdump.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EVMole Datasets\n\nThis repository contains smart contract datasets used for [EVMole benchmarks](https://github.com/cdump/evmole/tree/master/benchmark). The datasets include large Solidity contracts, randomly selected contracts, and Vyper contracts from the Ethereum mainnet.\n\n## Dataset Construction Process\n\n1. First, clone the source repository containing verified Ethereum smart contracts:\n```sh\ngit clone https://github.com/tintinweb/smart-contract-sanctuary.git\n```\n\n2. Locate all Solidity contracts and record their sizes:\n```sh\n$ cd smart-contract-sanctuary/ethereum/contracts/mainnet/\n\n# (contract_size_in_bytes) (contract_file_path)\n$ find ./ -name \"*.sol\" -printf \"%s %p\\n\" \u003e all.txt\n```\n\n3. Extract approximately 1200 of the largest contracts by file size:\n```sh\n$ cat all.txt | sort -rn | head -n 1200 | cut -d'/' -f3 | cut -d'_' -f1 \u003e top.txt\n```\n\n4. Select approximately 55,000 random contracts:\n```sh\n$ cat all.txt | cut -d'/' -f3 | cut -d'_' -f1 | sort -u | shuf | head -n 55000 \u003e random.txt\n```\n\n5. Get all vyper contracts:\n```sh\n$ find ./ -type f -name '*.vy' | cut -d'/' -f3 | cut -d'_' -f1 \u003e vyper.txt\n```\n\n6. Download contracts code \u0026 abi (using scripts/etherscan):\n```sh\n$ poetry run python3 download.py --etherscan-api-key=CHANGE_ME --addrs-list=top.txt --out-dir=datasets/largest1k --limit=1000 --code-regexp='^0x(?!73).'\n$ poetry run python3 download.py --etherscan-api-key=CHANGE_ME --addrs-list=random.txt --out-dir=datasets/random50k --limit=50000 --code-regexp='^0x(?!73).'\n$ poetry run python3 download.py --etherscan-api-key=CHANGE_ME --addrs-list=vyper.txt --out-dir=datasets/vyper --code-regexp='^0x(?!73).'\n```\n\nThe `--code-regexp='^0x(?!73).'` parameter is used to filter contracts:\n1. It skips contracts with empty code (`{\"code\": \"0x\",`), which are self-destructed contracts\n2. It excludes contracts with code starting with `0x73` (the `PUSH20` opcode)\n\nNote about excluded contracts: Compiled Solidity libraries [begin with the PUSH20 opcode](https://docs.soliditylang.org/en/v0.8.23/contracts.html#call-protection-for-libraries) for call protection. These are currently excluded because [non-storage structs are referred to by their fully qualified name](https://docs.soliditylang.org/en/v0.8.23/contracts.html#function-signatures-and-selectors-in-libraries), which is not yet supported by our reference Etherscan extractor (`providers/etherscan`). This limitation may be addressed in future updates.\n\n7. Build the `storage` dataset (`/mnt/sourcify/sources` must contain the downloaded contracts):\n```sh\n$ cd scripts/sourcify\n$ npm install\n$ mkdir -p out/\n\n# Process contracts in parallel (adjust -P16 for your CPU cores)\n$ find /mnt/sourcify/sources/contracts/full_match/1 -mindepth 1 -maxdepth 1 -type d | shuf | head -n 4000 | xargs -n1 -P16 node index.mjs\n\n# Select ~3000 unique contracts\n$ md5sum out/* | sort | uniq -w 32 | shuf | head -n 3000 | awk '{print $2}' | xargs -I{} cp {} storage3k/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdump%2Fevmole-datasets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdump%2Fevmole-datasets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdump%2Fevmole-datasets/lists"}