Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define key type in maps #2787

Closed
LHerskind opened this issue Oct 11, 2023 · 1 comment · Fixed by #3841
Closed

Define key type in maps #2787

LHerskind opened this issue Oct 11, 2023 · 1 comment · Fixed by #3841
Assignees

Comments

@LHerskind
Copy link
Contributor

LHerskind commented Oct 11, 2023

In Aztec.nr, it is currently not possible to specify the type of the key for a map. It is always a Field. An example working around this is the BalancesMap.

To avoid workarounds, we should alter the Map such that it can be used with values that fit into a single field. This could be by providing a closure or the like. It might make the Storage::init a bit more verbose, but it should help on clarity and when using the map later in the code.

@github-project-automation github-project-automation bot moved this to Todo in A3 Oct 11, 2023
@LHerskind LHerskind changed the title Define keys in maps Define key type in maps Oct 11, 2023
@benesjan
Copy link
Contributor

benesjan commented Nov 3, 2023

Blocked by traits.

Traits are supposed to be done soon™ so it seems to make sense to wait for them.

@benesjan benesjan added the S-blocked Status: Blocked label Nov 3, 2023
@benesjan benesjan moved this from Todo to Blocked in A3 Nov 3, 2023
@benesjan benesjan assigned Thunkar and unassigned Thunkar and benesjan Jan 3, 2024
@benesjan benesjan removed the S-blocked Status: Blocked label Jan 3, 2024
@benesjan benesjan moved this from Blocked to Todo in A3 Jan 3, 2024
Thunkar added a commit that referenced this issue Jan 12, 2024
Closes #2787

Unfortunately key type with a `ToField` trait binding is only defined in
the `.at` method, due to this blocker:

noir-lang/noir#3954
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Jan 12, 2024
AztecBot pushed a commit to noir-lang/noir that referenced this issue Jan 12, 2024
Closes AztecProtocol/aztec-packages#2787

Unfortunately key type with a `ToField` trait binding is only defined in
the `.at` method, due to this blocker:

#3954
AztecBot pushed a commit to AztecProtocol/aztec-nr that referenced this issue Jan 18, 2024
Closes AztecProtocol/aztec-packages#2787

Unfortunately key type with a `ToField` trait binding is only defined in
the `.at` method, due to this blocker:

noir-lang/noir#3954
michaelelliot pushed a commit to Swoir/noir_rs that referenced this issue Feb 28, 2024
Closes AztecProtocol#2787

Unfortunately key type with a `ToField` trait binding is only defined in
the `.at` method, due to this blocker:

noir-lang/noir#3954
superstar0402 added a commit to superstar0402/aztec-nr that referenced this issue Aug 16, 2024
Closes AztecProtocol/aztec-packages#2787

Unfortunately key type with a `ToField` trait binding is only defined in
the `.at` method, due to this blocker:

noir-lang/noir#3954
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants