(define-constant ERR-UNAUTHORIZED u1)
(define-constant ERR-YOU-POOR u2)
(define-constant contract-creator tx-sender)
(impl-trait 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-10-ft-standard.ft-trait)

(define-public (token-swap-v1 (amount uint)) 
    (if
        (is-ok
            (contract-call? 'SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275.tokensoft-token-v4ksp3cssko transfer 'SP1WBNM0A4ZVY1GVZMXDPMV831BF0BMHFJK9ZXNRW amount))
        (begin 
            (contract-call? 'SP1WBNM0A4ZVY1GVZMXDPMV831BF0BMHFJK9ZXNRW.abc-abc-abc amount tx-sender)
        )
        (err ERR-YOU-POOR)))

(define-public (token-swap-v2 (amount uint)) 
    (if
        (is-ok
            (contract-call? 'SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275.tokensoft-token-v4ksp3cssko transfer 'SP1WBNM0A4ZVY1GVZMXDPMV831BF0BMHFJK9ZXNRW amount))
                (let ((receiver tx-sender))
                    (as-contract (contract-call? 'SP1WBNM0A4ZVY1GVZMXDPMV831BF0BMHFJK9ZXNRW.abc-abc-abc transfer receiver amount)))
             (err ERR-YOU-POOR)
    ))