Skip to content

Commit

Permalink
git subrepo push --branch=master noir-projects/aztec-nr
Browse files Browse the repository at this point in the history
subrepo:
  subdir:   "noir-projects/aztec-nr"
  merged:   "178e7fb65"
upstream:
  origin:   "https://github.com/AztecProtocol/aztec-nr"
  branch:   "master"
  commit:   "178e7fb65"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???" [skip ci]
  • Loading branch information
AztecBot authored and signorecello committed May 13, 2024
1 parent e00ccb3 commit 0397b72
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 28 deletions.
9 changes: 5 additions & 4 deletions docs/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ deps:
RUN yarn install --frozen-lockfile

build:
ARG ENVIRONMENT
BUILD ../yarn-project/+build-dev
BUILD ../+release-meta
FROM +deps

COPY --dir ../yarn-project/+build-dev/usr/src /usr
COPY ../+release-meta/usr/src/.release-please-manifest.json /usr/src

COPY . .

RUN ./scripts/build.sh
SAVE ARTIFACT build

serve:
ARG ENVIRONMENT
FROM +deps
COPY +build/build build
COPY ./static static
Expand All @@ -34,8 +33,10 @@ serve:
SAVE ARTIFACT /usr/src/docs
SAVE IMAGE aztecprotocol/docs-server


deploy-preview:
BUILD ../yarn-project/+scripts-prod
ARG ENVIRONMENT
ARG NETLIFY_AUTH_TOKEN
ARG NETLIFY_SITE_ID
ARG AZTEC_BOT_COMMENTER_GITHUB_TOKEN
Expand All @@ -44,7 +45,7 @@ deploy-preview:
COPY --dir ../yarn-project/+scripts-prod/usr/src/yarn-project /usr/src
COPY ./netlify.toml .
COPY ./deploy_preview.sh .
RUN NETLIFY_AUTH_TOKEN=$NETLIFY_AUTH_TOKEN NETLIFY_SITE_ID=$NETLIFY_SITE_ID ./deploy_preview.sh $PR $AZTEC_BOT_COMMENTER_GITHUB_TOKEN
RUN echo "NETLIFY_AUTH_TOKEN=$NETLIFY_AUTH_TOKEN NETLIFY_SITE_ID=$NETLIFY_SITE_ID ./deploy_preview.sh $PR $AZTEC_BOT_COMMENTER_GITHUB_TOKEN"

