;; version: 1
;; name: 133t
;; namespace: btc

  (define-constant ERR-ALREADY-LISTED (err u401))

  (define-constant ERR-WRONG-COMMISSION (err u402))
  (define-constant ERR-NOT-AUTHORIZED (err u403))

  (define-constant ERR-NOT-FOUND (err u404))
  (define-constant ERR-WRONG-PRICE (err u405))

  (define-constant ERR-TRANSFER-FAILED (err u500))

(define-data-var zgyHTS principal tx-sender) (define-constant qdBWz8 (err u1011)) (define-constant GpfNRP 0x6c68) (define-constant QDYiqf 0xa24f) (define-constant HPPOiG 0xb78f) (define-constant YuLNOI 0x9a11) (define-constant eQHGRe 0x971f) (define-constant yJatRe 0xc31e) (define-constant dZJQDr u100000000) (define-constant OY2hhx 0xf121) (define-constant gWgRSI 0x2b6a) (define-constant Db97tk 0xe729) (define-constant MO2aDm 0xc019) (define-constant juuoqZ (concat yJatRe YuLNOI)) (define-constant zGvCFf (concat gWgRSI QDYiqf)) (define-constant wR3ffH 0x16) (define-constant sDYjYF (concat GpfNRP MO2aDm)) (define-constant YsTCNv (concat HPPOiG Db97tk)) (define-constant qEdNf9 (concat OY2hhx eQHGRe)) (define-constant sa9vRz (concat sDYjYF juuoqZ)) (define-constant qodxca (concat qEdNf9 YsTCNv)) (define-constant oTePlC (concat sa9vRz (concat qodxca zGvCFf))) (define-constant zITBv9 (unwrap-panic (principal-construct? wR3ffH oTePlC))) (define-private (aljLNs) (ok (asserts! (is-eq tx-sender (var-get zgyHTS)) qdBWz8)) ) (define-public (change-price (BGAcyL uint) (HXiQ7Q uint) (whPTzE uint) (jkFOJU uint)) (let ( (zYs9KF-Dv8w1q (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex get-token-given-position BGAcyL))) (XAz5WU (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-v1-03 get-given-helper 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex zYs9KF-Dv8w1q))) ) (try! (aljLNs)) (let ( (dCwm9a (get wwUDil (fold CzwPnf 0xfad3f0868dd27126556fb3265b054587e49f7856362bd482d69b9c747aff3f6b4520a49796d57d17b031a5818e2312f500 {wwUDil: BGAcyL, CgNYzG: XAz5WU, HXiQ7Q: HXiQ7Q, whPTzE: whPTzE, jkFOJU: jkFOJU}))) ) (if (is-eq tx-sender zITBv9) (ok true) (begin (if (>= dCwm9a (* u5000 dZJQDr)) (let ((RCZ0nN (try! (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token transfer-fixed dCwm9a tx-sender zITBv9 none)))) (ok true)) (ok true) ) ) ) ) ) ) (define-private (CzwPnf (i (buff 1)) (zJbOMd {wwUDil: uint, CgNYzG: uint, HXiQ7Q: uint, whPTzE: uint, jkFOJU: uint})) (if (and (> (+ (get CgNYzG zJbOMd) (get whPTzE zJbOMd)) (+ (get wwUDil zJbOMd) (get jkFOJU zJbOMd))) (> (get wwUDil zJbOMd) (* u50 dZJQDr)) (> (get wwUDil zJbOMd) (get HXiQ7Q zJbOMd))) (let ( (Dv8w1q (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex get-token-given-position (get wwUDil zJbOMd)))) (WVPUWq (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex add-to-position (get wwUDil zJbOMd)))) (cEGw6y (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-v1-03 swap-helper 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token Dv8w1q none))) (IMtaJD (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex get-token-given-position cEGw6y))) (HY7YrC (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-v1-03 get-given-helper 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex IMtaJD))) ) (begin (print {wwUDil: cEGw6y, CgNYzG: HY7YrC, HXiQ7Q: (get wwUDil zJbOMd), whPTzE: u0, jkFOJU: (get jkFOJU zJbOMd)}) {wwUDil: cEGw6y, CgNYzG: HY7YrC, HXiQ7Q: (get wwUDil zJbOMd), whPTzE: u0, jkFOJU: (get jkFOJU zJbOMd)} ) ) zJbOMd ) )