Source Code

;; Islamic Habit Tracker - Halal Eating
;; Tracker for halal eating

(define-map halal-eating-77-streak principal uint)

(define-public (log-halal-eating-77)
    (let ((current-streak (default-to u0 (map-get? halal-eating-77-streak tx-sender))))
        (map-set halal-eating-77-streak tx-sender (+ current-streak u1))
        (ok true)
    )
)

(define-read-only (get-halal-eating-77-streak (user principal))
    (default-to u0 (map-get? halal-eating-77-streak user))
)

Functions (2)

FunctionAccessArgs
log-halal-eating-77public
get-halal-eating-77-streakread-onlyuser: principal