deploy-prod:
BUILD ../yarn-project/+scripts-prod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,6 @@ TokenContractArtifact
UniswapContractArtifact
```

<sup><sub><a href="https://github.com/AztecProtocol/aztec-packages/blob/master//yarn-project/end-to-end/src/composed/cli_docs_sandbox.test.ts#L95-L118" target="_blank" rel="noopener noreferrer">Source code: /yarn-project/end-to-end/src/composed/cli_docs_sandbox.test.ts#L95-L118</a></sub></sup>
> <sup><sub><a href="https://github.com/AztecProtocol/aztec-packages/blob/master//yarn-project/end-to-end/src/composed/cli_docs_sandbox.test.ts#L95-L118" target="_blank" rel="noopener noreferrer">Source code: /yarn-project/end-to-end/src/composed/cli_docs_sandbox.test.ts#L95-L118</a></sub></sup>

You can see all of our example contracts in the monorepo [here](https://github.com/AztecProtocol/aztec-packages/tree/master/noir-projects/noir-contracts/contracts).
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ PrivateContext::emit_contract_class_unencrypted_log(&mut self, log);
### emit_encrypted_log

```rust
PrivateContext::emit_encrypted_log(&mut self, contract_address, storage_slot, note_type_id, ivpk_m, preimage);
PrivateContext::emit_encrypted_log(&mut self, contract_address, storage_slot, note_type_id, encryption_pub_key, preimage);
```

#### Parameters
Expand All @@ -218,7 +218,7 @@ PrivateContext::emit_encrypted_log(&mut self, contract_address, storage_slot, no
| contract_address | AztecAddress |
| storage_slot | Field |
| note_type_id | Field |
| ivpk_m | GrumpkinPoint |
| encryption_pub_key | GrumpkinPoint |
| preimage | [Field; N] |

### call_private_function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,6 @@ compute_note_hash_for_insertion(note);
| --- | --- |
| note | Note |

### compute_note_hash_for_read_request

```rust
compute_note_hash_for_read_request(note);
```

#### Parameters
| Name | Type |
| --- | --- |
| note | Note |

### compute_note_hash_for_consumption

```rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ emit_encrypted_log_oracle(_contract_address, _storage_slot, _note_type_id, _encr
### emit_encrypted_log

```rust
emit_encrypted_log(contract_address, storage_slot, note_type_id, ivpk_m, preimage, counter);
emit_encrypted_log(contract_address, storage_slot, note_type_id, encryption_pub_key, preimage, counter);
```

#### Parameters
Expand All @@ -28,7 +28,7 @@ emit_encrypted_log(contract_address, storage_slot, note_type_id, ivpk_m, preimag
| contract_address | AztecAddress |
| storage_slot | Field |
| note_type_id | Field |
| ivpk_m | GrumpkinPoint |
| encryption_pub_key | GrumpkinPoint |
| preimage | [Field; N] |
| counter | u32 |

5 changes: 4 additions & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const config = {
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
path: process.env.ENV === "dev" ? "docs" : "processed-docs",
path: process.env.HOT ? "processed-docs" : "docs",
sidebarPath: "./sidebars.js",
editUrl: (params) => {
return (
Expand Down Expand Up @@ -168,6 +168,9 @@ const config = {
],
// ["./src/plugins/plugin-embed-code", {}],
],
customFields: {
MATOMO_ENV: process.env.ENVIRONMENT || process.env.ENV,
},
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
Expand Down
8 changes: 3 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "yarn preprocess && yarn typedoc && docusaurus start --host 0.0.0.0",
"start:dev": "ENV=dev yarn start",
"start:dev:local": "yarn preprocess && yarn typedoc && docusaurus start",
"docs": "yarn preprocess && yarn typedoc && docusaurus start --host ${HOST:-localhost}",
"start": "HOST=0.0.0.0 ENV=dev yarn docs",
"start:local": "ENV=dev HOT=false yarn docs",
"build": "./scripts/build.sh",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "rm -rf 'processed-docs' 'processed-docs-cache' docs/apis && docusaurus clear && rm 'src/preprocess/AztecnrReferenceAutogenStructure.json' && rm -rf 'docs/developers/references/aztec-nr'",
"serve": "docusaurus serve",
"preprocess": "yarn node -r dotenv/config ./src/preprocess/index.js && node src/preprocess/generate_aztecnr_reference.js",
Expand Down
4 changes: 4 additions & 0 deletions docs/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env bash
set -eo pipefail

echo "Running with ENVIRONMENT set to: $ENVIRONMENT"
ENV=$ENVIRONMENT

# Helper function for building packages in yarn project
build_package() {
local package_name="$1"
Expand Down Expand Up @@ -48,4 +51,5 @@ echo Building docsite...
echo "Generating Aztec.nr reference docs..."
node ./src/preprocess/generate_aztecnr_reference.js
echo "Generated Aztec.nr reference docs"

yarn preprocess && yarn typedoc && yarn docusaurus build
2 changes: 1 addition & 1 deletion noir-projects/aztec-nr/aztec/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ compiler_version = ">=0.18.0"
type = "lib"

[dependencies]
protocol_types = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.38.0", directory="noir-projects/noir-protocol-circuits/crates/types" }
protocol_types = { path = "../../noir-protocol-circuits/crates/types" }
2 changes: 1 addition & 1 deletion noir-projects/aztec-nr/tests/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ type = "lib"

[dependencies]
aztec = { path = "../aztec" }
protocol_types = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.38.0", directory="noir-projects/noir-protocol-circuits/crates/types" }
protocol_types = { path = "../../noir-protocol-circuits/crates/types" }

0 comments on commit 0397b72

Please sign in to comment.