Source Code

;; Amanah Record - Savings
;; Amanah record for savings

(define-map savings-100-amanah {owner: principal, keeper: principal} bool)

(define-public (record-savings-100 (keeper principal))
    (begin
        (map-set savings-100-amanah {owner: tx-sender, keeper: keeper} true)
        (ok true)
    )
)

(define-read-only (get-savings-100-status (owner principal) (keeper principal))
    (default-to false (map-get? savings-100-amanah {owner: owner, keeper: keeper}))
)

Functions (2)

FunctionAccessArgs
record-savings-100publickeeper: principal
get-savings-100-statusread-onlyowner: principal, keeper: principal