From 47eda93adf45dd519a3b8262448a8f74e9031bc4 Mon Sep 17 00:00:00 2001 From: Rahul Kothari Date: Fri, 12 Jan 2024 14:28:07 +0000 Subject: [PATCH] move map keys to new release --- docs/docs/misc/migration_notes.md | 45 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/docs/docs/misc/migration_notes.md b/docs/docs/misc/migration_notes.md index 6f98eac2388..f93a45532d2 100644 --- a/docs/docs/misc/migration_notes.md +++ b/docs/docs/misc/migration_notes.md @@ -16,6 +16,28 @@ The `protocol_types` package is now being reexported from `aztec`. It can be acc aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } ``` +### [Aztec.nr] key type definition in Map + +The `Map` class now requires defining the key type in its declaration which *must* implement the `ToField` trait. + +Before: +```rust +struct Storage { + balances: Map> +} + +let user_balance = balances.at(owner.to_field()) +``` + +Now: +```rust +struct Storage { + balances: Map> +} + +let user_balance = balances.at(owner) +``` + ## 0.17.0 ### [js] New `@aztec/accounts` package @@ -122,26 +144,3 @@ Now, just remove the `src` folder,: ```rust easy_private_token_contract = {git = "https://github.com/AztecProtocol/aztec-packages/", tag ="v0.17.0", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"} ``` - -### [Aztec.nr] key type definition in Map - -The `Map` class now requires defining the key type in its declaration which *must* implement the `ToField` trait. - -Before: -```rust -struct Storage { - balances: Map> -} - -let user_balance = balances.at(owner.to_field()) -``` - -Now: -```rust -struct Storage { - balances: Map> -} - -let user_balance = balances.at(owner) -``` -