BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Mainnet
  • /
  • Versum Items
FA2Ledger
operations (689K)Storage Code Interact Tokens Metadata Fork Views Statistics Details
Latest
​x
521
1210
 
1
{ parameter (or
2
              (or
3
                (or
4
                  (or
5
                    (or
6
                      (pair %_add_migration_target (bytes %extra_data)
7
                                                   (address %new_contract))
8
                      (or (address %_set_contract_registry) (bool %_set_contracts_mht)))
9
                    (or (address %_set_identity)
10
                        (or (address %_set_market) (address %_set_materia_address))))
11
                  (or
12
                    (or (nat %_set_mint_materia_cost)
13
                        (or (bool %_set_minting_paused) (bool %_set_verified_to_mint)))
14
                    (or
15
                      (or
16
                        (pair %_ul_all_contracts_mht (address %minter) (nat %token_id))
17
                        (pair %_update_mint_slots (bool %_add)
18
                                                  (list %updates (pair
19
                                                                  (bool %genesis_set)
20
                                                                  (pair
21
                                                                    (address %minter)
22
                                                                    (nat %token_id))))))
23
                      (or
24
                        (pair %decrease_royalties (nat %new_royalties) (nat %token_id))
25
                        (nat %disable_no_transfers_until)))))
26
                (or
27
                  (or
28
                    (or (nat %disable_req_verified_to_hold)
29
                        (or (bytes %generic)
30
                            (pair %increase_max_per_wallet (nat %new_max)
31
                                                           (nat %token_id))))
32
                    (or
33
                      (pair %migrate (pair (address %_from) (bytes %extra_data))
34
                                     (pair
35
                                       (list %migrations (pair (nat %amount)
36
                                                              (nat %token_id)))
37
                                       (address %new_contract)))
38
                      (or
39
                        (pair %mint
40
                          (pair
41
                            (pair (nat %amount)
42
                                  (list %infusions (pair (address %token_address)
43
                                                        (list %token_id_amounts (pair
44
                                                                                 (nat %amount)
45
                                                                                 (nat %token_id))))))
46
                            (pair (nat %max_per_address) (map %metadata string bytes)))
47
                          (pair
48
                            (pair (option %no_transfers_until timestamp)
49
                                  (bool %req_verified_to_own))
50
                            (pair (nat %royalty)
51
                                  (list %splits (pair (address %address) (nat %pct))))))
52
                        (pair %pay_royalties_fa2 (address %buyer)
53
                                                 (pair (address %seller)
54
                                                       (pair (nat %token_id)
55
                                                             (pair
56
                                                               (pair %fa2 address nat)
57
                                                               (nat %amount))))))))
58
                  (or
59
                    (or
60
                      (pair %pay_royalties_xtz (address %buyer)
61
                                               (pair (address %seller) (nat %token_id)))
62
                      (or (nat %sign_cocreator)
63
                          (list %transfer (pair (address %from_)
64
                                               (list %txs (pair (address %to_)
65
                                                               (pair (nat %token_id)
66
                                                                     (nat %amount))))))))
67
                    (or
68
                      (or (nat %unlock_contracts_may_hold_token)
69
                          (pair %update_extra_db (bytes %key) (bytes %value)))
70
                      (or
71
                        (list %update_operators (or
72
                                                 (pair %add_operator (address %owner)
73
                                                                     (pair
74
                                                                       (address %operator)
75
                                                                       (nat %token_id)))
76
                                                 (pair %remove_operator (address %owner)
77
                                                                        (pair
78
                                                                          (address %operator)
79
                                                                          (nat %token_id)))))
80
                        (pair %update_token_metadata (map %metadata string bytes)
81
                                                     (nat %token_id)))))))
82
              (or
83
                (or
84
                  (pair %balance_of
85
                    (list %requests (pair (address %owner) (nat %token_id)))
86
                    (contract %callback (list (pair
87
                                              (pair %request (address %owner)
88
                                                             (nat %token_id))
89
                                              (nat %balance)))))
90
                  (or (pair %mutez_transfer (mutez %amount) (address %destination))
91
                      (address %set_administrator)))
92
                (or (pair %set_metadata (string %k) (bytes %v))
93
                    (or (bool %set_pause)
94
                        (pair %update_ep
95
                          (or %ep_name
96
                            (or (or (unit %_add_migration_target) (unit %generic))
97
                                (or (unit %migrate) (unit %mint)))
98
                            (or (or (unit %pay_royalties_fa2) (unit %pay_royalties_xtz))
99
                                (or (unit %transfer) (unit %update_operators))))
100
                          (lambda %new_ep
101
                            (pair
102
                              (or
103
                                (or
104
                                  (or
105
                                    (or
106
                                      (pair %_add_migration_target (bytes %extra_data)
107
                                                                   (address %new_contract))
108
                                      (or (address %_set_contract_registry)
109
                                          (bool %_set_contracts_mht)))
110
                                    (or (address %_set_identity)
111
                                        (or (address %_set_market)
112
                                            (address %_set_materia_address))))
113
                                  (or
114
                                    (or (nat %_set_mint_materia_cost)
115
                                        (or (bool %_set_minting_paused)
116
                                            (bool %_set_verified_to_mint)))
117
                                    (or
118
                                      (or
119
                                        (pair %_ul_all_contracts_mht (address %minter)
120
                                                                     (nat %token_id))
121
                                        (pair %_update_mint_slots (bool %_add)
122
                                                                  (list %updates (pair
123
                                                                                  (bool %genesis_set)
124
                                                                                  (pair
125
                                                                                    (address %minter)
126
                                                                                    (nat %token_id))))))
127
                                      (or
128
                                        (pair %decrease_royalties (nat %new_royalties)
129
                                                                  (nat %token_id))
130
                                        (nat %disable_no_transfers_until)))))
131
                                (or
132
                                  (or
133
                                    (or (nat %disable_req_verified_to_hold)
134
                                        (or (bytes %generic)
135
                                            (pair %increase_max_per_wallet
136
                                              (nat %new_max)
137
                                              (nat %token_id))))
138
                                    (or
139
                                      (pair %migrate
140
                                        (pair (address %_from) (bytes %extra_data))
141
                                        (pair
142
                                          (list %migrations (pair (nat %amount)
143
                                                                 (nat %token_id)))
144
                                          (address %new_contract)))
145
                                      (or
146
                                        (pair %mint
147
                                          (pair
148
                                            (pair (nat %amount)
149
                                                  (list %infusions (pair
150
                                                                    (address %token_address)
151
                                                                    (list %token_id_amounts (pair
152
                                                                                             (nat %amount)
153
                                                                                             (nat %token_id))))))
154
                                            (pair (nat %max_per_address)
155
                                                  (map %metadata string bytes)))
156
                                          (pair
157
                                            (pair (option %no_transfers_until timestamp)
158
                                                  (bool %req_verified_to_own))
159
                                            (pair (nat %royalty)
160
                                                  (list %splits (pair (address %address)
161
                                                                     (nat %pct))))))
162
                                        (pair %pay_royalties_fa2 (address %buyer)
163
                                                                 (pair (address %seller)
164
                                                                       (pair
165
                                                                         (nat %token_id)
166
                                                                         (pair
167
                                                                           (pair %fa2
168
                                                                             address
169
                                                                             nat)
170
                                                                           (nat %amount))))))))
171
                                  (or
172
                                    (or
173
                                      (pair %pay_royalties_xtz (address %buyer)
174
                                                               (pair (address %seller)
175
                                                                     (nat %token_id)))
176
                                      (or (nat %sign_cocreator)
177
                                          (list %transfer (pair (address %from_)
178
                                                               (list %txs (pair
179
                                                                           (address %to_)
180
                                                                           (pair
181
                                                                             (nat %token_id)
182
                                                                             (nat %amount))))))))
183
                                    (or
184
                                      (or (nat %unlock_contracts_may_hold_token)
185
                                          (pair %update_extra_db (bytes %key)
186
                                                                 (bytes %value)))
187
                                      (or
188
                                        (list %update_operators (or
189
                                                                 (pair %add_operator
190
                                                                   (address %owner)
191
                                                                   (pair
192
                                                                     (address %operator)
193
                                                                     (nat %token_id)))
194
                                                                 (pair %remove_operator
195
                                                                   (address %owner)
196
                                                                   (pair
197
                                                                     (address %operator)
198
                                                                     (nat %token_id)))))
199
                                        (pair %update_token_metadata
200
                                          (map %metadata string bytes)
201
                                          (nat %token_id)))))))
202
                              (pair
203
                                (pair
204
                                  (pair
205
                                    (pair
206
                                      (lambda %admin_check_lambda
207
                                        (pair
208
                                          (pair (address %address)
209
                                                (option %permission string))
210
                                          (pair (address %self_address)
211
                                                (address %self_admin)))
212
                                        bool)
213
                                      (pair (address %administrator)
214
                                            (set %all_tokens nat)))
215
                                    (pair (address %contract_registry)
216
                                          (pair (bool %contracts_may_hold_tokens_global)
217
                                                (big_map %extra_db bytes bytes))))
218
                                  (pair
219
                                    (pair (set %genesis_minters address)
220
                                          (pair (timestamp %genesis_timeout)
221
                                                (address %identity)))
222
                                    (pair (big_map %ledger (pair address nat) nat)
223
                                          (pair (address %market)
224
                                                (address %materia_address)))))
225
                                (pair
226
                                  (pair
227
                                    (pair (big_map %metadata string bytes)
228
                                          (pair (nat %mint_materia_cost)
229
                                                (big_map %mint_slots nat address)))
230
                                    (pair (bool %minting_paused)
231
                                          (pair
232
                                            (big_map %operators
233
                                              (pair (address %owner)
234
                                                    (pair (address %operator)
235
                                                          (nat %token_id)))
236
                                              unit)
237
                                            (bool %paused))))
238
                                  (pair
239
                                    (pair (bool %require_verified_to_mint)
240
                                          (pair
241
                                            (big_map %signed_co_creatorship
242
                                              (pair (address %cocreator) (nat %token_id))
243
                                              unit)
244
                                            (nat %token_counter)))
245
                                    (pair
246
                                      (big_map %token_extra_data nat
247
                                                                 (pair
248
                                                                   (pair
249
                                                                     (pair
250
                                                                       (bool %contracts_may_hold_token)
251
                                                                       (map %extra_fields
252
                                                                         string
253
                                                                         bytes))
254
                                                                     (pair
255
                                                                       (list %infusions (pair
256
                                                                                         (address %token_address)
257
                                                                                         (list %token_id_amounts (pair
258
                                                                                                                  (nat %amount)
259
                                                                                                                  (nat %token_id)))))
260
                                                                       (nat %max_per_address)))
261
                                                                   (pair
262
                                                                     (pair
263
                                                                       (address %minter)
264
                                                                       (option %no_transfers_until timestamp))
265
                                                                     (pair
266
                                                                       (bool %req_verified_to_own)
267
                                                                       (pair
268
                                                                         (nat %royalty)
269
                                                                         (list %splits (pair
270
                                                                                        (address %address)
271
                                                                                        (nat %pct))))))))
272
                                      (pair
273
                                        (big_map %token_metadata nat
274
                                                                 (pair (nat %token_id)
275
                                                                       (map %token_info
276
                                                                         string
277
                                                                         bytes)))
278
                                        (big_map %total_supply nat nat)))))))
279
                            (pair (list operation)
280
                                  (pair
281
                                    (pair
282
                                      (pair
283
                                        (pair
284
                                          (lambda %admin_check_lambda
285
                                            (pair
286
                                              (pair (address %address)
287
                                                    (option %permission string))
288
                                              (pair (address %self_address)
289
                                                    (address %self_admin)))
290
                                            bool)
291
                                          (pair (address %administrator)
292
                                                (set %all_tokens nat)))
293
                                        (pair (address %contract_registry)
294
                                              (pair
295
                                                (bool %contracts_may_hold_tokens_global)
296
                                                (big_map %extra_db bytes bytes))))
297
                                      (pair
298
                                        (pair (set %genesis_minters address)
299
                                              (pair (timestamp %genesis_timeout)
300
                                                    (address %identity)))
301
                                        (pair (big_map %ledger (pair address nat) nat)
302
                                              (pair (address %market)
303
                                                    (address %materia_address)))))
304
                                    (pair
305
                                      (pair
306
                                        (pair (big_map %metadata string bytes)
307
                                              (pair (nat %mint_materia_cost)
308
                                                    (big_map %mint_slots nat address)))
309
                                        (pair (bool %minting_paused)
310
                                              (pair
311
                                                (big_map %operators
312
                                                  (pair (address %owner)
313
                                                        (pair (address %operator)
314
                                                              (nat %token_id)))
315
                                                  unit)
316
                                                (bool %paused))))
317
                                      (pair
318
                                        (pair (bool %require_verified_to_mint)
319
                                              (pair
320
                                                (big_map %signed_co_creatorship
321
                                                  (pair (address %cocreator)
322
                                                        (nat %token_id))
323
                                                  unit)
324
                                                (nat %token_counter)))
325
                                        (pair
326
                                          (big_map %token_extra_data nat
327
                                                                     (pair
328
                                                                       (pair
329
                                                                         (pair
330
                                                                           (bool %contracts_may_hold_token)
331
                                                                           (map %extra_fields
332
                                                                             string
333
                                                                             bytes))
334
                                                                         (pair
335
                                                                           (list %infusions (pair
336
                                                                                             (address %token_address)
337
                                                                                             (list %token_id_amounts (pair
338
                                                                                                                      (nat %amount)
339
                                                                                                                      (nat %token_id)))))
340
                                                                           (nat %max_per_address)))
341
                                                                       (pair
342
                                                                         (pair
343
                                                                           (address %minter)
344
                                                                           (option %no_transfers_until timestamp))
345
                                                                         (pair
346
                                                                           (bool %req_verified_to_own)
347
                                                                           (pair
348
                                                                             (nat %royalty)
349
                                                                             (list %splits (pair
350
                                                                                            (address %address)
351
                                                                                            (nat %pct))))))))
352
                                          (pair
353
                                            (big_map %token_metadata nat
354
                                                                     (pair
355
                                                                       (nat %token_id)
356
                                                                       (map %token_info
357
                                                                         string
358
                                                                         bytes)))
359
                                            (big_map %total_supply nat nat))))))))))))) ;
360
  storage (pair
361
            (pair
362
              (pair
363
                (pair
364
                  (pair
365
                    (lambda %admin_check_lambda
366
                      (pair (pair (address %address) (option %permission string))
367
                            (pair (address %self_address) (address %self_admin)))
368
                      bool)
369
                    (pair (address %administrator) (set %all_tokens nat)))
370
                  (pair (address %contract_registry)
371
                        (pair (bool %contracts_may_hold_tokens_global)
372
                              (big_map %extra_db bytes bytes))))
373
                (pair
374
                  (pair (set %genesis_minters address)
375
                        (pair (timestamp %genesis_timeout) (address %identity)))
376
                  (pair (big_map %ledger (pair address nat) nat)
377
                        (pair (address %market) (address %materia_address)))))
378
              (pair
379
                (pair
380
                  (pair (big_map %metadata string bytes)
381
                        (pair (nat %mint_materia_cost) (big_map %mint_slots nat address)))
382
                  (pair (bool %minting_paused)
383
                        (pair
384
                          (big_map %operators
385
                            (pair (address %owner)
386
                                  (pair (address %operator) (nat %token_id)))
387
                            unit)
388
                          (bool %paused))))
389
                (pair
390
                  (pair (bool %require_verified_to_mint)
391
                        (pair
392
                          (big_map %signed_co_creatorship
393
                            (pair (address %cocreator) (nat %token_id))
394
                            unit)
395
                          (nat %token_counter)))
396
                  (pair
397
                    (big_map %token_extra_data nat
398
                                               (pair
399
                                                 (pair
400
                                                   (pair
401
                                                     (bool %contracts_may_hold_token)
402
                                                     (map %extra_fields string bytes))
403
                                                   (pair
404
                                                     (list %infusions (pair
405
                                                                       (address %token_address)
406
                                                                       (list %token_id_amounts (pair
407
                                                                                                (nat %amount)
408
                                                                                                (nat %token_id)))))
409
                                                     (nat %max_per_address)))
410
                                                 (pair
411
                                                   (pair (address %minter)
412
                                                         (option %no_transfers_until timestamp))
413
                                                   (pair (bool %req_verified_to_own)
414
                                                         (pair (nat %royalty)
415
                                                               (list %splits (pair
416
                                                                              (address %address)
417
                                                                              (nat %pct))))))))
418
                    (pair
419
                      (big_map %token_metadata nat
420
                                               (pair (nat %token_id)
421
                                                     (map %token_info string bytes)))
422
                      (big_map %total_supply nat nat))))))
423
            (big_map nat
424
                     (lambda
425
                       (pair
426
                         (or
427
                           (or
428
                             (or (or (pair bytes address) (or address bool))
429
                                 (or address (or address address)))
430
                             (or (or nat (or bool bool))
431
                                 (or
432
                                   (or (pair address nat)
433
                                       (pair bool (list (pair bool (pair address nat)))))
434
                                   (or (pair nat nat) nat))))
435
                           (or
436
                             (or (or nat (or bytes (pair nat nat)))
437
                                 (or
438
                                   (pair (pair address bytes)
439
                                         (pair (list (pair nat nat)) address))
440
                                   (or
441
                                     (pair
442
                                       (pair
443
                                         (pair nat
444
                                               (list (pair address (list (pair nat nat)))))
445
                                         (pair nat (map string bytes)))
446
                                       (pair (pair (option timestamp) bool)
447
                                             (pair nat (list (pair address nat)))))
448
                                     (pair address
449
                                           (pair address
450
                                                 (pair nat (pair (pair address nat) nat)))))))
451
                             (or
452
                               (or (pair address (pair address nat))
453
                                   (or nat
454
                                       (list (pair address
455
                                                  (list (pair address (pair nat nat)))))))
456
                               (or (or nat (pair bytes bytes))
457
                                   (or
458
                                     (list (or (pair address (pair address nat))
459
                                              (pair address (pair address nat))))
460
                                     (pair (map string bytes) nat))))))
461
                         (pair
462
                           (pair
463
                             (pair
464
                               (pair
465
                                 (lambda
466
                                   (pair (pair address (option string))
467
                                         (pair address address))
468
                                   bool)
469
                                 (pair address (set nat)))
470
                               (pair address (pair bool (big_map bytes bytes))))
471
                             (pair (pair (set address) (pair timestamp address))
472
                                   (pair (big_map (pair address nat) nat)
473
                                         (pair address address))))
474
                           (pair
475
                             (pair
476
                               (pair (big_map string bytes)
477
                                     (pair nat (big_map nat address)))
478
                               (pair bool
479
                                     (pair
480
                                       (big_map (pair address (pair address nat)) unit)
481
                                       bool)))
482
                             (pair
483
                               (pair bool (pair (big_map (pair address nat) unit) nat))
484
                               (pair
485
                                 (big_map nat
486
                                          (pair
487
                                            (pair (pair bool (map string bytes))
488
                                                  (pair
489
                                                    (list (pair address
490
                                                               (list (pair nat nat))))
491
                                                    nat))
492
                                            (pair (pair address (option timestamp))
493
                                                  (pair bool
494
                                                        (pair nat
495
                                                              (list (pair address nat)))))))
496
                                 (pair (big_map nat (pair nat (map string bytes)))
497
                                       (big_map nat nat)))))))
498
                       (pair (list operation)
499
                             (pair
500
                               (pair
501
                                 (pair
502
                                   (pair
503
                                     (lambda
504
                                       (pair (pair address (option string))
505
                                             (pair address address))
506
                                       bool)
507
                                     (pair address (set nat)))
508
                                   (pair address (pair bool (big_map bytes bytes))))
509
                                 (pair (pair (set address) (pair timestamp address))
510
                                       (pair (big_map (pair address nat) nat)
511
                                             (pair address address))))
512
                               (pair
513
                                 (pair
514
                                   (pair (big_map string bytes)
515
                                         (pair nat (big_map nat address)))
516
                                   (pair bool
517
                                         (pair
518
                                           (big_map (pair address (pair address nat))
519
                                                    unit)
520
                                           bool)))
521
                                 (pair
522
                                   (pair bool
523
                                         (pair (big_map (pair address nat) unit) nat))
524
                                   (pair
525
                                     (big_map nat
526
                                              (pair
527
                                                (pair (pair bool (map string bytes))
528
                                                      (pair
529
                                                        (list (pair address
530
                                                                   (list (pair nat nat))))
531
                                                        nat))
532
                                                (pair (pair address (option timestamp))
533
                                                      (pair bool
534
                                                            (pair nat
535
                                                                  (list (pair address nat)))))))
536
                                     (pair (big_map nat (pair nat (map string bytes)))
537
                                           (big_map nat nat)))))))))) ;
538
  code { CAST (pair
539
                (or
540
                  (or
541
                    (or
542
                      (or (or (pair bytes address) (or address bool))
543
                          (or address (or address address)))
544
                      (or (or nat (or bool bool))
545
                          (or
546
                            (or (pair address nat)
547
                                (pair bool (list (pair bool (pair address nat)))))
548
                            (or (pair nat nat) nat))))
549
                    (or
550
                      (or (or nat (or bytes (pair nat nat)))
551
                          (or
552
                            (pair (pair address bytes)
553
                                  (pair (list (pair nat nat)) address))
554
                            (or
555
                              (pair
556
                                (pair
557
                                  (pair nat (list (pair address (list (pair nat nat)))))
558
                                  (pair nat (map string bytes)))
559
                                (pair (pair (option timestamp) bool)
560
                                      (pair nat (list (pair address nat)))))
561
                              (pair address
562
                                    (pair address
563
                                          (pair nat (pair (pair address nat) nat)))))))
564
                      (or
565
                        (or (pair address (pair address nat))
566
                            (or nat
567
                                (list (pair address (list (pair address (pair nat nat)))))))
568
                        (or (or nat (pair bytes bytes))
569
                            (or
570
                              (list (or (pair address (pair address nat))
571
                                       (pair address (pair address nat))))
572
                              (pair (map string bytes) nat))))))
573
                  (or
574
                    (or
575
                      (pair (list (pair address nat))
576
                            (contract (list (pair (pair address nat) nat))))
577
                      (or (pair mutez address) address))
578
                    (or (pair string bytes)
579
                        (or bool
580
                            (pair
581
                              (or (or (or unit unit) (or unit unit))
582
                                  (or (or unit unit) (or unit unit)))
583
                              (lambda
584
                                (pair
585
                                  (or
586
                                    (or
587
                                      (or (or (pair bytes address) (or address bool))
588
                                          (or address (or address address)))
589
                                      (or (or nat (or bool bool))
590
                                          (or
591
                                            (or (pair address nat)
592
                                                (pair bool
593
                                                      (list (pair bool (pair address nat)))))
594
                                            (or (pair nat nat) nat))))
595
                                    (or
596
                                      (or (or nat (or bytes (pair nat nat)))
597
                                          (or
598
                                            (pair (pair address bytes)
599
                                                  (pair (list (pair nat nat)) address))
600
                                            (or
601
                                              (pair
602
                                                (pair
603
                                                  (pair nat
604
                                                        (list (pair address
605
                                                                   (list (pair nat nat)))))
606
                                                  (pair nat (map string bytes)))
607
                                                (pair (pair (option timestamp) bool)
608
                                                      (pair nat
609
                                                            (list (pair address nat)))))
610
                                              (pair address
611
                                                    (pair address
612
                                                          (pair nat
613
                                                                (pair (pair address nat)
614
                                                                      nat)))))))
615
                                      (or
616
                                        (or (pair address (pair address nat))
617
                                            (or nat
618
                                                (list (pair address
619
                                                           (list (pair address
620
                                                                      (pair nat nat)))))))
621
                                        (or (or nat (pair bytes bytes))
622
                                            (or
623
                                              (list (or (pair address (pair address nat))
624
                                                       (pair address (pair address nat))))
625
                                              (pair (map string bytes) nat))))))
626
                                  (pair
627
                                    (pair
628
                                      (pair
629
                                        (pair
630
                                          (lambda
631
                                            (pair (pair address (option string))
632
                                                  (pair address address))
633
                                            bool)
634
                                          (pair address (set nat)))
635
                                        (pair address (pair bool (big_map bytes bytes))))
636
                                      (pair
637
                                        (pair (set address) (pair timestamp address))
638
                                        (pair (big_map (pair address nat) nat)
639
                                              (pair address address))))
640
                                    (pair
641
                                      (pair
642
                                        (pair (big_map string bytes)
643
                                              (pair nat (big_map nat address)))
644
                                        (pair bool
645
                                              (pair
646
                                                (big_map
647
                                                  (pair address (pair address nat))
648
                                                  unit)
649
                                                bool)))
650
                                      (pair
651
                                        (pair bool
652
                                              (pair (big_map (pair address nat) unit)
653
                                                    nat))
654
                                        (pair
655
                                          (big_map nat
656
                                                   (pair
657
                                                     (pair
658
                                                       (pair bool (map string bytes))
659
                                                       (pair
660
                                                         (list (pair address
661
                                                                    (list (pair nat nat))))
662
                                                         nat))
663
                                                     (pair
664
                                                       (pair address (option timestamp))
665
                                                       (pair bool
666
                                                             (pair nat
667
                                                                   (list (pair address
668
                                                                              nat)))))))
669
                                          (pair
670
                                            (big_map nat (pair nat (map string bytes)))
671
                                            (big_map nat nat)))))))
672
                                (pair (list operation)
673
                                      (pair
674
                                        (pair
675
                                          (pair
676
                                            (pair
677
                                              (lambda
678
                                                (pair (pair address (option string))
679
                                                      (pair address address))
680
                                                bool)
681
                                              (pair address (set nat)))
682
                                            (pair address
683
                                                  (pair bool (big_map bytes bytes))))
684
                                          (pair
685
                                            (pair (set address) (pair timestamp address))
686
                                            (pair (big_map (pair address nat) nat)
687
                                                  (pair address address))))
688
                                        (pair
689
                                          (pair
690
                                            (pair (big_map string bytes)
691
                                                  (pair nat (big_map nat address)))
692
                                            (pair bool
693
                                                  (pair
694
                                                    (big_map
695
                                                      (pair address (pair address nat))
696
                                                      unit)
697
                                                    bool)))
698
                                          (pair
699
                                            (pair bool
700
                                                  (pair
701
                                                    (big_map (pair address nat) unit)
702
                                                    nat))
703
                                            (pair
704
                                              (big_map nat
705
                                                       (pair
706
                                                         (pair
707
                                                           (pair bool (map string bytes))
708
                                                           (pair
709
                                                             (list (pair address
710
                                                                        (list (pair nat
711
                                                                                   nat))))
712
                                                             nat))
713
                                                         (pair
714
                                                           (pair address
715
                                                                 (option timestamp))
716
                                                           (pair bool
717
                                                                 (pair nat
718
                                                                       (list (pair
719
                                                                              address
720
                                                                              nat)))))))
721
                                              (pair
722
                                                (big_map nat
723
                                                         (pair nat (map string bytes)))
724
                                                (big_map nat nat)))))))))))))
725
                (pair
726
                  (pair
727
                    (pair
728
                      (pair
729
                        (pair
730
                          (lambda
731
                            (pair (pair address (option string)) (pair address address))
732
                            bool)
733
                          (pair address (set nat)))
734
                        (pair address (pair bool (big_map bytes bytes))))
735
                      (pair (pair (set address) (pair timestamp address))
736
                            (pair (big_map (pair address nat) nat)
737
                                  (pair address address))))
738
                    (pair
739
                      (pair
740
                        (pair (big_map string bytes) (pair nat (big_map nat address)))
741
                        (pair bool
742
                              (pair (big_map (pair address (pair address nat)) unit)
743
                                    bool)))
744
                      (pair (pair bool (pair (big_map (pair address nat) unit) nat))
745
                            (pair
746
                              (big_map nat
747
                                       (pair
748
                                         (pair (pair bool (map string bytes))
749
                                               (pair
750
                                                 (list (pair address
751
                                                            (list (pair nat nat))))
752
                                                 nat))
753
                                         (pair (pair address (option timestamp))
754
                                               (pair bool
755
                                                     (pair nat (list (pair address nat)))))))
756
                              (pair (big_map nat (pair nat (map string bytes)))
757
                                    (big_map nat nat))))))
758
                  (big_map nat
759
                           (lambda
760
                             (pair
761
                               (or
762
                                 (or
763
                                   (or (or (pair bytes address) (or address bool))
764
                                       (or address (or address address)))
765
                                   (or (or nat (or bool bool))
766
                                       (or
767
                                         (or (pair address nat)
768
                                             (pair bool
769
                                                   (list (pair bool (pair address nat)))))
770
                                         (or (pair nat nat) nat))))
771
                                 (or
772
                                   (or (or nat (or bytes (pair nat nat)))
773
                                       (or
774
                                         (pair (pair address bytes)
775
                                               (pair (list (pair nat nat)) address))
776
                                         (or
777
                                           (pair
778
                                             (pair
779
                                               (pair nat
780
                                                     (list (pair address
781
                                                                (list (pair nat nat)))))
782
                                               (pair nat (map string bytes)))
783
                                             (pair (pair (option timestamp) bool)
784
                                                   (pair nat (list (pair address nat)))))
785
                                           (pair address
786
                                                 (pair address
787
                                                       (pair nat
788
                                                             (pair (pair address nat)
789
                                                                   nat)))))))
790
                                   (or
791
                                     (or (pair address (pair address nat))
792
                                         (or nat
793
                                             (list (pair address
794
                                                        (list (pair address
795
                                                                   (pair nat nat)))))))
796
                                     (or (or nat (pair bytes bytes))
797
                                         (or
798
                                           (list (or (pair address (pair address nat))
799
                                                    (pair address (pair address nat))))
800
                                           (pair (map string bytes) nat))))))
801
                               (pair
802
                                 (pair
803
                                   (pair
804
                                     (pair
805
                                       (lambda
806
                                         (pair (pair address (option string))
807
                                               (pair address address))
808
                                         bool)
809
                                       (pair address (set nat)))
810
                                     (pair address (pair bool (big_map bytes bytes))))
811
                                   (pair (pair (set address) (pair timestamp address))
812
                                         (pair (big_map (pair address nat) nat)
813
                                               (pair address address))))
814
                                 (pair
815
                                   (pair
816
                                     (pair (big_map string bytes)
817
                                           (pair nat (big_map nat address)))
818
                                     (pair bool
819
                                           (pair
820
                                             (big_map (pair address (pair address nat))
821
                                                      unit)
822
                                             bool)))
823
                                   (pair
824
                                     (pair bool
825
                                           (pair (big_map (pair address nat) unit) nat))
826
                                     (pair
827
                                       (big_map nat
828
                                                (pair
829
                                                  (pair (pair bool (map string bytes))
830
                                                        (pair
831
                                                          (list (pair address
832
                                                                     (list (pair nat nat))))
833
                                                          nat))
834
                                                  (pair
835
                                                    (pair address (option timestamp))
836
                                                    (pair bool
837
                                                          (pair nat
838
                                                                (list (pair address nat)))))))
839
                                       (pair (big_map nat (pair nat (map string bytes)))
840
                                             (big_map nat nat)))))))
841
                             (pair (list operation)
842
                                   (pair
843
                                     (pair
844
                                       (pair
845
                                         (pair
846
                                           (lambda
847
                                             (pair (pair address (option string))
848
                                                   (pair address address))
849
                                             bool)
850
                                           (pair address (set nat)))
851
                                         (pair address (pair bool (big_map bytes bytes))))
852
                                       (pair
853
                                         (pair (set address) (pair timestamp address))
854
                                         (pair (big_map (pair address nat) nat)
855
                                               (pair address address))))
856
                                     (pair
857
                                       (pair
858
                                         (pair (big_map string bytes)
859
                                               (pair nat (big_map nat address)))
860
                                         (pair bool
861
                                               (pair
862
                                                 (big_map
863
                                                   (pair address (pair address nat))
864
                                                   unit)
865
                                                 bool)))
866
                                       (pair
867
                                         (pair bool
868
                                               (pair (big_map (pair address nat) unit)
869
                                                     nat))
870
                                         (pair
871
                                           (big_map nat
872
                                                    (pair
873
                                                      (pair
874
                                                        (pair bool (map string bytes))
875
                                                        (pair
876
                                                          (list (pair address
877
                                                                     (list (pair nat nat))))
878
                                                          nat))
879
                                                      (pair
880
                                                        (pair address (option timestamp))
881
                                                        (pair bool
882
                                                              (pair nat
883
                                                                    (list (pair address
884
                                                                               nat)))))))
885
                                           (pair
886
                                             (big_map nat (pair nat (map string bytes)))
887
                                             (big_map nat nat))))))))))) ;
888
         UNPAIR 3 ;
889
         IF_LEFT
890
           { DUP ;
891
             IF_LEFT
892
               { IF_LEFT
893
                   { IF_LEFT
894
                       { IF_LEFT
895
                           { DROP ; PUSH nat 0 }
896
                           { IF_LEFT { DROP ; PUSH nat 1 } { DROP ; PUSH nat 2 } } }
897
                       { IF_LEFT
898
                           { DROP ; PUSH nat 3 }
899
                           { IF_LEFT { DROP ; PUSH nat 4 } { DROP ; PUSH nat 5 } } } }
900
                   { IF_LEFT
901
                       { IF_LEFT
902
                           { DROP ; PUSH nat 6 }
903
                           { IF_LEFT { DROP ; PUSH nat 7 } { DROP ; PUSH nat 8 } } }
904
                       { IF_LEFT
905
                           { IF_LEFT { DROP ; PUSH nat 9 } { DROP ; PUSH nat 10 } }
906
                           { IF_LEFT { DROP ; PUSH nat 11 } { DROP ; PUSH nat 12 } } } } }
907
               { IF_LEFT
908
                   { IF_LEFT
909
                       { IF_LEFT
910
                           { DROP ; PUSH nat 13 }
911
                           { IF_LEFT { DROP ; PUSH nat 14 } { DROP ; PUSH nat 15 } } }
912
                       { IF_LEFT
913
                           { DROP ; PUSH nat 16 }
914
                           { IF_LEFT { DROP ; PUSH nat 17 } { DROP ; PUSH nat 18 } } } }
915
                   { IF_LEFT
916
                       { IF_LEFT
917
                           { DROP ; PUSH nat 19 }
918
                           { IF_LEFT { DROP ; PUSH nat 20 } { DROP ; PUSH nat 21 } } }
919
                       { IF_LEFT
920
                           { IF_LEFT { DROP ; PUSH nat 22 } { DROP ; PUSH nat 23 } }
921
                           { IF_LEFT { DROP ; PUSH nat 24 } { DROP ; PUSH nat 25 } } } } } ;
922
             DUP 4 ;
923
             SWAP ;
924
             GET ;
925
             IF_NONE { PUSH int -1 ; FAILWITH } {} ;
926
             DUG 2 ;
927
             PAIR ;
928
             EXEC ;
929
             UNPAIR }
930
           { IF_LEFT
931
               { IF_LEFT
932
                   { SWAP ;
933
                     DUP ;
934
                     DUG 2 ;
935
                     GET 3 ;
936
                     GET 6 ;
937
                     IF { PUSH string "FA2_PAUSED" ; FAILWITH } {} ;
938
                     DUP ;
939
                     CAR ;
940
                     MAP { DUP 3 ;
941
                           GET 9 ;
942
                           SWAP ;
943
                           DUP ;
944
                           DUG 2 ;
945
                           CDR ;
946
                           MEM ;
947
                           IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
948
                           DUP 3 ;
949
                           CAR ;
950
                           GET 5 ;
951
                           SWAP ;
952
                           DUP ;
953
                           CDR ;
954
                           SWAP ;
955
                           DUP ;
956
                           DUG 3 ;
957
                           CAR ;
958
                           PAIR ;
959
                           MEM ;
960
                           IF
961
                             { DUP 3 ;
962
                               CAR ;
963
                               GET 5 ;
964
                               SWAP ;
965
                               DUP ;
966
                               CDR ;
967
                               SWAP ;
968
                               DUP ;
969
                               DUG 3 ;
970
                               CAR ;
971
                               PAIR ;
972
                               GET ;
973
                               IF_NONE { PUSH int 421 ; FAILWITH } {} ;
974
                               SWAP ;
975
                               PAIR }
976
                             { PUSH nat 0 ; SWAP ; PAIR } } ;
977
                     NIL operation ;
978
                     DIG 2 ;
979
                     CDR ;
980
                     PUSH mutez 0 ;
981
                     DIG 3 ;
982
                     TRANSFER_TOKENS ;
983
                     CONS }
984
                   { IF_LEFT
985
                       { SWAP ;
986
                         DUP ;
987
                         DUG 2 ;
988
                         CAR ;
989
                         CAR ;
990
                         CAR ;
991
                         GET 3 ;
992
                         SENDER ;
993
                         COMPARE ;
994
                         EQ ;
995
                         IF {} { PUSH int 325 ; FAILWITH } ;
996
                         DUP ;
997
                         CDR ;
998
                         CONTRACT unit ;
999
                         IF_NONE { PUSH int 328 ; FAILWITH } {} ;
1000
                         NIL operation ;
1001
                         SWAP ;
1002
                         DIG 2 ;
1003
                         CAR ;
1004
                         UNIT ;
1005
                         TRANSFER_TOKENS ;
1006
                         CONS }
1007
                       { SWAP ;
1008
                         DUP ;
1009
                         CAR ;
1010
                         CAR ;
1011
                         CAR ;
1012
                         CAR ;
1013
                         SWAP ;
1014
                         DUP ;
1015
                         DUG 3 ;
1016
                         CAR ;
1017
                         CAR ;
1018
                         CAR ;
1019
                         GET 3 ;
1020
                         SELF_ADDRESS ;
1021
                         PAIR ;
1022
                         NONE string ;
1023
                         SENDER ;
1024
                         PAIR ;
1025
                         PAIR ;
1026
                         EXEC ;
1027
                         IF {} { PUSH string "FA2_NOT_ADMIN" ; FAILWITH } ;
1028
                         SWAP ;
1029
                         UNPAIR ;
1030
                         UNPAIR ;
1031
                         UNPAIR ;
1032
                         UNPAIR ;
1033
                         SWAP ;
1034
                         CDR ;
1035
                         DIG 5 ;
1036
                         PAIR ;
1037
                         SWAP ;
1038
                         PAIR ;
1039
                         PAIR ;
1040
                         PAIR ;
1041
                         PAIR ;
1042
                         NIL operation } } }
1043
               { IF_LEFT
1044
                   { SWAP ;
1045
                     DUP ;
1046
                     CAR ;
1047
                     CAR ;
1048
                     CAR ;
1049
                     CAR ;
1050
                     SWAP ;
1051
                     DUP ;
1052
                     DUG 3 ;
1053
                     CAR ;
1054
                     CAR ;
1055
                     CAR ;
1056
                     GET 3 ;
1057
                     SELF_ADDRESS ;
1058
                     PAIR ;
1059
                     NONE string ;
1060
                     SENDER ;
1061
                     PAIR ;
1062
                     PAIR ;
1063
                     EXEC ;
1064
                     IF {} { PUSH string "FA2_NOT_ADMIN" ; FAILWITH } ;
1065
                     SWAP ;
1066
                     UNPAIR ;
1067
                     SWAP ;
1068
                     UNPAIR ;
1069
                     UNPAIR ;
1070
                     UNPAIR ;
1071
                     DUP 6 ;
1072
                     CDR ;
1073
                     SOME ;
1074
                     DIG 6 ;
1075
                     CAR ;
1076
                     UPDATE ;
1077
                     PAIR ;
1078
                     PAIR ;
1079
                     PAIR ;
1080
                     SWAP ;
1081
                     PAIR }
1082
                   { IF_LEFT
1083
                       { SWAP ;
1084
                         DUP ;
1085
                         CAR ;
1086
                         CAR ;
1087
                         CAR ;
1088
                         CAR ;
1089
                         SWAP ;
1090
                         DUP ;
1091
                         DUG 3 ;
1092
                         CAR ;
1093
                         CAR ;
1094
                         CAR ;
1095
                         GET 3 ;
1096
                         SELF_ADDRESS ;
1097
                         PAIR ;
1098
                         NONE string ;
1099
                         SENDER ;
1100
                         PAIR ;
1101
                         PAIR ;
1102
                         EXEC ;
1103
                         IF {} { PUSH string "FA2_NOT_ADMIN" ; FAILWITH } ;
1104
                         SWAP ;
1105
                         UNPAIR ;
1106
                         SWAP ;
1107
                         UNPAIR ;
1108
                         UNPAIR ;
1109
                         SWAP ;
1110
                         UNPAIR ;
1111
                         SWAP ;
1112
                         CAR ;
1113
                         DIG 5 ;
1114
                         SWAP ;
1115
                         PAIR ;
1116
                         SWAP ;
1117
                         PAIR ;
1118
                         SWAP ;
1119
                         PAIR ;
1120
                         PAIR ;
1121
                         SWAP ;
1122
                         PAIR }
1123
                       { SWAP ;
1124
                         DUP ;
1125
                         CAR ;
1126
                         CAR ;
1127
                         CAR ;
1128
                         CAR ;
1129
                         SWAP ;
1130
                         DUP ;
1131
                         DUG 3 ;
1132
                         CAR ;
1133
                         CAR ;
1134
                         CAR ;
1135
                         GET 3 ;
1136
                         SELF_ADDRESS ;
1137
                         PAIR ;
1138
                         PUSH (option string) (Some "update_code") ;
1139
                         SENDER ;
1140
                         PAIR ;
1141
                         PAIR ;
1142
                         EXEC ;
1143
                         IF {} { PUSH int 598 ; FAILWITH } ;
1144
                         DUP ;
1145
                         CAR ;
1146
                         IF_LEFT
1147
                           { IF_LEFT
1148
                               { IF_LEFT
1149
                                   { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 0 ; UPDATE ; SWAP }
1150
                                   { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 14 ; UPDATE ; SWAP } }
1151
                               { IF_LEFT
1152
                                   { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 16 ; UPDATE ; SWAP }
1153
                                   { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 17 ; UPDATE ; SWAP } } }
1154
                           { IF_LEFT
1155
                               { IF_LEFT
1156
                                   { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 18 ; UPDATE ; SWAP }
1157
                                   { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 19 ; UPDATE ; SWAP } }
1158
                               { IF_LEFT
1159
                                   { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 21 ; UPDATE ; SWAP }
1160
                                   { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 24 ; UPDATE ; SWAP } } } } } ;
1161
                 NIL operation } } ;
1162
         NIL operation ;
1163
         SWAP ;
1164
         ITER { CONS } ;
1165
         DUG 2 ;
1166
         PAIR ;
1167
         SWAP ;
1168
         PAIR } ;
1169
  view "all_tokens" unit (list nat)
1170
        { GET 3 ; CAR ; CAR ; CAR ; GET 4 ; NIL nat ; SWAP ; ITER { CONS } ; NIL nat ; SWAP ; ITER { CONS } } ;
1171
  view "count_tokens" unit nat { GET 3 ; CAR ; CAR ; CAR ; GET 4 ; SIZE } ;
1172
  view "does_token_exist" nat bool
1173
        { UNPAIR 3 ; DIG 2 ; DROP ; SWAP ; GET 9 ; SWAP ; MEM } ;
1174
  view "get_balance" (pair (address %owner) (nat %token_id)) nat
1175
        { UNPAIR 3 ;
1176
          DIG 2 ;
1177
          DROP ;
1178
          SWAP ;
1179
          DUP ;
1180
          DUG 2 ;
1181
          GET 9 ;
1182
          SWAP ;
1183
          DUP ;
1184
          DUG 2 ;
1185
          CDR ;
1186
          MEM ;
1187
          IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
1188
          SWAP ;
1189
          CAR ;
1190
          GET 5 ;
1191
          SWAP ;
1192
          GET ;
1193
          IF_NONE { PUSH int 502 ; FAILWITH } {} } ;
1194
  view "infusions" nat
1195
        (list (pair (address %token_address)
1196
                   (list %token_id_amounts (pair (nat %amount) (nat %token_id)))))
1197
        { UNPAIR 3 ;
1198
          DIG 2 ;
1199
          DROP ;
1200
          SWAP ;
1201
          GET 7 ;
1202
          SWAP ;
1203
          GET ;
1204
          IF_NONE { PUSH int 3161 ; FAILWITH } {} ;
1205
          CAR ;
1206
          GET 3 } ;
1207
  view "is_operator" (pair (address %owner) (pair (address %operator) (nat %token_id)))
1208
        bool
1209
        { UNPAIR 3 ; DIG 2 ; DROP ; SWAP ; GET 3 ; GET 5 ; SWAP ; DUP ; GET 4 ; SWAP ; DUP ; GET 3 ; SWAP ; CAR ; PAIR 3 ; MEM } ;
1210
  view "minter" nat address
1211
        { UNPAIR 3 ;
1212
          DIG 2 ;
1213
          DROP ;
1214
          SWAP ;
1215
          GET 7 ;
1216
          SWAP ;
1217
          GET ;
1218
          IF_NONE { PUSH int 3149 ; FAILWITH } {} ;
1219
          GET 3 ;
1220
          CAR } ;
1221
  view "next_token_id" unit nat { GET 3 ; GET 5 ; GET 4 } ;
1222
  view "query_extra_db" bytes (option bytes)
1223
        { UNPAIR 3 ;
1224
          DIG 2 ;
1225
          DROP ;
1226
          NONE bytes ;
1227
          DUP 3 ;
1228
          CAR ;
1229
          CAR ;
1230
          GET 6 ;
1231
          DUP 3 ;
1232
          MEM ;
1233
          IF
1234
            { DROP ; SWAP ; CAR ; CAR ; GET 6 ; SWAP ; GET ; IF_NONE { PUSH int 489 ; FAILWITH } {} ; SOME }
1235
            { SWAP ; DROP ; SWAP ; DROP } } ;
1236
  view "royalty" nat nat
1237
        { UNPAIR 3 ;
1238
          DIG 2 ;
1239
          DROP ;
1240
          SWAP ;
1241
          GET 7 ;
1242
          SWAP ;
1243
          GET ;
1244
          IF_NONE { PUSH int 3155 ; FAILWITH } {} ;
1245
          GET 7 } ;
1246
  view "splits" nat (list (pair (address %address) (nat %pct)))
1247
        { UNPAIR 3 ;
1248
          DIG 2 ;
1249
          DROP ;
1250
          SWAP ;
1251
          GET 7 ;
1252
          SWAP ;
1253
          GET ;
1254
          IF_NONE { PUSH int 3143 ; FAILWITH } {} ;
1255
          GET 8 } ;
1256
  view "total_supply" nat nat
1257
        { UNPAIR 3 ; DIG 2 ; DROP ; SWAP ; GET 10 ; SWAP ; GET ; IF_NONE { PUSH int 527 ; FAILWITH } {} } }