-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (64 loc) · 2.46 KB
/
Copy pathMakefile
File metadata and controls
83 lines (64 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
install-bun:
curl -fsSL https://bun.sh/install | bash
install-noir:
curl -L https://raw.githubusercontent.com/noir-lang/noirup/refs/heads/main/install | bash
noirup --version 1.0.0-beta.16
install-barretenberg:
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/master/barretenberg/bbup/install | bash
bbup --version 3.0.0-nightly.20251104
install-starknet:
curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.dev | sh
install-devnet:
asdf plugin add starknet-devnet
asdf install starknet-devnet 0.6.1
install-garaga:
pip install garaga==1.0.1
install-app-deps:
cd app && bun install
update-tools:
asdf install starknet-devnet
asdf install starknet-foundry
asdf install scarb
devnet:
starknet-devnet --accounts=2 --seed=0 --initial-balance=100000000000000000000000
accounts-file:
curl -s -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":"1","method":"devnet_getPredeployedAccounts"}' http://127.0.0.1:5050/ \
| jq '{"alpha-sepolia": {"devnet0": {\
address: .result[0].address, \
private_key: .result[0].private_key, \
public_key: .result[0].public_key, \
class_hash: "0xe2eb8f5672af4e6a4e8a8f1b44989685e668489b0a25437733756c5a34a1d6", \
deployed: true, \
legacy: false, \
salt: "0x14", \
type: "open_zeppelin"\
}}}' > ./contracts/accounts.json
build-circuit:
cd circuit && nargo build
exec-circuit:
cd circuit && nargo execute witness
prove-circuit:
bb prove --scheme ultra_honk \
--oracle_hash keccak \
-b ./circuit/target/circuit.json \
-w ./circuit/target/witness.gz \
-k ./circuit/target/vk \
-o ./circuit/target
gen-vk:
bb write_vk --scheme ultra_honk --oracle_hash keccak -b ./circuit/target/circuit.json -o ./circuit/target
gen-verifier:
cd contracts && garaga gen --system ultra_keccak_zk_honk --vk ../circuit/target/vk --project-name verifier
build-verifier:
cd contracts/verifier && scarb build
declare-verifier:
cd contracts && sncast declare --contract-name UltraKeccakZKHonkVerifier
deploy-verifier:
# TODO: use class hash from the result of the `make declare-verifier` step
cd contracts && sncast deploy --salt 0x00 --class-hash 0xf0b231261db9afa4c7fdbb25ec4917043933383ee394d44fbe496d8b083ef
artifacts:
cp ./circuit/target/circuit.json ./app/src/assets/circuit.json
cp ./circuit/target/vk ./app/src/assets/vk.bin
cp ./contracts/target/release/verifier_UltraKeccakZKHonkVerifier.contract_class.json ./app/src/assets/verifier.json
run-app:
cd app && bun run dev