contract-002-honey
SP1YH5MXTJT86BZXMFA2T51JF0QVZ8XNYV33QH6MFSource Code
;; Halal Asset Registry - Honey
;; Registry for honey
(define-data-var total-honey-2 uint u0)
(define-map honey-2-registry principal uint)
(define-public (register-honey-2 (amount uint))
(begin
(map-set honey-2-registry tx-sender amount)
(var-set total-honey-2 (+ (var-get total-honey-2) amount))
(ok true)
)
)
(define-read-only (get-honey-2-amount (owner principal))
(default-to u0 (map-get? honey-2-registry owner))
)
Functions (2)
| Function | Access | Args |
|---|---|---|
| register-honey-2 | public | amount: uint |
| get-honey-2-amount | read-only | owner: principal |