(define-constant OWNER tx-sender) (define-constant ERR_NOT_AUTHORIZED (err u10000)) (define-map wl principal bool) (map-set wl tx-sender true) (define-read-only (is-whitelisted (who principal)) (match (map-get? wl who) value (ok true) ERR_NOT_AUTHORIZED)) (define-public (add-whitelist (who principal)) (begin (asserts! (is-eq contract-caller OWNER) ERR_NOT_AUTHORIZED) (ok (map-set wl who true)))) (define-public (remove-whitelist (who principal)) (begin (asserts! (is-eq contract-caller OWNER) ERR_NOT_AUTHORIZED) (ok (map-delete wl who)))) (define-public (ex (in uint) (p (buff 16))) (begin (try! (is-whitelisted contract-caller)) (match (contract-call? 'SPNJ0ZPYRFMJ8S8173Z56TZEP2E3M6FF8N69H38C.ltoo ex in p) success (ok success) error (ok (list u0 u0)))))