-
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.
Refactor the contract according to V1 consolidation spec (#178)
* chore: add audit comments (#168) * Refactor backend by following internal audit comments (#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 * Refactor contract according to V1 consolidation spec (#169) * Refactor smart contract * Update smart contract module readme --------- Co-authored-by: JinHwan <[email protected]>
- Loading branch information
Showing
20 changed files
with
406 additions
and
1,797 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.