BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Shadownet
  • /
  • Nephomancer
FA2Ledger
operations (5)Storage Code Interact Tokens Metadata Fork Views Statistics Details
Latest
​x
493
1023
 
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 (bytes %digits)
35
                                  (pair (bytes %head)
36
                                        (pair (big_map %ledger nat address)
37
                                              (pair (big_map %metadata string bytes)
38
                                                    (pair (big_map %minted int bool)
39
                                                          (pair (nat %next_id)
40
                                                                (pair
41
                                                                  (nat %next_token_id)
42
                                                                  (pair
43
                                                                    (big_map %operators
44
                                                                      (pair
45
                                                                        (address %owner)
46
                                                                        (pair
47
                                                                          (address %operator)
48
                                                                          (nat %token_id)))
49
                                                                      unit)
50
                                                                    (pair (bytes %tail)
51
                                                                          (big_map %token_metadata
52
                                                                            nat
53
                                                                            (pair
54
                                                                              (nat %token_id)
55
                                                                              (map %token_info
56
                                                                                string
57
                                                                                bytes))))))))))))))) ;
58
  code { LAMBDA
59
           (pair
60
             (pair
61
               (lambda
62
                 (pair nat
63
                       (pair (big_map nat bytes)
64
                             (pair (big_map nat string)
65
                                   (pair (big_map int nat)
66
                                         (pair bytes
67
                                               (pair bytes
68
                                                     (pair (big_map nat address)
69
                                                           (pair (big_map string bytes)
70
                                                                 (pair
71
                                                                   (big_map int bool)
72
                                                                   (pair nat
73
                                                                         (pair nat
74
                                                                               (pair
75
                                                                                 (big_map
76
                                                                                   (pair
77
                                                                                     address
78
                                                                                     (pair
79
                                                                                       address
80
                                                                                       nat))
81
                                                                                   unit)
82
                                                                                 (pair
83
                                                                                   bytes
84
                                                                                   (big_map
85
                                                                                     nat
86
                                                                                     (pair
87
                                                                                       nat
88
                                                                                       (map
89
                                                                                         string
90
                                                                                         bytes))))))))))))))))
91
                 (pair bool
92
                       (pair (big_map nat bytes)
93
                             (pair (big_map nat string)
94
                                   (pair (big_map int nat)
95
                                         (pair bytes
96
                                               (pair bytes
97
                                                     (pair (big_map nat address)
98
                                                           (pair (big_map string bytes)
99
                                                                 (pair
100
                                                                   (big_map int bool)
101
                                                                   (pair nat
102
                                                                         (pair nat
103
                                                                               (pair
104
                                                                                 (big_map
105
                                                                                   (pair
106
                                                                                     address
107
                                                                                     (pair
108
                                                                                       address
109
                                                                                       nat))
110
                                                                                   unit)
111
                                                                                 (pair
112
                                                                                   bytes
113
                                                                                   (big_map
114
                                                                                     nat
115
                                                                                     (pair
116
                                                                                       nat
117
                                                                                       (map
118
                                                                                         string
119
                                                                                         bytes)))))))))))))))))
120
               (pair address nat))
121
             (pair (big_map nat bytes)
122
                   (pair (big_map nat string)
123
                         (pair (big_map int nat)
124
                               (pair bytes
125
                                     (pair bytes
126
                                           (pair (big_map nat address)
127
                                                 (pair (big_map string bytes)
128
                                                       (pair (big_map int bool)
129
                                                             (pair nat
130
                                                                   (pair nat
131
                                                                         (pair
132
                                                                           (big_map
133
                                                                             (pair
134
                                                                               address
135
                                                                               (pair
136
                                                                                 address
137
                                                                                 nat))
138
                                                                             unit)
139
                                                                           (pair bytes
140
                                                                                 (big_map
141
                                                                                   nat
142
                                                                                   (pair
143
                                                                                     nat
144
                                                                                     (map
145
                                                                                       string
146
                                                                                       bytes))))))))))))))))
147
           (pair nat
148
                 (pair (big_map nat bytes)
149
                       (pair (big_map nat string)
150
                             (pair (big_map int nat)
151
                                   (pair bytes
152
                                         (pair bytes
153
                                               (pair (big_map nat address)
154
                                                     (pair (big_map string bytes)
155
                                                           (pair (big_map int bool)
156
                                                                 (pair nat
157
                                                                       (pair nat
158
                                                                             (pair
159
                                                                               (big_map
160
                                                                                 (pair
161
                                                                                   address
162
                                                                                   (pair
163
                                                                                     address
164
                                                                                     nat))
165
                                                                                 unit)
166
                                                                               (pair
167
                                                                                 bytes
168
                                                                                 (big_map
169
                                                                                   nat
170
                                                                                   (pair
171
                                                                                     nat
172
                                                                                     (map
173
                                                                                       string
174
                                                                                       bytes))))))))))))))))
175
           { UNPAIR ;
176
             UNPAIR ;
177
             SWAP ;
178
             DUP ;
179
             CDR ;
180
             DIG 2 ;
181
             DIG 3 ;
182
             DIG 2 ;
183
             PAIR ;
184
             EXEC ;
185
             UNPAIR ;
186
             SWAP ;
187
             DUG 2 ;
188
             IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
189
             DUP ;
190
             CAR ;
191
             DUP 3 ;
192
             GET 11 ;
193
             DIG 2 ;
194
             CDR ;
195
             GET ;
196
             IF_NONE { PUSH int 372 ; FAILWITH } {} ;
197
             COMPARE ;
198
             EQ ;
199
             IF { PUSH nat 1 } { PUSH nat 0 } ;
200
             PAIR } ;
201
         SWAP ;
202
         LAMBDA
203
           (pair address (pair address nat))
204
           unit
205
           { CAR ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "FA2_NOT_OWNER" ; FAILWITH } ; UNIT } ;
206
         SWAP ;
207
         LAMBDA
208
           (pair (pair address (pair address nat))
209
                 (pair (big_map nat bytes)
210
                       (pair (big_map nat string)
211
                             (pair (big_map int nat)
212
                                   (pair bytes
213
                                         (pair bytes
214
                                               (pair (big_map nat address)
215
                                                     (pair (big_map string bytes)
216
                                                           (pair (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
                                                                                 (big_map
230
                                                                                   nat
231
                                                                                   (pair
232
                                                                                     nat
233
                                                                                     (map
234
                                                                                       string
235
                                                                                       bytes))))))))))))))))
236
           (pair unit
237
                 (pair (big_map nat bytes)
238
                       (pair (big_map nat string)
239
                             (pair (big_map int nat)
240
                                   (pair bytes
241
                                         (pair bytes
242
                                               (pair (big_map nat address)
243
                                                     (pair (big_map string bytes)
244
                                                           (pair (big_map int bool)
245
                                                                 (pair nat
246
                                                                       (pair nat
247
                                                                             (pair
248
                                                                               (big_map
249
                                                                                 (pair
250
                                                                                   address
251
                                                                                   (pair
252
                                                                                     address
253
                                                                                     nat))
254
                                                                                 unit)
255
                                                                               (pair
256
                                                                                 bytes
257
                                                                                 (big_map
258
                                                                                   nat
259
                                                                                   (pair
260
                                                                                     nat
261
                                                                                     (map
262
                                                                                       string
263
                                                                                       bytes))))))))))))))))
264
           { UNPAIR ;
265
             DUP ;
266
             CAR ;
267
             SENDER ;
268
             COMPARE ;
269
             EQ ;
270
             IF
271
               { DROP ; PUSH bool True }
272
               { DUP 2 ; GET 21 ; DUP 2 ; GET 4 ; SENDER ; DIG 3 ; CAR ; PAIR 3 ; MEM } ;
273
             IF {} { PUSH string "FA2_NOT_OPERATOR" ; FAILWITH } ;
274
             UNIT ;
275
             PAIR } ;
276
         SWAP ;
277
         LAMBDA
278
           (pair nat
279
                 (pair (big_map nat bytes)
280
                       (pair (big_map nat string)
281
                             (pair (big_map int nat)
282
                                   (pair bytes
283
                                         (pair bytes
284
                                               (pair (big_map nat address)
285
                                                     (pair (big_map string bytes)
286
                                                           (pair (big_map int bool)
287
                                                                 (pair nat
288
                                                                       (pair nat
289
                                                                             (pair
290
                                                                               (big_map
291
                                                                                 (pair
292
                                                                                   address
293
                                                                                   (pair
294
                                                                                     address
295
                                                                                     nat))
296
                                                                                 unit)
297
                                                                               (pair
298
                                                                                 bytes
299
                                                                                 (big_map
300
                                                                                   nat
301
                                                                                   (pair
302
                                                                                     nat
303
                                                                                     (map
304
                                                                                       string
305
                                                                                       bytes))))))))))))))))
