{"id":20737595,"url":"https://github.com/patronum-labs/vanity-create2","last_synced_at":"2026-06-01T10:31:20.755Z","repository":{"id":249208880,"uuid":"830436115","full_name":"Patronum-Labs/vanity-create2","owner":"Patronum-Labs","description":"Script that generates vanity addresses based on CREATE2 Factory and a regex provided by the developer.","archived":false,"fork":false,"pushed_at":"2024-08-13T23:47:37.000Z","size":78,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-19T20:10:05.586Z","etag":null,"topics":["create2","hardhat","regex","vanity","vanity-address"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Patronum-Labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"custom":"https://etherscan.io/address/0x5D551AbEAD9b93ebd0D092722517136FF278c3D0"}},"created_at":"2024-07-18T09:13:38.000Z","updated_at":"2024-08-20T10:04:06.000Z","dependencies_parsed_at":"2024-07-19T09:52:54.740Z","dependency_job_id":"f235dbde-baf3-46b6-97c7-66ce92e0ec3f","html_url":"https://github.com/Patronum-Labs/vanity-create2","commit_stats":null,"previous_names":["patronum-labs/vanity-create2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Patronum-Labs/vanity-create2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patronum-Labs%2Fvanity-create2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patronum-Labs%2Fvanity-create2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patronum-Labs%2Fvanity-create2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patronum-Labs%2Fvanity-create2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Patronum-Labs","download_url":"https://codeload.github.com/Patronum-Labs/vanity-create2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patronum-Labs%2Fvanity-create2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33771627,"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-01T02:00:06.963Z","response_time":115,"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":["create2","hardhat","regex","vanity","vanity-address"],"created_at":"2024-11-17T06:14:57.687Z","updated_at":"2026-06-01T10:31:20.736Z","avatar_url":"https://github.com/Patronum-Labs.png","language":"TypeScript","funding_links":["https://etherscan.io/address/0x5D551AbEAD9b93ebd0D092722517136FF278c3D0"],"categories":[],"sub_categories":[],"readme":"# @patronumlabs/vanity-create2\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/license/mit)\n\nThis repository provides a simple Hardhat TypeScript script that reads the bytecode of compiled contracts and generates vanity addresses based on regex provided by the developer.\n\n## Rationale\n\nWhile there are more efficient and faster examples with Rust, this script is practical for simple use cases. It can still generate very unique addresses in a short amount of time, depending on the machine's worker count.\n\n## Benchmark\n\nThe performance of this salt generation tool heavily depends on the complexity of the regex pattern used for matching addresses. Here are some approximate benchmarks:\n\n- **Simple regex (e.g., matching 2 characters):**\n  - Approximately 10 salt found in 1 second.\n\n- **More complex regex (e.g., matching 4 characters):**\n  - Approximately 1 salt found every ~9 seconds.\n\nPlease note that these benchmarks are approximations and may vary based on the specific regex pattern, hardware specifications, and other factors.\n\n## Usage\n\n1- Clone the repository:\n\n```bash\ngit clone https://github.com/Patronum-Labs/vanity-create2.git\ncd vanity-create2\n```\n\n2- Install the dependencies:\n\n```bash\nnpm install\n```\n\n3- Compile the contracts:\n\n```bash\nnpm run build\n```\n\n4- Update the script:\n\n* Bytecode of the contract to deploy\n* [Regex Tester](https://regexr.com/)\n* [Find how many CPU cores do you have - Windows](https://www.pcworld.com/article/395047/how-many-cpu-cores-do-you-have.html)\n* [Find how many CPU cores do you have - Mac](https://support.macincloud.com/support/solutions/articles/8000087401-how-can-i-check-the-number-of-cpu-cores-on-a-mac#:~:text=Navigate%20towards%20the%20top%20left,of%20%22Total%20number%20of%20Cores%22)\n\n```typescript\n// Constants\nimport { bytecode} from \"../artifacts/contracts/Lock.sol/Lock.json\"; // Either import or set it as a predefined const\nconst FROM = \"0x16A2DDa7E466aE460C5ADd1fBc64dfB8B96E11fb\"; // Adjust this based on the address of the create2 deployer\nconst ADDRESS_REGEX = /^0x*cafe/i; // Adjust this based on the pattern of the address you want to find\nconst WORKER_COUNT = 16; // Adjust this based on your CPU core count\nconst ITERATIONS_PER_WORKER = 1_000_000; // Number of random salts generated by each worker\n```\n\n5- Run the script:\n\n```typescript\nnpm run vanity\n```\n\n## Output\n\nSalts will be written to the root in `Salt.txt`.\n\n\u003e On each new run, **Salt.txt** will be reset with new values.\n\n```txt\nSalt found: 0x6fb12b5567149cdb2841347ad3d340c8467acaa0c318f4c0833fe2e06c4b489a with address: 0x420000f09404F9Eb873E1F28eC779C420428A479\nSalt found: 0xa976da044659a80d9036ee81644785e32632b5e87939b71fd9b59d037728b2f4 with address: 0x42000058bc71b1e667a6d07659F40b034FC62EBa\nSalt found: 0x2eff16418021ac5a12dc9396bb23603a0d6850136c86368149b7b6ab0841f1e2 with address: 0x42000d47f22d22118754A54Af2d2460E7AD3362E\nSalt found: 0xc867a2261180a84d339887e0a0eab323dd047bea12df50cdc73726e2551cc20c with address: 0x420006D51C4b516B015dF9Bf4F6e3d9dc1B08D5B\nSalt found: 0x3cf1ea0dcf3a6a5e529e03a89e4be10eb6ce365d0852a597018859708a4776c5 with address: 0x4200062dB414f84AeD8c4313cF9499a05F51406E\nSalt found: 0x334604a5f60501e927faffdb03bbf2808fc43e44985cc9bc3e25a99e18cc0e05 with address: 0x420000212B9c35ac18F990296b6D69B46Db4b836\nSalt found: 0x00ec2cd9f9d1ef51d63e3479b13d64bdd07a64db85ca94d91a2541def658116e with address: 0x420004888De2eDd4e6064fF9591cf337459Fc788\nSalt found: 0x38d3607f952149d53e16f52da383943a06d357731a63e9caa2171a3def2addc3 with address: 0x420005D5C3627EA6C66ed8A54a56E4Bc0C412dd3\nSalt found: 0x733a1c7172b060e993be7357d8b45588012753812540071ece81b917316249f9 with address: 0x42000285E7a44C6108FE0cF073275A101823e913\nSalt found: 0x589abe3b9a8fd5910e9def304ae022b042d5262180dcadb3f1cbe0bb01d9000c with address: 0x42000135982B4abaAd9747bc57e50498A7d2670e\nSalt found: 0x9dbf14473d0d7d03150db392f62f2597bb4642fa5662c64217ca209b308d018a with address: 0x420004eb8ed9e55EB15e0109521537D1E09322B4\nSalt found: 0x333348774c311d982146e2beedea45b2d352bbca2920104f92aca65a57622733 with address: 0x42000386f1F4ae876b6886be496f1F9Ebd971843\nSalt found: 0x2c4cdba1261f6129b46d51e943e14af5b4ffbdd94cd749786828400d69b49147 with address: 0x42000d40F8F85348b4aD1FDF6A7D09Ce7fE0A4EE\nSalt found: 0x89fe46c5d0d382d5a18785b723d0362e80ef1a0d89c50659ada1d86135d73669 with address: 0x4200066986a280E0A77E1F1AA35Dfc9F4213CA68\nSalt found: 0x2dc4ee7d9534c8637ed8dd6a8336b12f5eb90330789ee9241758c531f81d798b with address: 0x4200062e6E051bF6Df631466CfB99FbEccaafe8e\n...\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatronum-labs%2Fvanity-create2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatronum-labs%2Fvanity-create2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatronum-labs%2Fvanity-create2/lists"}