Skip to content

Define key type in maps #2787

@LHerskind

Description

@LHerskind

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions