forked from summa-dev/summa-solvency
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor backend by following internal audit comments (summa-dev#173)
* feat: create bash script for updating verifier interface files in backend * fix: error propagation with try operator; remove unnecessaries * refactor: changed data type in 'MstInclusionProof' * fix: generate solvency verifier contract * chore: remove left over * chore: update README * fix: remove left over; assert term * fix: update README; small fixes * feat: Signer accepts address or file path for init
- Loading branch information
Showing
14 changed files
with
217 additions
and
192 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
# will have compiled files and executables | ||
/target | ||
.env | ||
*_proof.json |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Build the verifier contracts | ||
echo "1. Building verifier contracts" | ||
cd ../zk_prover | ||
cargo run --release --example gen_inclusion_verifier | ||
cargo run --release --example gen_solvency_verifier | ||
|
||
# Deploy contracts to local environment | ||
echo "2. Deploying contracts to local environment" | ||
cd ../contracts | ||
npm install | ||
npx hardhat node & | ||
HARDHAT_PID=$! | ||
sleep 5 | ||
npx hardhat run scripts/deploy.ts --network localhost | ||
|
||
# Generate interface files for Backend | ||
echo "3. Generating interface files for Backend" | ||
cd ../backend | ||
cargo build | ||
|
||
# Wrap up | ||
echo "Terminate hardhat node" | ||
kill $HARDHAT_PID |
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
Oops, something went wrong.