;; the-guests

(impl-trait 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait)

(define-non-fungible-token the-guests uint)

;; Constants
(define-constant DEPLOYER tx-sender)
(define-constant COMM u1000)
(define-constant COMM-ADDR 'SPNWZ5V2TPWGQGVDR6T7B6RQ4XMGZ4PXTEE0VQ0S)

(define-constant ERR-NO-MORE-NFTS u100)
(define-constant ERR-NOT-ENOUGH-PASSES u101)
(define-constant ERR-PUBLIC-SALE-DISABLED u102)
(define-constant ERR-CONTRACT-INITIALIZED u103)
(define-constant ERR-NOT-AUTHORIZED u104)
(define-constant ERR-INVALID-USER u105)
(define-constant ERR-LISTING u106)
(define-constant ERR-WRONG-COMMISSION u107)
(define-constant ERR-NOT-FOUND u108)
(define-constant ERR-PAUSED u109)
(define-constant ERR-MINT-LIMIT u110)
(define-constant ERR-METADATA-FROZEN u111)
(define-constant ERR-AIRDROP-CALLED u112)
(define-constant ERR-NO-MORE-MINTS u113)

;; Internal variables
(define-data-var mint-limit uint u500)
(define-data-var last-id uint u1)
(define-data-var total-price uint u40000000)
(define-data-var artist-address principal 'SP3SC5PSKQM9ABTYPNYDV1J7SBGHA08VRW1DKTJK6)
(define-data-var artist-address2 principal 'SP3252T1HMQHZTA9S22WZ2HZMKC4CVH965SHSERTH)
(define-data-var ipfs-root (string-ascii 80) "ipfs://ipfs/Qmez37YhF4wvBBvbFoYk8xBxaki2sZdcfDYrXGmmRnjpzq/json/")
(define-data-var mint-paused bool false)
(define-data-var premint-enabled bool false)
(define-data-var sale-enabled bool false)
(define-data-var metadata-frozen bool false)
(define-data-var airdrop-called bool false)
(define-data-var mint-cap uint u0)

(define-map mints-per-user principal uint)
(define-map mint-passes principal uint)

(define-public (claim) 
  (mint (list true)))

(define-public (claim-three) (mint (list true true true)))

(define-public (claim-five) (mint (list true true true true true)))

(define-public (claim-ten) (mint (list true true true true true true true true true true)))

(define-public (claim-twentyfive) (mint (list true true true true true true true true true true true true true true true true true true true true true true true true true)))

;; Mintpass Minting
(define-private (mint (orders (list 25 bool)))
  (let 
    (
      (passes (get-passes tx-sender))
    )
    (if (var-get premint-enabled)
      (begin
        (asserts! (>= passes (len orders)) (err ERR-NOT-ENOUGH-PASSES))
        (map-set mint-passes tx-sender (- passes (len orders)))
        (mint-many orders)
      )
      (begin
        (asserts! (var-get sale-enabled) (err ERR-PUBLIC-SALE-DISABLED))
        (mint-many orders)
      )
    )))

(define-private (mint-many (orders (list 25 bool )))  
  (let 
    (
      (last-nft-id (var-get last-id))
      (enabled (asserts! (<= last-nft-id (var-get mint-limit)) (err ERR-NO-MORE-NFTS)))
      (art-addr (var-get artist-address))
      (id-reached (fold mint-many-iter orders last-nft-id))
      (price (* (var-get total-price) (- id-reached last-nft-id)))
      (current-balance (get-balance tx-sender))
      (total-commission (/ (* price COMM) u10000))
      (total-artist (/ (* price u5000) u10000))
      (total-artist2 (/ (* price u4000) u10000))
      (capped (> (var-get mint-cap) u0))
      (user-mints (get-mints tx-sender))
    )
    (asserts! (or (is-eq false (var-get mint-paused)) (is-eq tx-sender DEPLOYER)) (err ERR-PAUSED))
    (asserts! (or (not capped) (is-eq tx-sender DEPLOYER) (is-eq tx-sender art-addr) (>= (var-get mint-cap) (+ (len orders) user-mints))) (err ERR-NO-MORE-MINTS))
    (map-set mints-per-user tx-sender (+ (len orders) user-mints))
    (if (or (is-eq tx-sender art-addr) (is-eq tx-sender DEPLOYER) (is-eq (var-get total-price) u0000000))
      (begin
        (var-set last-id id-reached)
        (map-set token-count tx-sender (+ current-balance (- id-reached last-nft-id)))
      )
      (begin
        (var-set last-id id-reached)
        (map-set token-count tx-sender (+ current-balance (- id-reached last-nft-id)))
        (try! (stx-transfer? total-artist tx-sender (var-get artist-address)))
        (try! (stx-transfer? total-artist2 tx-sender (var-get artist-address2)))
        (try! (stx-transfer? total-commission tx-sender COMM-ADDR))
      )    
    )
    (ok id-reached)))

(define-private (mint-many-iter (ignore bool) (next-id uint))
  (if (<= next-id (var-get mint-limit))
    (begin
      (unwrap! (nft-mint? the-guests next-id tx-sender) next-id)
      (+ next-id u1)    
    )
    next-id))

(define-public (set-artist-address (address principal))
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-INVALID-USER))
    ;; #[allow(unchecked_data)]
    (ok (var-set artist-address address))))

