From 2667feb4f1cc3ea2b0c201a00215622dc2c53bca Mon Sep 17 00:00:00 2001 From: poma Date: Thu, 18 Feb 2021 20:48:39 +0300 Subject: [PATCH] add mock deploy script --- hardhat.config.js | 3 + scripts/buildCircuit.sh | 2 +- scripts/deployEmptyV1.js | 115 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 scripts/deployEmptyV1.js diff --git a/hardhat.config.js b/hardhat.config.js index b177477..4866a99 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -31,6 +31,9 @@ const config = { hardhat: { blockGasLimit: 9500000, }, + node: { + url: 'http://localhost:8545', + }, }, mocha: { timeout: 600000, diff --git a/scripts/buildCircuit.sh b/scripts/buildCircuit.sh index 67316d3..acea678 100755 --- a/scripts/buildCircuit.sh +++ b/scripts/buildCircuit.sh @@ -3,7 +3,7 @@ mkdir -p artifacts/circuits if [ "$2" = "large" ]; then npx circom -v -f -r artifacts/circuits/$1.r1cs -c artifacts/circuits/$1.cpp -s artifacts/circuits/$1.sym circuits/$1.circom else - npx circom -v -r artifacts/circuits/$1.r1cs -w artifacts/circuits/$1.wasm -s artifacts/circuits/$1.sym circuits/$1.circom + npx circom -v -r artifacts/circuits/$1.r1cs -w artifacts/circuits/$1.wasm -s artifacts/circuits/$1.sym circuits/$1.circom fi zkutil setup -c artifacts/circuits/$1.r1cs -p artifacts/circuits/$1.params zkutil generate-verifier -p artifacts/circuits/$1.params -v artifacts/circuits/${1}Verifier.sol diff --git a/scripts/deployEmptyV1.js b/scripts/deployEmptyV1.js new file mode 100644 index 0000000..c993aef --- /dev/null +++ b/scripts/deployEmptyV1.js @@ -0,0 +1,115 @@ +// We require the Hardhat Runtime Environment explicitly here. This is optional +// but useful for running the script in a standalone fashion through `node