Skip to content

Maps ​

Map mnemonics take registers containing the relevant Map, key, and value. See CandleVM map opcodes for runtime lookup behavior.

CASM mnemonicCandleVM opcodeOperandsBehavior
map_newNewMapdestinationCreates an empty map.
map_lenMapLendestination, mapWrites the number of key/value pairs to destination.
map_containsMapContainsdestination, map, keyTests whether key exists in the map.
map_getMapGetdestination, map, keyReads the value associated with key into destination.
map_setMapSetmap, key, valueInserts or replaces the value associated with key.
map_removeMapRemovemap, keyRemoves the entry for key.

Built for the Candle ecosystem · Powered by VitePress.