Source Code
;; Islamic Habit Tracker - Tahajjud
;; Tracker for tahajjud
(define-map tahajjud-65-streak principal uint)
(define-public (log-tahajjud-65)
(let ((current-streak (default-to u0 (map-get? tahajjud-65-streak tx-sender))))
(map-set tahajjud-65-streak tx-sender (+ current-streak u1))
(ok true)
)
)
(define-read-only (get-tahajjud-65-streak (user principal))
(default-to u0 (map-get? tahajjud-65-streak user))
)
Functions (2)
| Function | Access | Args |
|---|---|---|
| log-tahajjud-65 | public | |
| get-tahajjud-65-streak | read-only | user: principal |