{"id":40779781,"url":"https://github.com/olehmisar/hardhat-noir","last_synced_at":"2026-01-21T19:17:00.285Z","repository":{"id":259243774,"uuid":"877461504","full_name":"olehmisar/hardhat-noir","owner":"olehmisar","description":"Develop Noir with Hardhat without hassle.","archived":false,"fork":false,"pushed_at":"2025-10-10T13:23:03.000Z","size":228,"stargazers_count":10,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T22:46:41.606Z","etag":null,"topics":["aztec","hardhat","noir-lang","zero-knowledge"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/hardhat-plugin-noir","language":"TypeScript","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/olehmisar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2024-10-23T17:30:56.000Z","updated_at":"2025-10-17T05:31:18.000Z","dependencies_parsed_at":"2025-02-06T00:22:03.486Z","dependency_job_id":"d55f91dc-5fc0-4b62-b292-3a1f0d8a72d7","html_url":"https://github.com/olehmisar/hardhat-noir","commit_stats":null,"previous_names":["olehmisar/hardhat-noir"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/olehmisar/hardhat-noir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olehmisar%2Fhardhat-noir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olehmisar%2Fhardhat-noir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olehmisar%2Fhardhat-noir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olehmisar%2Fhardhat-noir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olehmisar","download_url":"https://codeload.github.com/olehmisar/hardhat-noir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olehmisar%2Fhardhat-noir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28640774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T18:04:35.752Z","status":"ssl_error","status_checked_at":"2026-01-21T18:03:55.054Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["aztec","hardhat","noir-lang","zero-knowledge"],"created_at":"2026-01-21T19:17:00.153Z","updated_at":"2026-01-21T19:17:00.277Z","avatar_url":"https://github.com/olehmisar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"right\" width=\"150\" height=\"150\" top=\"100\" src=\"./assets/banner.jpg\"\u003e\n\n# Hardhat Noir\n\nDevelop [Noir](https://noir-lang.org) with [Hardhat](https://hardhat.org) without hassle.\n\n[Use a boilerplate](https://github.com/olehmisar/hardhat-noir-starter) to get started.\n\n## What\n\nWrite programs in Noir, generate Solidity verifiers and run tests.\n\nThis plugin automatically manages `nargo` and `bb` versions and compiles Noir on demand.\n\n## Installation\n\nInstall the plugin and Noir dependencies:\n\n```bash\nnpm install hardhat-noir @noir-lang/noir_js@1.0.0-beta.11 @aztec/bb.js@1.2.0\n```\n\nImport the plugin in your `hardhat.config.ts`:\n\n```ts\nimport \"hardhat-noir\";\n```\n\nSpecify the Noir version in your Hardhat config:\n\n```ts\nconst config: HardhatUserConfig = {\n  solidity: {\n    version: \"0.8.27\",\n    // enable optimizer to deploy Solidity verifier contracts\n    settings: { optimizer: { enabled: true, runs: 100000000 } },\n  },\n  noir: {\n    version: \"1.0.0-beta.11\",\n  },\n};\n```\n\n## Usage\n\nTo get started, create a Noir circuit in `noir` folder:\n\n```bash\nnpx hardhat noir-new my_noir\n```\n\nIt will create `noir/my_noir` folder with the following `src/main.nr`:\n\n```rs\nfn main(x: Field, y: pub Field) {\n    assert(x != y);\n}\n```\n\nThis circuit will prove that the private input `x` is not equal to the public input `y` using a zero-knowledge proof.\n\nCompile Noir(it will also generate a Solidity verifier):\n\n```bash\nnpx hardhat compile\n```\n\nUse the verifier contract in Solidity:\n\n```solidity\n// contracts/MyContract.sol\nimport {HonkVerifier} from \"../noir/target/my_noir.sol\";\n\ncontract MyContract {\n    HonkVerifier public verifier = new HonkVerifier();\n\n    function verify(bytes calldata proof, uint256 y) external view returns (bool) {\n        bytes32[] memory publicInputs = new bytes32[](1);\n        publicInputs[0] = bytes32(y);\n        bool result = verifier.verify(proof, publicInputs);\n        return result;\n    }\n}\n```\n\nGenerate a proof in TypeScript and verify it on chain:\n\n```js\n// test/MyContract.test.ts\nimport { expect } from \"chai\";\nimport hre, { ethers } from \"hardhat\";\n\nit(\"proves and verifies on-chain\", async () =\u003e {\n  // Deploy a verifier contract\n  const contractFactory = await ethers.getContractFactory(\"MyContract\");\n  const contract = await contractFactory.deploy();\n  await contract.waitForDeployment();\n\n  // Generate a proof\n  const { noir, backend } = await hre.noir.getCircuit(\"my_noir\");\n  const input = { x: 1, y: 2 };\n  const { witness } = await noir.execute(input);\n  const { proof, publicInputs } = await backend.generateProof(witness, {\n    keccak: true,\n  });\n  // it matches because we marked y as `pub` in `main.nr`\n  expect(BigInt(publicInputs[0])).to.eq(BigInt(input.y));\n\n  // Verify the proof on-chain\n  // slice the proof to remove length information\n  const result = await contract.verify(proof, input.y);\n  expect(result).to.eq(true);\n\n  // You can also verify in JavaScript.\n  const resultJs = await backend.verifyProof(\n    {\n      proof,\n      publicInputs: [String(input.y)],\n    },\n    { keccak: true },\n  );\n  expect(resultJs).to.eq(true);\n});\n```\n\n## Tasks\n\nThis plugin creates no additional tasks. Run `hardhat compile` to compile Noir.\n\n\u003c!-- This plugin adds the _example_ task to Hardhat:\n\n```\noutput of `npx hardhat help example`\n``` --\u003e\n\n## Environment extensions\n\nThis plugin extends the Hardhat Runtime Environment by adding a `noir` field.\n\nYou can call `hre.noir.getCircuit(name, backendClass)` to get a compiled circuit JSON.\n\n## Configuration\n\nConfigure Noir and Barretenberg (bb) versions in `hardhat.config.ts`:\n\n```js\nexport default {\n  noir: {\n    // Noir version, optional, will use the latest known Noir version by default\n    version: \"1.0.0-beta.11\",\n  },\n};\n```\n\nThe default folder where Noir is located is `noir`. You can change it in `hardhat.config.js`:\n\n```js\nexport default {\n  paths: {\n    noir: \"circuits\",\n  },\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folehmisar%2Fhardhat-noir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folehmisar%2Fhardhat-noir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folehmisar%2Fhardhat-noir/lists"}