-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathcircvs-staximvs-welcome-2-clown-town.clar
More file actions
385 lines (345 loc) · 26 KB
/
circvs-staximvs-welcome-2-clown-town.clar
File metadata and controls
385 lines (345 loc) · 26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
;; circvs-staximvs-welcome-2-clown-town
;; contractType: continuous
(impl-trait 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait)
;;(impl-trait .nft-trait.nft-trait)
(define-non-fungible-token circvs-staximvs-welcome-2-clown-town uint)
(define-constant DEPLOYER tx-sender)
(define-constant ERR-NOT-AUTHORIZED u101)
(define-constant ERR-INVALID-USER u102)
(define-constant ERR-LISTING u103)
(define-constant ERR-WRONG-COMMISSION u104)
(define-constant ERR-NOT-FOUND u105)
(define-constant ERR-NFT-MINT u106)
(define-constant ERR-CONTRACT-LOCKED u107)
(define-constant ERR-METADATA-FROZEN u111)
(define-constant ERR-INVALID-PERCENTAGE u114)
(define-data-var last-id uint u0)
(define-data-var artist-address principal 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG)
(define-data-var locked bool false)
(define-data-var metadata-frozen bool false)
(define-map cids uint (string-ascii 64))
(define-public (lock-contract)
(begin
(asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
(var-set locked true)
(ok true)))
(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 (burn (token-id uint))
(begin
(asserts! (is-owner token-id tx-sender) (err ERR-NOT-AUTHORIZED))
(asserts! (is-none (map-get? market token-id)) (err ERR-LISTING))
(nft-burn? circvs-staximvs-welcome-2-clown-town token-id tx-sender)))
(define-public (set-token-uri (hash (string-ascii 64)) (token-id uint))
(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))
(print { notification: "token-metadata-update", payload: { token-class: "nft", token-ids: (list token-id), contract-id: (as-contract tx-sender) }})
(map-set cids token-id hash)
(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-private (is-owner (token-id uint) (user principal))
(is-eq user (unwrap! (nft-get-owner? circvs-staximvs-welcome-2-clown-town token-id) false)))
(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)))
(define-read-only (get-owner (token-id uint))
(ok (nft-get-owner? circvs-staximvs-welcome-2-clown-town token-id)))
(define-read-only (get-last-token-id)
(ok (var-get last-id)))
(define-read-only (get-token-uri (token-id uint))
(ok (some (concat "ipfs://" (unwrap-panic (map-get? cids token-id))))))
(define-read-only (get-artist-address)
(ok (var-get artist-address)))
(define-public (claim (uris (list 25 (string-ascii 64))))
(mint-many uris))
(define-private (mint-many (uris (list 25 (string-ascii 64))))
(let
(
(token-id (+ (var-get last-id) u1))
(art-addr (var-get artist-address))
(id-reached (fold mint-many-iter uris token-id))
(current-balance (get-balance tx-sender))
)
(asserts! (or (is-eq tx-sender DEPLOYER) (is-eq tx-sender art-addr)) (err ERR-NOT-AUTHORIZED))
(asserts! (is-eq (var-get locked) false) (err ERR-CONTRACT-LOCKED))
(var-set last-id (- id-reached u1))
(map-set token-count tx-sender (+ current-balance (- id-reached token-id)))
(ok id-reached)))
(define-private (mint-many-iter (hash (string-ascii 64)) (next-id uint))
(begin
(unwrap! (nft-mint? circvs-staximvs-welcome-2-clown-town next-id tx-sender) next-id)
(map-set cids next-id hash)
(+ next-id u1)))
;; NON-CUSTODIAL FUNCTIONS START
(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? circvs-staximvs-welcome-2-clown-town 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? circvs-staximvs-welcome-2-clown-town 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? circvs-staximvs-welcome-2-clown-town 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 (and (> royalty-amount u0) (not (is-eq tx-sender (var-get artist-address))))
(try! (stx-transfer? royalty-amount tx-sender (var-get artist-address)))
(print false)
)
(ok true)))
;; NON-CUSTODIAL FUNCTIONS END
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u1 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u1 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/1.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u2 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u2 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/2.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u3 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u3 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/3.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u4 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u4 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/4.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u5 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u5 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/5.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u6 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u6 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/6.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u7 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u7 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/7.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u8 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u8 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/8.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u9 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u9 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/9.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u10 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u10 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/10.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u11 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u11 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/11.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u12 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u12 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/12.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u13 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u13 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/13.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u14 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u14 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/14.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u15 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u15 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/15.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u16 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u16 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/16.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u17 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u17 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/17.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u18 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u18 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/18.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u19 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u19 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/19.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u20 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u20 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/20.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u21 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u21 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/21.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u22 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u22 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/22.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u23 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u23 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/23.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u24 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u24 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/24.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u25 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u25 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/25.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u26 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u26 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/26.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u27 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u27 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/27.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u28 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u28 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/28.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u29 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u29 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/29.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u30 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u30 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/30.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u31 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u31 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/31.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u32 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u32 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/32.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u33 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u33 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/33.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u34 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u34 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/34.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u35 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u35 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/35.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u36 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u36 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/36.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u37 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u37 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/37.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u38 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u38 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/38.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u39 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u39 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/39.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u40 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u40 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/40.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u41 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u41 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/41.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u42 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u42 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/42.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u43 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u43 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/43.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u44 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u44 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/44.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u45 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u45 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/45.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u46 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u46 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/46.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u47 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u47 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/47.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u48 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u48 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/48.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u49 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u49 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/49.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u50 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u50 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/50.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u51 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u51 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/51.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u52 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u52 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/52.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u53 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u53 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/53.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u54 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u54 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/54.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u55 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u55 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/55.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u56 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u56 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/56.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u57 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u57 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/57.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u58 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u58 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/58.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u59 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u59 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/59.json")
(try! (nft-mint? circvs-staximvs-welcome-2-clown-town u60 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG))
(map-set token-count 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG (+ (get-balance 'SP13MQ92X6HP6H50ZN6C68R4A05XAY5PRWJQ57XGG) u1))
(map-set cids u60 "QmchuC6E6kXei7p5GNBhXCgfizufHvBmqpbxuy8Fb7vb9H/json/60.json")
(var-set last-id u60)
(define-data-var license-uri (string-ascii 80) "https://arweave.net/zmc1WTspIhFyVY82bwfAIcIExLFH5lUcHHUN0wXg4W8/4")
(define-data-var license-name (string-ascii 40) "PERSONAL")
(define-read-only (get-license-uri)
(ok (var-get license-uri)))
(define-read-only (get-license-name)
(ok (var-get license-name)))
(define-public (set-license-uri (uri (string-ascii 80)))
(begin
(asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
(ok (var-set license-uri uri))))
(define-public (set-license-name (name (string-ascii 40)))
(begin
(asserts! (or (is-eq tx-sender (var-get artist-address)) (is-eq tx-sender DEPLOYER)) (err ERR-NOT-AUTHORIZED))
(ok (var-set license-name name))))