-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerateInput.sh
executable file
·27 lines (20 loc) · 1013 Bytes
/
generateInput.sh
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
#!/usr/bin/env bash
THE_USER=0x70997970C51812dc3A010C7d01b50e0d17dc79C8
# The first 5 addresses provided by anvil.
cat > out/users.txt <<EOF
0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
0x70997970c51812dc3a010c7d01b50e0d17dc79c8
0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc
0x90f79bf6eb2c4f870365e785982e1f101e93b906
0x15d34aaf54267db7d7c367839aaf71a00a2c6a65
EOF
echo "10" > out/secret.txt
# poseidon([0x70997970C51812dc3A010C7d01b50e0d17dc79C8, 10]) =
# 8502362473658640414873713381050276460620521516218748063951008744513842771979
cat > out/questions.txt <<EOF
10385078245495808745380294672782154280817051389343302273965536978408766671972
8502362473658640414873713381050276460620521516218748063951008744513842771979
585476706091359014211559510002068658301642325152075384954322696282008652556
EOF
time npx tsc --outDir out src/GenerateInput.ts && node out/GenerateInput.js ${THE_USER} out/secret.txt out/users.txt out/questions.txt | tee out/GenerateInput.txt
tail -n 1 out/GenerateInput.txt > out/input.json