{"id":13570788,"url":"https://github.com/weijiekoh/zknftmint","last_synced_at":"2025-04-12T19:35:58.328Z","repository":{"id":41501427,"uuid":"434020874","full_name":"weijiekoh/zknftmint","owner":"weijiekoh","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-22T14:59:40.000Z","size":1804,"stargazers_count":48,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T13:53:47.201Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","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/weijiekoh.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}},"created_at":"2021-12-01T23:41:49.000Z","updated_at":"2024-08-03T09:22:34.000Z","dependencies_parsed_at":"2024-01-07T06:16:43.505Z","dependency_job_id":"1b8b3a50-dec5-445e-9dba-ffaa90e1b419","html_url":"https://github.com/weijiekoh/zknftmint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weijiekoh%2Fzknftmint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weijiekoh%2Fzknftmint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weijiekoh%2Fzknftmint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weijiekoh%2Fzknftmint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weijiekoh","download_url":"https://codeload.github.com/weijiekoh/zknftmint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248623130,"owners_count":21135188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-08-01T14:00:54.986Z","updated_at":"2025-04-12T19:35:58.302Z","avatar_url":"https://github.com/weijiekoh.png","language":"Solidity","funding_links":[],"categories":["Applications","Projects"],"sub_categories":["Tokens / NFT","Zk-Applications"],"readme":"# Mint an NFT if you know a secret\n\nDeveloped for 0xPARC.\n\nContract on Goerli: [`0xc4490d6407f81378c8d3620eA11092B2FC429Df2`](https://goerli.etherscan.io/address/0xc4490d6407f81378c8d3620eA11092B2FC429Df2)\n\n## Getting started\n\nClone this repository and install dependencies:\n\n```bash\ngit clone git@github.com:weijiekoh/zknftmint.git\ncd zknftmint\nnpm i\nnpm run bootstrap\n```\n\nYou may need to manually install dependencies for `zkey-manager` by following instructions [here](https://github.com/privacy-scaling-explorations/zkey-manager#requirements).\n\nIn a separate terminal, run a HTTP server in `web/zkeys`:\n\n```bash\ncd web/zkeys\nnpx http-server --cors -p 8000\n```\n\nIn another terminal, run the web application:\n\n```bash\ncd web\nnpm run serve\n```\n\nGet Goerli ETH: https://faucet.paradigm.xyz/\n\nTo generate a proof and nullifier, first navigate to:\n\nhttp://127.0.0.1:1234\n\nNext, paste your ETH address from Metamask and enter the secret (currently\nhardcoded to `1234`). Click \"Create proof\".\n\nNavigate to the Write Contract page for the NftMint contract on Etherscan,\nclick on \"Connect to Web3\", and select `mintWithProof`. Copy and paste the\nnullifier and the proof, and click \"Write\".\n\nhttps://goerli.etherscan.io/address/0xc4490d6407f81378c8d3620eA11092B2FC429Df2#writeContract\n\nIf the proof is valid and you have not previously used this address to mint an\nNFT on this contract, the transaction will execute and mint an NFT to your\naddress.\n\n## Development\n\nTo install NPM dependencies, run this in the project's root directory:\n\n```\nnpm i \u0026\u0026 npm run bootstrap\n```\n\nTo compile the Typescript code for tests, run:\n\n```\nnpm run build\n```\n\nTo compile the circuits, generate its zkey file, and export its verification\nkey for off-chain proof verification:\n\n```\ncd circuits\nnpx zkey-manager compile -c ./zkeys.config.yml\nnpx zkey-manager downloadPtau -c ./zkeys.config.yml\nnpx zkey-manager genZkeys -c ./zkeys.config.yml\nnpx snarkjs zkev ./NftMint__prod.0.zkey ./zkeys/verification_key.json\nnode build/exportVerifier.js ./zkeys/NftMint__prod.0.zkey ../contracts/contracts/verifier.sol\n```\n\nNote that no phase 2 trusted setup is performed, so do not use this in\nproduction unless you perform one.\n\nNext, compile the contracts:\n\n```\ncd ../contracts\nnpm run compileSol\n```\n\nDeploy the contracts to a testnet:\n\n```bash\nnpx hardhat run build/deploy.js --network goerli\n```\n\nVerify the contracts on Etherscan:\n\n1. Update `contracts/hardhat.config.js` with your Etherscan API key.\n2. Run:\n\n```bash\nnpx hardhat verify --network goerli \u003cNftMint address\u003e \"\u003cverifier address\u003e\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweijiekoh%2Fzknftmint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweijiekoh%2Fzknftmint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweijiekoh%2Fzknftmint/lists"}