Maps
Map mnemonics take registers containing the relevant Map, key, and value. See CandleVM map opcodes for runtime lookup behavior.
| CASM mnemonic | CandleVM opcode | Operands | Behavior |
|---|---|---|---|
map_new | NewMap | destination | Creates an empty map. |
map_len | MapLen | destination, map | Writes the number of key/value pairs to destination. |
map_contains | MapContains | destination, map, key | Tests whether key exists in the map. |
map_get | MapGet | destination, map, key | Reads the value associated with key into destination. |
map_set | MapSet | map, key, value | Inserts or replaces the value associated with key. |
map_remove | MapRemove | map, key | Removes the entry for key. |