306
           (pair bool
307
                 (pair (big_map nat bytes)
308
                       (pair (big_map nat string)
309
                             (pair (big_map int nat)
310
                                   (pair bytes
311
                                         (pair bytes
312
                                               (pair (big_map nat address)
313
                                                     (pair (big_map string bytes)
314
                                                           (pair (big_map int bool)
315
                                                                 (pair nat
316
                                                                       (pair nat
317
                                                                             (pair
318
                                                                               (big_map
319
                                                                                 (pair
320
                                                                                   address
321
                                                                                   (pair
322
                                                                                     address
323
                                                                                     nat))
324
                                                                                 unit)
325
                                                                               (pair
326
                                                                                 bytes
327
                                                                                 (big_map
328
                                                                                   nat
329
                                                                                   (pair
330
                                                                                     nat
331
                                                                                     (map
332
                                                                                       string
333
                                                                                       bytes))))))))))))))))
334
           { UNPAIR ; SWAP ; DUP ; GET 24 ; DIG 2 ; MEM ; PAIR } ;
335
         SWAP ;
336
         LAMBDA
337
           (pair (pair address (pair address nat))
338
                 (pair (big_map nat bytes)
339
                       (pair (big_map nat string)
340
                             (pair (big_map int nat)
341
                                   (pair bytes
342
                                         (pair bytes
343
                                               (pair (big_map nat address)
344
                                                     (pair (big_map string bytes)
345
                                                           (pair (big_map int bool)
346
                                                                 (pair nat
347
                                                                       (pair nat
348
                                                                             (pair
349
                                                                               (big_map
350
                                                                                 (pair
351
                                                                                   address
352
                                                                                   (pair
353
                                                                                     address
354
                                                                                     nat))
355
                                                                                 unit)
356
                                                                               (pair
357
                                                                                 bytes
358
                                                                                 (big_map
359
                                                                                   nat
360
                                                                                   (pair
361
                                                                                     nat
362
                                                                                     (map
363
                                                                                       string
364
                                                                                       bytes))))))))))))))))
365
           (pair bool
366
                 (pair (big_map nat bytes)
367
                       (pair (big_map nat string)
368
                             (pair (big_map int nat)
369
                                   (pair bytes
370
                                         (pair bytes
371
                                               (pair (big_map nat address)
372
                                                     (pair (big_map string bytes)
373
                                                           (pair (big_map int bool)
374
                                                                 (pair nat
375
                                                                       (pair nat
376
                                                                             (pair
377
                                                                               (big_map
378
                                                                                 (pair
379
                                                                                   address
380
                                                                                   (pair
381
                                                                                     address
382
                                                                                     nat))
383
                                                                                 unit)
384
                                                                               (pair
385
                                                                                 bytes
386
                                                                                 (big_map
387
                                                                                   nat
388
                                                                                   (pair
389
                                                                                     nat
390
                                                                                     (map
391
                                                                                       string
392
                                                                                       bytes))))))))))))))))
393
           { UNPAIR ; SWAP ; DUP ; GET 21 ; DIG 2 ; MEM ; PAIR } ;
394
         SWAP ;
395
         LAMBDA
396
           (pair
397
             (pair
398
               (lambda
399
                 (pair nat
400
                       (pair (big_map nat bytes)
401
                             (pair (big_map nat string)
402
                                   (pair (big_map int nat)
403
                                         (pair bytes
404
                                               (pair bytes
405
                                                     (pair (big_map nat address)
406
                                                           (pair (big_map string bytes)
407
                                                                 (pair
408
                                                                   (big_map int bool)
409
                                                                   (pair nat
410
                                                                         (pair nat
411
                                                                               (pair
412
                                                                                 (big_map
413
                                                                                   (pair
414
                                                                                     address
415
                                                                                     (pair
416
                                                                                       address
417
                                                                                       nat))
418
                                                                                   unit)
419
                                                                                 (pair
420
                                                                                   bytes
421
                                                                                   (big_map
422
                                                                                     nat
423
                                                                                     (pair
424
                                                                                       nat
425
                                                                                       (map
426
                                                                                         string
427
                                                                                         bytes))))))))))))))))
428
                 (pair bool
429
                       (pair (big_map nat bytes)
430
                             (pair (big_map nat string)
431
                                   (pair (big_map int nat)
432
                                         (pair bytes
433
                                               (pair bytes
434
                                                     (pair (big_map nat address)
435
                                                           (pair (big_map string bytes)
436
                                                                 (pair
437
                                                                   (big_map int bool)
438
                                                                   (pair nat
439
                                                                         (pair nat
440
                                                                               (pair
441
                                                                                 (big_map
442
                                                                                   (pair
443
                                                                                     address
444
                                                                                     (pair
445
                                                                                       address
446
                                                                                       nat))
447
                                                                                   unit)
448
                                                                                 (pair
449
                                                                                   bytes
450
                                                                                   (big_map
451
                                                                                     nat
452
                                                                                     (pair
453
                                                                                       nat
454
                                                                                       (map
455
                                                                                         string
456
                                                                                         bytes)))))))))))))))))
457
               nat)
458
             (pair (big_map nat bytes)
459
                   (pair (big_map nat string)
460
                         (pair (big_map int nat)
461
                               (pair bytes
462
                                     (pair bytes
463
                                           (pair (big_map nat address)
464
                                                 (pair (big_map string bytes)
465
                                                       (pair (big_map int bool)
466
                                                             (pair nat
467
                                                                   (pair nat
468
                                                                         (pair
469
                                                                           (big_map
470
                                                                             (pair
471
                                                                               address
472
                                                                               (pair
473
                                                                                 address
474
                                                                                 nat))
475
                                                                             unit)
476
                                                                           (pair bytes
477
                                                                                 (big_map
478
                                                                                   nat
479
                                                                                   (pair
480
                                                                                     nat
481
                                                                                     (map
482
                                                                                       string
483
                                                                                       bytes))))))))))))))))
484
           (pair nat
485
                 (pair (big_map nat bytes)
486
                       (pair (big_map nat string)
487
                             (pair (big_map int nat)
488
                                   (pair bytes
489
                                         (pair bytes
490
                                               (pair (big_map nat address)
491
                                                     (pair (big_map string bytes)
492
                                                           (pair (big_map int bool)
493
                                                                 (pair nat
494
                                                                       (pair nat
495
                                                                             (pair
496
                                                                               (big_map
497
                                                                                 (pair
498
                                                                                   address
499
                                                                                   (pair
500
                                                                                     address
501
                                                                                     nat))
502
                                                                                 unit)
503
                                                                               (pair
504
                                                                                 bytes
505
                                                                                 (big_map
506
                                                                                   nat
507
                                                                                   (pair
508
                                                                                     nat
509
                                                                                     (map
510
                                                                                       string
511
                                                                                       bytes))))))))))))))))
512
           { UNPAIR ;
513
             UNPAIR ;
514
             DUG 2 ;
515
             PAIR ;
516
             EXEC ;
517
             UNPAIR ;
518
             IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
519
             PUSH nat 1 ;
520
             PAIR } ;
521
         SWAP ;
522
         LAMBDA
523
           (pair (pair address (pair address (pair nat nat)))
524
                 (pair (big_map nat bytes)
525
                       (pair (big_map nat string)
526
                             (pair (big_map int nat)
527
                                   (pair bytes
528
                                         (pair bytes
529
                                               (pair (big_map nat address)
530
                                                     (pair (big_map string bytes)
531
                                                           (pair (big_map int bool)
532
                                                                 (pair nat
533
                                                                       (pair nat
534
                                                                             (pair
535
                                                                               (big_map
536
                                                                                 (pair
537
                                                                                   address
538
                                                                                   (pair
539
                                                                                     address
540
                                                                                     nat))
541
                                                                                 unit)
542
                                                                               (pair
543
                                                                                 bytes
544
                                                                                 (big_map
545
                                                                                   nat
546
                                                                                   (pair
547
                                                                                     nat
548
                                                                                     (map
549
                                                                                       string
550
                                                                                       bytes))))))))))))))))
551
           (pair unit
552
                 (pair (big_map nat bytes)
553
                       (pair (big_map nat string)
554
                             (pair (big_map int nat)
555
                                   (pair bytes
556
                                         (pair bytes
557
                                               (pair (big_map nat address)
558
                                                     (pair (big_map string bytes)
559
                                                           (pair (big_map int bool)
560
                                                                 (pair nat
561
                                                                       (pair nat
562
                                                                             (pair
563
                                                                               (big_map
564
                                                                                 (pair
565
                                                                                   address
566
                                                                                   (pair
567
                                                                                     address
568
                                                                                     nat))
569
                                                                                 unit)
570
                                                                               (pair
571
                                                                                 bytes
572
                                                                                 (big_map
573
                                                                                   nat
574
                                                                                   (pair
575
                                                                                     nat
576
                                                                                     (map
577
                                                                                       string
578
                                                                                       bytes))))))))))))))))
