|
3 | 3 | ## Requirements |
4 | 4 |
|
5 | 5 | 1. [Rust](https://www.rust-lang.org/tools/install) |
6 | | -2. [Python](https://www.python.org/downloads/) |
7 | | -3. [Aligned](https://github.com/yetanotherco/aligned_layer) |
8 | | -4. [Foundry](https://getfoundry.sh) |
| 6 | +2. [Foundry](https://getfoundry.sh) |
9 | 7 |
|
10 | 8 | ## Usage |
11 | 9 |
|
12 | | -First, install dependencies by running: |
13 | | -```bash |
14 | | -make deps |
15 | | -``` |
16 | | -This will create a virtual environment and install python dependencies. |
| 10 | +### 1 - Create Keystore |
| 11 | + |
| 12 | +You can use cast to create a local keystore. |
| 13 | +If you already have one you can skip this step. |
17 | 14 |
|
18 | | -To answer quiz and generate proof run: |
19 | 15 | ```bash |
20 | | -make answer_quiz |
| 16 | +cast wallet new-mnemonic |
21 | 17 | ``` |
22 | 18 |
|
23 | | -This will ask questions and generate a proof if you answer correctly. |
| 19 | +Then you can import your created keystore using: |
24 | 20 |
|
25 | | -To submit the proof to aligned for verification run: |
26 | 21 | ```bash |
27 | | -make submit_proof ADDRESS=<your_address> |
| 22 | +cast wallet import --interactive <path_to_keystore.json> |
28 | 23 | ``` |
29 | 24 |
|
30 | | -Make sure to use your own address as this is the address that will receive the reward. |
| 25 | +Then you need to obtain some funds to pay for gas and proof verification. |
| 26 | +You can do this by using this [faucet](https://cloud.google.com/application/web3/faucet/ethereum/holesky) |
31 | 27 |
|
32 | | -Head to [Aligned Explorer](https://explorer.alignedlayer.com/batches) and wait for the batch to be verified. |
| 28 | +### 2 - Answer Quiz |
| 29 | + |
| 30 | +To answer quiz questions run: |
33 | 31 |
|
34 | | -Then to verify the proof was verified on aligned, and mint your nft run: |
35 | 32 | ```bash |
36 | | -make verify_and_get_reward VERIFICATION_DATA=<path_to_aligned_verification_data> PRIVATE_KEY=<your_private_key> |
| 33 | +make answer_quiz KEYSTORE_PATH=<path_to_keystore.json> |
37 | 34 | ``` |
38 | | -Note that the path to your proof verification data will be printed out when you submit the proof. |
39 | 35 |
|
40 | | -This will verify the proof and mint your nft. |
41 | | -You can check your nft on the [Chainlens Explorer](https://holesky.chainlens.com/nfts/0x8dB9e6f1393c3486F30181d606312ec632189621). |
| 36 | +This will: |
| 37 | + |
| 38 | +1. Ask quiz questions |
| 39 | +2. Generate ZK proof |
| 40 | +3. Pay & submit proof to aligned for verification |
| 41 | +4. Wait for proof to be verified in aligned |
| 42 | +5. Claim NFT if proof is verified |
0 commit comments