BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Shadownet
  • /
  • Nephomancer
FA2Ledger
operations (53)Storage Code Interact Tokens Metadata Fork Views Statistics Details
Latest
​x
463
1402
 
1
{ parameter (or
2
              (or
3
                (pair %balance_of
4
                  (list %requests (pair (address %owner) (nat %token_id)))
5
                  (contract %callback (list (pair
6
                                            (pair %request (address %owner)
7
                                                           (nat %token_id))
8
                                            (nat %balance)))))
9
                (or
10
                  (pair %configure (string %addr)
11
                                   (pair (string %body_after_addr)
12
                                         (pair (string %body_before_addr) (string %head))))
13
                  (bls12_381_fr %contribute)))
14
              (or
15
                (pair %mint (bls12_381_g1 %a)
16
                            (pair (bls12_381_g2 %b)
17
                                  (pair (bls12_381_g1 %c) (bls12_381_fr %commitment))))
18
                (or
19
                  (list %transfer (pair (address %from_)
20
                                       (list %txs (pair (address %to_)
21
                                                       (pair (nat %token_id)
22
                                                             (nat %amount))))))
23
                  (list %update_operators (or
24
                                           (pair %add_operator (address %owner)
25
                                                               (pair (address %operator)
26
                                                                     (nat %token_id)))
27
                                           (pair %remove_operator (address %owner)
28
                                                                  (pair
29
                                                                    (address %operator)
30
                                                                    (nat %token_id)))))))) ;
31
  storage (pair (big_map %colors nat bytes)
32
                (pair (big_map %content nat string)
33
                      (pair (big_map %contributed int nat)
34
                            (pair (big_map %contributions nat bls12_381_fr)
35
                                  (pair (nat %count)
36
                                        (pair (big_map %count_at_commitment int nat)
37
                                              (pair (bytes %digits)
38
                                                    (pair (bytes %head)
39
                                                          (pair
40
                                                            (big_map %ledger nat address)
41
                                                            (pair
42
                                                              (big_map %metadata string
43
                                                                                 bytes)
44
                                                              (pair
45
                                                                (big_map %minted int
46
                                                                                 bool)
47
                                                                (pair (nat %next_id)
48
                                                                      (pair
49
                                                                        (nat %next_token_id)
50
                                                                        (pair
51
                                                                          (big_map %operators
52
                                                                            (pair
53
                                                                              (address %owner)
54
                                                                              (pair
55
                                                                                (address %operator)
56
                                                                                (nat %token_id)))
57
                                                                            unit)
58
                                                                          (pair
59
                                                                            (bytes %tail)
60
                                                                            (pair
61
                                                                              (big_map %time_at_commitment
62
                                                                                int
63
                                                                                timestamp)
64
                                                                              (big_map %token_metadata
65
                                                                                nat
66
                                                                                (pair
67
                                                                                  (nat %token_id)
68
                                                                                  (map %token_info
69
                                                                                    string
70
                                                                                    bytes))))))))))))))))))) ;
71
  code { LAMBDA
72
           (pair
73
             (pair
74
               (lambda
75
                 (pair nat
76
                       (pair (big_map nat bytes)
77
                             (pair (big_map nat string)
78
                                   (pair (big_map int nat)
79
                                         (pair (big_map nat bls12_381_fr)
80
                                               (pair nat
81
                                                     (pair (big_map int nat)
82
                                                           (pair bytes
83
                                                                 (pair bytes
84
                                                                       (pair
85
                                                                         (big_map nat
86
                                                                                  address)
87
                                                                         (pair
88
                                                                           (big_map
89
                                                                             string
90
                                                                             bytes)
91
                                                                           (pair
92
                                                                             (big_map
93
                                                                               int
94
                                                                               bool)
95
                                                                             (pair nat
96
                                                                                   (pair
97
                                                                                     nat
98
                                                                                     (pair
99
                                                                                       (big_map
100
                                                                                         (pair
101
                                                                                           address
102
                                                                                           (pair
103
                                                                                             address
104
                                                                                             nat))
105
                                                                                         unit)
106
                                                                                       (pair
107
                                                                                         bytes
108
                                                                                         (pair
109
                                                                                           (big_map
110
                                                                                             int
111
                                                                                             timestamp)
112
                                                                                           (big_map
113
                                                                                             nat
114
                                                                                             (pair
115
                                                                                               nat
116
                                                                                               (map
117
                                                                                                 string
118
                                                                                                 bytes))))))))))))))))))))
119
                 (pair bool
120
                       (pair (big_map nat bytes)
121
                             (pair (big_map nat string)
122
                                   (pair (big_map int nat)
123
                                         (pair (big_map nat bls12_381_fr)
124
                                               (pair nat
125
                                                     (pair (big_map int nat)
126
                                                           (pair bytes
127
                                                                 (pair bytes
128
                                                                       (pair
129
                                                                         (big_map nat
130
                                                                                  address)
131
                                                                         (pair
132
                                                                           (big_map
133
                                                                             string
134
                                                                             bytes)
135
                                                                           (pair
136
                                                                             (big_map
137
                                                                               int
138
                                                                               bool)
139
                                                                             (pair nat
140
                                                                                   (pair
141
                                                                                     nat
142
                                                                                     (pair
143
                                                                                       (big_map
144
                                                                                         (pair
145
                                                                                           address
146
                                                                                           (pair
147
                                                                                             address
148
                                                                                             nat))
149
                                                                                         unit)
150
                                                                                       (pair
151
                                                                                         bytes
152
                                                                                         (pair
153
                                                                                           (big_map
154
                                                                                             int
155
                                                                                             timestamp)
156
                                                                                           (big_map
157
                                                                                             nat
158
                                                                                             (pair
159
                                                                                               nat
160
                                                                                               (map
161
                                                                                                 string
162
                                                                                                 bytes)))))))))))))))))))))
163
               (pair address nat))
164
             (pair (big_map nat bytes)
165
                   (pair (big_map nat string)
166
                         (pair (big_map int nat)
167
                               (pair (big_map nat bls12_381_fr)
168
                                     (pair nat
169
                                           (pair (big_map int nat)
170
                                                 (pair bytes
171
                                                       (pair bytes
172
                                                             (pair (big_map nat address)
173
                                                                   (pair
174
                                                                     (big_map string
175
                                                                              bytes)
176
                                                                     (pair
177
                                                                       (big_map int bool)
178
                                                                       (pair nat
179
                                                                             (pair nat
180
                                                                                   (pair
181
                                                                                     (big_map
182
                                                                                       (pair
183
                                                                                         address
184
                                                                                         (pair
185
                                                                                           address
186
                                                                                           nat))
187
                                                                                       unit)
188
                                                                                     (pair
189
                                                                                       bytes
190
                                                                                       (pair
191
                                                                                         (big_map
192
                                                                                           int
193
                                                                                           timestamp)
194
                                                                                         (big_map
195
                                                                                           nat
196
                                                                                           (pair
197
                                                                                             nat
198
                                                                                             (map
199
                                                                                               string
200
                                                                                               bytes))))))))))))))))))))
201
           (pair nat
202
                 (pair (big_map nat bytes)
203
                       (pair (big_map nat string)
204
                             (pair (big_map int nat)
205
                                   (pair (big_map nat bls12_381_fr)
206
                                         (pair nat
207
                                               (pair (big_map int nat)
208
                                                     (pair bytes
209
                                                           (pair bytes
210
                                                                 (pair
211
                                                                   (big_map nat address)
212
                                                                   (pair
213
                                                                     (big_map string
214
                                                                              bytes)
215
                                                                     (pair
216
                                                                       (big_map int bool)
217
                                                                       (pair nat
218
                                                                             (pair nat
219
                                                                                   (pair
220
                                                                                     (big_map
221
                                                                                       (pair
222
                                                                                         address
223
                                                                                         (pair
224
                                                                                           address
225
                                                                                           nat))
226
                                                                                       unit)
227
                                                                                     (pair
228
                                                                                       bytes
229
                                                                                       (pair
230
                                                                                         (big_map
231
                                                                                           int
232
                                                                                           timestamp)
233
                                                                                         (big_map
234
                                                                                           nat
235
                                                                                           (pair
236
                                                                                             nat
237
                                                                                             (map
238
                                                                                               string
239
                                                                                               bytes))))))))))))))))))))
240
           { UNPAIR ;
241
             UNPAIR ;
242
             SWAP ;
243
             DUP ;
244
             CDR ;
245
             DIG 2 ;
246
             DIG 3 ;
247
             DIG 2 ;
248
             PAIR ;
249
             EXEC ;
250
             UNPAIR ;
251
             SWAP ;
252
             DUG 2 ;
253
             IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
254
             DUP ;
255
             CAR ;
256
             DUP 3 ;
257
             GET 17 ;
258
             DIG 2 ;
259
             CDR ;
260
             GET ;
261
             IF_NONE { PUSH int 372 ; FAILWITH } {} ;
262
             COMPARE ;
263
             EQ ;
264
             IF { PUSH nat 1 } { PUSH nat 0 } ;
265
             PAIR } ;
266
         SWAP ;
267
         LAMBDA
268
           (pair address (pair address nat))
269
           unit
270
           { CAR ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "FA2_NOT_OWNER" ; FAILWITH } ; UNIT } ;
271
         SWAP ;
272
         LAMBDA
273
           (pair (pair address (pair address nat))
274
                 (pair (big_map nat bytes)
275
                       (pair (big_map nat string)
276
                             (pair (big_map int nat)
277
                                   (pair (big_map nat bls12_381_fr)
278
                                         (pair nat
279
                                               (pair (big_map int nat)
280
                                                     (pair bytes
281
                                                           (pair bytes
282
                                                                 (pair
283
                                                                   (big_map nat address)
284
                                                                   (pair
285
                                                                     (big_map string
286
                                                                              bytes)
287
                                                                     (pair
288
                                                                       (big_map int bool)
289
                                                                       (pair nat
290
                                                                             (pair nat
291
                                                                                   (pair
292
                                                                                     (big_map
293
                                                                                       (pair
294
                                                                                         address
295
                                                                                         (pair
296
                                                                                           address
297
                                                                                           nat))
298
                                                                                       unit)
299
                                                                                     (pair
300
                                                                                       bytes
301
                                                                                       (pair
302
                                                                                         (big_map
303
                                                                                           int
304
                                                                                           timestamp)
305
                                                                                         (big_map
306
                                                                                           nat
307
                                                                                           (pair
308
                                                                                             nat
309
                                                                                             (map
310
                                                                                               string
311
                                                                                               bytes))))))))))))))))))))
312
           (pair unit
313
                 (pair (big_map nat bytes)
314
                       (pair (big_map nat string)
315
                             (pair (big_map int nat)
316
                                   (pair (big_map nat bls12_381_fr)
317
                                         (pair nat
318
                                               (pair (big_map int nat)
319
                                                     (pair bytes
320
                                                           (pair bytes
321
                                                                 (pair
322
                                                                   (big_map nat address)
323
                                                                   (pair
324
                                                                     (big_map string
325
                                                                              bytes)
326
                                                                     (pair
327
                                                                       (big_map int bool)
328
                                                                       (pair nat
329
                                                                             (pair nat
330
                                                                                   (pair
331
                                                                                     (big_map
332
                                                                                       (pair
333
                                                                                         address
334
                                                                                         (pair
335
                                                                                           address
336
                                                                                           nat))
337
                                                                                       unit)
338
                                                                                     (pair
339
                                                                                       bytes
340
                                                                                       (pair
341
                                                                                         (big_map
342
                                                                                           int
343
                                                                                           timestamp)
344
                                                                                         (big_map
345
                                                                                           nat
346
                                                                                           (pair
347
                                                                                             nat
348
                                                                                             (map
349
                                                                                               string
350
                                                                                               bytes))))))))))))))))))))
351
           { UNPAIR ;
352
             DUP ;
353
             CAR ;
354
             SENDER ;
355
             COMPARE ;
356
             EQ ;
357
             IF
358
               { DROP ; PUSH bool True }
359
               { DUP 2 ; GET 27 ; DUP 2 ; GET 4 ; SENDER ; DIG 3 ; CAR ; PAIR 3 ; MEM } ;
360
             IF {} { PUSH string "FA2_NOT_OPERATOR" ; FAILWITH } ;
361
             UNIT ;
362
             PAIR } ;
363
         SWAP ;
364
         LAMBDA
365
           (pair nat
366
                 (pair (big_map nat bytes)
367
                       (pair (big_map nat string)
368
                             (pair (big_map int nat)
369
                                   (pair (big_map nat bls12_381_fr)
370
                                         (pair nat
371
                                               (pair (big_map int nat)
372
                                                     (pair bytes
373
                                                           (pair bytes
374
                                                                 (pair
375
                                                                   (big_map nat address)
376
                                                                   (pair
377
                                                                     (big_map string
378
                                                                              bytes)
379
                                                                     (pair
380
                                                                       (big_map int bool)
381
                                                                       (pair nat
382
                                                                             (pair nat
383
                                                                                   (pair
384
                                                                                     (big_map
385
                                                                                       (pair
386
                                                                                         address
387
                                                                                         (pair
388
                                                                                           address
389
                                                                                           nat))
390
                                                                                       unit)
391
                                                                                     (pair
392
                                                                                       bytes
393
                                                                                       (pair
394
                                                                                         (big_map
395
                                                                                           int
396
                                                                                           timestamp)
397
                                                                                         (big_map
398
                                                                                           nat
399
                                                                                           (pair
400
                                                                                             nat
401
                                                                                             (map
402
                                                                                               string
403
                                                                                               bytes))))))))))))))))))))
404
           (pair bool
405
                 (pair (big_map nat bytes)
406
                       (pair (big_map nat string)
407
                             (pair (big_map int nat)
408
                                   (pair (big_map nat bls12_381_fr)
409
                                         (pair nat
410
                                               (pair (big_map int nat)
411
                                                     (pair bytes
412
                                                           (pair bytes
413
                                                                 (pair
414
                                                                   (big_map nat address)
415
                                                                   (pair
416
                                                                     (big_map string
417
                                                                              bytes)
418
                                                                     (pair
419
                                                                       (big_map int bool)
420
                                                                       (pair nat
421
                                                                             (pair nat
422
                                                                                   (pair
423
                                                                                     (big_map
424
                                                                                       (pair
425
                                                                                         address
426
                                                                                         (pair
427
                                                                                           address
428
                                                                                           nat))
429
                                                                                       unit)
430
                                                                                     (pair
431
                                                                                       bytes
432
                                                                                       (pair
433
                                                                                         (big_map
434
                                                                                           int
435
                                                                                           timestamp)
436
                                                                                         (big_map
437
                                                                                           nat
438
                                                                                           (pair
439
                                                                                             nat
440
                                                                                             (map
441
                                                                                               string
442
                                                                                               bytes))))))))))))))))))))
443
           { UNPAIR ; SWAP ; DUP ; GET 32 ; DIG 2 ; MEM ; PAIR } ;
444
         SWAP ;
445
         LAMBDA
446
           (pair (pair address (pair address nat))
447
                 (pair (big_map nat bytes)
448
                       (pair (big_map nat string)
449
                             (pair (big_map int nat)
450
                                   (pair (big_map nat bls12_381_fr)
451
                                         (pair nat
452
                                               (pair (big_map int nat)
453
                                                     (pair bytes
454
                                                           (pair bytes
455
                                                                 (pair
456
                                                                   (big_map nat address)
457
                                                                   (pair
458
                                                                     (big_map string
459
                                                                              bytes)
460
                                                                     (pair
461
                                                                       (big_map int bool)
462
                                                                       (pair nat
463
                                                                             (pair nat
464
                                                                                   (pair
465
                                                                                     (big_map
466
                                                                                       (pair
467
                                                                                         address
468
                                                                                         (pair
469
                                                                                           address
470
                                                                                           nat))
471
                                                                                       unit)
472
                                                                                     (pair
473
                                                                                       bytes
474
                                                                                       (pair
475
                                                                                         (big_map
476
                                                                                           int
477
                                                                                           timestamp)
478
                                                                                         (big_map
479
                                                                                           nat
480
                                                                                           (pair
481
                                                                                             nat
482
                                                                                             (map
483
                                                                                               string
484
                                                                                               bytes))))))))))))))))))))
485
           (pair bool
486
                 (pair (big_map nat bytes)
487
                       (pair (big_map nat string)
488
                             (pair (big_map int nat)
489
                                   (pair (big_map nat bls12_381_fr)
490
                                         (pair nat
491
                                               (pair (big_map int nat)
492
                                                     (pair bytes
493
                                                           (pair bytes
494
                                                                 (pair
495
                                                                   (big_map nat address)
496
                                                                   (pair
497
                                                                     (big_map string
498
                                                                              bytes)
499
                                                                     (pair
500
                                                                       (big_map int bool)
501
                                                                       (pair nat
502
                                                                             (pair nat
503
                                                                                   (pair
504
                                                                                     (big_map
505
                                                                                       (pair
506
                                                                                         address
507
                                                                                         (pair
508
                                                                                           address
509
                                                                                           nat))
510
                                                                                       unit)
511
                                                                                     (pair
512
                                                                                       bytes
513
                                                                                       (pair
514
                                                                                         (big_map
515
                                                                                           int
516
                                                                                           timestamp)
517
                                                                                         (big_map
518
                                                                                           nat
519
                                                                                           (pair
520
                                                                                             nat
521
                                                                                             (map
522
                                                                                               string
523
                                                                                               bytes))))))))))))))))))))
524
           { UNPAIR ; SWAP ; DUP ; GET 27 ; DIG 2 ; MEM ; PAIR } ;
525
         SWAP ;
526
         LAMBDA
527
           (pair
528
             (pair
529
               (lambda
530
                 (pair nat
531
                       (pair (big_map nat bytes)
532
                             (pair (big_map nat string)
533
                                   (pair (big_map int nat)
534
                                         (pair (big_map nat bls12_381_fr)
535
                                               (pair nat
536
                                                     (pair (big_map int nat)
537
                                                           (pair bytes
538
                                                                 (pair bytes
539
                                                                       (pair
540
                                                                         (big_map nat
541
                                                                                  address)
542
                                                                         (pair
543
                                                                           (big_map
544
                                                                             string
545
                                                                             bytes)
546
                                                                           (pair
547
                                                                             (big_map
548
                                                                               int
549
                                                                               bool)
550
                                                                             (pair nat
551
                                                                                   (pair
552
                                                                                     nat
553
                                                                                     (pair
554
                                                                                       (big_map
555
                                                                                         (pair
556
                                                                                           address
557
                                                                                           (pair
558
                                                                                             address
559
                                                                                             nat))
560
                                                                                         unit)
561
                                                                                       (pair
562
                                                                                         bytes
563
                                                                                         (pair
564
                                                                                           (big_map
565
                                                                                             int
566
                                                                                             timestamp)
567
                                                                                           (big_map
568
                                                                                             nat
569
                                                                                             (pair
570
                                                                                               nat
571
                                                                                               (map
572
                                                                                                 string
573
                                                                                                 bytes))))))))))))))))))))
574
                 (pair bool
575
                       (pair (big_map nat bytes)
576
                             (pair (big_map nat string)
577
                                   (pair (big_map int nat)
578
                                         (pair (big_map nat bls12_381_fr)
579
                                               (pair nat
580
                                                     (pair (big_map int nat)
581
                                                           (pair bytes
582
                                                                 (pair bytes
583
                                                                       (pair
584
                                                                         (big_map nat
585
                                                                                  address)
586
                                                                         (pair
587
                                                                           (big_map
588
                                                                             string
589
                                                                             bytes)
590
                                                                           (pair
591
                                                                             (big_map
592
                                                                               int
593
                                                                               bool)
594
                                                                             (pair nat
595
                                                                                   (pair
596
                                                                                     nat
597
                                                                                     (pair
598
                                                                                       (big_map
599
                                                                                         (pair
600
                                                                                           address
601
                                                                                           (pair
602
                                                                                             address
603
                                                                                             nat))
604
                                                                                         unit)
605
                                                                                       (pair
606
                                                                                         bytes
607
                                                                                         (pair
608
                                                                                           (big_map
609
                                                                                             int
610
                                                                                             timestamp)
611
                                                                                           (big_map
612
                                                                                             nat
613
                                                                                             (pair
614
                                                                                               nat
615
                                                                                               (map
616
                                                                                                 string
617
                                                                                                 bytes)))))))))))))))))))))
618
               nat)
619
             (pair (big_map nat bytes)
620
                   (pair (big_map nat string)
621
                         (pair (big_map int nat)
622
                               (pair (big_map nat bls12_381_fr)
623
                                     (pair nat
624
                                           (pair (big_map int nat)
625
                                                 (pair bytes
626
                                                       (pair bytes
627
                                                             (pair (big_map nat address)
628
                                                                   (pair
629
                                                                     (big_map string
630
                                                                              bytes)
631
                                                                     (pair
632
                                                                       (big_map int bool)
633
                                                                       (pair nat
634
                                                                             (pair nat
635
                                                                                   (pair
636
                                                                                     (big_map
637
                                                                                       (pair
638
                                                                                         address
639
                                                                                         (pair
640
                                                                                           address
641
                                                                                           nat))
642
                                                                                       unit)
643
                                                                                     (pair
644
                                                                                       bytes
645
                                                                                       (pair
646
                                                                                         (big_map
647
                                                                                           int
648
                                                                                           timestamp)
649
                                                                                         (big_map
650
                                                                                           nat
651
                                                                                           (pair
652
                                                                                             nat
653
                                                                                             (map
654
                                                                                               string
655
                                                                                               bytes))))))))))))))))))))
656
           (pair nat
657
                 (pair (big_map nat bytes)
658
                       (pair (big_map nat string)
659
                             (pair (big_map int nat)
660
                                   (pair (big_map nat bls12_381_fr)
661
                                         (pair nat
662
                                               (pair (big_map int nat)
663
                                                     (pair bytes
664
                                                           (pair bytes
665
                                                                 (pair
666
                                                                   (big_map nat address)
667
                                                                   (pair
668
                                                                     (big_map string
669
                                                                              bytes)
670
                                                                     (pair
671
                                                                       (big_map int bool)
672
                                                                       (pair nat
673
                                                                             (pair nat
674
                                                                                   (pair
675
                                                                                     (big_map
676
                                                                                       (pair
677
                                                                                         address
678
                                                                                         (pair
679
                                                                                           address
680
                                                                                           nat))
681
                                                                                       unit)
682
                                                                                     (pair
683
                                                                                       bytes
684
                                                                                       (pair
685
                                                                                         (big_map
686
                                                                                           int
687
                                                                                           timestamp)
688
                                                                                         (big_map
689
                                                                                           nat
690
                                                                                           (pair
691
                                                                                             nat
692
                                                                                             (map
693
                                                                                               string
694
                                                                                               bytes))))))))))))))))))))
695
           { UNPAIR ;
696
             UNPAIR ;
697
             DUG 2 ;
698
             PAIR ;
699
             EXEC ;
700
             UNPAIR ;
701
             IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
702
             PUSH nat 1 ;
703
             PAIR } ;
704
         SWAP ;
705
         LAMBDA
706
           (pair (pair address (pair address (pair nat nat)))
707
                 (pair (big_map nat bytes)
708
                       (pair (big_map nat string)
709
                             (pair (big_map int nat)
710
                                   (pair (big_map nat bls12_381_fr)
711
                                         (pair nat
712
                                               (pair (big_map int nat)
713
                                                     (pair bytes
714
                                                           (pair bytes
715
                                                                 (pair
716
                                                                   (big_map nat address)
717
                                                                   (pair
718
                                                                     (big_map string
719
                                                                              bytes)
720
                                                                     (pair
721
                                                                       (big_map int bool)
722
                                                                       (pair nat
723
                                                                             (pair nat
724
                                                                                   (pair
725
                                                                                     (big_map
726
                                                                                       (pair
727
                                                                                         address
728
                                                                                         (pair
729
                                                                                           address
730
                                                                                           nat))
731
                                                                                       unit)
732
                                                                                     (pair
733
                                                                                       bytes
734
                                                                                       (pair
735
                                                                                         (big_map
736
                                                                                           int
737
                                                                                           timestamp)
738
                                                                                         (big_map
739
                                                                                           nat
740
                                                                                           (pair
741
                                                                                             nat
742
                                                                                             (map
743
                                                                                               string
744
                                                                                               bytes))))))))))))))))))))
745
           (pair unit
746
                 (pair (big_map nat bytes)
747
                       (pair (big_map nat string)
748
                             (pair (big_map int nat)
749
                                   (pair (big_map nat bls12_381_fr)
750
                                         (pair nat
751
                                               (pair (big_map int nat)
752
                                                     (pair bytes
753
                                                           (pair bytes
754
                                                                 (pair
755
                                                                   (big_map nat address)
756
                                                                   (pair
757
                                                                     (big_map string
758
                                                                              bytes)
759
                                                                     (pair
760
                                                                       (big_map int bool)
761
                                                                       (pair nat
762
                                                                             (pair nat
763
                                                                                   (pair
764
                                                                                     (big_map
765
                                                                                       (pair
766
                                                                                         address
767
                                                                                         (pair
768
                                                                                           address
769
                                                                                           nat))
770
                                                                                       unit)
771
                                                                                     (pair
772
                                                                                       bytes
773
                                                                                       (pair
774
                                                                                         (big_map
775
                                                                                           int
776
                                                                                           timestamp)
777
                                                                                         (big_map
778
                                                                                           nat
779
                                                                                           (pair
780
                                                                                             nat
781
                                                                                             (map
782
                                                                                               string
783
                                                                                               bytes))))))))))))))))))))
784
           { UNPAIR ;
785
             PUSH nat 1 ;
786
             DUP 2 ;
787
             GET 6 ;
788
             COMPARE ;
789
             EQ ;
790
             IF
791
               { DUP ;
792
                 CAR ;
793
                 DUP 3 ;
794
                 GET 17 ;
795
                 DUP 3 ;
796
                 GET 5 ;
797
                 GET ;
798
                 IF_NONE { PUSH int 380 ; FAILWITH } {} ;
799
                 COMPARE ;
800
                 EQ }
801
               { PUSH bool False } ;
802
             IF {} { PUSH string "FA2_INSUFFICIENT_BALANCE" ; FAILWITH } ;
803
             SWAP ;
804
             DUP ;
805
             GET 17 ;
806
             DUP 3 ;
807
             GET 3 ;
808
             SOME ;
809
             DIG 3 ;
810
             GET 5 ;
811
             UPDATE ;
812
             UPDATE 17 ;
813
             UNIT ;
814
             PAIR } ;
815
         SWAP ;
816
         PUSH (pair (string %ledger_type)
817
                 (pair %policy (string %name)
818
                               (pair (bool %supports_operator) (bool %supports_transfer)))) (Pair "NFT" (Pair "owner-or-operator-transfer" (Pair True True))) ;
819
         SWAP ;
820
         UNPAIR ;
821
         IF_LEFT
822
           { IF_LEFT
823
               { LAMBDA
824
                   (pair
825
                     (pair (pair address nat)
826
                           (pair
827
                             (lambda
828
                               (pair nat
829
                                     (pair (big_map nat bytes)
830
                                           (pair (big_map nat string)
831
                                                 (pair (big_map int nat)
832
                                                       (pair (big_map nat bls12_381_fr)
833
                                                             (pair nat
834
                                                                   (pair
835
                                                                     (big_map int nat)
836
                                                                     (pair bytes
837
                                                                           (pair bytes
838
                                                                                 (pair
839
                                                                                   (big_map
840
                                                                                     nat
841
                                                                                     address)
842
                                                                                   (pair
843
                                                                                     (big_map
844
                                                                                       string
845
                                                                                       bytes)
846
                                                                                     (pair
847
                                                                                       (big_map
848
                                                                                         int
849
                                                                                         bool)
850
                                                                                       (pair
851
                                                                                         nat
852
                                                                                         (pair
853
                                                                                           nat
854
                                                                                           (pair
855
                                                                                             (big_map
856
                                                                                               (pair
857
                                                                                                 address
858
                                                                                                 (pair
859
                                                                                                   address
860
                                                                                                   nat))
861
                                                                                               unit)
862
                                                                                             (pair
863
                                                                                               bytes
864
                                                                                               (pair
865
                                                                                                 (big_map
866
                                                                                                   int
867
                                                                                                   timestamp)
868
                                                                                                 (big_map
869
                                                                                                   nat
870
                                                                                                   (pair
871
                                                                                                     nat
872
                                                                                                     (map
873
                                                                                                       string
874
                                                                                                       bytes))))))))))))))))))))
875
                               (pair bool
876
                                     (pair (big_map nat bytes)
877
                                           (pair (big_map nat string)
878
                                                 (pair (big_map int nat)
879
                                                       (pair (big_map nat bls12_381_fr)
880
                                                             (pair nat
881
                                                                   (pair
882
                                                                     (big_map int nat)
883
                                                                     (pair bytes
884
                                                                           (pair bytes
885
                                                                                 (pair
886
                                                                                   (big_map
887
                                                                                     nat
888
                                                                                     address)
889
                                                                                   (pair
890
                                                                                     (big_map
891
                                                                                       string
892
                                                                                       bytes)
893
                                                                                     (pair
894
                                                                                       (big_map
895
                                                                                         int
896
                                                                                         bool)
897
                                                                                       (pair
898
                                                                                         nat
899
                                                                                         (pair
900
                                                                                           nat
901
                                                                                           (pair
902
                                                                                             (big_map
903
                                                                                               (pair
904
                                                                                                 address
905
                                                                                                 (pair
906
                                                                                                   address
907
                                                                                                   nat))
908
                                                                                               unit)
909
                                                                                             (pair
910
                                                                                               bytes
911
                                                                                               (pair
912
                                                                                                 (big_map
913
                                                                                                   int
914
                                                                                                   timestamp)
915
                                                                                                 (big_map
916
                                                                                                   nat
917
                                                                                                   (pair
918
                                                                                                     nat
919
                                                                                                     (map
920
                                                                                                       string
921
                                                                                                       bytes)))))))))))))))))))))
922
                             (lambda
923
                               (pair
924
                                 (pair
925
                                   (lambda
926
                                     (pair nat
927
                                           (pair (big_map nat bytes)
928
                                                 (pair (big_map nat string)
929
                                                       (pair (big_map int nat)
930
                                                             (pair
931
                                                               (big_map nat bls12_381_fr)
932
                                                               (pair nat
933
                                                                     (pair
934
                                                                       (big_map int nat)
935
                                                                       (pair bytes
936
                                                                             (pair bytes
937
                                                                                   (pair
938
                                                                                     (big_map
939
                                                                                       nat
940
                                                                                       address)
941
                                                                                     (pair
942
                                                                                       (big_map
943
                                                                                         string
944
                                                                                         bytes)
945
                                                                                       (pair
946
                                                                                         (big_map
947
                                                                                           int
948
                                                                                           bool)
949
                                                                                         (pair
950
                                                                                           nat
951
                                                                                           (pair
952
                                                                                             nat
953
                                                                                             (pair
954
                                                                                               (big_map
955
                                                                                                 (pair
956
                                                                                                   address
957
                                                                                                   (pair
958
                                                                                                     address
959
                                                                                                     nat))
960
                                                                                                 unit)
961
                                                                                               (pair
962
                                                                                                 bytes
963
                                                                                                 (pair
964
                                                                                                   (big_map
965
                                                                                                     int
966
                                                                                                     timestamp)
967
                                                                                                   (big_map
968
                                                                                                     nat
969
                                                                                                     (pair
970
                                                                                                       nat
971
                                                                                                       (map
972
                                                                                                         string
973
                                                                                                         bytes))))))))))))))))))))
974
                                     (pair bool
975
                                           (pair (big_map nat bytes)
976
                                                 (pair (big_map nat string)
977
                                                       (pair (big_map int nat)
978
                                                             (pair
979
                                                               (big_map nat bls12_381_fr)
980
                                                               (pair nat
981
                                                                     (pair
982
                                                                       (big_map int nat)
983
                                                                       (pair bytes
984
                                                                             (pair bytes
985
                                                                                   (pair
986
                                                                                     (big_map
987
                                                                                       nat
988
                                                                                       address)
989
                                                                                     (pair
990
                                                                                       (big_map
991
                                                                                         string
992
                                                                                         bytes)
993
                                                                                       (pair
994
                                                                                         (big_map
995
                                                                                           int
996
                                                                                           bool)
997
                                                                                         (pair
998
                                                                                           nat
999
                                                                                           (pair
1000
                                                                                             nat
1001
                                                                                             (pair
1002
                                                                                               (big_map
1003
                                                                                                 (pair
1004
                                                                                                   address
1005
                                                                                                   (pair
1006
                                                                                                     address
1007
                                                                                                     nat))
1008
                                                                                                 unit)
1009
                                                                                               (pair
1010
                                                                                                 bytes
1011
                                                                                                 (pair
1012
                                                                                                   (big_map
1013
                                                                                                     int
1014
                                                                                                     timestamp)
1015
                                                                                                   (big_map
1016
                                                                                                     nat
1017
                                                                                                     (pair
1018
                                                                                                       nat
1019
                                                                                                       (map
1020
                                                                                                         string
1021
                                                                                                         bytes)))))))))))))))))))))
1022
                                   (pair address nat))
1023
                                 (pair (big_map nat bytes)
1024
                                       (pair (big_map nat string)
1025
                                             (pair (big_map int nat)
1026
                                                   (pair (big_map nat bls12_381_fr)
1027
                                                         (pair nat
1028
                                                               (pair (big_map int nat)
1029
                                                                     (pair bytes
1030
                                                                           (pair bytes
1031
                                                                                 (pair
1032
                                                                                   (big_map
1033
                                                                                     nat
1034
                                                                                     address)
1035
                                                                                   (pair
1036
                                                                                     (big_map
1037
                                                                                       string
1038
                                                                                       bytes)
1039
                                                                                     (pair
1040
                                                                                       (big_map
1041
                                                                                         int
1042
                                                                                         bool)
1043
                                                                                       (pair
1044
                                                                                         nat
1045
                                                                                         (pair
1046
                                                                                           nat
1047
                                                                                           (pair
1048
                                                                                             (big_map
1049
                                                                                               (pair
1050
                                                                                                 address
1051
                                                                                                 (pair
1052
                                                                                                   address
1053
                                                                                                   nat))
1054
                                                                                               unit)
1055
                                                                                             (pair
1056
                                                                                               bytes
1057
                                                                                               (pair
1058
                                                                                                 (big_map
1059
                                                                                                   int
1060
                                                                                                   timestamp)
1061
                                                                                                 (big_map
1062
                                                                                                   nat
1063
                                                                                                   (pair
1064
                                                                                                     nat
1065
                                                                                                     (map
1066
                                                                                                       string
1067
                                                                                                       bytes))))))))))))))))))))
1068
                               (pair nat
1069
                                     (pair (big_map nat bytes)
1070
                                           (pair (big_map nat string)
1071
                                                 (pair (big_map int nat)
1072
                                                       (pair (big_map nat bls12_381_fr)
1073
                                                             (pair nat
1074
                                                                   (pair
1075
                                                                     (big_map int nat)
1076
                                                                     (pair bytes
1077
                                                                           (pair bytes
1078
                                                                                 (pair
1079
                                                                                   (big_map
1080
                                                                                     nat
1081
                                                                                     address)
1082
                                                                                   (pair
1083
                                                                                     (big_map
1084
                                                                                       string
1085
                                                                                       bytes)
1086
                                                                                     (pair
1087
                                                                                       (big_map
1088
                                                                                         int
1089
                                                                                         bool)
1090
                                                                                       (pair
1091
                                                                                         nat
1092
                                                                                         (pair
1093
                                                                                           nat
1094
                                                                                           (pair
1095
                                                                                             (big_map
1096
                                                                                               (pair
1097
                                                                                                 address
1098
                                                                                                 (pair
1099
                                                                                                   address
1100
                                                                                                   nat))
1101
                                                                                               unit)
1102
                                                                                             (pair
1103
                                                                                               bytes
1104
                                                                                               (pair
1105
                                                                                                 (big_map
1106
                                                                                                   int
1107
                                                                                                   timestamp)
1108
                                                                                                 (big_map
1109
                                                                                                   nat
1110
                                                                                                   (pair
1111
                                                                                                     nat
1112
                                                                                                     (map
1113
                                                                                                       string
1114
                                                                                                       bytes)))))))))))))))))))))))
1115
                     (pair (big_map nat bytes)
1116
                           (pair (big_map nat string)
1117
                                 (pair (big_map int nat)
1118
                                       (pair (big_map nat bls12_381_fr)
1119
                                             (pair nat
1120
                                                   (pair (big_map int nat)
1121
                                                         (pair bytes
1122
                                                               (pair bytes
1123
                                                                     (pair
1124
                                                                       (big_map nat
1125
                                                                                address)
1126
                                                                       (pair
1127
                                                                         (big_map string
1128
                                                                                  bytes)
1129
                                                                         (pair
1130
                                                                           (big_map int
1131
                                                                                    bool)
1132
                                                                           (pair nat
1133
                                                                                 (pair
1134
                                                                                   nat
1135
                                                                                   (pair
1136
                                                                                     (big_map
1137
                                                                                       (pair
1138
                                                                                         address
1139
                                                                                         (pair
1140
                                                                                           address
1141
                                                                                           nat))
1142
                                                                                       unit)
1143
                                                                                     (pair
1144
                                                                                       bytes
1145
                                                                                       (pair
1146
                                                                                         (big_map
1147
                                                                                           int
1148
                                                                                           timestamp)
1149
                                                                                         (big_map
1150
                                                                                           nat
1151
                                                                                           (pair
1152
                                                                                             nat
1153
                                                                                             (map
1154
                                                                                               string
1155
                                                                                               bytes))))))))))))))))))))
1156
                   (pair (pair (pair address nat) nat)
1157
                         (pair (big_map nat bytes)
1158
                               (pair (big_map nat string)
1159
                                     (pair (big_map int nat)
1160
                                           (pair (big_map nat bls12_381_fr)
1161
                                                 (pair nat
1162
                                                       (pair (big_map int nat)
1163
                                                             (pair bytes
1164
                                                                   (pair bytes
1165
                                                                         (pair
1166
                                                                           (big_map nat
1167
                                                                                    address)
1168
                                                                           (pair
1169
                                                                             (big_map
1170
                                                                               string
1171
                                                                               bytes)
1172
                                                                             (pair
1173
                                                                               (big_map
1174
                                                                                 int
1175
                                                                                 bool)
1176
                                                                               (pair nat
1177
                                                                                     (pair
1178
                                                                                       nat
1179
                                                                                       (pair
1180
                                                                                         (big_map
1181
                                                                                           (pair
1182
                                                                                             address
1183
                                                                                             (pair
1184
                                                                                               address
1185
                                                                                               nat))
1186
                                                                                           unit)
1187
                                                                                         (pair
1188
                                                                                           bytes
1189
                                                                                           (pair
1190
                                                                                             (big_map
1191
                                                                                               int
1192
                                                                                               timestamp)
1193
                                                                                             (big_map
1194
                                                                                               nat
1195
                                                                                               (pair
1196
                                                                                                 nat
1197
                                                                                                 (map
1198
                                                                                                   string
1199
                                                                                                   bytes))))))))))))))))))))
1200
                   { UNPAIR ;
1201
                     UNPAIR 3 ;
1202
                     DIG 2 ;
1203
                     DUP 2 ;
1204
                     DIG 3 ;
1205
                     PAIR ;
1206
                     SWAP ;
1207
                     DIG 3 ;
1208
                     DIG 2 ;
1209
                     PAIR ;
1210
                     EXEC ;
1211
                     UNPAIR ;
1212
                     SWAP ;
1213
                     DUG 2 ;
1214
                     SWAP ;
1215
                     PAIR ;
1216
                     PAIR } ;
1217
                 DUP 2 ;
1218
                 CAR ;
1219
                 MAP { DUP 2 ;
1220
                       DUP 13 ;
1221
                       DUP 11 ;
1222
                       PAIR ;
1223
                       DIG 2 ;
1224
                       PAIR ;
1225
                       SWAP ;
1226
                       DIG 4 ;
1227
                       DIG 2 ;
1228
                       PAIR ;
1229
                       EXEC ;
1230
                       UNPAIR ;
1231
                       DUG 11 ;
1232
                       DUG 11 ;
1233
                       DUG 11 ;
1234
                       DUG 11 ;
1235
                       DIG 9 ;
1236
                       DIG 11 ;
1237
                       DIG 11 ;
1238
                       DIG 11 } ;
1239
                 SWAP ;
1240
                 DROP ;
1241
                 DIG 3 ;
1242
                 DROP ;
1243
                 DIG 3 ;
1244
                 DROP ;
1245
                 DIG 3 ;
1246
                 DROP ;
1247
                 DIG 3 ;
1248
                 DROP ;
1249
                 DIG 3 ;
1250
                 DROP ;
1251
                 DIG 3 ;
1252
                 DROP ;
1253
                 DIG 3 ;
1254
                 DROP ;
1255
                 DIG 3 ;
1256
                 DROP ;
1257
                 NIL operation ;
1258
                 DIG 2 ;
1259
                 CDR ;
1260
                 PUSH mutez 0 ;
1261
                 DIG 3 ;
1262
                 TRANSFER_TOKENS ;
1263
                 CONS }
1264
               { DIG 2 ;
1265
                 DROP ;
1266
                 DIG 2 ;
1267
                 DROP ;
1268
                 DIG 2 ;
1269
                 DROP ;
1270
                 DIG 2 ;
1271
                 DROP ;
1272
                 DIG 2 ;
1273
                 DROP ;
1274
                 DIG 2 ;
1275
                 DROP ;
1276
                 DIG 2 ;
1277
                 DROP ;
1278
                 DIG 2 ;
1279
                 DROP ;
1280
                 IF_LEFT
1281
                   { SWAP ;
1282
                     LAMBDA
1283
                       string
1284
                       bytes
1285
                       { PACK ;
1286
                         DUP ;
1287
                         PUSH nat 6 ;
1288
                         DIG 2 ;
1289
                         SIZE ;
1290
                         SUB ;
1291
                         ISNAT ;
1292
                         IF_NONE { PUSH int 34 ; FAILWITH } {} ;
1293
                         PUSH nat 6 ;
1294
                         SLICE ;
1295
                         IF_NONE { PUSH int 34 ; FAILWITH } {} } ;
1296
                     DUP 3 ;
1297
                     GET 6 ;
1298
                     EXEC ;
1299
                     UPDATE 15 ;
1300
                     LAMBDA
1301
                       string
1302
                       bytes
1303
                       { PACK ;
1304
                         DUP ;
1305
                         PUSH nat 6 ;
1306
                         DIG 2 ;
1307
                         SIZE ;
1308
                         SUB ;
1309
                         ISNAT ;
1310
                         IF_NONE { PUSH int 34 ; FAILWITH } {} ;
1311
                         PUSH nat 6 ;
1312
                         SLICE ;
1313
                         IF_NONE { PUSH int 34 ; FAILWITH } {} } ;
1314
                     DIG 2 ;
1315
                     DUP ;
1316
                     GET 3 ;
1317
                     SWAP ;
1318
                     DUP ;
1319
                     CAR ;
1320
                     SWAP ;
1321
                     GET 5 ;
1322
                     CONCAT ;
1323
                     CONCAT ;
1324
                     EXEC ;
1325
                     UPDATE 29 }
1326
                   { DUP ;
1327
                     INT ;
1328
                     DIG 2 ;
1329
                     DUP ;
1330
                     GET 5 ;
1331
                     LEVEL ;
1332
                     SOME ;
1333
                     DUP 4 ;
1334
                     UPDATE ;
1335
                     UPDATE 5 ;
1336
                     DUG 2 ;
1337
                     DUP 3 ;
1338
                     DUP ;
1339
                     GET 11 ;
1340
                     DIG 4 ;
1341
                     GET 9 ;
1342
                     SOME ;
1343
                     DUP 4 ;
1344
                     UPDATE ;
1345
                     UPDATE 11 ;
1346
                     DUP ;
1347
                     GET 31 ;
1348
                     NOW ;
1349
                     SOME ;
1350
                     DIG 3 ;
1351
                     UPDATE ;
1352
                     UPDATE 31 ;
1353
                     SWAP ;
1354
                     DUP 2 ;
1355
                     DUP ;
1356
                     GET 7 ;
1357
                     DIG 2 ;
1358
                     SOME ;
1359
                     DIG 3 ;
1360
                     GET 9 ;
1361
                     UPDATE ;
1362
                     UPDATE 7 ;
1363
                     DUP ;
1364
                     GET 9 ;
1365
                     PUSH nat 1 ;
1366
                     ADD ;
1367
                     UPDATE 9 } ;
1368
                 NIL operation } }
1369
           { IF_LEFT
1370
               { DUP ;
1371
                 GET 6 ;
1372
                 INT ;
1373
                 DUP 3 ;
1374
                 GET 5 ;
1375
                 DUP 2 ;
1376
                 MEM ;
1377
                 IF
1378
                   {}
1379
                   { PUSH string "Assert failure: self.data.contributed.contains(key)" ;
1380
                     FAILWITH } ;
1381
                 DUP 3 ;
1382
                 GET 21 ;
1383
                 DUP 2 ;
1384
                 GET ;
1385
                 IF_NONE { PUSH bool False } {} ;
1386
                 IF
1387
                   { PUSH string "Assert failure: not self.data.minted.get(key, default_value = False)" ;
1388
                     FAILWITH }
1389
                   {} ;
1390
                 PUSH bls12_381_g1 0x0a72dca01ecb44a3d282f9962ecfe816e8694a2aecc5bcd948ab8a690d762d8f8edcd47c202e4fb9db780f0df34370f416850acec2475998743a75ec35cb6b6836f02bc9f04419e0073d72c9a06fe7105c104d2970e15560415178ba53e5f682 ;
1391
                 PUSH bls12_381_g2 0x0fc6035e7c9832f98b51c5b62e2dfcab06bf29ca79fc1b581715fcdb0007e737d102c044dfe7c5dcda245df5569b5362178dbcf1f6edb5133ee59a1a71f47621f06a1c378239aa7603b6b2881988c7357842a04a286e604a324c5ff653f6b1ce04c622cba3fe07ba5785cc573979927acab1a9f88201cf9183035838d448c36560bc7d1d042192c142ab588ed5188d9b19bebd83290fc8eeafdc9f38a3695ff60ce809dd16102046839996973c4767e6390081af6b3fbdc5439d810382b85a60 ;
1392
                 PUSH bls12_381_g2 0x13e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb80606c4a02ea734cc32acd2b02bc28b99cb3e287e85a763af267492ab572e99ab3f370d275cec1da1aaa9075ff05f79be0ce5d527727d6e118cc9cdc6da2e351aadfd9baa8cbdd3a76d429a695160d12c923ac9cc3baca289e193548608b82801 ;
1393
                 PUSH bls12_381_g2 0x106c100d9dde23db7df7e1705860b12dfc6515ddc8a0467a49daa2a1b61361665fc8b2f8c158474c4f4b6e23327da5790c7a288fce6a09342c593d4d33760ede1a9ec0801b82f25f844372b1d362d005ddddccbaf55bc50d34dd36732a4686b70cd6991854742435c1004f1a71e4dab05fde638e3c2dfd35e7c9e79830a9d0f4b64094b1c077c943ee6149b7c2fda7c401bad5660d3dabd57fba4229ebd423dff3d7572bd6a3428c9ef214de19f832d6c4c3ac4d3e016f1b30bf3bf8f4b631d1 ;
1394
                 PUSH bls12_381_g1 0x13ab0365e93c6b35b43c38903e158e29a6042d0478ba4fed9fb686964346c3f99cd832521506d909b189eb448461e78818d12e0290ccce677c3160a179d89ca2ee257f1d748e4fb23a7f09fa3013b99067d74df67c7953580a38fb0c746be212 ;
1395
                 PUSH bls12_381_g1 0x0f31b145b92d18331893a2b150d02b5a17eabb0fbb183027aa1c02a93d471e6651b822421a9fcfd4172e1ae38135346815fb43810442a97b002321ddd123cc272d964735f91431f2892788c91fdead01f7169e6b76edd2b4a5b73fb9bdffcee0 ;
1396
                 DUP 8 ;
1397
                 GET 6 ;
1398
                 SWAP ;
1399
                 MUL ;
1400
                 ADD ;
1401
                 NIL (pair bls12_381_g1 bls12_381_g2) ;
1402
                 DIG 2 ;
1403
                 DUP 8 ;
1404
                 GET 5 ;
1405
                 PAIR ;
1406
                 CONS ;
1407
                 DUG 2 ;
1408
                 PAIR ;
1409
                 CONS ;
1410
                 SWAP ;
1411
                 DIG 2 ;
1412
                 PAIR ;
1413
                 CONS ;
1414
                 DUP 3 ;
1415
                 GET 3 ;
1416
                 DUP 4 ;
1417
                 CAR ;
1418
                 NEG ;
1419
                 PAIR ;
1420
                 CONS ;
1421
                 PAIRING_CHECK ;
1422
                 IF
1423
                   {}
1424
                   { PUSH string "Assert failure: sp.pairing_check(sp.list([(- params.a, params.b), (alpha, beta), (vk_x, gamma), (params.c, delta)]))" ;
1425
                     FAILWITH } ;
1426
                 DUP 3 ;
1427
                 GET 23 ;
1428
                 DIG 3 ;
1429
                 DUP ;
1430
                 GET 17 ;
1431
                 SENDER ;
1432
                 SOME ;
1433
                 DUP 4 ;
1434
                 UPDATE ;
1435
                 UPDATE 17 ;
1436
                 DUP ;
1437
                 CAR ;
1438
                 LAMBDA
1439
                   bls12_381_fr
1440
                   bytes
1441
                   { LAMBDA
1442
                       string
1443
                       bytes
1444
                       { DUP ;
1445
                         PACK ;
1446
                         SWAP ;
1447
                         SIZE ;
1448
                         PUSH nat 6 ;
1449
                         SLICE ;
1450
                         IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1451
                     PUSH string "0123456789abcdef" ;
1452
                     EXEC ;
1453
                     DUP 2 ;
1454
                     INT ;
1455
                     ISNAT ;
1456
                     IF_NONE { PUSH int 40 ; FAILWITH } {} ;
1457
                     PUSH bytes 0x ;
1458
                     PUSH int 0 ;
1459
                     PUSH bool True ;
1460
                     LOOP { PUSH nat 16 ;
1461
                            DUP 4 ;
1462
                            EDIV ;
1463
                            IF_NONE { PUSH int 45 ; FAILWITH } { CDR } ;
1464
                            DIG 2 ;
1465
                            DUP 5 ;
1466
                            PUSH nat 1 ;
1467
                            DIG 3 ;
1468
                            SLICE ;
1469
                            IF_NONE { PUSH int 46 ; FAILWITH } {} ;
1470
                            CONCAT ;
1471
                            SWAP ;
1472
                            DIG 2 ;
1473
                            PUSH nat 16 ;
1474
                            SWAP ;
1475
                            EDIV ;
1476
                            IF_NONE { PUSH int 47 ; FAILWITH } { CAR } ;
1477
                            DUG 2 ;
1478
                            PUSH int 1 ;
1479
                            ADD ;
1480
                            DUP ;
1481
                            PUSH int 6 ;
1482
                            COMPARE ;
1483
                            GT } ;
1484
                     DROP ;
1485
                     SWAP ;
1486
                     DROP ;
1487
                     SWAP ;
1488
                     DROP ;
1489
                     SWAP ;
1490
                     DROP ;
1491
                     LAMBDA
1492
                       string
1493
                       bytes
1494
                       { DUP ;
1495
                         PACK ;
1496
                         SWAP ;
1497
                         SIZE ;
1498
                         PUSH nat 6 ;
1499
                         SLICE ;
1500
                         IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1501
                     PUSH string "#" ;
1502
                     EXEC ;
1503
                     CONCAT } ;
1504
                 DIG 5 ;
1505
                 GET 6 ;
1506
                 EXEC ;
1507
                 SOME ;
1508
                 DUP 4 ;
1509
                 UPDATE ;
1510
                 UPDATE 1 ;
1511
                 DUP ;
1512
                 GET 23 ;
1513
                 PUSH nat 1 ;
1514
                 ADD ;
1515
                 UPDATE 23 ;
1516
                 DUG 2 ;
1517
                 PUSH timestamp "1970-01-01T00:00:00Z" ;
1518
                 NOW ;
1519
                 SUB ;
1520
                 ISNAT ;
1521
                 IF_NONE { PUSH int 53 ; FAILWITH } {} ;
1522
                 DUP ;
1523
                 INT ;
1524
                 NEQ ;
1525
                 IF
1526
                   { PUSH string "" ;
1527
                     DUP 2 ;
1528
                     INT ;
1529
                     NEQ ;
1530
                     LOOP { PUSH string "0123456789" ;
1531
                            PUSH nat 1 ;
1532
                            PUSH nat 10 ;
1533
                            DUP 5 ;
1534
                            EDIV ;
1535
                            IF_NONE { PUSH int 58 ; FAILWITH } { CDR } ;
1536
                            SLICE ;
1537
                            IF_NONE { PUSH int 58 ; FAILWITH } {} ;
1538
                            CONCAT ;
1539
                            PUSH nat 10 ;
1540
                            DIG 2 ;
1541
                            EDIV ;
1542
                            IF_NONE { PUSH int 59 ; FAILWITH } { CAR } ;
1543
                            SWAP ;
1544
                            DUP 2 ;
1545
                            INT ;
1546
                            NEQ } ;
1547
                     DROP 2 ;
1548
                     DIG 3 ;
1549
                     DROP ;
1550
                     DIG 3 ;
1551
                     DROP ;
1552
                     DIG 3 ;
1553
                     DROP ;
1554
                     DIG 3 ;
1555
                     DROP ;
1556
                     DIG 3 ;
1557
                     DROP ;
1558
                     DIG 3 ;
1559
                     DROP ;
1560
                     DIG 3 ;
1561
                     DROP ;
1562
                     DIG 3 ;
1563
                     DROP }
1564
                   { DROP ;
1565
                     DIG 3 ;
1566
                     DROP ;
1567
                     DIG 3 ;
1568
                     DROP ;
1569
                     DIG 3 ;
1570
                     DROP ;
1571
                     DIG 3 ;
1572
                     DROP ;
1573
                     DIG 3 ;
1574
                     DROP ;
1575
                     DIG 3 ;
1576
                     DROP ;
1577
                     DIG 3 ;
1578
                     DROP ;
1579
                     DIG 3 ;
1580
                     DROP } ;
1581
                 LAMBDA
1582
                   int
1583
                   string
1584
                   { ISNAT ;
1585
                     IF_NONE { PUSH int 53 ; FAILWITH } {} ;
1586
                     PUSH string "0" ;
1587
                     DUP 2 ;
1588
                     INT ;
1589
                     NEQ ;
1590
                     IF
1591
                       { DROP ;
1592
                         PUSH string "" ;
1593
                         DUP 2 ;
1594
                         INT ;
1595
                         NEQ ;
1596
                         LOOP { PUSH string "0123456789" ;
1597
                                PUSH nat 1 ;
1598
                                PUSH nat 10 ;
1599
                                DUP 5 ;
1600
                                EDIV ;
1601
                                IF_NONE { PUSH int 58 ; FAILWITH } { CDR } ;
1602
                                SLICE ;
1603
                                IF_NONE { PUSH int 58 ; FAILWITH } {} ;
1604
                                CONCAT ;
1605
                                PUSH nat 10 ;
1606
                                DIG 2 ;
1607
                                EDIV ;
1608
                                IF_NONE { PUSH int 59 ; FAILWITH } { CAR } ;
1609
                                SWAP ;
1610
                                DUP 2 ;
1611
                                INT ;
1612
                                NEQ } ;
1613
                         SWAP ;
1614
                         DROP }
1615
                       { SWAP ; DROP } } ;
1616
                 DUP 2 ;
1617
                 INT ;
1618
                 EXEC ;
1619
                 DUP 4 ;
1620
                 GET 29 ;
1621
                 LAMBDA
1622
                   string
1623
                   bytes
1624
                   { DUP ;
1625
                     PACK ;
1626
                     SWAP ;
1627
                     SIZE ;
1628
                     PUSH nat 6 ;
1629
                     SLICE ;
1630
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1631
                 DUP 3 ;
1632
                 EXEC ;
1633
                 DUP 6 ;
1634
                 GET 15 ;
1635
                 CONCAT ;
1636
                 CONCAT ;
1637
                 DIG 4 ;
1638
                 DUP ;
1639
                 GET 19 ;
1640
                 DIG 2 ;
1641
                 SOME ;
1642
                 DUP 4 ;
1643
                 UPDATE ;
1644
                 UPDATE 19 ;
1645
                 DUG 3 ;
1646
                 LAMBDA
1647
                   string
1648
                   bytes
1649
                   { DUP ;
1650
                     PACK ;
1651
                     SWAP ;
1652
                     SIZE ;
1653
                     PUSH nat 6 ;
1654
                     SLICE ;
1655
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1656
                 DUP 2 ;
1657
                 EXEC ;
1658
                 LAMBDA
1659
                   string
1660
                   bytes
1661
                   { DUP ;
1662
                     PACK ;
1663
                     SWAP ;
1664
                     SIZE ;
1665
                     PUSH nat 6 ;
1666
                     SLICE ;
1667
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1668
                 PUSH string "tezos-storage:" ;
1669
                 EXEC ;
1670
                 CONCAT ;
1671
                 DIG 4 ;
1672
                 DUP ;
1673
                 GET 32 ;
1674
                 EMPTY_MAP string bytes ;
1675
                 LAMBDA
1676
                   string
1677
                   bytes
1678
                   { DUP ;
1679
                     PACK ;
1680
                     SWAP ;
1681
                     SIZE ;
1682
                     PUSH nat 6 ;
1683
                     SLICE ;
1684
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1685
                 DIG 5 ;
1686
                 EXEC ;
1687
                 LAMBDA
1688
                   string
1689
                   bytes
1690
                   { DUP ;
1691
                     PACK ;
1692
                     SWAP ;
1693
                     SIZE ;
1694
                     PUSH nat 6 ;
1695
                     SLICE ;
1696
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1697
                 PUSH string "Moment " ;
1698
                 EXEC ;
1699
                 CONCAT ;
1700
                 SOME ;
1701
                 PUSH string "name" ;
1702
                 UPDATE ;
1703
                 LAMBDA
1704
                   string
1705
                   bytes
1706
                   { DUP ;
1707
                     PACK ;
1708
                     SWAP ;
1709
                     SIZE ;
1710
                     PUSH nat 6 ;
1711
                     SLICE ;
1712
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1713
                 PUSH string "0" ;
1714
                 EXEC ;
1715
                 SOME ;
1716
                 PUSH string "decimals" ;
1717
                 UPDATE ;
1718
                 DIG 3 ;
1719
                 SOME ;
1720
                 PUSH string "artifactUri" ;
1721
                 UPDATE ;
1722
                 LAMBDA
1723
                   string
1724
                   bytes
1725
                   { DUP ;
1726
                     PACK ;
1727
                     SWAP ;
1728
                     SIZE ;
1729
                     PUSH nat 6 ;
1730
                     SLICE ;
1731
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1732
                 PUSH string "https://www.larvalabs.com/public/assetsv2/cryptopunks-gallery/cryptopunk-7488.png" ;
1733
                 EXEC ;
1734
                 SOME ;
1735
                 PUSH string "displayUri" ;
1736
                 UPDATE ;
1737
                 DUP 4 ;
1738
                 PAIR ;
1739
                 SOME ;
1740
                 DIG 3 ;
1741
                 UPDATE ;
1742
                 UPDATE 32 ;
1743
                 DUP ;
1744
                 GET 21 ;
1745
                 PUSH (option bool) (Some True) ;
1746
                 DIG 3 ;
1747
                 UPDATE ;
1748
                 UPDATE 21 }
1749
               { IF_LEFT
1750
                   { DUP 3 ;
1751
                     GET 6 ;
1752
                     IF
1753
                       { DUP ;
1754
                         ITER { DUP ;
1755
                                CDR ;
1756
                                ITER { DUP 9 ;
1757
                                       SWAP ;
1758
                                       DUP ;
1759
                                       GET 3 ;
1760
                                       DIG 2 ;
1761
                                       DIG 5 ;
1762
                                       DIG 2 ;
1763
                                       PAIR ;
1764
                                       EXEC ;
1765
                                       UNPAIR ;
1766
                                       DUG 12 ;
1767
                                       DUG 12 ;
1768
                                       DUG 12 ;
1769
                                       DUG 12 ;
1770
                                       DUG 12 ;
1771
                                       DIG 9 ;
1772
                                       DIG 12 ;
1773
                                       DIG 12 ;
1774
                                       DIG 12 ;
1775
                                       DIG 12 ;
1776
                                       IF
1777
                                         {}
1778
                                         { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
1779
                                       DUP 10 ;
1780
                                       DUP 2 ;
1781
                                       GET 3 ;
1782
                                       DUP 3 ;
1783
                                       CAR ;
1784
                                       DUP 5 ;
1785
                                       CAR ;
1786
                                       PAIR 3 ;
1787
                                       SWAP ;
1788
                                       DIG 5 ;
1789
                                       DIG 2 ;
1790
                                       PAIR ;
1791
                                       EXEC ;
1792
                                       CDR ;
1793
                                       DUG 11 ;
1794
                                       DUG 11 ;
1795
                                       DUG 11 ;
1796
                                       DUG 11 ;
1797
                                       DIG 8 ;
1798
                                       DIG 11 ;
1799
                                       DIG 11 ;
1800
                                       DIG 11 ;
1801
                                       PUSH nat 0 ;
1802
                                       DUP 2 ;
1803
                                       GET 4 ;
1804
                                       COMPARE ;
1805
                                       GT ;
1806
                                       IF
1807
                                         { DUP 2 ;
1808
                                           CAR ;
1809
                                           PAIR ;
1810
                                           DUP 6 ;
1811
                                           DIG 4 ;
1812
                                           DIG 2 ;
1813
                                           PAIR ;
1814
                                           EXEC ;
1815
                                           CDR ;
1816
                                           DUG 10 ;
1817
                                           DUG 10 ;
1818
                                           DUG 10 ;
1819
                                           DIG 8 ;
1820
                                           DIG 10 ;
1821
                                           DIG 10 }
1822
                                         { DROP } } ;
1823
                                DROP } ;
1824
                         DROP ;
1825
                         SWAP ;
1826
                         DROP ;
1827
                         SWAP ;
1828
                         DROP ;
1829
                         SWAP ;
1830
                         DROP ;
1831
                         SWAP ;
1832
                         DROP ;
1833
                         SWAP ;
1834
                         DROP ;
1835
                         SWAP ;
1836
                         DROP ;
1837
                         SWAP ;
1838
                         DROP ;
1839
                         SWAP ;
1840
                         DROP }
1841
                       { PUSH string "FA2_TX_DENIED" ; FAILWITH } }
1842
                   { DUP 3 ;
1843
                     GET 5 ;
1844
                     IF
1845
                       { DUP ;
1846
                         ITER { IF_LEFT
1847
                                  { DUP 10 ;
1848
                                    DUP 2 ;
1849
                                    EXEC ;
1850
                                    DROP ;
1851
                                    DIG 2 ;
1852
                                    DUP ;
1853
                                    GET 27 ;
1854
                                    PUSH (option unit) (Some Unit) ;
1855
                                    DIG 3 ;
1856
                                    UPDATE ;
1857
                                    UPDATE 27 ;
1858
                                    SWAP }
1859
                                  { DUP 10 ;
1860
                                    DUP 2 ;
1861
                                    EXEC ;
1862
                                    DROP ;
1863
                                    DIG 2 ;
1864
                                    DUP ;
1865
                                    GET 27 ;
1866
                                    NONE unit ;
1867
                                    DIG 3 ;
1868
                                    UPDATE ;
1869
                                    UPDATE 27 ;
1870
                                    SWAP } } ;
1871
                         DROP ;
1872
                         SWAP ;
1873
                         DROP ;
1874
                         SWAP ;
1875
                         DROP ;
1876
                         SWAP ;
1877
                         DROP ;
1878
                         SWAP ;
1879
                         DROP ;
1880
                         SWAP ;
1881
                         DROP ;
1882
                         SWAP ;
1883
                         DROP ;
1884
                         SWAP ;
1885
                         DROP ;
1886
                         SWAP ;
1887
                         DROP }
1888
                       { PUSH string "FA2_OPERATORS_UNSUPPORTED" ; FAILWITH } } } ;
1889
             NIL operation } ;
1890
         PAIR } ;
1891
  view "get_last" nat (list bls12_381_fr)
1892
        { UNPAIR ;
1893
          NIL bls12_381_fr ;
1894
          PUSH nat 0 ;
1895
          DUP 3 ;
1896
          DUP 5 ;
1897
          GET 9 ;
1898
          COMPARE ;
1899
          GT ;
1900
          IF
1901
            { DROP ; DUP 2 ; DUP 4 ; GET 9 ; SUB ; ISNAT ; IF_NONE { PUSH int 115 ; FAILWITH } {} }
1902
            {} ;
1903
          DUP ;
1904
          DUP 5 ;
1905
          GET 9 ;
1906
          DUP 2 ;
1907
          COMPARE ;
1908
          LT ;
1909
          LOOP { DIG 2 ;
1910
                 DUP 5 ;
1911
                 GET 7 ;
1912
                 DUP 3 ;
1913
                 GET ;
1914
                 IF_NONE { PUSH int 118 ; FAILWITH } {} ;
1915
                 CONS ;
1916
                 DUG 2 ;
1917
                 PUSH nat 1 ;
1918
                 ADD ;
1919
                 DUP 5 ;
1920
                 GET 9 ;
1921
                 DUP 2 ;
1922
                 COMPARE ;
1923
                 LT } ;
1924
          DROP 2 ;
1925
          SWAP ;
1926
          DROP ;
1927
          SWAP ;
1928
          DROP } ;
1929
  view "render" nat string
1930
        { CAR ;
1931
          PUSH string "</p>" ;
1932
          LAMBDA
1933
            int
1934
            string
1935
            { ISNAT ;
1936
              IF_NONE { PUSH int 53 ; FAILWITH } {} ;
1937
              PUSH string "0" ;
1938
              DUP 2 ;
1939
              INT ;
1940
              NEQ ;
1941
              IF
1942
                { DROP ;
1943
                  PUSH string "" ;
1944
                  DUP 2 ;
1945
                  INT ;
1946
                  NEQ ;
1947
                  LOOP { PUSH string "0123456789" ;
1948
                         PUSH nat 1 ;
1949
                         PUSH nat 10 ;
1950
                         DUP 5 ;
1951
                         EDIV ;
1952
                         IF_NONE { PUSH int 58 ; FAILWITH } { CDR } ;
1953
                         SLICE ;
1954
                         IF_NONE { PUSH int 58 ; FAILWITH } {} ;
1955
                         CONCAT ;
1956
                         PUSH nat 10 ;
1957
                         DIG 2 ;
1958
                         EDIV ;
1959
                         IF_NONE { PUSH int 59 ; FAILWITH } { CAR } ;
1960
                         SWAP ;
1961
                         DUP 2 ;
1962
                         INT ;
1963
                         NEQ } ;
1964
                  SWAP ;
1965
                  DROP }
1966
                { SWAP ; DROP } } ;
1967
          DIG 2 ;
1968
          INT ;
1969
          EXEC ;
1970
          PUSH string "<p>HELLO" ;
1971
          CONCAT ;
1972
          CONCAT } ;
1973
  view "get_balance_of" (list (pair (address %owner) (nat %token_id)))
1974
        (list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance)))
1975
        { UNPAIR ;
1976
          LAMBDA
1977
            (pair
1978
              (pair
1979
                (lambda
1980
                  (pair nat
1981
                        (pair (big_map nat bytes)
1982
                              (pair (big_map nat string)
1983
                                    (pair (big_map int nat)
1984
                                          (pair (big_map nat bls12_381_fr)
1985
                                                (pair nat
1986
                                                      (pair (big_map int nat)
1987
                                                            (pair bytes
1988
                                                                  (pair bytes
1989
                                                                        (pair
1990
                                                                          (big_map nat
1991
                                                                                   address)
1992
                                                                          (pair
1993
                                                                            (big_map
1994
                                                                              string
1995
                                                                              bytes)
1996
                                                                            (pair
1997
                                                                              (big_map
1998
                                                                                int
1999
                                                                                bool)
2000
                                                                              (pair nat
2001
                                                                                    (pair
2002
                                                                                      nat
2003
                                                                                      (pair
2004
                                                                                        (big_map
2005
                                                                                          (pair
2006
                                                                                            address
2007
                                                                                            (pair
2008
                                                                                              address
2009
                                                                                              nat))
2010
                                                                                          unit)
2011
                                                                                        (pair
2012
                                                                                          bytes
2013
                                                                                          (pair
2014
                                                                                            (big_map
2015
                                                                                              int
2016
                                                                                              timestamp)
2017
                                                                                            (big_map
2018
                                                                                              nat
2019
                                                                                              (pair
2020
                                                                                                nat
2021
                                                                                                (map
2022
                                                                                                  string
2023
                                                                                                  bytes))))))))))))))))))))
2024
                  (pair bool
2025
                        (pair (big_map nat bytes)
2026
                              (pair (big_map nat string)
2027
                                    (pair (big_map int nat)
2028
                                          (pair (big_map nat bls12_381_fr)
2029
                                                (pair nat
2030
                                                      (pair (big_map int nat)
2031
                                                            (pair bytes
2032
                                                                  (pair bytes
2033
                                                                        (pair
2034
                                                                          (big_map nat
2035
                                                                                   address)
2036
                                                                          (pair
2037
                                                                            (big_map
2038
                                                                              string
2039
                                                                              bytes)
2040
                                                                            (pair
2041
                                                                              (big_map
2042
                                                                                int
2043
                                                                                bool)
2044
                                                                              (pair nat
2045
                                                                                    (pair
2046
                                                                                      nat
2047
                                                                                      (pair
2048
                                                                                        (big_map
2049
                                                                                          (pair
2050
                                                                                            address
2051
                                                                                            (pair
2052
                                                                                              address
2053
                                                                                              nat))
2054
                                                                                          unit)
2055
                                                                                        (pair
2056
                                                                                          bytes
2057
                                                                                          (pair
2058
                                                                                            (big_map
2059
                                                                                              int
2060
                                                                                              timestamp)
2061
                                                                                            (big_map
2062
                                                                                              nat
2063
                                                                                              (pair
2064
                                                                                                nat
2065
                                                                                                (map
2066
                                                                                                  string
2067
                                                                                                  bytes)))))))))))))))))))))
2068
                (pair address nat))
2069
              (pair (big_map nat bytes)
2070
                    (pair (big_map nat string)
2071
                          (pair (big_map int nat)
2072
                                (pair (big_map nat bls12_381_fr)
2073
                                      (pair nat
2074
                                            (pair (big_map int nat)
2075
                                                  (pair bytes
2076
                                                        (pair bytes
2077
                                                              (pair
2078
                                                                (big_map nat address)
2079
                                                                (pair
2080
                                                                  (big_map string bytes)
2081
                                                                  (pair
2082
                                                                    (big_map int bool)
2083
                                                                    (pair nat
2084
                                                                          (pair nat
2085
                                                                                (pair
2086
                                                                                  (big_map
2087
                                                                                    (pair
2088
                                                                                      address
2089
                                                                                      (pair
2090
                                                                                        address
2091
                                                                                        nat))
2092
                                                                                    unit)
2093
                                                                                  (pair
2094
                                                                                    bytes
2095
                                                                                    (pair
2096
                                                                                      (big_map
2097
                                                                                        int
2098
                                                                                        timestamp)
2099
                                                                                      (big_map
2100
                                                                                        nat
2101
                                                                                        (pair
2102
                                                                                          nat
2103
                                                                                          (map
2104
                                                                                            string
2105
                                                                                            bytes))))))))))))))))))))
2106
            (pair nat
2107
                  (pair (big_map nat bytes)
2108
                        (pair (big_map nat string)
2109
                              (pair (big_map int nat)
2110
                                    (pair (big_map nat bls12_381_fr)
2111
                                          (pair nat
2112
                                                (pair (big_map int nat)
2113
                                                      (pair bytes
2114
                                                            (pair bytes
2115
                                                                  (pair
2116
                                                                    (big_map nat address)
2117
                                                                    (pair
2118
                                                                      (big_map string
2119
                                                                               bytes)
2120
                                                                      (pair
2121
                                                                        (big_map int
2122
                                                                                 bool)
2123
                                                                        (pair nat
2124
                                                                              (pair nat
2125
                                                                                    (pair
2126
                                                                                      (big_map
2127
                                                                                        (pair
2128
                                                                                          address
2129
                                                                                          (pair
2130
                                                                                            address
2131
                                                                                            nat))
2132
                                                                                        unit)
2133
                                                                                      (pair
2134
                                                                                        bytes
2135
                                                                                        (pair
2136
                                                                                          (big_map
2137
                                                                                            int
2138
                                                                                            timestamp)
2139
                                                                                          (big_map
2140
                                                                                            nat
2141
                                                                                            (pair
2142
                                                                                              nat
2143
                                                                                              (map
2144
                                                                                                string
2145
                                                                                                bytes))))))))))))))))))))
2146
            { UNPAIR ;
2147
              UNPAIR ;
2148
              SWAP ;
2149
              DUP ;
2150
              CDR ;
2151
              DIG 2 ;
2152
              DIG 3 ;
2153
              DIG 2 ;
2154
              PAIR ;
2155
              EXEC ;
2156
              UNPAIR ;
2157
              SWAP ;
2158
              DUG 2 ;
2159
              IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
2160
              DUP ;
2161
              CAR ;
2162
              DUP 3 ;
2163
              GET 17 ;
2164
              DIG 2 ;
2165
              CDR ;
2166
              GET ;
2167
              IF_NONE { PUSH int 372 ; FAILWITH } {} ;
2168
              COMPARE ;
2169
              EQ ;
2170
              IF { PUSH nat 1 } { PUSH nat 0 } ;
2171
              PAIR } ;
2172
          SWAP ;
2173
          LAMBDA
2174
            (pair nat
2175
                  (pair (big_map nat bytes)
2176
                        (pair (big_map nat string)
2177
                              (pair (big_map int nat)
2178
                                    (pair (big_map nat bls12_381_fr)
2179
                                          (pair nat
2180
                                                (pair (big_map int nat)
2181
                                                      (pair bytes
2182
                                                            (pair bytes
2183
                                                                  (pair
2184
                                                                    (big_map nat address)
2185
                                                                    (pair
2186
                                                                      (big_map string
2187
                                                                               bytes)
2188
                                                                      (pair
2189
                                                                        (big_map int
2190
                                                                                 bool)
2191
                                                                        (pair nat
2192
                                                                              (pair nat
2193
                                                                                    (pair
2194
                                                                                      (big_map
2195
                                                                                        (pair
2196
                                                                                          address
2197
                                                                                          (pair
2198
                                                                                            address
2199
                                                                                            nat))
2200
                                                                                        unit)
2201
                                                                                      (pair
2202
                                                                                        bytes
2203
                                                                                        (pair
2204
                                                                                          (big_map
2205
                                                                                            int
2206
                                                                                            timestamp)
2207
                                                                                          (big_map
2208
                                                                                            nat
2209
                                                                                            (pair
2210
                                                                                              nat
2211
                                                                                              (map
2212
                                                                                                string
2213
                                                                                                bytes))))))))))))))))))))
2214
            (pair bool
2215
                  (pair (big_map nat bytes)
2216
                        (pair (big_map nat string)
2217
                              (pair (big_map int nat)
2218
                                    (pair (big_map nat bls12_381_fr)
2219
                                          (pair nat
2220
                                                (pair (big_map int nat)
2221
                                                      (pair bytes
2222
                                                            (pair bytes
2223
                                                                  (pair
2224
                                                                    (big_map nat address)
2225
                                                                    (pair
2226
                                                                      (big_map string
2227
                                                                               bytes)
2228
                                                                      (pair
2229
                                                                        (big_map int
2230
                                                                                 bool)
2231
                                                                        (pair nat
2232
                                                                              (pair nat
2233
                                                                                    (pair
2234
                                                                                      (big_map
2235
                                                                                        (pair
2236
                                                                                          address
2237
                                                                                          (pair
2238
                                                                                            address
2239
                                                                                            nat))
2240
                                                                                        unit)
2241
                                                                                      (pair
2242
                                                                                        bytes
2243
                                                                                        (pair
2244
                                                                                          (big_map
2245
                                                                                            int
2246
                                                                                            timestamp)
2247
                                                                                          (big_map
2248
                                                                                            nat
2249
                                                                                            (pair
2250
                                                                                              nat
2251
                                                                                              (map
2252
                                                                                                string
2253
                                                                                                bytes))))))))))))))))))))
2254
            { UNPAIR ; SWAP ; DUP ; GET 32 ; DIG 2 ; MEM ; PAIR } ;
2255
          SWAP ;
2256
          LAMBDA
2257
            (pair
2258
              (pair (pair address nat)
2259
                    (pair
2260
                      (lambda
2261
                        (pair nat
2262
                              (pair (big_map nat bytes)
2263
                                    (pair (big_map nat string)
2264
                                          (pair (big_map int nat)
2265
                                                (pair (big_map nat bls12_381_fr)
2266
                                                      (pair nat
2267
                                                            (pair (big_map int nat)
2268
                                                                  (pair bytes
2269
                                                                        (pair bytes
2270
                                                                              (pair
2271
                                                                                (big_map
2272
                                                                                  nat
2273
                                                                                  address)
2274
                                                                                (pair
2275
                                                                                  (big_map
2276
                                                                                    string
2277
                                                                                    bytes)
2278
                                                                                  (pair
2279
                                                                                    (big_map
2280
                                                                                      int
2281
                                                                                      bool)
2282
                                                                                    (pair
2283
                                                                                      nat
2284
                                                                                      (pair
2285
                                                                                        nat
2286
                                                                                        (pair
2287
                                                                                          (big_map
2288
                                                                                            (pair
2289
                                                                                              address
2290
                                                                                              (pair
2291
                                                                                                address
2292
                                                                                                nat))
2293
                                                                                            unit)
2294
                                                                                          (pair
2295
                                                                                            bytes
2296
                                                                                            (pair
2297
                                                                                              (big_map
2298
                                                                                                int
2299
                                                                                                timestamp)
2300
                                                                                              (big_map
2301
                                                                                                nat
2302
                                                                                                (pair
2303
                                                                                                  nat
2304
                                                                                                  (map
2305
                                                                                                    string
2306
                                                                                                    bytes))))))))))))))))))))
2307
                        (pair bool
2308
                              (pair (big_map nat bytes)
2309
                                    (pair (big_map nat string)
2310
                                          (pair (big_map int nat)
2311
                                                (pair (big_map nat bls12_381_fr)
2312
                                                      (pair nat
2313
                                                            (pair (big_map int nat)
2314
                                                                  (pair bytes
2315
                                                                        (pair bytes
2316
                                                                              (pair
2317
                                                                                (big_map
2318
                                                                                  nat
2319
                                                                                  address)
2320
                                                                                (pair
2321
                                                                                  (big_map
2322
                                                                                    string
2323
                                                                                    bytes)
2324
                                                                                  (pair
2325
                                                                                    (big_map
2326
                                                                                      int
2327
                                                                                      bool)
2328
                                                                                    (pair
2329
                                                                                      nat
2330
                                                                                      (pair
2331
                                                                                        nat
2332
                                                                                        (pair
2333
                                                                                          (big_map
2334
                                                                                            (pair
2335
                                                                                              address
2336
                                                                                              (pair
2337
                                                                                                address
2338
                                                                                                nat))
2339
                                                                                            unit)
2340
                                                                                          (pair
2341
                                                                                            bytes
2342
                                                                                            (pair
2343
                                                                                              (big_map
2344
                                                                                                int
2345
                                                                                                timestamp)
2346
                                                                                              (big_map
2347
                                                                                                nat
2348
                                                                                                (pair
2349
                                                                                                  nat
2350
                                                                                                  (map
2351
                                                                                                    string
2352
                                                                                                    bytes)))))))))))))))))))))
2353
                      (lambda
2354
                        (pair
2355
                          (pair
2356
                            (lambda
2357
                              (pair nat
2358
                                    (pair (big_map nat bytes)
2359
                                          (pair (big_map nat string)
2360
                                                (pair (big_map int nat)
2361
                                                      (pair (big_map nat bls12_381_fr)
2362
                                                            (pair nat
2363
                                                                  (pair
2364
                                                                    (big_map int nat)
2365
                                                                    (pair bytes
2366
                                                                          (pair bytes
2367
                                                                                (pair
2368
                                                                                  (big_map
2369
                                                                                    nat
2370
                                                                                    address)
2371
                                                                                  (pair
2372
                                                                                    (big_map
2373
                                                                                      string
2374
                                                                                      bytes)
2375
                                                                                    (pair
2376
                                                                                      (big_map
2377
                                                                                        int
2378
                                                                                        bool)
2379
                                                                                      (pair
2380
                                                                                        nat
2381
                                                                                        (pair
2382
                                                                                          nat
2383
                                                                                          (pair
2384
                                                                                            (big_map
2385
                                                                                              (pair
2386
                                                                                                address
2387
                                                                                                (pair
2388
                                                                                                  address
2389
                                                                                                  nat))
2390
                                                                                              unit)
2391
                                                                                            (pair
2392
                                                                                              bytes
2393
                                                                                              (pair
2394
                                                                                                (big_map
2395
                                                                                                  int
2396
                                                                                                  timestamp)
2397
                                                                                                (big_map
2398
                                                                                                  nat
2399
                                                                                                  (pair
2400
                                                                                                    nat
2401
                                                                                                    (map
2402
                                                                                                      string
2403
                                                                                                      bytes))))))))))))))))))))
2404
                              (pair bool
2405
                                    (pair (big_map nat bytes)
2406
                                          (pair (big_map nat string)
2407
                                                (pair (big_map int nat)
2408
                                                      (pair (big_map nat bls12_381_fr)
2409
                                                            (pair nat
2410
                                                                  (pair
2411
                                                                    (big_map int nat)
2412
                                                                    (pair bytes
2413
                                                                          (pair bytes
2414
                                                                                (pair
2415
                                                                                  (big_map
2416
                                                                                    nat
2417
                                                                                    address)
2418
                                                                                  (pair
2419
                                                                                    (big_map
2420
                                                                                      string
2421
                                                                                      bytes)
2422
                                                                                    (pair
2423
                                                                                      (big_map
2424
                                                                                        int
2425
                                                                                        bool)
2426
                                                                                      (pair
2427
                                                                                        nat
2428
                                                                                        (pair
2429
                                                                                          nat
2430
                                                                                          (pair
2431
                                                                                            (big_map
2432
                                                                                              (pair
2433
                                                                                                address
2434
                                                                                                (pair
2435
                                                                                                  address
2436
                                                                                                  nat))
2437
                                                                                              unit)
2438
                                                                                            (pair
2439
                                                                                              bytes
2440
                                                                                              (pair
2441
                                                                                                (big_map
2442
                                                                                                  int
2443
                                                                                                  timestamp)
2444
                                                                                                (big_map
2445
                                                                                                  nat
2446
                                                                                                  (pair
2447
                                                                                                    nat
2448
                                                                                                    (map
2449
                                                                                                      string
2450
                                                                                                      bytes)))))))))))))))))))))
2451
                            (pair address nat))
2452
                          (pair (big_map nat bytes)
2453
                                (pair (big_map nat string)
2454
                                      (pair (big_map int nat)
2455
                                            (pair (big_map nat bls12_381_fr)
2456
                                                  (pair nat
2457
                                                        (pair (big_map int nat)
2458
                                                              (pair bytes
2459
                                                                    (pair bytes
2460
                                                                          (pair
2461
                                                                            (big_map nat
2462
                                                                                     address)
2463
                                                                            (pair
2464
                                                                              (big_map
2465
                                                                                string
2466
                                                                                bytes)
2467
                                                                              (pair
2468
                                                                                (big_map
2469
                                                                                  int
2470
                                                                                  bool)
2471
                                                                                (pair
2472
                                                                                  nat
2473
                                                                                  (pair
2474
                                                                                    nat
2475
                                                                                    (pair
2476
                                                                                      (big_map
2477
                                                                                        (pair
2478
                                                                                          address
2479
                                                                                          (pair
2480
                                                                                            address
2481
                                                                                            nat))
2482
                                                                                        unit)
2483
                                                                                      (pair
2484
                                                                                        bytes
2485
                                                                                        (pair
2486
                                                                                          (big_map
2487
                                                                                            int
2488
                                                                                            timestamp)
2489
                                                                                          (big_map
2490
                                                                                            nat
2491
                                                                                            (pair
2492
                                                                                              nat
2493
                                                                                              (map
2494
                                                                                                string
2495
                                                                                                bytes))))))))))))))))))))
2496
                        (pair nat
2497
                              (pair (big_map nat bytes)
2498
                                    (pair (big_map nat string)
2499
                                          (pair (big_map int nat)
2500
                                                (pair (big_map nat bls12_381_fr)
2501
                                                      (pair nat
2502
                                                            (pair (big_map int nat)
2503
                                                                  (pair bytes
2504
                                                                        (pair bytes
2505
                                                                              (pair
2506
                                                                                (big_map
2507
                                                                                  nat
2508
                                                                                  address)
2509
                                                                                (pair
2510
                                                                                  (big_map
2511
                                                                                    string
2512
                                                                                    bytes)
2513
                                                                                  (pair
2514
                                                                                    (big_map
2515
                                                                                      int
2516
                                                                                      bool)
2517
                                                                                    (pair
2518
                                                                                      nat
2519
                                                                                      (pair
2520
                                                                                        nat
2521
                                                                                        (pair
2522
                                                                                          (big_map
2523
                                                                                            (pair
2524
                                                                                              address
2525
                                                                                              (pair
2526
                                                                                                address
2527
                                                                                                nat))
2528
                                                                                            unit)
2529
                                                                                          (pair
2530
                                                                                            bytes
2531
                                                                                            (pair
2532
                                                                                              (big_map
2533
                                                                                                int
2534
                                                                                                timestamp)
2535
                                                                                              (big_map
2536
                                                                                                nat
2537
                                                                                                (pair
2538
                                                                                                  nat
2539
                                                                                                  (map
2540
                                                                                                    string
2541
                                                                                                    bytes)))))))))))))))))))))))
2542
              (pair (big_map nat bytes)
2543
                    (pair (big_map nat string)
2544
                          (pair (big_map int nat)
2545
                                (pair (big_map nat bls12_381_fr)
2546
                                      (pair nat
2547
                                            (pair (big_map int nat)
2548
                                                  (pair bytes
2549
                                                        (pair bytes
2550
                                                              (pair
2551
                                                                (big_map nat address)
2552
                                                                (pair
2553
                                                                  (big_map string bytes)
2554
                                                                  (pair
2555
                                                                    (big_map int bool)
2556
                                                                    (pair nat
2557
                                                                          (pair nat
2558
                                                                                (pair
2559
                                                                                  (big_map
2560
                                                                                    (pair
2561
                                                                                      address
2562
                                                                                      (pair
2563
                                                                                        address
2564
                                                                                        nat))
2565
                                                                                    unit)
2566
                                                                                  (pair
2567
                                                                                    bytes
2568
                                                                                    (pair
2569
                                                                                      (big_map
2570
                                                                                        int
2571
                                                                                        timestamp)
2572
                                                                                      (big_map
2573
                                                                                        nat
2574
                                                                                        (pair
2575
                                                                                          nat
2576
                                                                                          (map
2577
                                                                                            string
2578
                                                                                            bytes))))))))))))))))))))
2579
            (pair (pair (pair address nat) nat)
2580
                  (pair (big_map nat bytes)
2581
                        (pair (big_map nat string)
2582
                              (pair (big_map int nat)
2583
                                    (pair (big_map nat bls12_381_fr)
2584
                                          (pair nat
2585
                                                (pair (big_map int nat)
2586
                                                      (pair bytes
2587
                                                            (pair bytes
2588
                                                                  (pair
2589
                                                                    (big_map nat address)
2590
                                                                    (pair
2591
                                                                      (big_map string
2592
                                                                               bytes)
2593
                                                                      (pair
2594
                                                                        (big_map int
2595
                                                                                 bool)
2596
                                                                        (pair nat
2597
                                                                              (pair nat
2598
                                                                                    (pair
2599
                                                                                      (big_map
2600
                                                                                        (pair
2601
                                                                                          address
2602
                                                                                          (pair
2603
                                                                                            address
2604
                                                                                            nat))
2605
                                                                                        unit)
2606
                                                                                      (pair
2607
                                                                                        bytes
2608
                                                                                        (pair
2609
                                                                                          (big_map
2610
                                                                                            int
2611
                                                                                            timestamp)
2612
                                                                                          (big_map
2613
                                                                                            nat
2614
                                                                                            (pair
2615
                                                                                              nat
2616
                                                                                              (map
2617
                                                                                                string
2618
                                                                                                bytes))))))))))))))))))))
2619
            { UNPAIR ;
2620
              UNPAIR 3 ;
2621
              DIG 2 ;
2622
              DUP 2 ;
2623
              DIG 3 ;
2624
              PAIR ;
2625
              SWAP ;
2626
              DIG 3 ;
2627
              DIG 2 ;
2628
              PAIR ;
2629
              EXEC ;
2630
              UNPAIR ;
2631
              SWAP ;
2632
              DUG 2 ;
2633
              SWAP ;
2634
              PAIR ;
2635
              PAIR } ;
2636
          DUP 2 ;
2637
          MAP { DUP 2 ; DUP 6 ; DUP 6 ; PAIR ; DIG 2 ; PAIR ; SWAP ; DIG 6 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; SWAP ; DUG 5 } ;
2638
          SWAP ;
2639
          DROP ;
2640
          SWAP ;
2641
          DROP ;
2642
          SWAP ;
2643
          DROP ;
2644
          SWAP ;
2645
          DROP ;
2646
          SWAP ;
2647
          DROP } }