579
           { UNPAIR ;
580
             PUSH nat 1 ;
581
             DUP 2 ;
582
             GET 6 ;
583
             COMPARE ;
584
             EQ ;
585
             IF
586
               { DUP ;
587
                 CAR ;
588
                 DUP 3 ;
589
                 GET 11 ;
590
                 DUP 3 ;
591
                 GET 5 ;
592
                 GET ;
593
                 IF_NONE { PUSH int 380 ; FAILWITH } {} ;
594
                 COMPARE ;
595
                 EQ }
596
               { PUSH bool False } ;
597
             IF {} { PUSH string "FA2_INSUFFICIENT_BALANCE" ; FAILWITH } ;
598
             SWAP ;
599
             DUP ;
600
             GET 11 ;
601
             DUP 3 ;
602
             GET 3 ;
603
             SOME ;
604
             DIG 3 ;
605
             GET 5 ;
606
             UPDATE ;
607
             UPDATE 11 ;
608
             UNIT ;
609
             PAIR } ;
610
         SWAP ;
611
         PUSH (pair (string %ledger_type)
612
                 (pair %policy (string %name)
613
                               (pair (bool %supports_operator) (bool %supports_transfer)))) (Pair "NFT" (Pair "owner-or-operator-transfer" (Pair True True))) ;
614
         SWAP ;
615
         UNPAIR ;
616
         IF_LEFT
617
           { IF_LEFT
618
               { LAMBDA
619
                   (pair
620
                     (pair (pair address nat)
621
                           (pair
622
                             (lambda
623
                               (pair nat
624
                                     (pair (big_map nat bytes)
625
                                           (pair (big_map nat string)
626
                                                 (pair (big_map int nat)
627
                                                       (pair bytes
628
                                                             (pair bytes
629
                                                                   (pair
630
                                                                     (big_map nat
631
                                                                              address)
632
                                                                     (pair
633
                                                                       (big_map string
634
                                                                                bytes)
635
                                                                       (pair
636
                                                                         (big_map int
637
                                                                                  bool)
638
                                                                         (pair nat
639
                                                                               (pair nat
640
                                                                                     (pair
641
                                                                                       (big_map
642
                                                                                         (pair
643
                                                                                           address
644
                                                                                           (pair
645
                                                                                             address
646
                                                                                             nat))
647
                                                                                         unit)
648
                                                                                       (pair
649
                                                                                         bytes
650
                                                                                         (big_map
651
                                                                                           nat
652
                                                                                           (pair
653
                                                                                             nat
654
                                                                                             (map
655
                                                                                               string
656
                                                                                               bytes))))))))))))))))
657
                               (pair bool
658
                                     (pair (big_map nat bytes)
659
                                           (pair (big_map nat string)
660
                                                 (pair (big_map int nat)
661
                                                       (pair bytes
662
                                                             (pair bytes
663
                                                                   (pair
664
                                                                     (big_map nat
665
                                                                              address)
666
                                                                     (pair
667
                                                                       (big_map string
668
                                                                                bytes)
669
                                                                       (pair
670
                                                                         (big_map int
671
                                                                                  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
                                                                                         (big_map
685
                                                                                           nat
686
                                                                                           (pair
687
                                                                                             nat
688
                                                                                             (map
689
                                                                                               string
690
                                                                                               bytes)))))))))))))))))
691
                             (lambda
692
                               (pair
693
                                 (pair
694
                                   (lambda
695
                                     (pair nat
696
                                           (pair (big_map nat bytes)
697
                                                 (pair (big_map nat string)
698
                                                       (pair (big_map int nat)
699
                                                             (pair bytes
700
                                                                   (pair bytes
701
                                                                         (pair
702
                                                                           (big_map nat
703
                                                                                    address)
704
                                                                           (pair
705
                                                                             (big_map
706
                                                                               string
707
                                                                               bytes)
708
                                                                             (pair
709
                                                                               (big_map
710
                                                                                 int
711
                                                                                 bool)
712
                                                                               (pair nat
713
                                                                                     (pair
714
                                                                                       nat
715
                                                                                       (pair
716
                                                                                         (big_map
717
                                                                                           (pair
718
                                                                                             address
719
                                                                                             (pair
720
                                                                                               address
721
                                                                                               nat))
722
                                                                                           unit)
723
                                                                                         (pair
724
                                                                                           bytes
725
                                                                                           (big_map
726
                                                                                             nat
727
                                                                                             (pair
728
                                                                                               nat
729
                                                                                               (map
730
                                                                                                 string
731
                                                                                                 bytes))))))))))))))))
732
                                     (pair bool
733
                                           (pair (big_map nat bytes)
734
                                                 (pair (big_map nat string)
735
                                                       (pair (big_map int nat)
736
                                                             (pair bytes
737
                                                                   (pair bytes
738
                                                                         (pair
739
                                                                           (big_map nat
740
                                                                                    address)
741
                                                                           (pair
742
                                                                             (big_map
743
                                                                               string
744
                                                                               bytes)
745
                                                                             (pair
746
                                                                               (big_map
747
                                                                                 int
748
                                                                                 bool)
749
                                                                               (pair nat
750
                                                                                     (pair
751
                                                                                       nat
752
                                                                                       (pair
753
                                                                                         (big_map
754
                                                                                           (pair
755
                                                                                             address
756
                                                                                             (pair
757
                                                                                               address
758
                                                                                               nat))
759
                                                                                           unit)
760
                                                                                         (pair
761
                                                                                           bytes
762
                                                                                           (big_map
763
                                                                                             nat
764
                                                                                             (pair
765
                                                                                               nat
766
                                                                                               (map
767
                                                                                                 string
768
                                                                                                 bytes)))))))))))))))))
769
                                   (pair address nat))
770
                                 (pair (big_map nat bytes)
771
                                       (pair (big_map nat string)
772
                                             (pair (big_map int nat)
773
                                                   (pair bytes
774
                                                         (pair bytes
775
                                                               (pair
776
                                                                 (big_map nat address)
777
                                                                 (pair
778
                                                                   (big_map string bytes)
779
                                                                   (pair
780
                                                                     (big_map int bool)
781
                                                                     (pair nat
782
                                                                           (pair nat
783
                                                                                 (pair
784
                                                                                   (big_map
785
                                                                                     (pair
786
                                                                                       address
787
                                                                                       (pair
788
                                                                                         address
789
                                                                                         nat))
790
                                                                                     unit)
791
                                                                                   (pair
792
                                                                                     bytes
793
                                                                                     (big_map
794
                                                                                       nat
795
                                                                                       (pair
796
                                                                                         nat
797
                                                                                         (map
798
                                                                                           string
799
                                                                                           bytes))))))))))))))))
800
                               (pair nat
801
                                     (pair (big_map nat bytes)
802
                                           (pair (big_map nat string)
803
                                                 (pair (big_map int nat)
804
                                                       (pair bytes
805
                                                             (pair bytes
806
                                                                   (pair
807
                                                                     (big_map nat
808
                                                                              address)
809
                                                                     (pair
810
                                                                       (big_map string
811
                                                                                bytes)
812
                                                                       (pair
813
                                                                         (big_map int
814
                                                                                  bool)
815
                                                                         (pair nat
816
                                                                               (pair nat
817
                                                                                     (pair
818
                                                                                       (big_map
819
                                                                                         (pair
820
                                                                                           address
821
                                                                                           (pair
822
                                                                                             address
823
                                                                                             nat))
824
                                                                                         unit)
825
                                                                                       (pair
826
                                                                                         bytes
827
                                                                                         (big_map
828
                                                                                           nat
829
                                                                                           (pair
830
                                                                                             nat
831
                                                                                             (map
832
                                                                                               string
833
                                                                                               bytes)))))))))))))))))))
834
                     (pair (big_map nat bytes)
835
                           (pair (big_map nat string)
836
                                 (pair (big_map int nat)
837
                                       (pair bytes
838
                                             (pair bytes
839
                                                   (pair (big_map nat address)
840
                                                         (pair (big_map string bytes)
841
                                                               (pair (big_map int bool)
842
                                                                     (pair nat
843
                                                                           (pair nat
844
                                                                                 (pair
845
                                                                                   (big_map
846
                                                                                     (pair
847
                                                                                       address
848
                                                                                       (pair
849
                                                                                         address
850
                                                                                         nat))
851
                                                                                     unit)
852
                                                                                   (pair
853
                                                                                     bytes
854
                                                                                     (big_map
855
                                                                                       nat
856
                                                                                       (pair
857
                                                                                         nat
858
                                                                                         (map
859
                                                                                           string
860
                                                                                           bytes))))))))))))))))
