Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.
pragma solidity >=0.8.27;

import {RiscZeroGroth16Verifier as RiscZero} from "risc0/groth16/RiscZeroGroth16Verifier.sol";
import {ControlID} from "risc0/groth16/ControlID.sol";

contract RiscZeroGroth16Verifier is RiscZero {
constructor() RiscZero(
ControlID.CONTROL_ROOT,
ControlID.BN254_CONTROL_ID
) {}
}
54 changes: 0 additions & 54 deletions examples/CRISP/packages/crisp-contracts/deploy/Deploy.s.sol

This file was deleted.

45 changes: 11 additions & 34 deletions examples/CRISP/packages/crisp-contracts/deploy/crisp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,40 +107,17 @@ export const deployVerifier = async (useMockVerifier: boolean): Promise<string>
return existingVerifier.address;
}

// use forge to deploy while we work on a way to have hardhat deploy from git submodules artifacts
// Deploy using Foundry
const rpcUrl = chain === "default" || "localhost" ? "http://localhost:8545" : process.env.RPC_URL!;
try {
// Run forge script
const command = `forge script deploy/Deploy.s.sol --rpc-url ${rpcUrl} --broadcast`;

const output = execSync(command, {
encoding: "utf-8",
env: {
...process.env,
},
});

// Parse the output to get the deployed address
// Looking for: "Deployed RiscZeroGroth16Verifier to 0x..."
const match = output.match(/Deployed RiscZeroGroth16Verifier to (0x[a-fA-F0-9]{40})/);

if (!match) {
console.error("Forge output:", output);
throw new Error("Could not parse deployed address from forge output");
}

const address = match[1];

storeDeploymentArgs({
address,
}, "RiscZeroGroth16Verifier", chain);

return address;
} catch (error) {
console.error("Failed to deploy with Foundry:", error);
throw error;
}
const verifierFactory = await ethers.getContractFactory("RiscZeroGroth16Verifier");
const verifier = await verifierFactory.deploy();
await verifier.waitForDeployment();

const address = await verifier.getAddress();

storeDeploymentArgs({
address,
}, "RiscZeroGroth16Verifier", chain);

return address;
}

// Check if mock verifier already deployed
Expand Down
12 changes: 0 additions & 12 deletions examples/CRISP/packages/crisp-contracts/foundry.toml

This file was deleted.

4 changes: 1 addition & 3 deletions examples/CRISP/packages/crisp-contracts/remappings.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
forge-std/=lib/risc0-ethereum/lib/forge-std/src/
risc0/=lib/risc0-ethereum/contracts/src/
@enclave-e3/contracts/=node_modules/@enclave-e3/contracts/
@excubiae/contracts/=node_modules/@excubiae/contracts/
solady/=node_modules/solady/
@zk-kit/lean-imt.sol=node_modules/@zk-kit/lean-imt.sol
poseidon-solidity/=node_modules/poseidon-solidity/
@openzeppelin/=lib/risc0-ethereum/lib/openzeppelin-contracts/
openzeppelin/=lib/risc0-ethereum/lib/openzeppelin-contracts/
@openzeppelin/=node_modules/@openzeppelin/
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading