-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add scripts for testing (#2890)
Co-authored-by: Tom French <tom@tomfren.ch> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
- Loading branch information
1 parent
6a2cd78
commit 5e43bb6
Showing
6 changed files
with
68 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
foundry-project |
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,18 @@ | ||
#!/bin/bash | ||
|
||
self_path=$(dirname "$(readlink -f "$0")") | ||
|
||
repo_root=$self_path/../../.. | ||
|
||
# Run codegen-verifier for 1_mul | ||
mul_dir=$repo_root/tooling/nargo_cli/tests/execution_success/1_mul | ||
nargo --program-dir $mul_dir codegen-verifier | ||
|
||
# Run codegen-verifier for main | ||
main_dir=$repo_root/compiler/integration-tests/test/circuits/main | ||
nargo --program-dir $main_dir codegen-verifier | ||
|
||
# Copy compiled contracts from the root of compiler/integration-tests | ||
src_dir=$self_path/../foundry-project/src | ||
cp $mul_dir/contract/1_mul/plonk_vk.sol $src_dir/1_mul.sol | ||
cp $main_dir/contract/main/plonk_vk.sol $src_dir/main.sol |
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,23 @@ | ||
#!/bin/bash | ||
|
||
self_path=$(dirname "$(readlink -f "$0")") | ||
cd $self_path/../foundry-project | ||
|
||
forge build | ||
|
||
CI=${CI:-false} | ||
if [[ $CI = true ]]; then | ||
anvil > /dev/null 2>&1 & | ||
else | ||
anvil & | ||
pid=$! | ||
fi | ||
|
||
sleep 10 | ||
|
||
forge create --rpc-url http://127.0.0.1:8545 --mnemonic "test test test test test test test test test test test junk" src/1_mul.sol:UltraVerifier --json > mul_output.json | ||
forge create --rpc-url http://127.0.0.1:8545 --mnemonic "test test test test test test test test test test test junk" src/main.sol:UltraVerifier --json > main_output.json | ||
|
||
if [[ $CI = false ]]; then | ||
wait $pid | ||
fi |
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,13 @@ | ||
#!/bin/bash | ||
|
||
self_path=$(dirname "$(readlink -f "$0")") | ||
|
||
project_path=$self_path/../foundry-project | ||
|
||
# Create forge project | ||
forge init --no-git --no-commit --no-deps --force $project_path | ||
|
||
# Remove unwanted files | ||
rm -rf $project_path/script | ||
rm -rf $project_path/src/*.sol | ||
rm -rf $project_path/test |
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,7 @@ | ||
#!/bin/bash | ||
|
||
self_path=$(dirname "$(readlink -f "$0")") | ||
|
||
bash $self_path/forge-init.sh | ||
bash $self_path/codegen-verifiers.sh | ||
bash $self_path/deploy-verifiers.sh |