;; pepepunks-unicorn-edition
;; contractType: public

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

(define-non-fungible-token pepepunks-unicorn-edition 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)
(define-constant ERR-INVALID-PERCENTAGE u114)

;; Internal variables
(define-data-var mint-limit uint u150)
(define-data-var last-id uint u1)
(define-data-var total-price uint u100000000)
(define-data-var artist-address principal 'SP1MX3R99FENJJJVKW27DSA6X2M6SDSVJH4Y0HE23)
(define-data-var ipfs-root (string-ascii 80) "ipfs://ipfs/QmYNkvm5uRbx39189LWmKK4dEQF3tengD5N2qG1gdne2We/json/")
(define-data-var mint-paused bool true)
(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 u20)

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

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

;; Default Minting
(define-private (mint (orders (list 25 bool)))
  (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)))
      (total-commission (/ (* price COMM) u10000))
      (current-balance (get-balance tx-sender))
      (total-artist (- price total-commission))
      (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-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? pepepunks-unicorn-edition 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))
    (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))
    (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? pepepunks-unicorn-edition token-id tx-sender)))

(define-private (is-owner (token-id uint) (user principal))
    (is-eq user (unwrap! (nft-get-owner? pepepunks-unicorn-edition 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))
    (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)))

;; 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))
    (trnsfr id sender recipient)))

;; read-only functions
(define-read-only (get-owner (token-id uint))
  (ok (nft-get-owner? pepepunks-unicorn-edition 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
(use-trait commission-trait 'SP3D6PV2ACBPEKYJTCMH7HEN02KP87QSP8KTEH335.commission-trait.commission)

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

(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? pepepunks-unicorn-edition 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? pepepunks-unicorn-edition 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), royalty: (var-get royalty-percent)}))
    (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? pepepunks-unicorn-edition id) (err ERR-NOT-FOUND)))
      (listing (unwrap! (map-get? market id) (err ERR-LISTING)))
      (price (get price listing))
      (royalty (get royalty listing)))
    (asserts! (is-eq (contract-of comm-trait) (get commission listing)) (err ERR-WRONG-COMMISSION))
    (try! (stx-transfer? price tx-sender owner))
    (try! (pay-royalty price royalty))
    (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)))
    
(define-data-var royalty-percent uint u500)

(define-read-only (get-royalty-percent)
  (ok (var-get royalty-percent)))

(define-public (set-royalty-percent (royalty uint))
  (begin
    (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-INVALID-USER))
    (asserts! (and (>= royalty u0) (<= royalty u1000)) (err ERR-INVALID-PERCENTAGE))
    (ok (var-set royalty-percent royalty))))

(define-private (pay-royalty (price uint) (royalty uint))
  (let (
    (royalty-amount (/ (* price royalty) u10000))
  )
  (if (> royalty-amount u0)
    (try! (stx-transfer? royalty-amount tx-sender (var-get artist-address)))
    (print false)
  )
  (ok true)))
  