(define-public (set-price (price uint))
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-INVALID-USER))
    ;; #[allow(unchecked_data)]
    (ok (var-set total-price price))))

(define-public (toggle-pause)
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-INVALID-USER))
    (ok (var-set mint-paused (not (var-get mint-paused))))))

(define-public (set-mint-limit (limit uint))
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-INVALID-USER))
    (asserts! (< limit (var-get mint-limit)) (err ERR-MINT-LIMIT))
    (ok (var-set mint-limit limit))))

(define-public (burn (token-id uint))
  (begin 
    (asserts! (is-owner token-id tx-sender) (err ERR-NOT-AUTHORIZED))
    (nft-burn? the-guests token-id tx-sender)))

(define-private (is-owner (token-id uint) (user principal))
    (is-eq user (unwrap! (nft-get-owner? the-guests token-id) false)))

(define-public (set-base-uri (new-base-uri (string-ascii 80)))
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
    (asserts! (not (var-get metadata-frozen)) (err ERR-METADATA-FROZEN))
    ;; #[allow(unchecked_data)]
    (var-set ipfs-root new-base-uri)
    (ok true)))

(define-public (freeze-metadata)
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
    (var-set metadata-frozen true)
    (ok true)))

(define-public (reveal-artwork (new-base-uri (string-ascii 80)))
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
    (asserts! (not (var-get metadata-frozen)) (err ERR-METADATA-FROZEN))
    ;; #[allow(unchecked_data)]
    (var-set ipfs-root new-base-uri)
    (var-set metadata-frozen true)
    (ok true)))

;; Non-custodial SIP-009 transfer function
(define-public (transfer (id uint) (sender principal) (recipient principal))
  (begin
    (asserts! (is-eq tx-sender sender) (err ERR-NOT-AUTHORIZED))
    (asserts! (is-none (map-get? market id)) (err ERR-LISTING))
    ;; #[allow(unchecked_data)]
    (trnsfr id sender recipient)))

;; read-only functions
(define-read-only (get-owner (token-id uint))
  (ok (nft-get-owner? the-guests token-id)))

(define-read-only (get-last-token-id)
  (ok (- (var-get last-id) u1)))

(define-read-only (get-token-uri (token-id uint))
  (ok (some (concat (concat (var-get ipfs-root) "{id}") ".json"))))

(define-read-only (get-paused)
  (ok (var-get mint-paused)))

(define-read-only (get-price)
  (ok (var-get total-price)))

(define-read-only (get-mints (caller principal))
  (default-to u0 (map-get? mints-per-user caller)))

(define-read-only (get-mint-limit)
  (ok (var-get mint-limit)))

;; Non-custodial marketplace extras
(define-trait commission-trait
  ((pay (uint uint) (response bool uint))))

(define-map token-count principal uint)
(define-map market uint {price: uint, commission: principal})

(define-read-only (get-balance (account principal))
  (default-to u0
    (map-get? token-count account)))

(define-private (trnsfr (id uint) (sender principal) (recipient principal))
  (match (nft-transfer? the-guests id sender recipient)
    success
      (let
        ((sender-balance (get-balance sender))
        (recipient-balance (get-balance recipient)))
          (map-set token-count
            sender
            (- sender-balance u1))
          (map-set token-count
            recipient
            (+ recipient-balance u1))
          (ok success))
    error (err error)))

(define-private (is-sender-owner (id uint))
  (let ((owner (unwrap! (nft-get-owner? the-guests id) false)))
    (or (is-eq tx-sender owner) (is-eq contract-caller owner))))

