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