Source Code

;; Islamic Habit Tracker - Istighfar
;; Tracker for istighfar

(define-map istighfar-70-streak principal uint)

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

(define-read-only (get-istighfar-70-streak (user principal))
    (default-to u0 (map-get? istighfar-70-streak user))
)

Functions (2)

FunctionAccessArgs
log-istighfar-70public
get-istighfar-70-streakread-onlyuser: principal