{"id":21184537,"url":"https://github.com/0xzothio/create3-factory","last_synced_at":"2026-05-16T23:15:09.320Z","repository":{"id":263576329,"uuid":"885233285","full_name":"0xZothio/Create3-Factory","owner":"0xZothio","description":"A Solidity-based implementation of a Create3Factory contract that leverages the CREATE3 opcode for deterministic address generation with integrated access control. Built using the Hardhat framework, this project facilitates secure and predictable contract deployments.","archived":false,"fork":false,"pushed_at":"2025-01-24T15:10:16.000Z","size":221,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-14T19:52:37.102Z","etag":null,"topics":["access-control","create3","hardhat","nodejs","pnpm","solidity"],"latest_commit_sha":null,"homepage":"https://zoth.io","language":"Solidity","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/0xZothio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-11-08T08:00:38.000Z","updated_at":"2025-01-24T15:10:20.000Z","dependencies_parsed_at":"2024-11-19T10:20:37.928Z","dependency_job_id":"06606acf-70d7-4d68-a62a-52ee99b61ab6","html_url":"https://github.com/0xZothio/Create3-Factory","commit_stats":null,"previous_names":["0xzothio/create3-factory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0xZothio/Create3-Factory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xZothio%2FCreate3-Factory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xZothio%2FCreate3-Factory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xZothio%2FCreate3-Factory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xZothio%2FCreate3-Factory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xZothio","download_url":"https://codeload.github.com/0xZothio/Create3-Factory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xZothio%2FCreate3-Factory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33121881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["access-control","create3","hardhat","nodejs","pnpm","solidity"],"created_at":"2024-11-20T18:09:15.767Z","updated_at":"2026-05-16T23:15:09.283Z","avatar_url":"https://github.com/0xZothio.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create3Factory with Access Control\n\nA Solidity-based implementation of a `Create3Factory` contract that leverages the `CREATE3` opcode for deterministic address generation with integrated access control. Built using the Hardhat framework, this project facilitates secure and predictable contract deployments.\n\n---\n\n## Features\n\n- **Deterministic Address Generation**: Deploy contracts to predictable addresses regardless of the deployer’s address.\n- **Access Control**: Restricts deployment functionality to authorized entities.\n- **Hardhat Integration**: Uses Hardhat for testing, compiling, and deployment.\n\n---\n\n## Table of Contents\n\n1. [Installation](#installation)\n2. [Contracts Overview](#contracts-overview)\n3. [Usage](#usage)\n4. [Deployment](#deployment)\n5. [License](#license)\n6. [Acknowledgments](#acknowledgments)\n\n---\n\n## Installation\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/) (v20.x or higher)\n- [pnpm](https://pnpm.io/)\n- [Hardhat](https://hardhat.org/)\n\n### Setup\n\nClone the repository and install the required dependencies:\n\n```bash\ngit clone https://github.com/0xZothio/Create3-Factory.git\ncd Create3-Factory\npnpm install\n```\n\n---\n\n## Contracts Overview\n\n### `Create3Factory.sol`\n\nThe `Create3Factory` contract offers:\n\n1. **Deploy with Deterministic Address**:\n   ```solidity\n   function create(bytes32 _salt, bytes calldata _creationCode) external onlyRole(DEPLOYER_ROLE)\n   ```\n   Deploys a contract to a predictable address calculated from the provided `salt`.\n\n2. **Get Deployed Address**:\n   ```solidity\n   function addressOf(bytes32 _salt) external view returns (address);\n   ```\n   Computes the deterministic address for a given `salt`.\n\n3. **Access Control**:\n   Access is restricted to authorized deployers via `onlyAuthorized` modifier.\n\n---\n\n## Usage\n\n### Compile Contracts\n\nRun the following command to compile the Solidity contracts:\n\n```bash\nnpx hardhat compile\n```\n\n### Deploy Contracts Locally\n\nTo deploy the `Create3Factory` contract on a local Hardhat network:\n\n```bash\nnpx hardhat ignition deploy ignition/modules/deploy.ts --network localhost\n```\n\n### Example Script for Deploying Contracts Using the Factory\n\nBelow is a sample script to deploy a contract via the `Create3Factory`:\n\n```javascript\nconst { ethers } = require(\"hardhat\");\n\nasync function main() {\n  const Create3Factory = await ethers.getContractFactory(\"Create3Factory\");\n  const factory = await Create3Factory.deploy();\n  await factory.deployed();\n\n  console.log(\"Create3Factory deployed to:\", factory.address);\n\n  const salt = ethers.utils.formatBytes32String(\"mySalt\");\n  const bytecode = \"0x6080604052348015600f57600080fd5b5060...\"; // Replace with actual bytecode\n\n  const tx = await factory.create(salt, bytecode);\n  await tx.wait();\n\n  const deployedAddress = await factory.addressOf(salt);\n  console.log(\"Deployed contract at deterministic address:\", deployedAddress);\n}\n\nmain().catch((error) =\u003e {\n  console.error(error);\n  process.exitCode = 1;\n});\n```\n\n\n## Deployment\n\n### Configure Networks\n\nUpdate the `hardhat.config.ts` file with your desired network details:\n\n```javascript\nmodule.exports = {\n  networks: {\n    rinkeby: {\n      url: \"https://rinkeby.infura.io/v3/YOUR_INFURA_PROJECT_ID\",\n      accounts: [\"YOUR_PRIVATE_KEY\"],\n    },\n  },\n};\n```\n\u003e Replace placeholders (`YOUR_INFURA_PROJECT_ID`, `YOUR_PRIVATE_KEY`) with actual values.\n\n### Deploy on a Live Network\n\nDeploy the `Create3Factory` to a testnet or mainnet:\n\n```bash\nnpx hardhat ignition deploy ignition/modules/deploy.ts --network rinkeby\n```\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n---\n\n## Acknowledgments\n\n- Utilizes the `CREATE3` opcode for deterministic and secure deployments.\n- Built with [Hardhat](https://hardhat.org/).\n- Inspired by modern Solidity development practices and OpenZeppelin libraries.\n\nFeel free to fork, contribute, or suggest improvements!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xzothio%2Fcreate3-factory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xzothio%2Fcreate3-factory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xzothio%2Fcreate3-factory/lists"}