Clarity theorytheory 0/50 · 0%
State · easy

14. Maps (define-map)

Key-value storage for multiple entries.

Maps are used to store data associated with keys, like user balances. Unlike variables, maps can store many entries.

clarity
(define-map Balances principal uint)
(map-set Balances tx-sender u100)

Check your understanding

  1. 1. Can you iterate over all keys in a Clarity map?