;; Airdrop
(define-public (admin-airdrop)
  (let
    (
      (last-nft-id (var-get last-id))
    )
    (begin
      (asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
      (asserts! (is-eq false (var-get airdrop-called)) (err ERR-AIRDROP-CALLED))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u0) 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG))
      (map-set token-count 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG (+ (get-balance 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u1) 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG))
      (map-set token-count 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG (+ (get-balance 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u2) 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG))
      (map-set token-count 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG (+ (get-balance 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u3) 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG))
      (map-set token-count 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG (+ (get-balance 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u4) 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG))
      (map-set token-count 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG (+ (get-balance 'SP32DFA3HXYZ2BV3P8H6XQM8EN94D2212QM71BRYG) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u5) 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0))
      (map-set token-count 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0 (+ (get-balance 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u6) 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0))
      (map-set token-count 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0 (+ (get-balance 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u7) 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0))
      (map-set token-count 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0 (+ (get-balance 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u8) 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0))
      (map-set token-count 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0 (+ (get-balance 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u9) 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0))
      (map-set token-count 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0 (+ (get-balance 'SP5KEYTM4GCEPXJ7T3QD58TJNSMM4Y12H2ABA2J0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u10) 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V))
      (map-set token-count 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V (+ (get-balance 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u11) 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V))
      (map-set token-count 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V (+ (get-balance 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u12) 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V))
      (map-set token-count 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V (+ (get-balance 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u13) 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V))
      (map-set token-count 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V (+ (get-balance 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u14) 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V))
      (map-set token-count 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V (+ (get-balance 'SP1MCHEYXEQ0JYGV4X4ZYZ3D7CKPPVJ8J6GP3W76V) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u15) 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1))
      (map-set token-count 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1 (+ (get-balance 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u16) 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1))
      (map-set token-count 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1 (+ (get-balance 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u17) 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1))
      (map-set token-count 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1 (+ (get-balance 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u18) 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1))
      (map-set token-count 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1 (+ (get-balance 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u19) 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1))
      (map-set token-count 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1 (+ (get-balance 'SPW1JGZ10KXRKFY77EGNB0F9CHEJGEWR7PXAV9W1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u20) 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN))
      (map-set token-count 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN (+ (get-balance 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u21) 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN))
      (map-set token-count 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN (+ (get-balance 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u22) 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN))
      (map-set token-count 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN (+ (get-balance 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u23) 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN))
      (map-set token-count 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN (+ (get-balance 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u24) 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN))
      (map-set token-count 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN (+ (get-balance 'SPKPYMWSJXX4KNAQYZKS0T7BRMESXGQEME4J2WJN) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u25) 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD))
      (map-set token-count 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD (+ (get-balance 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u26) 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD))
      (map-set token-count 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD (+ (get-balance 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u27) 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD))
      (map-set token-count 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD (+ (get-balance 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u28) 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD))
      (map-set token-count 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD (+ (get-balance 'SP2XDHH3DVCN2W4K2J0FWP0XX744R0FQV8W5JMXKD) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u29) 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES))
      (map-set token-count 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES (+ (get-balance 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u30) 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES))
      (map-set token-count 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES (+ (get-balance 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u31) 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES))
      (map-set token-count 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES (+ (get-balance 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u32) 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES))
      (map-set token-count 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES (+ (get-balance 'SP3C5JYPB8YE5H9WC2SM196RVJ0JXN2GHCWXJWSES) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u33) 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0))
      (map-set token-count 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0 (+ (get-balance 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u34) 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0))
      (map-set token-count 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0 (+ (get-balance 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u35) 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0))
      (map-set token-count 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0 (+ (get-balance 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u36) 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0))
      (map-set token-count 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0 (+ (get-balance 'SPXE4CC9QNP0VVVMWHQDAQ3DZ8WCFTV5J2RZWRM0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u37) 'SP3KGJHCN8V9YBXX0AGNN7RH4H4KSAN4NR2BRQRX9))
      (map-set token-count 'SP3KGJHCN8V9YBXX0AGNN7RH4H4KSAN4NR2BRQRX9 (+ (get-balance 'SP3KGJHCN8V9YBXX0AGNN7RH4H4KSAN4NR2BRQRX9) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u38) 'SP3KGJHCN8V9YBXX0AGNN7RH4H4KSAN4NR2BRQRX9))
      (map-set token-count 'SP3KGJHCN8V9YBXX0AGNN7RH4H4KSAN4NR2BRQRX9 (+ (get-balance 'SP3KGJHCN8V9YBXX0AGNN7RH4H4KSAN4NR2BRQRX9) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u39) 'SP3KGJHCN8V9YBXX0AGNN7RH4H4KSAN4NR2BRQRX9))
      (map-set token-count 'SP3KGJHCN8V9YBXX0AGNN7RH4H4KSAN4NR2BRQRX9 (+ (get-balance 'SP3KGJHCN8V9YBXX0AGNN7RH4H4KSAN4NR2BRQRX9) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u40) 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9))
      (map-set token-count 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9 (+ (get-balance 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u41) 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9))
      (map-set token-count 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9 (+ (get-balance 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u42) 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9))
      (map-set token-count 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9 (+ (get-balance 'SPHWCHVHRY2Q4884XNNSV8B3J1T41PBN0GQE16A9) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u43) 'SPQJN9008GBDXCPVS2CZSPXAPYV8251GZX1GX64R))
      (map-set token-count 'SPQJN9008GBDXCPVS2CZSPXAPYV8251GZX1GX64R (+ (get-balance 'SPQJN9008GBDXCPVS2CZSPXAPYV8251GZX1GX64R) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u44) 'SPQJN9008GBDXCPVS2CZSPXAPYV8251GZX1GX64R))
      (map-set token-count 'SPQJN9008GBDXCPVS2CZSPXAPYV8251GZX1GX64R (+ (get-balance 'SPQJN9008GBDXCPVS2CZSPXAPYV8251GZX1GX64R) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u45) 'SP34BZ5T39TY7YHA09V115CN9TGAEZF0NF42NE1J9))
      (map-set token-count 'SP34BZ5T39TY7YHA09V115CN9TGAEZF0NF42NE1J9 (+ (get-balance 'SP34BZ5T39TY7YHA09V115CN9TGAEZF0NF42NE1J9) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u46) 'SP34BZ5T39TY7YHA09V115CN9TGAEZF0NF42NE1J9))
      (map-set token-count 'SP34BZ5T39TY7YHA09V115CN9TGAEZF0NF42NE1J9 (+ (get-balance 'SP34BZ5T39TY7YHA09V115CN9TGAEZF0NF42NE1J9) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u47) 'SP24AGF98C1WYWSDDCA021JGSTTZ90V4BAD4R4SSS))
      (map-set token-count 'SP24AGF98C1WYWSDDCA021JGSTTZ90V4BAD4R4SSS (+ (get-balance 'SP24AGF98C1WYWSDDCA021JGSTTZ90V4BAD4R4SSS) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u48) 'SP24AGF98C1WYWSDDCA021JGSTTZ90V4BAD4R4SSS))
      (map-set token-count 'SP24AGF98C1WYWSDDCA021JGSTTZ90V4BAD4R4SSS (+ (get-balance 'SP24AGF98C1WYWSDDCA021JGSTTZ90V4BAD4R4SSS) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u49) 'SP3CK642B6119EVC6CT550PW5EZZ1AJW661ZMQTYD))
      (map-set token-count 'SP3CK642B6119EVC6CT550PW5EZZ1AJW661ZMQTYD (+ (get-balance 'SP3CK642B6119EVC6CT550PW5EZZ1AJW661ZMQTYD) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u50) 'SP3CK642B6119EVC6CT550PW5EZZ1AJW661ZMQTYD))
      (map-set token-count 'SP3CK642B6119EVC6CT550PW5EZZ1AJW661ZMQTYD (+ (get-balance 'SP3CK642B6119EVC6CT550PW5EZZ1AJW661ZMQTYD) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u51) 'SPPWN1N1CQAK8DFC1W9BR5RTY9K77JTBD0P4K88G))
      (map-set token-count 'SPPWN1N1CQAK8DFC1W9BR5RTY9K77JTBD0P4K88G (+ (get-balance 'SPPWN1N1CQAK8DFC1W9BR5RTY9K77JTBD0P4K88G) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u52) 'SP12BEEDG31J0AH68DFDJJYZ36D002PKDZCP1DZQE))
      (map-set token-count 'SP12BEEDG31J0AH68DFDJJYZ36D002PKDZCP1DZQE (+ (get-balance 'SP12BEEDG31J0AH68DFDJJYZ36D002PKDZCP1DZQE) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u53) 'SP2QDMH88MEZ8FFAYHW4B0BTXJRTHX8XBD54FE7HJ))
      (map-set token-count 'SP2QDMH88MEZ8FFAYHW4B0BTXJRTHX8XBD54FE7HJ (+ (get-balance 'SP2QDMH88MEZ8FFAYHW4B0BTXJRTHX8XBD54FE7HJ) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u54) 'SP1TAS8DAT68SRNCKP2N0DBTQA8SHMAW4D5P50XHV))
      (map-set token-count 'SP1TAS8DAT68SRNCKP2N0DBTQA8SHMAW4D5P50XHV (+ (get-balance 'SP1TAS8DAT68SRNCKP2N0DBTQA8SHMAW4D5P50XHV) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u55) 'SP2S872HVH23Q1M1VQ6Z55VM11V8Z7YG8V3TZTR96))
      (map-set token-count 'SP2S872HVH23Q1M1VQ6Z55VM11V8Z7YG8V3TZTR96 (+ (get-balance 'SP2S872HVH23Q1M1VQ6Z55VM11V8Z7YG8V3TZTR96) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u56) 'SP1CSHTKVHMMQJ7PRQRFYW6SB4QAW6SR3XY2F81PA))
      (map-set token-count 'SP1CSHTKVHMMQJ7PRQRFYW6SB4QAW6SR3XY2F81PA (+ (get-balance 'SP1CSHTKVHMMQJ7PRQRFYW6SB4QAW6SR3XY2F81PA) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u57) 'SP2HVP68NY5BD2RDFX0JNXSYRS8AA6R7S30N08NJZ))
      (map-set token-count 'SP2HVP68NY5BD2RDFX0JNXSYRS8AA6R7S30N08NJZ (+ (get-balance 'SP2HVP68NY5BD2RDFX0JNXSYRS8AA6R7S30N08NJZ) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u58) 'SP2YG72D6FSZ5G7FWFTTFXT2WGYBF7N3H176ZPTF8))
      (map-set token-count 'SP2YG72D6FSZ5G7FWFTTFXT2WGYBF7N3H176ZPTF8 (+ (get-balance 'SP2YG72D6FSZ5G7FWFTTFXT2WGYBF7N3H176ZPTF8) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u59) 'SP2JPMCK24H4ANXV3V2CVWP93E13R3QFBEYKYM2QG))
      (map-set token-count 'SP2JPMCK24H4ANXV3V2CVWP93E13R3QFBEYKYM2QG (+ (get-balance 'SP2JPMCK24H4ANXV3V2CVWP93E13R3QFBEYKYM2QG) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u60) 'SP111TNHS4RZC6VZW0X2JDRWY1WHKY3JCF1ACVR2W))
      (map-set token-count 'SP111TNHS4RZC6VZW0X2JDRWY1WHKY3JCF1ACVR2W (+ (get-balance 'SP111TNHS4RZC6VZW0X2JDRWY1WHKY3JCF1ACVR2W) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u61) 'SP14V9BXQR5A6M32REYYFDBQQE7FA0Q2R41GD90NK))
      (map-set token-count 'SP14V9BXQR5A6M32REYYFDBQQE7FA0Q2R41GD90NK (+ (get-balance 'SP14V9BXQR5A6M32REYYFDBQQE7FA0Q2R41GD90NK) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u62) 'SP22WQSX5S3DJJA8GPBPPNYERXHS4HYB3EM69Q3CE))
      (map-set token-count 'SP22WQSX5S3DJJA8GPBPPNYERXHS4HYB3EM69Q3CE (+ (get-balance 'SP22WQSX5S3DJJA8GPBPPNYERXHS4HYB3EM69Q3CE) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u63) 'SP3M94TZTEZ1DEGF6JAKFSYFC9HMADWQJBEZAEDA1))
      (map-set token-count 'SP3M94TZTEZ1DEGF6JAKFSYFC9HMADWQJBEZAEDA1 (+ (get-balance 'SP3M94TZTEZ1DEGF6JAKFSYFC9HMADWQJBEZAEDA1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u64) 'SP3RJRVHRBRXKH7QJ6Z4GQ7FY8VHNMYQWDMREK8Q5))
      (map-set token-count 'SP3RJRVHRBRXKH7QJ6Z4GQ7FY8VHNMYQWDMREK8Q5 (+ (get-balance 'SP3RJRVHRBRXKH7QJ6Z4GQ7FY8VHNMYQWDMREK8Q5) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u65) 'SPGAKH27HF1T170QET72C727873H911BKNMPF8YB))
      (map-set token-count 'SPGAKH27HF1T170QET72C727873H911BKNMPF8YB (+ (get-balance 'SPGAKH27HF1T170QET72C727873H911BKNMPF8YB) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u66) 'SP8SJDE79CXYFRDF7YY4TNHBZ4JG6SGWM00BT4HP))
      (map-set token-count 'SP8SJDE79CXYFRDF7YY4TNHBZ4JG6SGWM00BT4HP (+ (get-balance 'SP8SJDE79CXYFRDF7YY4TNHBZ4JG6SGWM00BT4HP) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u67) 'SP34XEPDJJFJKFPT87CCZQCPGXR4PJ8ERFVQETKZ4))
      (map-set token-count 'SP34XEPDJJFJKFPT87CCZQCPGXR4PJ8ERFVQETKZ4 (+ (get-balance 'SP34XEPDJJFJKFPT87CCZQCPGXR4PJ8ERFVQETKZ4) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u68) 'SP2BDMSXM0T345W5SEDGVPK43ZTWBR52A58B1VPHJ))
      (map-set token-count 'SP2BDMSXM0T345W5SEDGVPK43ZTWBR52A58B1VPHJ (+ (get-balance 'SP2BDMSXM0T345W5SEDGVPK43ZTWBR52A58B1VPHJ) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u69) 'SP1YCKMYRQ38RX7ZXTMX9EZZWNGXJ1QB8A5YR9Z6Q))
      (map-set token-count 'SP1YCKMYRQ38RX7ZXTMX9EZZWNGXJ1QB8A5YR9Z6Q (+ (get-balance 'SP1YCKMYRQ38RX7ZXTMX9EZZWNGXJ1QB8A5YR9Z6Q) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u70) 'SP3BQJKHGAX1GGSN5XYAVJKXEX9QZ413J21TYW1P9))
      (map-set token-count 'SP3BQJKHGAX1GGSN5XYAVJKXEX9QZ413J21TYW1P9 (+ (get-balance 'SP3BQJKHGAX1GGSN5XYAVJKXEX9QZ413J21TYW1P9) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u71) 'SP1K6W1QST3KKJHM4KGG2BN2WZQTD86PC8H9STN1B))
      (map-set token-count 'SP1K6W1QST3KKJHM4KGG2BN2WZQTD86PC8H9STN1B (+ (get-balance 'SP1K6W1QST3KKJHM4KGG2BN2WZQTD86PC8H9STN1B) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u72) 'SPQE3J7XMMK0DN0BWJZHGE6B05VDYQRXRMDV734D))
      (map-set token-count 'SPQE3J7XMMK0DN0BWJZHGE6B05VDYQRXRMDV734D (+ (get-balance 'SPQE3J7XMMK0DN0BWJZHGE6B05VDYQRXRMDV734D) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u73) 'SP2HK7F30KWK8JRPEJXKHGP5QMWGMZTZX5SM570QS))
      (map-set token-count 'SP2HK7F30KWK8JRPEJXKHGP5QMWGMZTZX5SM570QS (+ (get-balance 'SP2HK7F30KWK8JRPEJXKHGP5QMWGMZTZX5SM570QS) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u74) 'SP1M5XE7YDTB611NVT6TQ9BRMB999NK4G6XDT5PTN))
      (map-set token-count 'SP1M5XE7YDTB611NVT6TQ9BRMB999NK4G6XDT5PTN (+ (get-balance 'SP1M5XE7YDTB611NVT6TQ9BRMB999NK4G6XDT5PTN) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u75) 'SP87PK9PJ1FBC511N5DDXY9YTKWSKH0EE4SZ0N3S))
      (map-set token-count 'SP87PK9PJ1FBC511N5DDXY9YTKWSKH0EE4SZ0N3S (+ (get-balance 'SP87PK9PJ1FBC511N5DDXY9YTKWSKH0EE4SZ0N3S) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u76) 'SP14814KM6CBCJZMD15JJ58Q3E2S3NCB6SDXM8C79))
      (map-set token-count 'SP14814KM6CBCJZMD15JJ58Q3E2S3NCB6SDXM8C79 (+ (get-balance 'SP14814KM6CBCJZMD15JJ58Q3E2S3NCB6SDXM8C79) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u77) 'SP3YTRQVJBW9MK3RTG5VGAJYPB9T4MM87194BB0CH))
      (map-set token-count 'SP3YTRQVJBW9MK3RTG5VGAJYPB9T4MM87194BB0CH (+ (get-balance 'SP3YTRQVJBW9MK3RTG5VGAJYPB9T4MM87194BB0CH) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u78) 'SP3GK06CKDRH2R5KDGSXWJM39HXX5VNYCEGA9Q745))
      (map-set token-count 'SP3GK06CKDRH2R5KDGSXWJM39HXX5VNYCEGA9Q745 (+ (get-balance 'SP3GK06CKDRH2R5KDGSXWJM39HXX5VNYCEGA9Q745) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u79) 'SP3G74X4YQPWB3VZFHQ8ZAXC3ZD6XA14Z6WK1PDD1))
      (map-set token-count 'SP3G74X4YQPWB3VZFHQ8ZAXC3ZD6XA14Z6WK1PDD1 (+ (get-balance 'SP3G74X4YQPWB3VZFHQ8ZAXC3ZD6XA14Z6WK1PDD1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u80) 'SP3AJC728JY0Y43E8RT6K4VDWPT265RDMXJ8M0VH0))
      (map-set token-count 'SP3AJC728JY0Y43E8RT6K4VDWPT265RDMXJ8M0VH0 (+ (get-balance 'SP3AJC728JY0Y43E8RT6K4VDWPT265RDMXJ8M0VH0) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u81) 'SP3E296WCAWJV0T4E8WNBTHF7AJMG298VBKGV8GBZ))
      (map-set token-count 'SP3E296WCAWJV0T4E8WNBTHF7AJMG298VBKGV8GBZ (+ (get-balance 'SP3E296WCAWJV0T4E8WNBTHF7AJMG298VBKGV8GBZ) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u82) 'SP3QAEQPSFYX8FFQ3GVNBFG1YP2S6RY1CD8GWB32X))
      (map-set token-count 'SP3QAEQPSFYX8FFQ3GVNBFG1YP2S6RY1CD8GWB32X (+ (get-balance 'SP3QAEQPSFYX8FFQ3GVNBFG1YP2S6RY1CD8GWB32X) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u83) 'SP3X16BR7MQ0K690CZ2BGDK9RXA4BXDXWGAR20VK5))
      (map-set token-count 'SP3X16BR7MQ0K690CZ2BGDK9RXA4BXDXWGAR20VK5 (+ (get-balance 'SP3X16BR7MQ0K690CZ2BGDK9RXA4BXDXWGAR20VK5) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u84) 'SP1PJ6FG587CQK586VSZNHDK60H724F7XJY6SBBG3))
      (map-set token-count 'SP1PJ6FG587CQK586VSZNHDK60H724F7XJY6SBBG3 (+ (get-balance 'SP1PJ6FG587CQK586VSZNHDK60H724F7XJY6SBBG3) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u85) 'SP2069715QFEA9GK8Q2E7QREFABGKRP78C08NTDTK))
      (map-set token-count 'SP2069715QFEA9GK8Q2E7QREFABGKRP78C08NTDTK (+ (get-balance 'SP2069715QFEA9GK8Q2E7QREFABGKRP78C08NTDTK) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u86) 'SP265DNHNK1NHX7FE9MZKCCA4G1VS7TT3BMES5TR))
      (map-set token-count 'SP265DNHNK1NHX7FE9MZKCCA4G1VS7TT3BMES5TR (+ (get-balance 'SP265DNHNK1NHX7FE9MZKCCA4G1VS7TT3BMES5TR) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u87) 'SPV00QHST52GD7D0SEWV3R5N04RD4Q1PMA3TE2MP))
      (map-set token-count 'SPV00QHST52GD7D0SEWV3R5N04RD4Q1PMA3TE2MP (+ (get-balance 'SPV00QHST52GD7D0SEWV3R5N04RD4Q1PMA3TE2MP) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u88) 'SP117NVTJF0Q9EZX6XAW182QVJ50SBF2SF1C52KYA))
      (map-set token-count 'SP117NVTJF0Q9EZX6XAW182QVJ50SBF2SF1C52KYA (+ (get-balance 'SP117NVTJF0Q9EZX6XAW182QVJ50SBF2SF1C52KYA) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u89) 'SP7MAP8XJCMRZ9901ETFA3EKVVPJ4X51AWQ2VG4F))
      (map-set token-count 'SP7MAP8XJCMRZ9901ETFA3EKVVPJ4X51AWQ2VG4F (+ (get-balance 'SP7MAP8XJCMRZ9901ETFA3EKVVPJ4X51AWQ2VG4F) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u90) 'SP2J1KPVK02423DE29KSV868ZBE0S6VPVJ9PSS3NE))
      (map-set token-count 'SP2J1KPVK02423DE29KSV868ZBE0S6VPVJ9PSS3NE (+ (get-balance 'SP2J1KPVK02423DE29KSV868ZBE0S6VPVJ9PSS3NE) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u91) 'SP2J4M1478902E1A4WPVX99FECDYSEHEMZW249K27))
      (map-set token-count 'SP2J4M1478902E1A4WPVX99FECDYSEHEMZW249K27 (+ (get-balance 'SP2J4M1478902E1A4WPVX99FECDYSEHEMZW249K27) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u92) 'SP2SBSJ0VNFNBZFT5KX5F95Z0TYMF9AHWDHQVB1E1))
      (map-set token-count 'SP2SBSJ0VNFNBZFT5KX5F95Z0TYMF9AHWDHQVB1E1 (+ (get-balance 'SP2SBSJ0VNFNBZFT5KX5F95Z0TYMF9AHWDHQVB1E1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u93) 'SPVQ4CH9AZ7KE4NHC09N5A98X10ED3CTZF5BXR3P))
      (map-set token-count 'SPVQ4CH9AZ7KE4NHC09N5A98X10ED3CTZF5BXR3P (+ (get-balance 'SPVQ4CH9AZ7KE4NHC09N5A98X10ED3CTZF5BXR3P) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u94) 'SP30H7S10NK42C2AYJXV6RDVE4AM93BJMEBXD3GHF))
      (map-set token-count 'SP30H7S10NK42C2AYJXV6RDVE4AM93BJMEBXD3GHF (+ (get-balance 'SP30H7S10NK42C2AYJXV6RDVE4AM93BJMEBXD3GHF) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u95) 'SPKG09MT5HAVD2D48YPYPAD9DBW535N4NYQXVP81))
      (map-set token-count 'SPKG09MT5HAVD2D48YPYPAD9DBW535N4NYQXVP81 (+ (get-balance 'SPKG09MT5HAVD2D48YPYPAD9DBW535N4NYQXVP81) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u96) 'SP15C6A6519BWYXHJJTQNPYJJ4TWMBVEXQ5K2ETS2))
      (map-set token-count 'SP15C6A6519BWYXHJJTQNPYJJ4TWMBVEXQ5K2ETS2 (+ (get-balance 'SP15C6A6519BWYXHJJTQNPYJJ4TWMBVEXQ5K2ETS2) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u97) 'SP16JSP1JMTBNV3GN5Y3JYEEPG5WK3SGSYDZSM7VJ))
      (map-set token-count 'SP16JSP1JMTBNV3GN5Y3JYEEPG5WK3SGSYDZSM7VJ (+ (get-balance 'SP16JSP1JMTBNV3GN5Y3JYEEPG5WK3SGSYDZSM7VJ) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u98) 'SP16MMTNCPGW89N6K0MGECVHJ8WYFBB9T9Z7827PR))
      (map-set token-count 'SP16MMTNCPGW89N6K0MGECVHJ8WYFBB9T9Z7827PR (+ (get-balance 'SP16MMTNCPGW89N6K0MGECVHJ8WYFBB9T9Z7827PR) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u99) 'SP1D1A8QDF1D0VT91A005ZVJWBVFZ682XZ3S43QWK))
      (map-set token-count 'SP1D1A8QDF1D0VT91A005ZVJWBVFZ682XZ3S43QWK (+ (get-balance 'SP1D1A8QDF1D0VT91A005ZVJWBVFZ682XZ3S43QWK) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u100) 'SP1E3EVV4V3JGV482S82REH2KY3JRS30Z8X7JCS79))
      (map-set token-count 'SP1E3EVV4V3JGV482S82REH2KY3JRS30Z8X7JCS79 (+ (get-balance 'SP1E3EVV4V3JGV482S82REH2KY3JRS30Z8X7JCS79) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u101) 'SP1MX3R99FENJJJVKW27DSA6X2M6SDSVJH4Y0HE23))
      (map-set token-count 'SP1MX3R99FENJJJVKW27DSA6X2M6SDSVJH4Y0HE23 (+ (get-balance 'SP1MX3R99FENJJJVKW27DSA6X2M6SDSVJH4Y0HE23) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u102) 'SP1W3T8PC4KYJQCCEGPG3XFYH71JFM90D1ETANM4S))
      (map-set token-count 'SP1W3T8PC4KYJQCCEGPG3XFYH71JFM90D1ETANM4S (+ (get-balance 'SP1W3T8PC4KYJQCCEGPG3XFYH71JFM90D1ETANM4S) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u103) 'SP1WPGGAZ96CC6C85K86SYZNDRRDBF6CGMYWAFSHR))
      (map-set token-count 'SP1WPGGAZ96CC6C85K86SYZNDRRDBF6CGMYWAFSHR (+ (get-balance 'SP1WPGGAZ96CC6C85K86SYZNDRRDBF6CGMYWAFSHR) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u104) 'SP1XX81XBN0FKGA4ARN0CDECH1AQ2PXHGA84ZRWHJ))
      (map-set token-count 'SP1XX81XBN0FKGA4ARN0CDECH1AQ2PXHGA84ZRWHJ (+ (get-balance 'SP1XX81XBN0FKGA4ARN0CDECH1AQ2PXHGA84ZRWHJ) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u105) 'SP225X75JEN4894XV3JWD6NJKY16X739YT3X891VW))
      (map-set token-count 'SP225X75JEN4894XV3JWD6NJKY16X739YT3X891VW (+ (get-balance 'SP225X75JEN4894XV3JWD6NJKY16X739YT3X891VW) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u106) 'SP22JVYH52F33R584TM195J9Y84F1F9ARM4CW3R8Q))
      (map-set token-count 'SP22JVYH52F33R584TM195J9Y84F1F9ARM4CW3R8Q (+ (get-balance 'SP22JVYH52F33R584TM195J9Y84F1F9ARM4CW3R8Q) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u107) 'SP25J2EJ4GNE42860RAZ2DF18X5JNKVMC0WRGV65R))
      (map-set token-count 'SP25J2EJ4GNE42860RAZ2DF18X5JNKVMC0WRGV65R (+ (get-balance 'SP25J2EJ4GNE42860RAZ2DF18X5JNKVMC0WRGV65R) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u108) 'SP2791RKSYJJ39MVHC09J8NARWBMK5G9C79EJB0RV))
      (map-set token-count 'SP2791RKSYJJ39MVHC09J8NARWBMK5G9C79EJB0RV (+ (get-balance 'SP2791RKSYJJ39MVHC09J8NARWBMK5G9C79EJB0RV) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u109) 'SP29NN0QCNQFNMZBYV0Y84WM2X8WGA8186GEGBMMC))
      (map-set token-count 'SP29NN0QCNQFNMZBYV0Y84WM2X8WGA8186GEGBMMC (+ (get-balance 'SP29NN0QCNQFNMZBYV0Y84WM2X8WGA8186GEGBMMC) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u110) 'SP2FSVSGZF6FQY0PG6NH8MGRFV43460GEGHB47CZK))
      (map-set token-count 'SP2FSVSGZF6FQY0PG6NH8MGRFV43460GEGHB47CZK (+ (get-balance 'SP2FSVSGZF6FQY0PG6NH8MGRFV43460GEGHB47CZK) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u111) 'SP2GJGK4MSYTX9SX98NJJWA50A06WZEF1K59MH90C))
      (map-set token-count 'SP2GJGK4MSYTX9SX98NJJWA50A06WZEF1K59MH90C (+ (get-balance 'SP2GJGK4MSYTX9SX98NJJWA50A06WZEF1K59MH90C) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u112) 'SP2HV9HYWZRAPTCC10VXCK72P3W4F9NDB8E1HBEZH))
      (map-set token-count 'SP2HV9HYWZRAPTCC10VXCK72P3W4F9NDB8E1HBEZH (+ (get-balance 'SP2HV9HYWZRAPTCC10VXCK72P3W4F9NDB8E1HBEZH) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u113) 'SP2Q5A2VTTVVDGNPBM45Q6FTBRR5E1X6ZTGG65VNW))
      (map-set token-count 'SP2Q5A2VTTVVDGNPBM45Q6FTBRR5E1X6ZTGG65VNW (+ (get-balance 'SP2Q5A2VTTVVDGNPBM45Q6FTBRR5E1X6ZTGG65VNW) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u114) 'SP2QE37DRH9WZM6K4K8Z55XD0Y31P2FEXA62BYAT5))
      (map-set token-count 'SP2QE37DRH9WZM6K4K8Z55XD0Y31P2FEXA62BYAT5 (+ (get-balance 'SP2QE37DRH9WZM6K4K8Z55XD0Y31P2FEXA62BYAT5) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u115) 'SP2T3BTTS51ZA29VGXS6NX055Y1YYW3C149BXS28K))
      (map-set token-count 'SP2T3BTTS51ZA29VGXS6NX055Y1YYW3C149BXS28K (+ (get-balance 'SP2T3BTTS51ZA29VGXS6NX055Y1YYW3C149BXS28K) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u116) 'SP2TW1D8YF5CE0NDP5VCR5NMTPHQ4PQR1KBB4NQ5Q))
      (map-set token-count 'SP2TW1D8YF5CE0NDP5VCR5NMTPHQ4PQR1KBB4NQ5Q (+ (get-balance 'SP2TW1D8YF5CE0NDP5VCR5NMTPHQ4PQR1KBB4NQ5Q) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u117) 'SP2WZ3YVH8PQAT9SCTRKW79BXHJ8M652NMRJ7YN8A))
      (map-set token-count 'SP2WZ3YVH8PQAT9SCTRKW79BXHJ8M652NMRJ7YN8A (+ (get-balance 'SP2WZ3YVH8PQAT9SCTRKW79BXHJ8M652NMRJ7YN8A) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u118) 'SP31HR3BK10ENB0TW7M989Q98KWCYWT5ECKW6SGQ3))
      (map-set token-count 'SP31HR3BK10ENB0TW7M989Q98KWCYWT5ECKW6SGQ3 (+ (get-balance 'SP31HR3BK10ENB0TW7M989Q98KWCYWT5ECKW6SGQ3) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u119) 'SP32F0HZXV47PXVYB5GNPE3XRJDPAY4VH7P6QR1JM))
      (map-set token-count 'SP32F0HZXV47PXVYB5GNPE3XRJDPAY4VH7P6QR1JM (+ (get-balance 'SP32F0HZXV47PXVYB5GNPE3XRJDPAY4VH7P6QR1JM) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u120) 'SP32G5NZH2KJ7P0SDFC7MEG06MGR6ZJB8FJT449SJ))
      (map-set token-count 'SP32G5NZH2KJ7P0SDFC7MEG06MGR6ZJB8FJT449SJ (+ (get-balance 'SP32G5NZH2KJ7P0SDFC7MEG06MGR6ZJB8FJT449SJ) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u121) 'SP337WP7AQSX8Q9H0TGY8K3RVQBBF82MTZMRE7JDB))
      (map-set token-count 'SP337WP7AQSX8Q9H0TGY8K3RVQBBF82MTZMRE7JDB (+ (get-balance 'SP337WP7AQSX8Q9H0TGY8K3RVQBBF82MTZMRE7JDB) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u122) 'SP33QBZQF9CZYDQTA7A5SADQA47J7FBC00G5Z85CD))
      (map-set token-count 'SP33QBZQF9CZYDQTA7A5SADQA47J7FBC00G5Z85CD (+ (get-balance 'SP33QBZQF9CZYDQTA7A5SADQA47J7FBC00G5Z85CD) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u123) 'SP34SYZTWXPMA0M13MTTSMWFYHWMDKHB0S9SRGZ11))
      (map-set token-count 'SP34SYZTWXPMA0M13MTTSMWFYHWMDKHB0S9SRGZ11 (+ (get-balance 'SP34SYZTWXPMA0M13MTTSMWFYHWMDKHB0S9SRGZ11) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u124) 'SP3BH9700MJEX25GWJYTCDNZB50QC786T9QM8NM3B))
      (map-set token-count 'SP3BH9700MJEX25GWJYTCDNZB50QC786T9QM8NM3B (+ (get-balance 'SP3BH9700MJEX25GWJYTCDNZB50QC786T9QM8NM3B) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u125) 'SP3P8M5J25457Q73MKS8EGD5Z19Z57RKYSPNEAK85))
      (map-set token-count 'SP3P8M5J25457Q73MKS8EGD5Z19Z57RKYSPNEAK85 (+ (get-balance 'SP3P8M5J25457Q73MKS8EGD5Z19Z57RKYSPNEAK85) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u126) 'SP3P8PMKMYJQ9V16A6EZW2XHH1P29JN58R31VQ4VJ))
      (map-set token-count 'SP3P8PMKMYJQ9V16A6EZW2XHH1P29JN58R31VQ4VJ (+ (get-balance 'SP3P8PMKMYJQ9V16A6EZW2XHH1P29JN58R31VQ4VJ) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u127) 'SP3TZF64TY080GVMZRT4Z87E383Q8EAKZ5W67FCNY))
      (map-set token-count 'SP3TZF64TY080GVMZRT4Z87E383Q8EAKZ5W67FCNY (+ (get-balance 'SP3TZF64TY080GVMZRT4Z87E383Q8EAKZ5W67FCNY) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u128) 'SP3VK2S9N1Q5JQBYBTVRZRWNCV6VCXXJN5B0N6S8V))
      (map-set token-count 'SP3VK2S9N1Q5JQBYBTVRZRWNCV6VCXXJN5B0N6S8V (+ (get-balance 'SP3VK2S9N1Q5JQBYBTVRZRWNCV6VCXXJN5B0N6S8V) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u129) 'SP3W5KN5XC7RQ5M0TMFGEZANE4P80Z7KQF1PJJB55))
      (map-set token-count 'SP3W5KN5XC7RQ5M0TMFGEZANE4P80Z7KQF1PJJB55 (+ (get-balance 'SP3W5KN5XC7RQ5M0TMFGEZANE4P80Z7KQF1PJJB55) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u130) 'SP3X1D7FJ3TXXFQ979SYS2DS0PTNQT5YWD25D2ZDE))
      (map-set token-count 'SP3X1D7FJ3TXXFQ979SYS2DS0PTNQT5YWD25D2ZDE (+ (get-balance 'SP3X1D7FJ3TXXFQ979SYS2DS0PTNQT5YWD25D2ZDE) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u131) 'SP3X6QG6ZHB7HNP3RMQFXYRMF2TWBHN0CWG3GYZ5N))
      (map-set token-count 'SP3X6QG6ZHB7HNP3RMQFXYRMF2TWBHN0CWG3GYZ5N (+ (get-balance 'SP3X6QG6ZHB7HNP3RMQFXYRMF2TWBHN0CWG3GYZ5N) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u132) 'SP4DJ9TS6PXMQ42J6FNQZBBJ6SPEE08DM8CNVCW1))
      (map-set token-count 'SP4DJ9TS6PXMQ42J6FNQZBBJ6SPEE08DM8CNVCW1 (+ (get-balance 'SP4DJ9TS6PXMQ42J6FNQZBBJ6SPEE08DM8CNVCW1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u133) 'SP5G3VY7MZT8BNB6FHXZE9JD4PPF8WRT3H6JSBWW))
      (map-set token-count 'SP5G3VY7MZT8BNB6FHXZE9JD4PPF8WRT3H6JSBWW (+ (get-balance 'SP5G3VY7MZT8BNB6FHXZE9JD4PPF8WRT3H6JSBWW) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u134) 'SP6VV2AFXM7ZMT5V3ZAE8M6JXK9EA5N1GPFHJC4M))
      (map-set token-count 'SP6VV2AFXM7ZMT5V3ZAE8M6JXK9EA5N1GPFHJC4M (+ (get-balance 'SP6VV2AFXM7ZMT5V3ZAE8M6JXK9EA5N1GPFHJC4M) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u135) 'SPDXC0NM3YQDHV1HN3V9P5Y4P26QWY709NB86EYB))
      (map-set token-count 'SPDXC0NM3YQDHV1HN3V9P5Y4P26QWY709NB86EYB (+ (get-balance 'SPDXC0NM3YQDHV1HN3V9P5Y4P26QWY709NB86EYB) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u136) 'SPJRW4D4JACQQQQ5DK09P1K7M2TE8PGZJ638HCW1))
      (map-set token-count 'SPJRW4D4JACQQQQ5DK09P1K7M2TE8PGZJ638HCW1 (+ (get-balance 'SPJRW4D4JACQQQQ5DK09P1K7M2TE8PGZJ638HCW1) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u137) 'SPPETRK1EV53SKFF2Y2QH8GPWG2GN0XT1KFKN8S))
      (map-set token-count 'SPPETRK1EV53SKFF2Y2QH8GPWG2GN0XT1KFKN8S (+ (get-balance 'SPPETRK1EV53SKFF2Y2QH8GPWG2GN0XT1KFKN8S) u1))
      (try! (nft-mint? pepepunks-unicorn-edition (+ last-nft-id u138) 'SPPRBSNWX16XYKVTVPFVQN60Q70P86JJ9Q98CW0))
      (map-set token-count 'SPPRBSNWX16XYKVTVPFVQN60Q70P86JJ9Q98CW0 (+ (get-balance 'SPPRBSNWX16XYKVTVPFVQN60Q70P86JJ9Q98CW0) u1))

      (var-set last-id (+ last-nft-id u139))
      (var-set airdrop-called true)
      (ok true))))