task-manager
SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBTSource Code
;; Task Manager
(define-map tasks {owner: principal, task-id: uint} {completed: bool})
(define-public (complete-task (id uint))
(ok (map-set tasks {owner: tx-sender, task-id: id} {completed: true}))
)
(define-read-only (is-completed (owner principal) (id uint))
(get completed (default-to {completed: false} (map-get? tasks {owner: owner, task-id: id})))
)
Functions (2)
| Function | Access | Args |
|---|---|---|
| complete-task | public | id: uint |
| is-completed | read-only | owner: principal, id: uint |