You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-20Lines changed: 13 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,15 @@ This is an example web app that demonstrates how to interact with an Aztec contr
10
10
11
11
1. Install the Aztec tools from the first few steps in [Quick Start Guide](https://docs.aztec.network/developers/getting_started).
12
12
13
-
Please note that this project uses `0.87.2` version of Aztec SDK. If you wish to use a different version, please update the dependencies in the `app/package.json` and in `contracts/Nargo.toml` file to match your version.
13
+
Please note that this project uses `latest` version of Aztec SDK. If you wish to use a different version, please update the dependencies in the `app/package.json` and in `contracts/Nargo.toml` file to match your version.
14
14
15
-
Alternatively, you can install `0.87.2`version of Aztec tools by running the below commands:
15
+
You can install a specific version of Aztec tools by running `aztec-up 0.X.X`
16
16
17
-
```sh
18
-
aztec-up 0.87.2
19
-
aztec start --sandbox
20
-
```
21
17
22
18
2. Compile smart contracts in `/contracts`:
23
19
24
20
```sh
25
-
(cd contracts && ./build.sh)
21
+
yarn build-contracts
26
22
```
27
23
28
24
The build script compiles the contract and generates the artifacts.
@@ -32,19 +28,20 @@ The build script compiles the contract and generates the artifacts.
32
28
Run the JS deploy script to deploy the contracts (NodeJS v20.0):
33
29
34
30
```sh
35
-
(cd app &&yarn install)
36
-
(cd app &&yarn deploy-contracts)
31
+
yarn install
32
+
yarn deploy-contracts
37
33
```
38
34
39
-
This will deploy the contracts and save the deployment info to `app/deployed-contract.json`.
40
-
The full process involves `Generating Client IVC proof`, and may take a few moments. For faster development the sandbox does not verify proofs, so this can optionally be disabled [here](#disable-client-proofs).
35
+
The deploy script generates a random account and deploys the voting contract with it. It also uses the SponsoredFPC contract for fee payment. This is sufficient for testing with Sandbox, but is not suitable for production setup.
36
+
37
+
The script also writes the deployment info to `.env` (which our web-app reads from).
41
38
42
-
> Important: For a production app, you need to back up the deployment info file to a secure location as without it, you will not be able to recover the contract address.
39
+
> Note that the script generates client proofs and it may take a couple of seconds. For faster development, you can disable proving by calling with `PROVER_ENABLED=false` (Sandbox accepts transactions without a valid proof).
43
40
44
-
4. Run the app:
41
+
4. Run the app (development mode):
45
42
46
43
```sh
47
-
(cd app &&yarn dev)
44
+
yarn dev
48
45
```
49
46
50
47
### Test the app
@@ -62,7 +59,7 @@ You can now interact with the deployed contract using the web app:
62
59
You can also run the E2E tests:
63
60
64
61
```sh
65
-
(cd app &&yarn test)
62
+
yarn test
66
63
```
67
64
68
65
<br />
@@ -77,8 +74,4 @@ To disable proving in the deploy script, run:
77
74
PXE_PROVER=none ./deploy.sh
78
75
```
79
76
80
-
To disable proving in the web app, you can add the following line in `app/src/embedded-wallet.ts` (uncomment the existing line):
81
-
82
-
```ts
83
-
config.proverEnabled=false;
84
-
```
77
+
To disable proving in the web app, you can set `PROVER_ENABLED` to `false` in `embedded-wallet.ts` file.
0 commit comments