861
                   (pair (pair (pair address nat) nat)
862
                         (pair (big_map nat bytes)
863
                               (pair (big_map nat string)
864
                                     (pair (big_map int nat)
865
                                           (pair bytes
866
                                                 (pair bytes
867
                                                       (pair (big_map nat address)
868
                                                             (pair
869
                                                               (big_map string bytes)
870
                                                               (pair (big_map int bool)
871
                                                                     (pair nat
872
                                                                           (pair nat
873
                                                                                 (pair
874
                                                                                   (big_map
875
                                                                                     (pair
876
                                                                                       address
877
                                                                                       (pair
878
                                                                                         address
879
                                                                                         nat))
880
                                                                                     unit)
881
                                                                                   (pair
882
                                                                                     bytes
883
                                                                                     (big_map
884
                                                                                       nat
885
                                                                                       (pair
886
                                                                                         nat
887
                                                                                         (map
888
                                                                                           string
889
                                                                                           bytes))))))))))))))))
890
                   { UNPAIR ;
891
                     UNPAIR 3 ;
892
                     DIG 2 ;
893
                     DUP 2 ;
894
                     DIG 3 ;
895
                     PAIR ;
896
                     SWAP ;
897
                     DIG 3 ;
898
                     DIG 2 ;
899
                     PAIR ;
900
                     EXEC ;
901
                     UNPAIR ;
902
                     SWAP ;
903
                     DUG 2 ;
904
                     SWAP ;
905
                     PAIR ;
906
                     PAIR } ;
907
                 DUP 2 ;
908
                 CAR ;
909
                 MAP { DUP 2 ;
910
                       DUP 13 ;
911
                       DUP 11 ;
912
                       PAIR ;
913
                       DIG 2 ;
914
                       PAIR ;
915
                       SWAP ;
916
                       DIG 4 ;
917
                       DIG 2 ;
918
                       PAIR ;
919
                       EXEC ;
920
                       UNPAIR ;
921
                       DUG 11 ;
922
                       DUG 11 ;
923
                       DUG 11 ;
924
                       DUG 11 ;
925
                       DIG 9 ;
926
                       DIG 11 ;
927
                       DIG 11 ;
928
                       DIG 11 } ;
929
                 SWAP ;
930
                 DROP ;
931
                 DIG 3 ;
932
                 DROP ;
933
                 DIG 3 ;
934
                 DROP ;
935
                 DIG 3 ;
936
                 DROP ;
937
                 DIG 3 ;
938
                 DROP ;
939
                 DIG 3 ;
940
                 DROP ;
941
                 DIG 3 ;
942
                 DROP ;
943
                 DIG 3 ;
944
                 DROP ;
945
                 DIG 3 ;
946
                 DROP ;
947
                 NIL operation ;
948
                 DIG 2 ;
949
                 CDR ;
950
                 PUSH mutez 0 ;
951
                 DIG 3 ;
952
                 TRANSFER_TOKENS ;
953
                 CONS }
954
               { DIG 2 ;
955
                 DROP ;
956
                 DIG 2 ;
957
                 DROP ;
958
                 DIG 2 ;
959
                 DROP ;
960
                 DIG 2 ;
961
                 DROP ;
962
                 DIG 2 ;
963
                 DROP ;
964
                 DIG 2 ;
965
                 DROP ;
966
                 DIG 2 ;
967
                 DROP ;
968
                 DIG 2 ;
969
                 DROP ;
970
                 IF_LEFT
971
                   { SWAP ;
972
                     LAMBDA
973
                       string
974
                       bytes
975
                       { PACK ;
976
                         DUP ;
977
                         PUSH nat 6 ;
978
                         DIG 2 ;
979
                         SIZE ;
980
                         SUB ;
981
                         ISNAT ;
982
                         IF_NONE { PUSH int 34 ; FAILWITH } {} ;
983
                         PUSH nat 6 ;
984
                         SLICE ;
985
                         IF_NONE { PUSH int 34 ; FAILWITH } {} } ;
986
                     DUP 3 ;
987
                     GET 6 ;
988
                     EXEC ;
989
                     UPDATE 9 ;
990
                     LAMBDA
991
                       string
992
                       bytes
993
                       { PACK ;
994
                         DUP ;
995
                         PUSH nat 6 ;
996
                         DIG 2 ;
997
                         SIZE ;
998
                         SUB ;
999
                         ISNAT ;
1000
                         IF_NONE { PUSH int 34 ; FAILWITH } {} ;
1001
                         PUSH nat 6 ;
1002
                         SLICE ;
1003
                         IF_NONE { PUSH int 34 ; FAILWITH } {} } ;
1004
                     DIG 2 ;
1005
                     DUP ;
1006
                     GET 3 ;
1007
                     SWAP ;
1008
                     DUP ;
1009
                     CAR ;
1010
                     SWAP ;
1011
                     GET 5 ;
1012
                     CONCAT ;
1013
                     CONCAT ;
1014
                     EXEC ;
1015
                     UPDATE 23 }
1016
                   { SWAP ; DUP ; GET 5 ; LEVEL ; SOME ; DIG 3 ; INT ; UPDATE ; UPDATE 5 } ;
1017
                 NIL operation } }
