registry-a02-UW86
SP1Q7YR67R6WGP28NXDJD1WZ11REPAAXRJJ3V6RKMSource Code
;; Implementation 5
;; Name Registry
(define-map identities principal (string-utf8 50))
(define-public (register (label (string-utf8 50)))
(ok (map-set identities tx-sender label))
)
(define-read-only (get-label (who principal))
(ok (map-get? identities who))
)
(define-read-only (get-my-label)
(ok (map-get? identities tx-sender))
)
Functions (3)
| Function | Access | Args |
|---|---|---|
| register | public | label: (string-utf8 50 |
| get-label | read-only | who: principal |
| get-my-label | read-only |