2021-03-29 10:57:37 +03:00
|
|
|
# leo new hello-world
|
|
|
|
|
2021-03-29 11:36:16 +03:00
|
|
|
cd ./project/examples/pedersen-hash
|
2021-03-29 10:57:37 +03:00
|
|
|
|
2021-03-29 11:59:19 +03:00
|
|
|
export PEDERSEN_HASH_CONSTRAINTS=1539
|
2021-03-29 10:57:37 +03:00
|
|
|
|
|
|
|
# 1. build
|
|
|
|
# 2. find lines with constraint number
|
2021-03-29 11:59:19 +03:00
|
|
|
# 3. find lines with $PEDERSEN_HASH_CONSTRAINTS
|
2021-03-29 10:57:37 +03:00
|
|
|
# 4. count lines
|
|
|
|
# 4.Er if result is 0 -> constraint number changed
|
|
|
|
# 4.Ok if result is 1 -> all good
|
|
|
|
|
2021-03-29 11:59:19 +03:00
|
|
|
[[ $($LEO build | grep "Number of constraints" | grep $PEDERSEN_HASH_CONSTRAINTS | wc -l) -eq 1 ]] || {
|
2021-03-29 10:57:37 +03:00
|
|
|
echo >&2 "Number of constraints for Pedersen Hash is not $PEDERSEN_HASH_CONSTRAINTS";
|
|
|
|
exit 1;
|
|
|
|
}
|