(define-read-only (get-listing-in-ustx (id uint))
  (map-get? market id))

(define-public (list-in-ustx (id uint) (price uint) (comm-trait <commission-trait>))
  (let ((listing  {price: price, commission: (contract-of comm-trait)}))
    (asserts! (is-sender-owner id) (err ERR-NOT-AUTHORIZED))
    (map-set market id listing)
    (print (merge listing {a: "list-in-ustx", id: id}))
    (ok true)))

(define-public (unlist-in-ustx (id uint))
  (begin
    (asserts! (is-sender-owner id) (err ERR-NOT-AUTHORIZED))
    (map-delete market id)
    (print {a: "unlist-in-ustx", id: id})
    (ok true)))

(define-public (buy-in-ustx (id uint) (comm-trait <commission-trait>))
  (let ((owner (unwrap! (nft-get-owner? the-guests id) (err ERR-NOT-FOUND)))
      (listing (unwrap! (map-get? market id) (err ERR-LISTING)))
      (price (get price listing)))
    (asserts! (is-eq (contract-of comm-trait) (get commission listing)) (err ERR-WRONG-COMMISSION))
    (try! (stx-transfer? price tx-sender owner))
    (try! (contract-call? comm-trait pay id price))
    (try! (trnsfr id owner tx-sender))
    (map-delete market id)
    (print {a: "buy-in-ustx", id: id})
    (ok true)))

;; Extra functionality required for mintpass
(define-public (toggle-sale-state)
  (let 
    (
      ;; (premint (not (var-get premint-enabled)))
      (sale (not (var-get sale-enabled)))
    )
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
    (var-set premint-enabled false)
    (var-set sale-enabled sale)
    (print { sale: sale })
    (ok true)))

(define-public (enable-premint)
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
    (ok (var-set premint-enabled true))))

(define-public (disable-premint)
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
    (ok (var-set premint-enabled false))))

(define-read-only (get-passes (caller principal))
  (default-to u0 (map-get? mint-passes caller)))

(define-read-only (get-premint-enabled)
  (ok (var-get premint-enabled)))

(define-read-only (get-sale-enabled)
  (ok (var-get sale-enabled)))

