(define-data-var airdrop-token (optional (principal)) 'SP1WBNM0A4ZVY1GVZMXDPMV831BF0BMHFJK9ZXNRW.abc-test-token)
(define-data-var airdrop-amount (optional (uint)) u1000000)
(define-constant CONTRACT-OWNER tx-sender)
(define-constant ERR-UNAUTHORIZED u1)
(define-constant ERR-AIRDROP-TOKEN-WRONG u2)
(define-constant ERR-AIDROP-AMOUNT-WRONG u3)
(define-constant ERR-AIRDROP-PARTICIPANT-WORNG u4)


;; airdrop-claim - to tx-sender -> tx-sender contract-creator

(define-public (airdrop-claim (airdroptoken principal) (airdropamount uint) (to principal))
    (begin
        (asserts! (is-eq token airdrop-token) (err ERR-AIRDROP-TOKEN-WRONG))
        (asserts! (is-eq airdropamount airdrop-per-claim) (err ERR-AIDROP-AMOUNT-WRONG))
        (asserts! (is-eq tx-sender contract-creator) (err ERR-AIRDROP-PARTICIPANT-WORNG))
        
        (ft-transfer? airdroptoken amount CONTRACT-OWNER to)

    )    
)

;; airdrop token setup

(define-public (set-airdrop-token (airdroptoken (principal)))
    (if 
        (is-eq tx-sender CONTRACT-OWNER) 
            (ok (var-set airdrop-token (some airdroptoken))) 
        (err ERR-UNAUTHORIZED)
    )
)

(define-read-only (get-airdrop-token)
    (ok (var-get airdrop-token)
    )
)

;; airdrop amount setup

(define-public (set-airdrop-amount (airdropamount (uint)))
    (if 
        (is-eq tx-sender CONTRACT-OWNER) 
            (ok (var-set airdrop-amount (some airdropamount))) 
        (err ERR-UNAUTHORIZED)
    )
)

(define-read-only (get-airdrop-amount)
    (ok (var-get airdrop-amount)
    )
)

