Skip to content

Commit

Permalink
fix(docs): Update private voting tutorial cli commands (AztecProtocol…
Browse files Browse the repository at this point in the history
…#4472)

update the artifact name
  • Loading branch information
critesjosh committed Feb 7, 2024
1 parent d101d2a commit 82c2365
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ aztec-cli codegen target -o src/artifacts --ts
Once it is compiled you can [deploy](../contracts/deploying.md) it to the sandbox. Ensure your [sandbox is running](../cli/sandbox-reference.md) and run this in the same dir as before:

```bash
aztec-cli deploy ./target/Voting.json --args $ADMIN_ADDRESS
aztec-cli deploy ./target/private_voting-Voting.json --args $ADMIN_ADDRESS
```

The constructor takes an address as an argument to set the admin, so you can use an address that is deployed with the sandbox - check the sandbox terminal or run `aztec-cli get-accounts`.
Expand All @@ -200,7 +200,7 @@ You should see a success message with the contract address. Now we can start cal
Cast a vote like this:

```bash
aztec-cli send cast_vote --contract-artifact ./target/Voting.json --contract-address $CONTRACT_ADDRESS --args 1 --private-key $PRIVATE_KEY
aztec-cli send cast_vote --contract-artifact ./target/private_voting-Voting.json --contract-address $CONTRACT_ADDRESS --args 1 --private-key $PRIVATE_KEY
```

You can get the contract address from the sandbox terminal or the message printed when you deployed the contract. You can also get a private key from the sandbox terminal, or generate one with `aztec-cli generate-private-key`.
Expand All @@ -212,7 +212,7 @@ You can now try running this command again to ensure our nullifier works.
Get the number of votes like this:

```bash
aztec-cli call get_vote --contract-artifact ./target/Voting.json --contract-address $CONTRACT_ADDRESS --args 1
aztec-cli call get_vote --contract-artifact ./target/private_voting-Voting.json --contract-address $CONTRACT_ADDRESS --args 1
```

This should return `1n`.
Expand Down

0 comments on commit 82c2365

Please sign in to comment.