(map-set mint-passes 'SP4QA0NHP03T3T9GJKR5KEA7VQ2KNSXRK5JC74NG u4)
(map-set mint-passes 'SP26SB34D9THJ8BMSPT6EJHW9JDGBHWMX74PVDFEN u2)
(map-set mint-passes 'SP23RS2V3BAWHNQ3RHVZHK10F51RA99C1FHQKY9QH u1)
(map-set mint-passes 'SP21FF0HPBXNPDWY2DRDQ0YRA66WHH6SPCQVNVR6A u2)
(map-set mint-passes 'SP2RT3CD78EMEHETDCK7HHHAE7SXZJ6N5CVYCF19R u1)
(map-set mint-passes 'SPBJMEMDZR53P2XPZF11CZFCG5BWN7QYX682SMEE u1)
(map-set mint-passes 'SP5DVYVM5FMWGAQNP2KE9HGXAY4N3F3CNTMSRGM8 u2)
(map-set mint-passes 'SP1P94TYSJZ25849PHEBR5Y4J9BCW8MJMZCE0TD4K u3)
(map-set mint-passes 'SPQY88E87FNMP1NTY2YQ7X5DPTVY810PS8T6D2Y3 u2)
(map-set mint-passes 'SP1AC2ZSA6KGGNWE4Y4E5EVR17RN2KT9SBM3BF2QS u1)
(map-set mint-passes 'SPV5GYRXDQRYQKZW7FFAZDNRRNVFS41P3YZWXFGD u4)
(map-set mint-passes 'SP35QK5547F0ZYA9CM9ES4EQ1AVW8YQBW9ASAJP5Z u2)
(map-set mint-passes 'SP13NK68ADVWYDZM2GZCNF0ZCFMCYAYGCTK22YE6T u1)
(map-set mint-passes 'SP2RKVC8PYANWJ40VSRCK2K935HSN4H0AHTVHD73D u2)
(map-set mint-passes 'SP2HV9HYWZRAPTCC10VXCK72P3W4F9NDB8E1HBEZH u5)
(map-set mint-passes 'SP228WEAEMYX21RW0TT5T38THPNDYPPGGVW2RP570 u1)
(map-set mint-passes 'SP156PKFGDHNQ5322FWE631WR391K7NMZ091G3J6A u1)
(map-set mint-passes 'SPS2FZ3K6N2CZPBM4BSQCEQV23V2334E7MJ4CHZT u1)
(map-set mint-passes 'SP5W8Q40M5NRAVHRYFGRNAW2TGQ6HZQ7VG88WMFJ u1)
(map-set mint-passes 'SPJSCH3DDEJ8GQPGYZBHSB4F3HX5Q222CG89PSAB u7)
(map-set mint-passes 'SP19PYWHN176GDH7RPFWS7Z0S509X55G80DB1CHC9 u1)
(map-set mint-passes 'SP3MMG05H6T48W5NJEEST0RR3FTPGKPM7C19X5M16 u4)
(map-set mint-passes 'SP31WTJ415SNJM9H6202S3WK9AFQXQZMT48PESBQE u1)
(map-set mint-passes 'SP35MEYYBHSFCFXY296YGP7NAT6Y4XBJW2VETR8AV u2)
(map-set mint-passes 'SP3VTWA4VHJXCC82898M21QSRQCYC730K49M5NMKF u3)
(map-set mint-passes 'SP1CCC68DRYZZKMPAZPWKE3VP2R7YSVN9DZJG86Y8 u2)
(map-set mint-passes 'SP9227STGNCZPRTP2T2G3S02M7XB5ENAQB1J82FA u4)
(map-set mint-passes 'SP1FWAF97ZST58D7Q9WFQR3SJV3XW9SD8E3G0VTH3 u1)
(map-set mint-passes 'SP921K8RNCZ2T6ADS1Q463H60DZNJB8QZRW6X79F u1)
(map-set mint-passes 'SP1JQCYDVHKE8RWBJ9JSX8ZH6TVTX0TH2F7D3A8YJ u2)
(map-set mint-passes 'SP3EYT7KF5ERWQFTWW3SWHS8QRYBNSMRZ7JW73YXR u2)
(map-set mint-passes 'SP329G766AV8Z01X9EEAHPDQ4WDJXT2A0XB383MGP u5)
(map-set mint-passes 'SP2F18PH7FP22EHS0J0X3A6EFZ9PAW0EZJRET0GXZ u6)
(map-set mint-passes 'SP3ST6K5W36V2MTSNYYXE56SCXR7DGTW9N4NMZHYV u2)
(map-set mint-passes 'SPGRQERDKBT29K5PYNBGF7QY2N68S1GVAC1ERWQW u2)
(map-set mint-passes 'SP690PDD045XTP8Y10MQZJT3S5W9DPGWQJ4P3X4P u2)
(map-set mint-passes 'SP2F2KH0RVX6GF1Y9FWMMSR9RHG0TW3NN72D724NX u5)
(map-set mint-passes 'SPXQS1T1T2BKGSHH8H75PVFEY0R1X39F0B3MQWTJ u1)
(map-set mint-passes 'SP1G4Z5J9AYVKZCHZ8RVPH593FPWJX5P6QM6JEV27 u2)
(map-set mint-passes 'SP3K22XKPT9WJFCE957J94J6XXVZHP7747YNPDTFD u3)
(map-set mint-passes 'SP33N5R751MG99QAM4CN6HQ3MDTYBR71SB4NXVGT1 u6)
(map-set mint-passes 'SP247RS63PWW7ZQZ9EYYA9CXKKPWEP71M14W8N294 u1)
(map-set mint-passes 'SPM1Q7YG18378H6W254YN8PABEVRPT38ZCY01SJD u2)
(map-set mint-passes 'SP1VRHC4B8M5QSEA005GBQ3MXRP68RNG097SKEXHS u4)
(map-set mint-passes 'SP3356JJ54Q0YB2Q7EN3ZPV7DAY8E2NAS9P8E2WZ0 u1)
(map-set mint-passes 'SPQ07EP6QK61JDHJQ0YDJJBHX5JZ8TWG5FNS8904 u2)
(map-set mint-passes 'SP32CF0E78JNPK0HYDTH3CCZ8FN76PFX5W0FYBN20 u4)
(map-set mint-passes 'SP1XZW2BJJRT9T5XD7QRMJXHVPPMZJAJPFQB9B7MN u1)
(map-set mint-passes 'SP1CKA3MMJABFQ3ATVC5J6Q24R8QZSHYQ19VB3CQE u1)
(map-set mint-passes 'SP1WM9B3RKTNRSWHXAQ9SQ5PKYW91VRRX59SJF10 u2)
(map-set mint-passes 'SP38VV4YM3MEDRCDF77HANWTGVJ5G4MNEDTF951QS u4)
(map-set mint-passes 'SPGZRWBAHX30M89KQHF1H38038PCCW5T03QHFS1F u2)
(map-set mint-passes 'SPQ2HN9TYF8ZYY9D3G45NGYA9GHA6QZHQ8AXF5QM u2)
(map-set mint-passes 'SP1GYWMYK320ASBBAERSC40TA3PA99ZHV3GF256T8 u5)
(map-set mint-passes 'SP18KN2HDVMD2J7VDYPGGPFDWJFRKPQ7N1CN6VXXC u5)
(map-set mint-passes 'SP3YPMD71E1Q0WRW0949AT5MQ4M72GMP915CX1XTW u5)
(map-set mint-passes 'SP3ZEG0WKYKEBF73EYVGBWQE4SZASF7X0WZTBCFJB u1)
(map-set mint-passes 'SP3CRGM0QHHD36B57FXZW60EQS7NM6XJK8WC7T34S u3)
(map-set mint-passes 'SPQE3J7XMMK0DN0BWJZHGE6B05VDYQRXRMDV734D u1)
(map-set mint-passes 'SP1XPG9QFX5M95G36SGN9R8YJ4KJ0JB7ZXNH892N6 u4)
(map-set mint-passes 'SP0DKPNHR7FW183BQQHABN5CEJHPG93FR0Z41FH2 u5)
(map-set mint-passes 'SP3YMM3JXFEP4JSPTF8DKD2HSPEBJV2C6GEQDXC06 u1)
(map-set mint-passes 'SP28AE5NFQKQWN3YKP6SX5TSK2QZGZ6586EJGFBYV u5)
(map-set mint-passes 'SP3GG2XRSX2APJ1JFWV2A3KFEJPAJ5X8JGDXTSF1N u4)
(map-set mint-passes 'SP2R3CHRAP1HE4M64X1NZXHZT41JG3XGNHJW4HX2W u6)
(map-set mint-passes 'SP2EE622QKYSZF5VZYMY48P6GTVY2XRSCMDMYYWQQ u2)
(map-set mint-passes 'SP3SF0PSD7KYVJQPKKRBYJFF7NENGFHZSBVHM3B27 u2)
(map-set mint-passes 'SP2DW9RTN82J2MR2FHQXY5EE0Y616JJ076RYG8PTY u1)
(map-set mint-passes 'SPFZJAWND9GDB2QC54524J73DGBQ07XJ6JM1E3GN u5)
(map-set mint-passes 'SP11XNN88FNPAHV3067QGBFSZ7VT14BVPVZX89KB u2)
(map-set mint-passes 'SPD06GYCB9CEQT1JEKNC074P4RDXPD64763XAJAW u2)
(map-set mint-passes 'SP3JHYR2QFMQ8Z8NPHF6XH9B350JSZPTG0ZKYENPF u2)
(map-set mint-passes 'SP3JPR7XNR60AMBBEZAGF1YHRSFY1JCKE14HBKGTY u4)
(map-set mint-passes 'SP2F9WV0YF46ZJ12545K6125YDKBSGFJ2WF2FMFFM u1)
(map-set mint-passes 'SP364J7EDJXRE1FPDZDABP9M58HPY4G88BFCP2HD0 u2)
(map-set mint-passes 'SP18V7NZHXPQKRNBYAF5WGBV79PDY6XMDNHMZSW4R u4)
(map-set mint-passes 'SP2BZQ48MADDN62X044NNJCNXF5BA33C3BFQ3TZJW u4)
(map-set mint-passes 'SPFK6E20DN1PFBY02956QN23TCWSPHMY76KYWGEZ u2)
(map-set mint-passes 'SP1W7F05KJZEY3WQ4ECHVGWKQR6G6YHZYEE6NXH24 u3)
(map-set mint-passes 'SP2AVGX0DR4DACDBZABMFBRY34WJ0MBW1RVCPW3DV u4)
(map-set mint-passes 'SP1VCG4HXMG02BMJCSAZDBS1WR4N2YG3RPHMNP9WR u4)
(map-set mint-passes 'SP36NC0KX6RZGPQXR73AMW8R0CXXHS06DRM487A5G u1)
(map-set mint-passes 'SP3P8M5J25457Q73MKS8EGD5Z19Z57RKYSPNEAK85 u4)
(map-set mint-passes 'SPWYR5GD2GRBZWSZ1YTSN8EE98Q9C2JFA9HTPXWM u2)
(map-set mint-passes 'SP24REE22G7MP540GDBY6A1JC0XSDNKF2YSYY7NYV u1)
(map-set mint-passes 'SP2Q1SZSETS27AZ9FE0BH6C6B7MVC25E4N6C2VE7D u3)
(map-set mint-passes 'SP2QDMH88MEZ8FFAYHW4B0BTXJRTHX8XBD54FE7HJ u3)
(map-set mint-passes 'SP3R4NKXMGW6YXA44X2ESZPKJNV25X4ZN7DPW0RXR u1)
(map-set mint-passes 'SP6K8CTMC52XBCNG9TRCF3JBE76S2BFYS985DANQ u4)
(map-set mint-passes 'SPA9NVRN0AX8DT84T3WXPBJ6AYX1YPYZQWPPZDBW u2)
(map-set mint-passes 'SP1FR2M102H4DE4DH96R4D29RC8AGQZG5D5Y4S7CH u2)
(map-set mint-passes 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9 u4)
(map-set mint-passes 'SP3QJ41PARX6F6B4H56JZ272ANK0TRJ9J2VFBVY1D u1)
(map-set mint-passes 'SP3GNAE8V8KZ24T31JC10TT184F6NQ4YDYHGVFZ10 u3)
(map-set mint-passes 'SP3RY71RCQX2J3BTDAEHTMSDWTXAC70R9W5XY0X05 u1)
(map-set mint-passes 'SP2791RKSYJJ39MVHC09J8NARWBMK5G9C79EJB0RV u1)
(map-set mint-passes 'SPDXC0NM3YQDHV1HN3V9P5Y4P26QWY709NB86EYB u5)
(map-set mint-passes 'SP30KD0JV9B3XX6DSPXSH90J621R7VBSSY2GNBC26 u5)
(map-set mint-passes 'SP2TW1D8YF5CE0NDP5VCR5NMTPHQ4PQR1KBB4NQ5Q u2)
(map-set mint-passes 'SP3YSG653BZZNTJVFHFMBSQCTP3GK6NAQEHC82TNK u3)
(map-set mint-passes 'SP2FZ154ESZ8NB34RZ3RS147GD6DSEYNE8DQD0XDM u5)
(map-set mint-passes 'SP3S0KVK1YNQ2WDN9WMFDJ3VZZVBMNAWK033ZBGX u1)
(map-set mint-passes 'SPV9HNVRJ6833QJVN3KD9T1FSXRJSN842M9PJ02V u4)
(map-set mint-passes 'SP14814KM6CBCJZMD15JJ58Q3E2S3NCB6SDXM8C79 u1)
(map-set mint-passes 'SP328RRCE6B3DK3NJR01C2QHVVHXAF9WY9CVV36QD u2)
(map-set mint-passes 'SP2Z81XAQ69W0HF8W2HHB8CNXARBAJF18T8K1BV8B u1)
(map-set mint-passes 'SP12BEEDG31J0AH68DFDJJYZ36D002PKDZCP1DZQE u1)
(map-set mint-passes 'SP1QSN2SZKA2ZVE0024WSV5SZP3ZDM645SKHFTV94 u1)
(map-set mint-passes 'SP18WRH4SF7F1M5QZZ2BQDZZYBCJWT9VWQMDSTFY5 u5)
(map-set mint-passes 'SP218YVRAFYY2Y736VY6869X1QXCHD5TP0S2DVVXD u1)
(map-set mint-passes 'SPD1FGYTNQE7AZ3CRTH7FTZNC0QHGHJJW56KSTS9 u3)
(map-set mint-passes 'SPVKECY6JDNM1RG88KDJT48GJJKPSEMA9HDKA1T0 u1)
(map-set mint-passes 'SP19KPWZDPBD13N07C7Q1BENQMEPRTNA6J6ACBJB3 u5)
(map-set mint-passes 'SP1CHG262X3TQEQPSRPRSTEMN7YEMXPJJM1M403Z9 u1)
(map-set mint-passes 'SP3AQSW210PFW6K3FB1JW62ZHTH11FSVR0SH5AZ6P u5)
(map-set mint-passes 'SP3RBMGTRD92F0S8DTDJ4FVP3D76SM4A27EV93106 u4)
(map-set mint-passes 'SPAFJKGDVS11C9P9DY0ZTNFQ9774R568W9XYZDJV u5)
(map-set mint-passes 'SP1RQZCECRGR5W7J9PBX6TGF7Q0JN923E47W22KN7 u5)
(map-set mint-passes 'SP3QBRHQF4BN8HNNGFHCJMQZDB8V20BMGF2VS3MJ2 u1)
(map-set mint-passes 'SP1K8RG4PV202FHT8J9023G1WJRPFTSZXN9TPNEJX u2)
(map-set mint-passes 'SP2RWS7D7RW6DDZCTXJC0VTK86CKD0TF445116V8A u4)
(map-set mint-passes 'SP2TJ5YMZDY0FKY0PFM37TP6D9QP6XHYT9WHXSH6N u1)
(map-set mint-passes 'SP1QMRV7ET1JDHPRDTX51K06XYQGHCREHQQNY06G1 u2)
(map-set mint-passes 'SPH7P46DMTTFNSHDD33N6G8GFE1MQB2R0QW176B1 u2)
(map-set mint-passes 'SPZCSX967VF1MPKHFWEPK1GGBH5BQJEB12NP5XWC u1)
(map-set mint-passes 'SP3ZTYBN9PYVVFKBEFVSZ2BEGK3HXRNVP6FDG79WV u1)
(map-set mint-passes 'SP349J1ZTEE71M1J5D4YS0BPQCCFJ3YSNM1P8BJY4 u1)
(map-set mint-passes 'SPK8785ECMV8E8Q94KQF94JVZ50TH8FTS5TMQV7Y u2)
(map-set mint-passes 'SP2E03GHWY145XMFDTHX4Z913EADP4RMZ0P0DCTE9 u2)
(map-set mint-passes 'SP2YQCF4DMRWRPKD0EVNDY3AJ0BBS9FQH548GCHND u2)
(map-set mint-passes 'SP2NR2625HB0YFFRFBD9VHVYESNY83VTMKZXMV6H0 u2)
(map-set mint-passes 'SP3QVXMZWR9T5RZVFGJ838BDH4S96BZKDWHBX52EK u2)
(map-set mint-passes 'SP3H0DJMGJFXJ6HP30B74YGK19ADYMD9H13ECSPZJ u2)
(map-set mint-passes 'SP1AA9E6WY7BC1Y2KP8B217DECSAK4S5YCNG62H5W u2)
(map-set mint-passes 'SP2EDM43EC3EH5CRCVGKR2VRXDVXQCW3PPZMV86F6 u2)
(map-set mint-passes 'SP12ZTNXCQY2Q09JQP6991SDHK6P0J6AG8QDCBMJ0 u2)
(map-set mint-passes 'SP624CC9MSWX8SV0KX02EK30AFDNT0MSPT42XG3X u2)
(map-set mint-passes 'SP1SKWYXRSTZ61CKVR9N8Q36N5DJYC5M4213P4WJM u2)
(map-set mint-passes 'SPZKBCMMR5EZ66V8P2V8TTP6QHKC8MXF6CNRE8TH u2)
(map-set mint-passes 'SPHWY482ANTWNTW2618HYHQSDY1WCW7P20BW5F7Y u2)
(map-set mint-passes 'SPTETNN57BDV0X796ZVW41B5VVN99JQRDH68Z5W6 u2)
(map-set mint-passes 'SP1TH8Y1953C1484KDFC8R1NAA0E925CFG7W4Y46G u2)
(map-set mint-passes 'SPC84CF05VYMWX8AP05PYKPHH2FF2A8XMNVCAHVH u2)
(map-set mint-passes 'SP2JQKHDV4N3FH86S52G4DH8HRG93DE1X39YHNSN u2)
(map-set mint-passes 'SPDAAZZ75RKKXKS67HVHYXMKMJNR72V5AGWMA7D6 u2)
(map-set mint-passes 'SP3JJC9CVH2251JC0B4QTPS661H6JNTA2P9E6HA6N u2)
(map-set mint-passes 'SP6Y9FQ6HE0HZ4G5XVT9PG0XZJJM2WWN0SXCY8YV u2)
(map-set mint-passes 'SPZ7Q5J0NE9PSD7MNRGQ6QR61N9YZRET1S7RH1DT u2)
(map-set mint-passes 'SPY11X2CFKJ9JG213HJP1Z4JFT2H88079MQFW2MS u2)
(map-set mint-passes 'SP3PBV8B7KPKNEXAGGYYNZWFB6FZQGWRKNRA034NK u2)
(map-set mint-passes 'SP1XHX4584AM7KARG7MTVBW6CN8JQ8Q97DMFZJ8W u2)
(map-set mint-passes 'SP3B94KBH9AEVAQRHGM54HPA795SPK7NMCM9VJNAN u2)
(map-set mint-passes 'SP3XBS01AVMM6Q1KMBZ21BF2GGJR6217MN2DW0KTG u2)
(map-set mint-passes 'SP2ZD78CEHCFPJ71SB8R0EK0ZMVAGB3NTHK947F06 u2)
(map-set mint-passes 'SP6CRZ19K5YTT64V8FGD5XTM6JCSP0MP1NVW40RJ u2)
(map-set mint-passes 'SP6CRZ19K5YTT64V8FGD5XTM6JCSP0MP1NVW40RJ u2)
(map-set mint-passes 'SP4BTHZK0VQ46JGT9TEJA0EVC6N4N7PF34SDK0YZ u2)
(map-set mint-passes 'SP1HNS1QE5Y2S9E09MV9WZSKYWAXE5FGMM6RDYB4E u2)
(map-set mint-passes 'SP2BEFSB43KR4M6C9117SA2A6T4SA6H0X1XDZF716 u2)
(map-set mint-passes 'SP8S5Q798G12YDE6WWC4G2P7RNH071QDA6Z6WEYR u2)
(map-set mint-passes 'SP2TZE09GHARKG0B8NTT9X77QXBTQPQ2J1579T0D8 u2)
(map-set mint-passes 'SP20T6574NT9K9ZQD1BEBT5S3KR1ZG4W50AJA7G20 u2)
(map-set mint-passes 'SP1VWEB6G5X97YP4TEPCJY6SEJ2K8BQKM9S6R1GGE u5)
(map-set mint-passes 'SP356400A5XM1ZKNXCQ7BJRE8PXXG1EJHV3954Z27 u2)
(map-set mint-passes 'SP2S31PFC49T1J7JWVRJ6TWEW2G1PW4Q603D0CBFC u1)
(map-set mint-passes 'SP1SY6J0SXWQRX29SWJ09W2R5PR4FKEC6Z235SG1T u1)
(map-set mint-passes 'SP4T1A2BNKJMFBY7JNXRKTFYJGTNHW5GJ1W1BBBE u3)
(map-set mint-passes 'SP3W6T3EYVW3DXDXN4PCYEWXX51GDTBS0T96DYQR7 u1)
(map-set mint-passes 'SP3C5ECA2QFB2XF6BTBY3Z006NVTDKNHJM1NTMQT u2)
(map-set mint-passes 'SP17NZ4FXJAKJYM3976YT216ZTJVMJ6XACRB089XH u1)
(map-set mint-passes 'SPSKW6RQQEFB9FN7MC6AMNYEGJYPE716RRA3EKHW u1)
(map-set mint-passes 'SP262CK3VPG6PDF4S96TTXFBVV9Y9Z75F51A6G83N u1)
(map-set mint-passes 'SPY1612ZD54TBX84CY78MHJFZ7H8MR4HZTW9HNP0 u4)
(map-set mint-passes 'SPPMGZTRGMBVCFW3RMEVQJEF26MW9G6EKT51EMD8 u1)
(map-set mint-passes 'SP2W0KJMJB2601KK53Y7F8W9FV5YJ1QVCT0GBJHTA u1)
(map-set mint-passes 'SP35HRCG72XTSHVCSS9WYAPZN1M3SS9X6H7ZW535A u1)
(map-set mint-passes 'SP38Z9JA0Q1ZXBN3DPH9SD9AN8RE2MMPZV8D2DVX u1)
(map-set mint-passes 'SP3P8PMKMYJQ9V16A6EZW2XHH1P29JN58R31VQ4VJ u2)
(map-set mint-passes 'SPJ52DQFJVJACKHY0QX5DRE559MBCXWTSGNBN76V u2)
(map-set mint-passes 'SP1N4YMXJ23X5BEA7BQB4H9TTDDVSZBQWM2HRX6BX u1)
(map-set mint-passes 'SP24ZBZ8ZE6F48JE9G3F3HRTG9FK7E2H6K2QZ3Q1K u2)