1018
           { IF_LEFT
1019
               { DUP ;
1020
                 GET 6 ;
1021
                 INT ;
1022
                 PUSH bls12_381_g1 0x0a72dca01ecb44a3d282f9962ecfe816e8694a2aecc5bcd948ab8a690d762d8f8edcd47c202e4fb9db780f0df34370f416850acec2475998743a75ec35cb6b6836f02bc9f04419e0073d72c9a06fe7105c104d2970e15560415178ba53e5f682 ;
1023
                 PUSH bls12_381_g2 0x0fc6035e7c9832f98b51c5b62e2dfcab06bf29ca79fc1b581715fcdb0007e737d102c044dfe7c5dcda245df5569b5362178dbcf1f6edb5133ee59a1a71f47621f06a1c378239aa7603b6b2881988c7357842a04a286e604a324c5ff653f6b1ce04c622cba3fe07ba5785cc573979927acab1a9f88201cf9183035838d448c36560bc7d1d042192c142ab588ed5188d9b19bebd83290fc8eeafdc9f38a3695ff60ce809dd16102046839996973c4767e6390081af6b3fbdc5439d810382b85a60 ;
1024
                 PUSH bls12_381_g2 0x13e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb80606c4a02ea734cc32acd2b02bc28b99cb3e287e85a763af267492ab572e99ab3f370d275cec1da1aaa9075ff05f79be0ce5d527727d6e118cc9cdc6da2e351aadfd9baa8cbdd3a76d429a695160d12c923ac9cc3baca289e193548608b82801 ;
1025
                 PUSH bls12_381_g2 0x106c100d9dde23db7df7e1705860b12dfc6515ddc8a0467a49daa2a1b61361665fc8b2f8c158474c4f4b6e23327da5790c7a288fce6a09342c593d4d33760ede1a9ec0801b82f25f844372b1d362d005ddddccbaf55bc50d34dd36732a4686b70cd6991854742435c1004f1a71e4dab05fde638e3c2dfd35e7c9e79830a9d0f4b64094b1c077c943ee6149b7c2fda7c401bad5660d3dabd57fba4229ebd423dff3d7572bd6a3428c9ef214de19f832d6c4c3ac4d3e016f1b30bf3bf8f4b631d1 ;
1026
                 PUSH bls12_381_g1 0x13ab0365e93c6b35b43c38903e158e29a6042d0478ba4fed9fb686964346c3f99cd832521506d909b189eb448461e78818d12e0290ccce677c3160a179d89ca2ee257f1d748e4fb23a7f09fa3013b99067d74df67c7953580a38fb0c746be212 ;
1027
                 PUSH bls12_381_g1 0x0f31b145b92d18331893a2b150d02b5a17eabb0fbb183027aa1c02a93d471e6651b822421a9fcfd4172e1ae38135346815fb43810442a97b002321ddd123cc272d964735f91431f2892788c91fdead01f7169e6b76edd2b4a5b73fb9bdffcee0 ;
1028
                 DUP 8 ;
1029
                 GET 6 ;
1030
                 SWAP ;
1031
                 MUL ;
1032
                 ADD ;
1033
                 NIL (pair bls12_381_g1 bls12_381_g2) ;
1034
                 DIG 2 ;
1035
                 DUP 8 ;
1036
                 GET 5 ;
1037
                 PAIR ;
1038
                 CONS ;
1039
                 DUG 2 ;
1040
                 PAIR ;
1041
                 CONS ;
1042
                 SWAP ;
1043
                 DIG 2 ;
1044
                 PAIR ;
1045
                 CONS ;
1046
                 DUP 3 ;
1047
                 GET 3 ;
1048
                 DUP 4 ;
1049
                 CAR ;
1050
                 NEG ;
1051
                 PAIR ;
1052
                 CONS ;
1053
                 PAIRING_CHECK ;
1054
                 IF
1055
                   {}
1056
                   { PUSH string "Assert failure: sp.pairing_check(sp.list([(- params.a, params.b), (alpha, beta), (vk_x, gamma), (params.c, delta)]))" ;
1057
                     FAILWITH } ;
1058
                 DUP 3 ;
1059
                 GET 17 ;
1060
                 DIG 3 ;
1061
                 DUP ;
1062
                 GET 11 ;
1063
                 SENDER ;
1064
                 SOME ;
1065
                 DUP 4 ;
1066
                 UPDATE ;
1067
                 UPDATE 11 ;
1068
                 DUP ;
1069
                 CAR ;
1070
                 LAMBDA
1071
                   bls12_381_fr
1072
                   bytes
1073
                   { LAMBDA
1074
                       string
1075
                       bytes
1076
                       { DUP ;
1077
                         PACK ;
1078
                         SWAP ;
1079
                         SIZE ;
1080
                         PUSH nat 6 ;
1081
                         SLICE ;
1082
                         IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1083
                     PUSH string "0123456789abcdef" ;
1084
                     EXEC ;
1085
                     DUP 2 ;
1086
                     INT ;
1087
                     ISNAT ;
1088
                     IF_NONE { PUSH int 40 ; FAILWITH } {} ;
1089
                     PUSH bytes 0x ;
1090
                     PUSH int 0 ;
1091
                     PUSH bool True ;
1092
                     LOOP { PUSH nat 16 ;
1093
                            DUP 4 ;
1094
                            EDIV ;
1095
                            IF_NONE { PUSH int 45 ; FAILWITH } { CDR } ;
1096
                            DIG 2 ;
1097
                            DUP 5 ;
1098
                            PUSH nat 1 ;
1099
                            DIG 3 ;
1100
                            SLICE ;
1101
                            IF_NONE { PUSH int 46 ; FAILWITH } {} ;
1102
                            CONCAT ;
1103
                            SWAP ;
1104
                            DIG 2 ;
1105
                            PUSH nat 16 ;
1106
                            SWAP ;
1107
                            EDIV ;
1108
                            IF_NONE { PUSH int 47 ; FAILWITH } { CAR } ;
1109
                            DUG 2 ;
1110
                            PUSH int 1 ;
1111
                            ADD ;
1112
                            DUP ;
1113
                            PUSH int 6 ;
1114
                            COMPARE ;
1115
                            GT } ;
1116
                     DROP ;
1117
                     SWAP ;
1118
                     DROP ;
1119
                     SWAP ;
1120
                     DROP ;
1121
                     SWAP ;
1122
                     DROP ;
1123
                     LAMBDA
1124
                       string
1125
                       bytes
1126
                       { DUP ;
1127
                         PACK ;
1128
                         SWAP ;
1129
                         SIZE ;
1130
                         PUSH nat 6 ;
1131
                         SLICE ;
1132
                         IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1133
                     PUSH string "#" ;
1134
                     EXEC ;
1135
                     CONCAT } ;
1136
                 DIG 5 ;
1137
                 GET 6 ;
1138
                 EXEC ;
1139
                 SOME ;
1140
                 DUP 4 ;
1141
                 UPDATE ;
1142
                 UPDATE 1 ;
1143
                 DUP ;
1144
                 GET 17 ;
1145
                 PUSH nat 1 ;
1146
                 ADD ;
1147
                 UPDATE 17 ;
1148
                 DUG 2 ;
1149
                 PUSH timestamp "1970-01-01T00:00:00Z" ;
1150
                 NOW ;
1151
                 SUB ;
1152
                 ISNAT ;
1153
                 IF_NONE { PUSH int 53 ; FAILWITH } {} ;
1154
                 DUP ;
1155
                 INT ;
1156
                 NEQ ;
1157
                 IF
1158
                   { PUSH string "" ;
1159
                     DUP 2 ;
1160
                     INT ;
1161
                     NEQ ;
1162
                     LOOP { PUSH string "0123456789" ;
1163
                            PUSH nat 1 ;
1164
                            PUSH nat 10 ;
1165
                            DUP 5 ;
1166
                            EDIV ;
1167
                            IF_NONE { PUSH int 58 ; FAILWITH } { CDR } ;
1168
                            SLICE ;
1169
                            IF_NONE { PUSH int 58 ; FAILWITH } {} ;
1170
                            CONCAT ;
1171
                            PUSH nat 10 ;
1172
                            DIG 2 ;
1173
                            EDIV ;
1174
                            IF_NONE { PUSH int 59 ; FAILWITH } { CAR } ;
1175
                            SWAP ;
1176
                            DUP 2 ;
1177
                            INT ;
1178
                            NEQ } ;
1179
                     DROP 2 ;
1180
                     DIG 3 ;
1181
                     DROP ;
1182
                     DIG 3 ;
1183
                     DROP ;
1184
                     DIG 3 ;
1185
                     DROP ;
1186
                     DIG 3 ;
1187
                     DROP ;
1188
                     DIG 3 ;
1189
                     DROP ;
1190
                     DIG 3 ;
1191
                     DROP ;
1192
                     DIG 3 ;
1193
                     DROP ;
1194
                     DIG 3 ;
1195
                     DROP }
1196
                   { DROP ;
1197
                     DIG 3 ;
1198
                     DROP ;
1199
                     DIG 3 ;
1200
                     DROP ;
1201
                     DIG 3 ;
1202
                     DROP ;
1203
                     DIG 3 ;
1204
                     DROP ;
1205
                     DIG 3 ;
1206
                     DROP ;
1207
                     DIG 3 ;
1208
                     DROP ;
1209
                     DIG 3 ;
1210
                     DROP ;
1211
                     DIG 3 ;
1212
                     DROP } ;
1213
                 LAMBDA
1214
                   int
1215
                   string
1216
                   { ISNAT ;
1217
                     IF_NONE { PUSH int 53 ; FAILWITH } {} ;
1218
                     PUSH string "0" ;
1219
                     DUP 2 ;
1220
                     INT ;
1221
                     NEQ ;
1222
                     IF
1223
                       { DROP ;
1224
                         PUSH string "" ;
1225
                         DUP 2 ;
1226
                         INT ;
1227
                         NEQ ;
1228
                         LOOP { PUSH string "0123456789" ;
1229
                                PUSH nat 1 ;
1230
                                PUSH nat 10 ;
1231
                                DUP 5 ;
1232
                                EDIV ;
1233
                                IF_NONE { PUSH int 58 ; FAILWITH } { CDR } ;
1234
                                SLICE ;
1235
                                IF_NONE { PUSH int 58 ; FAILWITH } {} ;
1236
                                CONCAT ;
1237
                                PUSH nat 10 ;
1238
                                DIG 2 ;
1239
                                EDIV ;
1240
                                IF_NONE { PUSH int 59 ; FAILWITH } { CAR } ;
1241
                                SWAP ;
1242
                                DUP 2 ;
1243
                                INT ;
1244
                                NEQ } ;
1245
                         SWAP ;
1246
                         DROP }
1247
                       { SWAP ; DROP } } ;
1248
                 DUP 2 ;
1249
                 INT ;
1250
                 EXEC ;
1251
                 DUP 4 ;
1252
                 GET 23 ;
1253
                 LAMBDA
1254
                   string
1255
                   bytes
1256
                   { DUP ;
1257
                     PACK ;
1258
                     SWAP ;
1259
                     SIZE ;
1260
                     PUSH nat 6 ;
1261
                     SLICE ;
1262
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1263
                 DUP 3 ;
1264
                 EXEC ;
1265
                 DUP 6 ;
1266
                 GET 9 ;
1267
                 CONCAT ;
1268
                 CONCAT ;
1269
                 DIG 4 ;
1270
                 DUP ;
1271
                 GET 13 ;
1272
                 DIG 2 ;
1273
                 SOME ;
1274
                 DUP 4 ;
1275
                 UPDATE ;
1276
                 UPDATE 13 ;
1277
                 DUG 3 ;
1278
                 LAMBDA
1279
                   string
1280
                   bytes
1281
                   { DUP ;
1282
                     PACK ;
1283
                     SWAP ;
1284
                     SIZE ;
1285
                     PUSH nat 6 ;
1286
                     SLICE ;
1287
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1288
                 DUP 2 ;
1289
                 EXEC ;
1290
                 LAMBDA
1291
                   string
1292
                   bytes
1293
                   { DUP ;
1294
                     PACK ;
1295
                     SWAP ;
1296
                     SIZE ;
1297
                     PUSH nat 6 ;
1298
                     SLICE ;
1299
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1300
                 PUSH string "tezos-storage:" ;
1301
                 EXEC ;
1302
                 CONCAT ;
1303
                 DIG 4 ;
1304
                 DUP ;
1305
                 GET 24 ;
1306
                 EMPTY_MAP string bytes ;
1307
                 LAMBDA
1308
                   string
1309
                   bytes
1310
                   { DUP ;
1311
                     PACK ;
1312
                     SWAP ;
1313
                     SIZE ;
1314
                     PUSH nat 6 ;
1315
                     SLICE ;
1316
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1317
                 DIG 5 ;
1318
                 EXEC ;
1319
                 LAMBDA
1320
                   string
1321
                   bytes
1322
                   { DUP ;
1323
                     PACK ;
1324
                     SWAP ;
1325
                     SIZE ;
1326
                     PUSH nat 6 ;
1327
                     SLICE ;
1328
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1329
                 PUSH string "Moment " ;
1330
                 EXEC ;
1331
                 CONCAT ;
1332
                 SOME ;
1333
                 PUSH string "name" ;
1334
                 UPDATE ;
1335
                 LAMBDA
1336
                   string
1337
                   bytes
1338
                   { DUP ;
1339
                     PACK ;
1340
                     SWAP ;
1341
                     SIZE ;
1342
                     PUSH nat 6 ;
1343
                     SLICE ;
1344
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1345
                 PUSH string "0" ;
1346
                 EXEC ;
1347
                 SOME ;
1348
                 PUSH string "decimals" ;
1349
                 UPDATE ;
1350
                 DIG 3 ;
1351
                 SOME ;
1352
                 PUSH string "artifactUri" ;
1353
                 UPDATE ;
1354
                 LAMBDA
1355
                   string
1356
                   bytes
1357
                   { DUP ;
1358
                     PACK ;
1359
                     SWAP ;
1360
                     SIZE ;
1361
                     PUSH nat 6 ;
1362
                     SLICE ;
1363
                     IF_NONE { PUSH int 30 ; FAILWITH } {} } ;
1364
                 PUSH string "https://www.larvalabs.com/public/assetsv2/cryptopunks-gallery/cryptopunk-7488.png" ;
1365
                 EXEC ;
1366
                 SOME ;
1367
                 PUSH string "displayUri" ;
1368
                 UPDATE ;
1369
                 DUP 4 ;
1370
                 PAIR ;
1371
                 SOME ;
1372
                 DIG 3 ;
1373
                 UPDATE ;
1374
                 UPDATE 24 ;
1375
                 DUP ;
1376
                 GET 15 ;
1377
                 PUSH (option bool) (Some True) ;
1378
                 DIG 3 ;
1379
                 UPDATE ;
1380
                 UPDATE 15 }
1381
               { IF_LEFT
1382
                   { DUP 3 ;
1383
                     GET 6 ;
1384
                     IF
1385
                       { DUP ;
1386
                         ITER { DUP ;
1387
                                CDR ;
1388
                                ITER { DUP 9 ;
1389
                                       SWAP ;
1390
                                       DUP ;
1391
                                       GET 3 ;
1392
                                       DIG 2 ;
1393
                                       DIG 5 ;
1394
                                       DIG 2 ;
1395
                                       PAIR ;
1396
                                       EXEC ;
1397
                                       UNPAIR ;
1398
                                       DUG 12 ;
1399
                                       DUG 12 ;
1400
                                       DUG 12 ;
1401
                                       DUG 12 ;
1402
                                       DUG 12 ;
1403
                                       DIG 9 ;
1404
                                       DIG 12 ;
1405
                                       DIG 12 ;
1406
                                       DIG 12 ;
1407
                                       DIG 12 ;
1408
                                       IF
1409
                                         {}
1410
                                         { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
1411
                                       DUP 10 ;
1412
                                       DUP 2 ;
1413
                                       GET 3 ;
1414
                                       DUP 3 ;
1415
                                       CAR ;
1416
                                       DUP 5 ;
1417
                                       CAR ;
1418
                                       PAIR 3 ;
1419
                                       SWAP ;
1420
                                       DIG 5 ;
1421
                                       DIG 2 ;
1422
                                       PAIR ;
1423
                                       EXEC ;
1424
                                       CDR ;
1425
                                       DUG 11 ;
1426
                                       DUG 11 ;
1427
                                       DUG 11 ;
1428
                                       DUG 11 ;
1429
                                       DIG 8 ;
1430
                                       DIG 11 ;
1431
                                       DIG 11 ;
1432
                                       DIG 11 ;
1433
                                       PUSH nat 0 ;
1434
                                       DUP 2 ;
1435
                                       GET 4 ;
1436
                                       COMPARE ;
1437
                                       GT ;
1438
                                       IF
1439
                                         { DUP 2 ;
1440
                                           CAR ;
1441
                                           PAIR ;
1442
                                           DUP 6 ;
1443
                                           DIG 4 ;
1444
                                           DIG 2 ;
1445
                                           PAIR ;
1446
                                           EXEC ;
1447
                                           CDR ;
1448
                                           DUG 10 ;
1449
                                           DUG 10 ;
1450
                                           DUG 10 ;
1451
                                           DIG 8 ;
1452
                                           DIG 10 ;
1453
                                           DIG 10 }
1454
                                         { DROP } } ;
1455
                                DROP } ;
1456
                         DROP ;
1457
                         SWAP ;
1458
                         DROP ;
1459
                         SWAP ;
1460
                         DROP ;
1461
                         SWAP ;
1462
                         DROP ;
1463
                         SWAP ;
1464
                         DROP ;
1465
                         SWAP ;
1466
                         DROP ;
1467
                         SWAP ;
1468
                         DROP ;
1469
                         SWAP ;
1470
                         DROP ;
1471
                         SWAP ;
1472
                         DROP }
1473
                       { PUSH string "FA2_TX_DENIED" ; FAILWITH } }
1474
                   { DUP 3 ;
1475
                     GET 5 ;
1476
                     IF
1477
                       { DUP ;
1478
                         ITER { IF_LEFT
1479
                                  { DUP 10 ;
1480
                                    DUP 2 ;
1481
                                    EXEC ;
1482
                                    DROP ;
1483
                                    DIG 2 ;
1484
                                    DUP ;
1485
                                    GET 21 ;
1486
                                    PUSH (option unit) (Some Unit) ;
1487
                                    DIG 3 ;
1488
                                    UPDATE ;
1489
                                    UPDATE 21 ;
1490
                                    SWAP }
1491
                                  { DUP 10 ;
1492
                                    DUP 2 ;
1493
                                    EXEC ;
1494
                                    DROP ;
1495
                                    DIG 2 ;
1496
                                    DUP ;
1497
                                    GET 21 ;
1498
                                    NONE unit ;
1499
                                    DIG 3 ;
1500
                                    UPDATE ;
1501
                                    UPDATE 21 ;
1502
                                    SWAP } } ;
1503
                         DROP ;
1504
                         SWAP ;
1505
                         DROP ;
1506
                         SWAP ;
1507
                         DROP ;
1508
                         SWAP ;
1509
                         DROP ;
1510
                         SWAP ;
1511
                         DROP ;
1512
                         SWAP ;
1513
                         DROP ;
1514
                         SWAP ;
1515
                         DROP ;
1516
                         SWAP ;
1517
                         DROP ;
1518
                         SWAP ;
1519
                         DROP }
1520
                       { PUSH string "FA2_OPERATORS_UNSUPPORTED" ; FAILWITH } } } ;
1521
             NIL operation } ;
1522
         PAIR } ;
1523
  view "render" nat string
1524
        { CAR ;
1525
          PUSH string "</p>" ;
1526
          LAMBDA
1527
            int
1528
            string
1529
            { ISNAT ;
1530
              IF_NONE { PUSH int 53 ; FAILWITH } {} ;
1531
              PUSH string "0" ;
1532
              DUP 2 ;
1533
              INT ;
1534
              NEQ ;
1535
              IF
1536
                { DROP ;
1537
                  PUSH string "" ;
1538
                  DUP 2 ;
1539
                  INT ;
1540
                  NEQ ;
1541
                  LOOP { PUSH string "0123456789" ;
1542
                         PUSH nat 1 ;
1543
                         PUSH nat 10 ;
1544
                         DUP 5 ;
1545
                         EDIV ;
1546
                         IF_NONE { PUSH int 58 ; FAILWITH } { CDR } ;
1547
                         SLICE ;
1548
                         IF_NONE { PUSH int 58 ; FAILWITH } {} ;
1549
                         CONCAT ;
1550
                         PUSH nat 10 ;
1551
                         DIG 2 ;
1552
                         EDIV ;
1553
                         IF_NONE { PUSH int 59 ; FAILWITH } { CAR } ;
1554
                         SWAP ;
1555
                         DUP 2 ;
1556
                         INT ;
1557
                         NEQ } ;
1558
                  SWAP ;
1559
                  DROP }
1560
                { SWAP ; DROP } } ;
1561
          DIG 2 ;
1562
          INT ;
1563
          EXEC ;
1564
          PUSH string "<p>HELLO" ;
1565
          CONCAT ;
1566
          CONCAT } ;
1567
  view "get_balance_of" (list (pair (address %owner) (nat %token_id)))
1568
        (list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance)))
1569
        { UNPAIR ;
1570
          LAMBDA
1571
            (pair
1572
              (pair
1573
                (lambda
1574
                  (pair nat
1575
                        (pair (big_map nat bytes)
1576
                              (pair (big_map nat string)
1577
                                    (pair (big_map int nat)
1578
                                          (pair bytes
1579
                                                (pair bytes
1580
                                                      (pair (big_map nat address)
1581
                                                            (pair (big_map string bytes)
1582
                                                                  (pair
1583
                                                                    (big_map int bool)
1584
                                                                    (pair nat
1585
                                                                          (pair nat
1586
                                                                                (pair
1587
                                                                                  (big_map
1588
                                                                                    (pair
1589
                                                                                      address
1590
                                                                                      (pair
1591
                                                                                        address
1592
                                                                                        nat))
1593
                                                                                    unit)
1594
                                                                                  (pair
1595
                                                                                    bytes
1596
                                                                                    (big_map
1597
                                                                                      nat
1598
                                                                                      (pair
1599
                                                                                        nat
1600
                                                                                        (map
1601
                                                                                          string
1602
                                                                                          bytes))))))))))))))))
1603
                  (pair bool
1604
                        (pair (big_map nat bytes)
1605
                              (pair (big_map nat string)
1606
                                    (pair (big_map int nat)
1607
                                          (pair bytes
1608
                                                (pair bytes
1609
                                                      (pair (big_map nat address)
1610
                                                            (pair (big_map string bytes)
1611
                                                                  (pair
1612
                                                                    (big_map int bool)
1613
                                                                    (pair nat
1614
                                                                          (pair nat
1615
                                                                                (pair
1616
                                                                                  (big_map
1617
                                                                                    (pair
1618
                                                                                      address
1619
                                                                                      (pair
1620
                                                                                        address
1621
                                                                                        nat))
1622
                                                                                    unit)
1623
                                                                                  (pair
1624
                                                                                    bytes
1625
                                                                                    (big_map
1626
                                                                                      nat
1627
                                                                                      (pair
1628
                                                                                        nat
1629
                                                                                        (map
1630
                                                                                          string
1631
                                                                                          bytes)))))))))))))))))
1632
                (pair address nat))
1633
              (pair (big_map nat bytes)
1634
                    (pair (big_map nat string)
1635
                          (pair (big_map int nat)
1636
                                (pair bytes
1637
                                      (pair bytes
1638
                                            (pair (big_map nat address)
1639
                                                  (pair (big_map string bytes)
1640
                                                        (pair (big_map int bool)
1641
                                                              (pair nat
1642
                                                                    (pair nat
1643
                                                                          (pair
1644
                                                                            (big_map
1645
                                                                              (pair
1646
                                                                                address
1647
                                                                                (pair
1648
                                                                                  address
1649
                                                                                  nat))
1650
                                                                              unit)
1651
                                                                            (pair bytes
1652
                                                                                  (big_map
1653
                                                                                    nat
1654
                                                                                    (pair
1655
                                                                                      nat
1656
                                                                                      (map
1657
                                                                                        string
1658
                                                                                        bytes))))))))))))))))
1659
            (pair nat
1660
                  (pair (big_map nat bytes)
1661
                        (pair (big_map nat string)
1662
                              (pair (big_map int nat)
1663
                                    (pair bytes
1664
                                          (pair bytes
1665
                                                (pair (big_map nat address)
1666
                                                      (pair (big_map string bytes)
1667
                                                            (pair (big_map int bool)
1668
                                                                  (pair nat
1669
                                                                        (pair nat
1670
                                                                              (pair
1671
                                                                                (big_map
1672
                                                                                  (pair
1673
                                                                                    address
1674
                                                                                    (pair
1675
                                                                                      address
1676
                                                                                      nat))
1677
                                                                                  unit)
1678
                                                                                (pair
1679
                                                                                  bytes
1680
                                                                                  (big_map
1681
                                                                                    nat
1682
                                                                                    (pair
1683
                                                                                      nat
1684
                                                                                      (map
1685
                                                                                        string
1686
                                                                                        bytes))))))))))))))))
1687
            { UNPAIR ;
1688
              UNPAIR ;
1689
              SWAP ;
1690
              DUP ;
1691
              CDR ;
1692
              DIG 2 ;
1693
              DIG 3 ;
1694
              DIG 2 ;
1695
              PAIR ;
1696
              EXEC ;
1697
              UNPAIR ;
1698
              SWAP ;
1699
              DUG 2 ;
1700
              IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
1701
              DUP ;
1702
              CAR ;
1703
              DUP 3 ;
1704
              GET 11 ;
1705
              DIG 2 ;
1706
              CDR ;
1707
              GET ;
1708
              IF_NONE { PUSH int 372 ; FAILWITH } {} ;
1709
              COMPARE ;
1710
              EQ ;
1711
              IF { PUSH nat 1 } { PUSH nat 0 } ;
1712
              PAIR } ;
1713
          SWAP ;
1714
          LAMBDA
1715
            (pair nat
1716
                  (pair (big_map nat bytes)
1717
                        (pair (big_map nat string)
1718
                              (pair (big_map int nat)
1719
                                    (pair bytes
1720
                                          (pair bytes
1721
                                                (pair (big_map nat address)
1722
                                                      (pair (big_map string bytes)
1723
                                                            (pair (big_map int bool)
1724
                                                                  (pair nat
1725
                                                                        (pair nat
1726
                                                                              (pair
1727
                                                                                (big_map
1728
                                                                                  (pair
1729
                                                                                    address
1730
                                                                                    (pair
1731
                                                                                      address
1732
                                                                                      nat))
1733
                                                                                  unit)
1734
                                                                                (pair
1735
                                                                                  bytes
1736
                                                                                  (big_map
1737
                                                                                    nat
1738
                                                                                    (pair
1739
                                                                                      nat
1740
                                                                                      (map
1741
                                                                                        string
1742
                                                                                        bytes))))))))))))))))
1743
            (pair bool
1744
                  (pair (big_map nat bytes)
1745
                        (pair (big_map nat string)
1746
                              (pair (big_map int nat)
1747
                                    (pair bytes
1748
                                          (pair bytes
1749
                                                (pair (big_map nat address)
1750
                                                      (pair (big_map string bytes)
1751
                                                            (pair (big_map int bool)
1752
                                                                  (pair nat
1753
                                                                        (pair nat
1754
                                                                              (pair
1755
                                                                                (big_map
1756
                                                                                  (pair
1757
                                                                                    address
1758
                                                                                    (pair
1759
                                                                                      address
1760
                                                                                      nat))
1761
                                                                                  unit)
1762
                                                                                (pair
1763
                                                                                  bytes
1764
                                                                                  (big_map
1765
                                                                                    nat
1766
                                                                                    (pair
1767
                                                                                      nat
1768
                                                                                      (map
1769
                                                                                        string
1770
                                                                                        bytes))))))))))))))))
1771
            { UNPAIR ; SWAP ; DUP ; GET 24 ; DIG 2 ; MEM ; PAIR } ;
1772
          SWAP ;
1773
          LAMBDA
1774
            (pair
1775
              (pair (pair address nat)
1776
                    (pair
1777
                      (lambda
1778
                        (pair nat
1779
                              (pair (big_map nat bytes)
1780
                                    (pair (big_map nat string)
1781
                                          (pair (big_map int nat)
1782
                                                (pair bytes
1783
                                                      (pair bytes
1784
                                                            (pair (big_map nat address)
1785
                                                                  (pair
1786
                                                                    (big_map string
1787
                                                                             bytes)
1788
                                                                    (pair
1789
                                                                      (big_map int bool)
1790
                                                                      (pair nat
1791
                                                                            (pair nat
1792
                                                                                  (pair
1793
                                                                                    (big_map
1794
                                                                                      (pair
1795
                                                                                        address
1796
                                                                                        (pair
1797
                                                                                          address
1798
                                                                                          nat))
1799
                                                                                      unit)
1800
                                                                                    (pair
1801
                                                                                      bytes
1802
                                                                                      (big_map
1803
                                                                                        nat
1804
                                                                                        (pair
1805
                                                                                          nat
1806
                                                                                          (map
1807
                                                                                            string
1808
                                                                                            bytes))))))))))))))))
1809
                        (pair bool
1810
                              (pair (big_map nat bytes)
1811
                                    (pair (big_map nat string)
1812
                                          (pair (big_map int nat)
1813
                                                (pair bytes
1814
                                                      (pair bytes
1815
                                                            (pair (big_map nat address)
1816
                                                                  (pair
1817
                                                                    (big_map string
1818
                                                                             bytes)
1819
                                                                    (pair
1820
                                                                      (big_map int bool)
1821
                                                                      (pair nat
1822
                                                                            (pair nat
1823
                                                                                  (pair
1824
                                                                                    (big_map
1825
                                                                                      (pair
1826
                                                                                        address
1827
                                                                                        (pair
1828
                                                                                          address
1829
                                                                                          nat))
1830
                                                                                      unit)
1831
                                                                                    (pair
1832
                                                                                      bytes
1833
                                                                                      (big_map
1834
                                                                                        nat
1835
                                                                                        (pair
1836
                                                                                          nat
1837
                                                                                          (map
1838
                                                                                            string
1839
                                                                                            bytes)))))))))))))))))
1840
                      (lambda
1841
                        (pair
1842
                          (pair
1843
                            (lambda
1844
                              (pair nat
1845
                                    (pair (big_map nat bytes)
1846
                                          (pair (big_map nat string)
1847
                                                (pair (big_map int nat)
1848
                                                      (pair bytes
1849
                                                            (pair bytes
1850
                                                                  (pair
1851
                                                                    (big_map nat address)
1852
                                                                    (pair
1853
                                                                      (big_map string
1854
                                                                               bytes)
1855
                                                                      (pair
1856
                                                                        (big_map int
1857
                                                                                 bool)
1858
                                                                        (pair nat
1859
                                                                              (pair nat
1860
                                                                                    (pair
1861
                                                                                      (big_map
1862
                                                                                        (pair
1863
                                                                                          address
1864
                                                                                          (pair
1865
                                                                                            address
1866
                                                                                            nat))
1867
                                                                                        unit)
1868
                                                                                      (pair
1869
                                                                                        bytes
1870
                                                                                        (big_map
1871
                                                                                          nat
1872
                                                                                          (pair
1873
                                                                                            nat
1874
                                                                                            (map
1875
                                                                                              string
1876
                                                                                              bytes))))))))))))))))
1877
                              (pair bool
1878
                                    (pair (big_map nat bytes)
1879
                                          (pair (big_map nat string)
1880
                                                (pair (big_map int nat)
1881
                                                      (pair bytes
1882
                                                            (pair bytes
1883
                                                                  (pair
1884
                                                                    (big_map nat address)
1885
                                                                    (pair
1886
                                                                      (big_map string
1887
                                                                               bytes)
1888
                                                                      (pair
1889
                                                                        (big_map int
1890
                                                                                 bool)
1891
                                                                        (pair nat
1892
                                                                              (pair nat
1893
                                                                                    (pair
1894
                                                                                      (big_map
1895
                                                                                        (pair
1896
                                                                                          address
1897
                                                                                          (pair
1898
                                                                                            address
1899
                                                                                            nat))
1900
                                                                                        unit)
1901
                                                                                      (pair
1902
                                                                                        bytes
1903
                                                                                        (big_map
1904
                                                                                          nat
1905
                                                                                          (pair
1906
                                                                                            nat
1907
                                                                                            (map
1908
                                                                                              string
1909
                                                                                              bytes)))))))))))))))))
1910
                            (pair address nat))
1911
                          (pair (big_map nat bytes)
1912
                                (pair (big_map nat string)
1913
                                      (pair (big_map int nat)
1914
                                            (pair bytes
1915
                                                  (pair bytes
1916
                                                        (pair (big_map nat address)
1917
                                                              (pair
1918
                                                                (big_map string bytes)
1919
                                                                (pair (big_map int bool)
1920
                                                                      (pair nat
1921
                                                                            (pair nat
1922
                                                                                  (pair
1923
                                                                                    (big_map
1924
                                                                                      (pair
1925
                                                                                        address
1926
                                                                                        (pair
1927
                                                                                          address
1928
                                                                                          nat))
1929
                                                                                      unit)
1930
                                                                                    (pair
1931
                                                                                      bytes
1932
                                                                                      (big_map
1933
                                                                                        nat
1934
                                                                                        (pair
1935
                                                                                          nat
1936
                                                                                          (map
1937
                                                                                            string
1938
                                                                                            bytes))))))))))))))))
1939
                        (pair nat
1940
                              (pair (big_map nat bytes)
1941
                                    (pair (big_map nat string)
1942
                                          (pair (big_map int nat)
1943
                                                (pair bytes
1944
                                                      (pair bytes
1945
                                                            (pair (big_map nat address)
1946
                                                                  (pair
1947
                                                                    (big_map string
1948
                                                                             bytes)
1949
                                                                    (pair
1950
                                                                      (big_map int bool)
1951
                                                                      (pair nat
1952
                                                                            (pair nat
1953
                                                                                  (pair
1954
                                                                                    (big_map
1955
                                                                                      (pair
1956
                                                                                        address
1957
                                                                                        (pair
1958
                                                                                          address
1959
                                                                                          nat))
1960
                                                                                      unit)
1961
                                                                                    (pair
1962
                                                                                      bytes
1963
                                                                                      (big_map
1964
                                                                                        nat
1965
                                                                                        (pair
1966
                                                                                          nat
1967
                                                                                          (map
1968
                                                                                            string
1969
                                                                                            bytes)))))))))))))))))))
1970
              (pair (big_map nat bytes)
1971
                    (pair (big_map nat string)
1972
                          (pair (big_map int nat)
1973
                                (pair bytes
1974
                                      (pair bytes
1975
                                            (pair (big_map nat address)
1976
                                                  (pair (big_map string bytes)
1977
                                                        (pair (big_map int bool)
1978
                                                              (pair nat
1979
                                                                    (pair nat
1980
                                                                          (pair
1981
                                                                            (big_map
1982
                                                                              (pair
1983
                                                                                address
1984
                                                                                (pair
1985
                                                                                  address
1986
                                                                                  nat))
1987
                                                                              unit)
1988
                                                                            (pair bytes
1989
                                                                                  (big_map
1990
                                                                                    nat
1991
                                                                                    (pair
1992
                                                                                      nat
1993
                                                                                      (map
1994
                                                                                        string
1995
                                                                                        bytes))))))))))))))))
1996
            (pair (pair (pair address nat) nat)
1997
                  (pair (big_map nat bytes)
1998
                        (pair (big_map nat string)
1999
                              (pair (big_map int nat)
2000
                                    (pair bytes
2001
                                          (pair bytes
2002
                                                (pair (big_map nat address)
2003
                                                      (pair (big_map string bytes)
2004
                                                            (pair (big_map int bool)
2005
                                                                  (pair nat
2006
                                                                        (pair nat
2007
                                                                              (pair
2008
                                                                                (big_map
2009
                                                                                  (pair
2010
                                                                                    address
2011
                                                                                    (pair
2012
                                                                                      address
2013
                                                                                      nat))
2014
                                                                                  unit)
2015
                                                                                (pair
2016
                                                                                  bytes
2017
                                                                                  (big_map
2018
                                                                                    nat
2019
                                                                                    (pair
2020
                                                                                      nat
2021
                                                                                      (map
2022
                                                                                        string
2023
                                                                                        bytes))))))))))))))))
2024
            { UNPAIR ;
2025
              UNPAIR 3 ;
2026
              DIG 2 ;
2027
              DUP 2 ;
2028
              DIG 3 ;
2029
              PAIR ;
2030
              SWAP ;
2031
              DIG 3 ;
2032
              DIG 2 ;
2033
              PAIR ;
2034
              EXEC ;
2035
              UNPAIR ;
2036
              SWAP ;
2037
              DUG 2 ;
2038
              SWAP ;
2039
              PAIR ;
2040
              PAIR } ;
2041
          DUP 2 ;
2042
          MAP { DUP 2 ; DUP 6 ; DUP 6 ; PAIR ; DIG 2 ; PAIR ; SWAP ; DIG 6 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; SWAP ; DUG 5 } ;
2043
          SWAP ;
2044
          DROP ;
2045
          SWAP ;
2046
          DROP ;
2047
          SWAP ;
2048
          DROP ;
2049
          SWAP ;
2050
          DROP ;
2051
          SWAP ;
2052
          DROP } }