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
1 change: 1 addition & 0 deletions crates/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"license": "LGPL-3.0-only",
"packageManager": "pnpm@10.7.1+sha512.2d92c86b7928dc8284f53494fb4201f983da65f0fb4f0d40baafa5cf628fa31dae3e5968f12466f17df7e97310e30f343a648baea1b9b350685dafafffdf5808",
"devDependencies": {
"wasm-pack": "^0.13.1",
"execa": "^8.0.1",
"replace-in-file": "^7.2.0"
}
Expand Down
1 change: 1 addition & 0 deletions examples/CRISP/client/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
link-workspace-packages=true
1 change: 0 additions & 1 deletion examples/CRISP/client/libs/noir/crisp_circuit.json

This file was deleted.

3 changes: 3 additions & 0 deletions examples/CRISP/client/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"installCommand": "pnpm install --no-link-workspace-packages --no-lockfile"
}
2 changes: 1 addition & 1 deletion examples/CRISP/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test": "pnpm test:e2e",
"test:circuits:inputs": "node --test test/governanceCircuit.test.ts",
"test:circuits": "cd circuits && nargo test",
"compile:circuit": "cd circuits && nargo compile",
"compile:circuit": "bash ./scripts/compile_circuits.sh",
Comment thread
ctrlc03 marked this conversation as resolved.
"test:sdk": "cd sdk && pnpm test",
"release:sdk": "cd sdk && pnpm release",
"report": "playwright show-report",
Expand Down
5 changes: 3 additions & 2 deletions examples/CRISP/packages/crisp-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
"types": "./dist/index.d.ts",
"homepage": "https://github.com/gnosisguild/enclave",
"scripts": {
"compile:circuit": "cd ../../circuits && nargo compile",
"build:wasm": "pnpm -C ../crisp-zk-inputs build",
"build": "pnpm build:wasm && tsup",
"test": "pnpm build:wasm && vitest --run",
"build": "pnpm build:wasm && pnpm compile:circuit && tsup",
"test": "pnpm build:wasm && pnpm compile:circuit && vitest --run",
"prettier:fix": "pnpm prettier --write .",
"prettier:check": "pnpm prettier --check .",
"release": "pnpm build && pnpm publish --access public"
Expand Down
6 changes: 3 additions & 3 deletions examples/CRISP/packages/crisp-zk-inputs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"access": "public"
},
"scripts": {
"compile:circuit": "pnpm -C ../../ compile:circuit",
"build": "rm -rf dist && pnpm compile:circuit && node scripts/build.js"
"build": "rm -rf dist && node scripts/build.js"
},
"devDependencies": {
"execa": "^8.0.1",
"replace-in-file": "^7.2.0"
"replace-in-file": "^7.2.0",
"wasm-pack": "^0.13.1"
}
}
26 changes: 15 additions & 11 deletions examples/CRISP/scripts/compile_circuits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ if ! (cd circuits && nargo compile); then
exit 1
fi

# Create the public circuits directory
echo "Creating public circuits directory..."
mkdir -p client/libs/noir

# Copy the compiled artifacts
echo "Copying circuit artifacts..."
if ! cp -r circuits/target/* client/libs/noir/; then
echo "Error: Failed to copy circuit artifacts"
exit 1
fi

# Generate the Verifier
echo "Generating Verifier Key..."
if ! bb write_vk -b circuits/target/*.json -o circuits/target --oracle_hash keccak; then
Expand All @@ -42,4 +31,19 @@ if ! cp circuits/target/CRISPVerifier.sol packages/crisp-contracts/contracts/CRI
exit 1
fi

# Add the correct license header
echo "Adding license header to CRISPVerifier.sol..."
LICENSE_HEADER="// 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."
# Remove the first 2 lines (Apache license and copyright) and prepend our license header
TEMP_FILE=$(mktemp)
{
echo "$LICENSE_HEADER"
tail -n +3 packages/crisp-contracts/contracts/CRISPVerifier.sol
} > "$TEMP_FILE"
mv "$TEMP_FILE" packages/crisp-contracts/contracts/CRISPVerifier.sol

echo "Noir setup completed successfully"
Loading
Loading