From d7e2d9c80262dd4dff714caac575785b3bf14482 Mon Sep 17 00:00:00 2001 From: josh crites Date: Mon, 29 Jan 2024 20:24:30 -0500 Subject: [PATCH] fix(docs): Add missing deps to token tutorial references (#4265) Small changes to update dependencies in tutorials --- docs/docs/developers/tutorials/token_portal/setup.md | 7 +++---- .../tutorials/writing_dapp/contract_deployment.md | 3 ++- docs/docs/developers/tutorials/writing_token_contract.md | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/docs/developers/tutorials/token_portal/setup.md b/docs/docs/developers/tutorials/token_portal/setup.md index fc5d141381a..6737c6d3171 100644 --- a/docs/docs/developers/tutorials/token_portal/setup.md +++ b/docs/docs/developers/tutorials/token_portal/setup.md @@ -63,7 +63,6 @@ type = "contract" [dependencies] aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } token_portal_content_hash_lib = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-contracts/contracts/token_portal_content_hash_lib" } -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/src/crates/types"} ``` We will also be writing some helper functions that should exist elsewhere so we don't overcomplicated our contract. In `src` create two more files - one called `util.nr` and one called `token_interface` - so your dir structure should now look like this: @@ -156,11 +155,11 @@ Your `package.json` should look something like this (do not copy and paste): "license": "MIT", "private": true, "type": "module", - "dependencies": { - "dep": "version", + "dependencies": { + "dep": "version" }, "devDependencies": { - "dep": "version", + "dep": "version" }, "scripts": { "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest)" diff --git a/docs/docs/developers/tutorials/writing_dapp/contract_deployment.md b/docs/docs/developers/tutorials/writing_dapp/contract_deployment.md index 10906728034..b55ebcac2c2 100644 --- a/docs/docs/developers/tutorials/writing_dapp/contract_deployment.md +++ b/docs/docs/developers/tutorials/writing_dapp/contract_deployment.md @@ -22,6 +22,7 @@ Then, open the `contracts/token/Nargo.toml` configuration file, and add the `azt aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } authwit = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/authwit"} safe_math = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/safe-math"} +compressed_string = {git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/compressed-string"} ``` Last, copy-paste the code from the `Token` contract into `contracts/token/main.nr`: @@ -51,7 +52,7 @@ Create a new file `src/deploy.mjs`: ```js // src/deploy.mjs import { writeFileSync } from 'fs'; -import { Contract, ContractDeployer, createPXEClient } from '@aztec/aztec.js'; +import { Contract, loadContractArtifact, createPXEClient } from '@aztec/aztec.js'; import { getInitialTestAccountsWallets } from '@aztec/accounts/testing'; import TokenContractJson from "../contracts/token/target/token_contract-Token.json" assert { type: "json" }; diff --git a/docs/docs/developers/tutorials/writing_token_contract.md b/docs/docs/developers/tutorials/writing_token_contract.md index fe3b71421e4..27ce57c8fbe 100644 --- a/docs/docs/developers/tutorials/writing_token_contract.md +++ b/docs/docs/developers/tutorials/writing_token_contract.md @@ -61,6 +61,7 @@ type = "contract" aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } safe_math = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/safe-math"} authwit={ git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/authwit"} +compressed_string = {git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/compressed-string"} ``` ## Contract Interface