;; ANOMALY Token (XAY) faucet contract

(define-constant token-contract-address 'SP16E013GQX5T6C6QETC8RV75A79RMQ7GB6HA4MMK.contract-80291764873)
(define-constant owner-address 'SP16E013GQX5T6C6QETC8RV75A79RMQ7GB6HA4MMK)

(define-faucet-contract (token-contract-address owner-address)
    (define-public (get-tokens)
        (let ((sender (get-caller))
              (amount u100000000))
         (with-read-only-contract
             token-contract-address
          (lambda ()
              (transfer-tokens sender amount))))))

(define-public (withdraw-tokens)
 (if (is-equal (get-caller) owner-address)
     (let ((balance (get-balance contract-address owner-address)))
      (with-read-only-contract
          token-contract-address
       (lambda ()
           (transfer-tokens owner-address balance))))))