Source Code
(define-map counters principal int)
(define-public (count (change int))
(ok (map-set counters tx-sender (+ (get-count tx-sender) change)))
)
(define-read-only (get-count (who principal))
(default-to 0 (map-get? counters who))
)Functions (2)
| Function | Access | Args |
|---|---|---|
| count | public | change: int |
| get-count | read-only | who: principal |