-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored backend for updated v2 contracts (#270)
- Loading branch information
Showing
22 changed files
with
36,637 additions
and
59,369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,23 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Build the verifier contracts | ||
# Build the verifier contract | ||
echo "1. Building verifier contracts" | ||
cd ../zk_prover | ||
cargo run --release --example gen_inclusion_verifier | ||
cd ../kzg_prover | ||
cargo run --release --bin generate_verifier | ||
|
||
# Generate Commitment for Merkle Sum Tree | ||
echo "2. Generate Commitment for Merkle Sum Tree" | ||
cd ../zk_prover | ||
cargo run --release --example gen_commitment | ||
# Generate Commitment and Proofs for Encoded Polynomials | ||
echo "2. Generate Commitment and Proofs for Encoded Polynomials" | ||
cd ../kzg_prover | ||
cargo run --release --bin generate_commitment_and_proofs | ||
|
||
# Deploy contracts to local environment | ||
echo "3. Deploying contracts to local environment" | ||
cd ../contracts | ||
npm install | ||
npx hardhat node & | ||
HARDHAT_PID=$! | ||
sleep 5 | ||
npx hardhat run scripts/deploy.ts --network localhost | ||
npx hardhat run scripts/deploy.ts | ||
|
||
# Generate interface files for Backend | ||
echo "4. Generating interface files for Backend" | ||
cd ../backend | ||
cargo build | ||
|
||
# Wrap up | ||
echo "Terminate hardhat node" | ||
kill $HARDHAT_PID |
Oops, something went wrong.