BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Shadownet
  • /
  • KT1LHXj...wmi6
FA2Ledger
operations (29)Storage Code Interact Tokens Fork Views Statistics Details
Latest
​x
624
1422
 
1
{ parameter (or
2
              (or
3
                (or
4
                  (pair %balance_of
5
                    (list %requests (pair (address %owner) (nat %token_id)))
6
                    (contract %callback (list (pair
7
                                              (pair %request (address %owner)
8
                                                             (nat %token_id))
9
                                              (nat %balance)))))
10
                  (list %burn (pair (address %from_) (pair (nat %token_id) (nat %amount)))))
11
                (or
12
                  (list %mint (pair (address %to_)
13
                                   (pair
14
                                     (or %token (nat %existing) (map %new string bytes))
15
                                     (nat %amount))))
16
                  (address %set_administrator)))
17
              (or (or (big_map %set_metadata string bytes) (bool %set_pause))
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
26
                                                                   (address %operator)
27
                                                                   (nat %token_id)))
28
                                             (pair %remove_operator (address %owner)
29
                                                                    (pair
30
                                                                      (address %operator)
31
                                                                      (nat %token_id)))))))) ;
32
  storage (pair (address %administrator)
33
                (pair (big_map %ledger (pair address nat) nat)
34
                      (pair (big_map %metadata string bytes)
35
                            (pair (nat %next_token_id)
36
                                  (pair
37
                                    (big_map %operators
38
                                      (pair (address %owner)
39
                                            (pair (address %operator) (nat %token_id)))
40
                                      unit)
41
                                    (pair (bool %paused)
42
                                          (pair (big_map %supply nat nat)
43
                                                (big_map %token_metadata nat
44
                                                                         (pair
45
                                                                           (nat %token_id)
46
                                                                           (map %token_info
47
                                                                             string
48
                                                                             bytes)))))))))) ;
49
  code { LAMBDA
50
           (pair
51
             (pair
52
               (lambda
53
                 (pair nat
54
                       (pair address
55
                             (pair (big_map (pair address nat) nat)
56
                                   (pair (big_map string bytes)
57
                                         (pair nat
58
                                               (pair
59
                                                 (big_map
60
                                                   (pair address (pair address nat))
61
                                                   unit)
62
                                                 (pair bool
63
                                                       (pair (big_map nat nat)
64
                                                             (big_map nat
65
                                                                      (pair nat
66
                                                                            (map string
67
                                                                                 bytes)))))))))))
68
                 (pair bool
69
                       (pair address
70
                             (pair (big_map (pair address nat) nat)
71
                                   (pair (big_map string bytes)
72
                                         (pair nat
73
                                               (pair
74
                                                 (big_map
75
                                                   (pair address (pair address nat))
76
                                                   unit)
77
                                                 (pair bool
78
                                                       (pair (big_map nat nat)
79
                                                             (big_map nat
80
                                                                      (pair nat
81
                                                                            (map string
82
                                                                                 bytes))))))))))))
83
               (pair address nat))
84
             (pair address
85
                   (pair (big_map (pair address nat) nat)
86
                         (pair (big_map string bytes)
87
                               (pair nat
88
                                     (pair
89
                                       (big_map (pair address (pair address nat)) unit)
90
                                       (pair bool
91
                                             (pair (big_map nat nat)
92
                                                   (big_map nat
93
                                                            (pair nat (map string bytes)))))))))))
94
           (pair nat
95
                 (pair address
96
                       (pair (big_map (pair address nat) nat)
97
                             (pair (big_map string bytes)
98
                                   (pair nat
99
                                         (pair
100
                                           (big_map (pair address (pair address nat))
101
                                                    unit)
102
                                           (pair bool
103
                                                 (pair (big_map nat nat)
104
                                                       (big_map nat
105
                                                                (pair nat
106
                                                                      (map string bytes)))))))))))
107
           { UNPAIR ;
108
             UNPAIR ;
109
             SWAP ;
110
             DUP ;
111
             CDR ;
112
             DIG 2 ;
113
             DIG 3 ;
114
             DIG 2 ;
115
             PAIR ;
116
             EXEC ;
117
             UNPAIR ;
118
             SWAP ;
119
             DUG 2 ;
120
             IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
121
             SWAP ;
122
             DUP ;
123
             GET 3 ;
124
             DIG 2 ;
125
             GET ;
126
             IF_NONE { PUSH nat 0 } {} ;
127
             PAIR } ;
128
         SWAP ;
129
         LAMBDA
130
           (pair (pair address (pair address nat))
131
                 (pair address
132
                       (pair (big_map (pair address nat) nat)
133
                             (pair (big_map string bytes)
134
                                   (pair nat
135
                                         (pair
136
                                           (big_map (pair address (pair address nat))
137
                                                    unit)
138
                                           (pair bool
139
                                                 (pair (big_map nat nat)
140
                                                       (big_map nat
141
                                                                (pair nat
142
                                                                      (map string bytes)))))))))))
143
           (pair unit
144
                 (pair address
145
                       (pair (big_map (pair address nat) nat)
146
                             (pair (big_map string bytes)
147
                                   (pair nat
148
                                         (pair
149
                                           (big_map (pair address (pair address nat))
150
                                                    unit)
151
                                           (pair bool
152
                                                 (pair (big_map nat nat)
153
                                                       (big_map nat
154
                                                                (pair nat
155
                                                                      (map string bytes)))))))))))
156
           { UNPAIR ;
157
             DUP 2 ;
158
             GET 11 ;
159
             IF
160
               { PUSH (pair string string) (Pair "FA2_OPERATORS_UNSUPPORTED" "FA2_PAUSED") ;
161
                 FAILWITH }
162
               {} ;
163
             CAR ;
164
             SENDER ;
165
             COMPARE ;
166
             EQ ;
167
             IF {} { PUSH string "FA2_NOT_OWNER" ; FAILWITH } ;
168
             UNIT ;
169
             PAIR } ;
170
         SWAP ;
171
         LAMBDA
172
           (pair (pair address (pair address nat))
173
                 (pair address
174
                       (pair (big_map (pair address nat) nat)
175
                             (pair (big_map string bytes)
176
                                   (pair nat
177
                                         (pair
178
                                           (big_map (pair address (pair address nat))
179
                                                    unit)
180
                                           (pair bool
181
                                                 (pair (big_map nat nat)
182
                                                       (big_map nat
183
                                                                (pair nat
184
                                                                      (map string bytes)))))))))))
185
           (pair unit
186
                 (pair address
187
                       (pair (big_map (pair address nat) nat)
188
                             (pair (big_map string bytes)
189
                                   (pair nat
190
                                         (pair
191
                                           (big_map (pair address (pair address nat))
192
                                                    unit)
193
                                           (pair bool
194
                                                 (pair (big_map nat nat)
195
                                                       (big_map nat
196
                                                                (pair nat
197
                                                                      (map string bytes)))))))))))
198
           { UNPAIR ;
199
             DUP 2 ;
200
             GET 11 ;
201
             IF
202
               { PUSH (pair string string) (Pair "FA2_TX_DENIED" "FA2_PAUSED") ;
203
                 FAILWITH }
204
               {} ;
205
             DUP ;
206
             CAR ;
207
             SENDER ;
208
             COMPARE ;
209
             EQ ;
210
             IF
211
               { DROP ; PUSH bool True }
212
               { DUP 2 ; GET 9 ; DUP 2 ; GET 4 ; SENDER ; DIG 3 ; CAR ; PAIR 3 ; MEM } ;
213
             IF {} { PUSH string "FA2_NOT_OPERATOR" ; FAILWITH } ;
214
             UNIT ;
215
             PAIR } ;
216
         SWAP ;
217
         LAMBDA
218
           (pair unit
219
                 (pair address
220
                       (pair (big_map (pair address nat) nat)
221
                             (pair (big_map string bytes)
222
                                   (pair nat
223
                                         (pair
224
                                           (big_map (pair address (pair address nat))
225
                                                    unit)
226
                                           (pair bool
227
                                                 (pair (big_map nat nat)
228
                                                       (big_map nat
229
                                                                (pair nat
230
                                                                      (map string bytes)))))))))))
231
           (pair bool
232
                 (pair address
233
                       (pair (big_map (pair address nat) nat)
234
                             (pair (big_map string bytes)
235
                                   (pair nat
236
                                         (pair
237
                                           (big_map (pair address (pair address nat))
238
                                                    unit)
239
                                           (pair bool
240
                                                 (pair (big_map nat nat)
241
                                                       (big_map nat
242
                                                                (pair nat
243
                                                                      (map string bytes)))))))))))
244
           { CDR ; DUP ; CAR ; SENDER ; COMPARE ; EQ ; PAIR } ;
245
         SWAP ;
246
         LAMBDA
247
           (pair nat
248
                 (pair address
249
                       (pair (big_map (pair address nat) nat)
250
                             (pair (big_map string bytes)
251
                                   (pair nat
252
                                         (pair
253
                                           (big_map (pair address (pair address nat))
254
                                                    unit)
255
                                           (pair bool
256
                                                 (pair (big_map nat nat)
257
                                                       (big_map nat
258
                                                                (pair nat
259
                                                                      (map string bytes)))))))))))
260
           (pair bool
261
                 (pair address
262
                       (pair (big_map (pair address nat) nat)
263
                             (pair (big_map string bytes)
264
                                   (pair nat
265
                                         (pair
266
                                           (big_map (pair address (pair address nat))
267
                                                    unit)
268
                                           (pair bool
269
                                                 (pair (big_map nat nat)
270
                                                       (big_map nat
271
                                                                (pair nat
272
                                                                      (map string bytes)))))))))))
273
           { UNPAIR ; SWAP ; DUP ; GET 14 ; DIG 2 ; MEM ; PAIR } ;
274
         SWAP ;
275
         LAMBDA
276
           (pair (pair address (pair address nat))
277
                 (pair address
278
                       (pair (big_map (pair address nat) nat)
279
                             (pair (big_map string bytes)
280
                                   (pair nat
281
                                         (pair
282
                                           (big_map (pair address (pair address nat))
283
                                                    unit)
284
                                           (pair bool
285
                                                 (pair (big_map nat nat)
286
                                                       (big_map nat
287
                                                                (pair nat
288
                                                                      (map string bytes)))))))))))
289
           (pair bool
290
                 (pair address
291
                       (pair (big_map (pair address nat) nat)
292
                             (pair (big_map string bytes)
293
                                   (pair nat
294
                                         (pair
295
                                           (big_map (pair address (pair address nat))
296
                                                    unit)
297
                                           (pair bool
298
                                                 (pair (big_map nat nat)
299
                                                       (big_map nat
300
                                                                (pair nat
301
                                                                      (map string bytes)))))))))))
302
           { UNPAIR ; SWAP ; DUP ; GET 9 ; DIG 2 ; MEM ; PAIR } ;
303
         SWAP ;
304
         LAMBDA
305
           (pair (pair address (pair address nat))
306
                 (pair address
307
                       (pair (big_map (pair address nat) nat)
308
                             (pair (big_map string bytes)
309
                                   (pair nat
310
                                         (pair
311
                                           (big_map (pair address (pair address nat))
312
                                                    unit)
313
                                           (pair bool
314
                                                 (pair (big_map nat nat)
315
                                                       (big_map nat
316
                                                                (pair nat
317
                                                                      (map string bytes)))))))))))
318
           (pair bool
319
                 (pair address
320
                       (pair (big_map (pair address nat) nat)
321
                             (pair (big_map string bytes)
322
                                   (pair nat
323
                                         (pair
324
                                           (big_map (pair address (pair address nat))
325
                                                    unit)
326
                                           (pair bool
327
                                                 (pair (big_map nat nat)
328
                                                       (big_map nat
329
                                                                (pair nat
330
                                                                      (map string bytes)))))))))))
331
           { UNPAIR ; SWAP ; DUP ; GET 9 ; DIG 2 ; MEM ; PAIR } ;
332
         SWAP ;
333
         LAMBDA
334
           (pair
335
             (pair
336
               (lambda
337
                 (pair nat
338
                       (pair address
339
                             (pair (big_map (pair address nat) nat)
340
                                   (pair (big_map string bytes)
341
                                         (pair nat
342
                                               (pair
343
                                                 (big_map
344
                                                   (pair address (pair address nat))
345
                                                   unit)
346
                                                 (pair bool
347
                                                       (pair (big_map nat nat)
348
                                                             (big_map nat
349
                                                                      (pair nat
350
                                                                            (map string
351
                                                                                 bytes)))))))))))
352
                 (pair bool
353
                       (pair address
354
                             (pair (big_map (pair address nat) nat)
355
                                   (pair (big_map string bytes)
356
                                         (pair nat
357
                                               (pair
358
                                                 (big_map
359
                                                   (pair address (pair address nat))
360
                                                   unit)
361
                                                 (pair bool
362
                                                       (pair (big_map nat nat)
363
                                                             (big_map nat
364
                                                                      (pair nat
365
                                                                            (map string
366
                                                                                 bytes))))))))))))
367
               nat)
368
             (pair address
369
                   (pair (big_map (pair address nat) nat)
370
                         (pair (big_map string bytes)
371
                               (pair nat
372
                                     (pair
373
                                       (big_map (pair address (pair address nat)) unit)
374
                                       (pair bool
375
                                             (pair (big_map nat nat)
376
                                                   (big_map nat
377
                                                            (pair nat (map string bytes)))))))))))
378
           (pair nat
379
                 (pair address
380
                       (pair (big_map (pair address nat) nat)
381
                             (pair (big_map string bytes)
382
                                   (pair nat
383
                                         (pair
384
                                           (big_map (pair address (pair address nat))
385
                                                    unit)
386
                                           (pair bool
387
                                                 (pair (big_map nat nat)
388
                                                       (big_map nat
389
                                                                (pair nat
390
                                                                      (map string bytes)))))))))))
391
           { UNPAIR ;
392
             UNPAIR ;
393
             DUP 2 ;
394
             SWAP ;
395
             DIG 3 ;
396
             DIG 2 ;
397
             PAIR ;
398
             EXEC ;
399
             UNPAIR ;
400
             SWAP ;
401
             DUG 2 ;
402
             IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
403
             SWAP ;
404
             DUP ;
405
             GET 13 ;
406
             DIG 2 ;
407
             GET ;
408
             IF_NONE { PUSH int 444 ; FAILWITH } {} ;
409
             PAIR } ;
410
         SWAP ;
411
         LAMBDA
412
           (pair (pair address (pair address (pair nat nat)))
413
                 (pair address
414
                       (pair (big_map (pair address nat) nat)
415
                             (pair (big_map string bytes)
416
                                   (pair nat
417
                                         (pair
418
                                           (big_map (pair address (pair address nat))
419
                                                    unit)
420
                                           (pair bool
421
                                                 (pair (big_map nat nat)
422
                                                       (big_map nat
423
                                                                (pair nat
424
                                                                      (map string bytes)))))))))))
425
           (pair unit
426
                 (pair address
427
                       (pair (big_map (pair address nat) nat)
428
                             (pair (big_map string bytes)
429
                                   (pair nat
430
                                         (pair
431
                                           (big_map (pair address (pair address nat))
432
                                                    unit)
433
                                           (pair bool
434
                                                 (pair (big_map nat nat)
435
                                                       (big_map nat
436
                                                                (pair nat
437
                                                                      (map string bytes)))))))))))
438
           { UNPAIR ;
439
             DUP ;
440
             GET 5 ;
441
             DUP 2 ;
442
             CAR ;
443
             PAIR ;
444
             DUP 3 ;
445
             DUP ;
446
             GET 3 ;
447
             DUP 4 ;
448
             GET 6 ;
449
             DIG 5 ;
450
             GET 3 ;
451
             DUP 5 ;
452
             GET ;
453
             IF_NONE { PUSH nat 0 } {} ;
454
             SUB ;
455
             ISNAT ;
456
             IF_NONE { PUSH string "FA2_INSUFFICIENT_BALANCE" ; FAILWITH } {} ;
457
             SOME ;
458
             DIG 3 ;
459
             UPDATE ;
460
             UPDATE 3 ;
461
             SWAP ;
462
             DUP ;
463
             GET 5 ;
464
             DUP 2 ;
465
             GET 3 ;
466
             PAIR ;
467
             DUP 3 ;
468
             DUP ;
469
             GET 3 ;
470
             DIG 3 ;
471
             GET 6 ;
472
             DIG 4 ;
473
             GET 3 ;
474
             DUP 5 ;
475
             GET ;
476
             IF_NONE { PUSH nat 0 } {} ;
477
             ADD ;
478
             SOME ;
479
             DIG 3 ;
480
             UPDATE ;
481
             UPDATE 3 ;
482
             UNIT ;
483
             PAIR } ;
484
         SWAP ;
485
         PUSH (pair (string %ledger_type)
486
                 (pair %policy (string %name)
487
                               (pair (bool %supports_operator) (bool %supports_transfer)))) (Pair "Fungible"
488
                     (Pair "pauseable-owner-or-operator-transfer" (Pair True True))) ;
489
         SWAP ;
490
         UNPAIR ;
491
         IF_LEFT
492
           { IF_LEFT
493
               { IF_LEFT
494
                   { LAMBDA
495
                       (pair
496
                         (pair (pair address nat)
497
                               (pair
498
                                 (lambda
499
                                   (pair nat
500
                                         (pair address
501
                                               (pair (big_map (pair address nat) nat)
502
                                                     (pair (big_map string bytes)
503
                                                           (pair nat
504
                                                                 (pair
505
                                                                   (big_map
506
                                                                     (pair address
507
                                                                           (pair address
508
                                                                                 nat))
509
                                                                     unit)
510
                                                                   (pair bool
511
                                                                         (pair
512
                                                                           (big_map nat
513
                                                                                    nat)
514
                                                                           (big_map nat
515
                                                                                    (pair
516
                                                                                      nat
517
                                                                                      (map
518
                                                                                        string
519
                                                                                        bytes)))))))))))
520
                                   (pair bool
521
                                         (pair address
522
                                               (pair (big_map (pair address nat) nat)
523
                                                     (pair (big_map string bytes)
524
                                                           (pair nat
525
                                                                 (pair
526
                                                                   (big_map
527
                                                                     (pair address
528
                                                                           (pair address
529
                                                                                 nat))
530
                                                                     unit)
531
                                                                   (pair bool
532
                                                                         (pair
533
                                                                           (big_map nat
534
                                                                                    nat)
535
                                                                           (big_map nat
536
                                                                                    (pair
537
                                                                                      nat
538
                                                                                      (map
539
                                                                                        string
540
                                                                                        bytes))))))))))))
541
                                 (lambda
542
                                   (pair
543
                                     (pair
544
                                       (lambda
545
                                         (pair nat
546
                                               (pair address
547
                                                     (pair
548
                                                       (big_map (pair address nat) nat)
549
                                                       (pair (big_map string bytes)
550
                                                             (pair nat
551
                                                                   (pair
552
                                                                     (big_map
553
                                                                       (pair address
554
                                                                             (pair
555
                                                                               address
556
                                                                               nat))
557
                                                                       unit)
558
                                                                     (pair bool
559
                                                                           (pair
560
                                                                             (big_map
561
                                                                               nat
562
                                                                               nat)
563
                                                                             (big_map
564
                                                                               nat
565
                                                                               (pair nat
566
                                                                                     (map
567
                                                                                       string
568
                                                                                       bytes)))))))))))
569
                                         (pair bool
570
                                               (pair address
571
                                                     (pair
572
                                                       (big_map (pair address nat) nat)
573
                                                       (pair (big_map string bytes)
574
                                                             (pair nat
575
                                                                   (pair
576
                                                                     (big_map
577
                                                                       (pair address
578
                                                                             (pair
579
                                                                               address
580
                                                                               nat))
581
                                                                       unit)
582
                                                                     (pair bool
583
                                                                           (pair
584
                                                                             (big_map
585
                                                                               nat
586
                                                                               nat)
587
                                                                             (big_map
588
                                                                               nat
589
                                                                               (pair nat
590
                                                                                     (map
591
                                                                                       string
592
                                                                                       bytes))))))))))))
593
                                       (pair address nat))
594
                                     (pair address
595
                                           (pair (big_map (pair address nat) nat)
596
                                                 (pair (big_map string bytes)
597
                                                       (pair nat
598
                                                             (pair
599
                                                               (big_map
600
                                                                 (pair address
601
                                                                       (pair address nat))
602
                                                                 unit)
603
                                                               (pair bool
604
                                                                     (pair
605
                                                                       (big_map nat nat)
606
                                                                       (big_map nat
607
                                                                                (pair
608
                                                                                  nat
609
                                                                                  (map
610
                                                                                    string
611
                                                                                    bytes)))))))))))
612
                                   (pair nat
613
                                         (pair address
614
                                               (pair (big_map (pair address nat) nat)
615
                                                     (pair (big_map string bytes)
616
                                                           (pair nat
617
                                                                 (pair
618
                                                                   (big_map
619
                                                                     (pair address
620
                                                                           (pair address
621
                                                                                 nat))
622
                                                                     unit)
623
                                                                   (pair bool
624
                                                                         (pair
625
                                                                           (big_map nat
626
                                                                                    nat)
627
                                                                           (big_map nat
628
                                                                                    (pair
629
                                                                                      nat
630
                                                                                      (map
631
                                                                                        string
632
                                                                                        bytes))))))))))))))
633
                         (pair address
634
                               (pair (big_map (pair address nat) nat)
635
                                     (pair (big_map string bytes)
636
                                           (pair nat
637
                                                 (pair
638
                                                   (big_map
639
                                                     (pair address (pair address nat))
640
                                                     unit)
641
                                                   (pair bool
642
                                                         (pair (big_map nat nat)
643
                                                               (big_map nat
644
                                                                        (pair nat
645
                                                                              (map
646
                                                                                string
647
                                                                                bytes)))))))))))
648
                       (pair (pair (pair address nat) nat)
649
                             (pair address
650
                                   (pair (big_map (pair address nat) nat)
651
                                         (pair (big_map string bytes)
652
                                               (pair nat
653
                                                     (pair
654
                                                       (big_map
655
                                                         (pair address
656
                                                               (pair address nat))
657
                                                         unit)
658
                                                       (pair bool
659
                                                             (pair (big_map nat nat)
660
                                                                   (big_map nat
661
                                                                            (pair nat
662
                                                                                  (map
663
                                                                                    string
664
                                                                                    bytes)))))))))))
665
                       { UNPAIR ;
666
                         UNPAIR 3 ;
667
                         DIG 2 ;
668
                         DUP 2 ;
669
                         DIG 3 ;
670
                         PAIR ;
671
                         SWAP ;
672
                         DIG 3 ;
673
                         DIG 2 ;
674
                         PAIR ;
675
                         EXEC ;
676
                         UNPAIR ;
677
                         SWAP ;
678
                         DUG 2 ;
679
                         SWAP ;
680
                         PAIR ;
681
                         PAIR } ;
682
                     DUP 2 ;
683
                     CAR ;
684
                     MAP { DUP 2 ;
685
                           DUP 15 ;
686
                           DUP 12 ;
687
                           PAIR ;
688
                           DIG 2 ;
689
                           PAIR ;
690
                           SWAP ;
691
                           DIG 4 ;
692
                           DIG 2 ;
693
                           PAIR ;
694
                           EXEC ;
695
                           UNPAIR ;
696
                           DUG 13 ;
697
                           DUG 13 ;
698
                           DUG 13 ;
699
                           DUG 13 ;
700
                           DIG 11 ;
701
                           DIG 13 ;
702
                           DIG 13 ;
703
                           DIG 13 } ;
704
                     SWAP ;
705
                     DROP ;
706
                     DIG 3 ;
707
                     DROP ;
708
                     DIG 3 ;
709
                     DROP ;
710
                     DIG 3 ;
711
                     DROP ;
712
                     DIG 3 ;
713
                     DROP ;
714
                     DIG 3 ;
715
                     DROP ;
716
                     DIG 3 ;
717
                     DROP ;
718
                     DIG 3 ;
719
                     DROP ;
720
                     DIG 3 ;
721
                     DROP ;
722
                     DIG 3 ;
723
                     DROP ;
724
                     DIG 3 ;
725
                     DROP ;
726
                     NIL operation ;
727
                     DIG 2 ;
728
                     CDR ;
729
                     PUSH mutez 0 ;
730
                     DIG 3 ;
731
                     TRANSFER_TOKENS ;
732
                     CONS }
733
                   { DUP 3 ;
734
                     GET 6 ;
735
                     IF {} { PUSH string "FA2_TX_DENIED" ; FAILWITH } ;
736
                     DUP ;
737
                     ITER { DUP 9 ;
738
                            SWAP ;
739
                            DUP ;
740
                            GET 3 ;
741
                            DIG 2 ;
742
                            DIG 4 ;
743
                            DIG 2 ;
744
                            PAIR ;
745
                            EXEC ;
746
                            UNPAIR ;
747
                            DUG 13 ;
748
                            DUG 13 ;
749
                            DUG 13 ;
750
                            DUG 13 ;
751
                            DIG 11 ;
752
                            DIG 13 ;
753
                            DIG 13 ;
754
                            DIG 13 ;
755
                            IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
756
                            DUP 11 ;
757
                            DUP 2 ;
758
                            GET 3 ;
759
                            DUP 3 ;
760
                            CAR ;
761
                            DUP 4 ;
762
                            CAR ;
763
                            PAIR 3 ;
764
                            SWAP ;
765
                            DIG 4 ;
766
                            DIG 2 ;
767
                            PAIR ;
768
                            EXEC ;
769
                            CDR ;
770
                            DUG 12 ;
771
                            DUG 12 ;
772
                            DUG 12 ;
773
                            DIG 10 ;
774
                            DIG 12 ;
775
                            DIG 12 ;
776
                            DUP ;
777
                            GET 3 ;
778
                            DUP 2 ;
779
                            CAR ;
780
                            PAIR ;
781
                            DUP 4 ;
782
                            DUP ;
783
                            GET 3 ;
784
                            DUP 4 ;
785
                            GET 4 ;
786
                            DIG 6 ;
787
                            GET 3 ;
788
                            DUP 5 ;
789
                            GET ;
790
                            IF_NONE { PUSH nat 0 } {} ;
791
                            SUB ;
792
                            ISNAT ;
793
                            IF_NONE
794
                              { PUSH string "FA2_INSUFFICIENT_BALANCE" ; FAILWITH }
795
                              {} ;
796
                            SOME ;
797
                            DIG 3 ;
798
                            UPDATE ;
799
                            UPDATE 3 ;
800
                            DUG 2 ;
801
                            DUP ;
802
                            GET 4 ;
803
                            DUP 4 ;
804
                            GET 13 ;
805
                            DUP 3 ;
806
                            GET 3 ;
807
                            GET ;
808
                            IF_NONE { PUSH nat 0 } {} ;
809
                            SUB ;
810
                            ISNAT ;
811
                            IF_NONE
812
                              { DIG 2 ;
813
                                DUP ;
814
                                GET 13 ;
815
                                PUSH (option nat) (Some 0) ;
816
                                DIG 3 ;
817
                                GET 3 ;
818
                                UPDATE ;
819
                                UPDATE 13 ;
820
                                SWAP }
821
                              { DIG 3 ; DUP ; GET 13 ; DIG 2 ; SOME ; DIG 3 ; GET 3 ; UPDATE ; UPDATE 13 ; SWAP } } ;
822
                     DROP ;
823
                     SWAP ;
824
                     DROP ;
825
                     SWAP ;
826
                     DROP ;
827
                     SWAP ;
828
                     DROP ;
829
                     SWAP ;
830
                     DROP ;
831
                     SWAP ;
832
                     DROP ;
833
                     SWAP ;
834
                     DROP ;
835
                     SWAP ;
836
                     DROP ;
837
                     SWAP ;
838
                     DROP ;
839
                     SWAP ;
840
                     DROP ;
841
                     SWAP ;
842
                     DROP ;
843
                     NIL operation } }
844
               { IF_LEFT
845
                   { DUP 9 ;
846
                     UNIT ;
847
                     SWAP ;
848
                     DIG 3 ;
849
                     DIG 2 ;
850
                     PAIR ;
851
                     EXEC ;
852
                     UNPAIR ;
853
                     DUG 12 ;
854
                     DUG 12 ;
855
                     DUG 12 ;
856
                     DIG 11 ;
857
                     DIG 12 ;
858
                     DIG 12 ;
859
                     IF {} { PUSH string "FA2_NOT_ADMIN" ; FAILWITH } ;
860
                     DUP ;
861
                     ITER { DUP ;
862
                            GET 3 ;
863
                            IF_LEFT
864
                              { DUP 10 ;
865
                                DUP 2 ;
866
                                SWAP ;
867
                                DIG 5 ;
868
                                DIG 2 ;
869
                                PAIR ;
870
                                EXEC ;
871
                                UNPAIR ;
872
                                DUG 14 ;
873
                                DUG 14 ;
874
                                DUG 14 ;
875
                                DUG 14 ;
876
                                DUG 14 ;
877
                                DIG 11 ;
878
                                DIG 14 ;
879
                                DIG 14 ;
880
                                DIG 14 ;
881
                                DIG 14 ;
882
                                IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
883
                                DIG 3 ;
884
                                DUP ;
885
                                GET 13 ;
886
                                DUP ;
887
                                DUP 4 ;
888
                                DUP ;
889
                                DUG 2 ;
890
                                GET ;
891
                                IF_NONE { PUSH int 680 ; FAILWITH } {} ;
892
                                DUP 6 ;
893
                                GET 4 ;
894
                                ADD ;
895
                                SOME ;
896
                                SWAP ;
897
                                UPDATE ;
898
                                UPDATE 13 ;
899
                                DUG 3 ;
900
                                DUP 2 ;
901
                                CAR ;
902
                                PAIR ;
903
                                DUP 4 ;
904
                                DUP ;
905
                                GET 3 ;
906
                                DIG 3 ;
907
                                GET 4 ;
908
                                DIG 5 ;
909
                                GET 3 ;
910
                                DUP 5 ;
911
                                GET ;
912
                                IF_NONE { PUSH nat 0 } {} ;
913
                                ADD ;
914
                                SOME ;
915
                                DIG 3 ;
916
                                UPDATE ;
917
                                UPDATE 3 ;
918
                                SWAP }
919
                              { DUP 4 ;
920
                                GET 7 ;
921
                                DIG 4 ;
922
                                DUP ;
923
                                GET 14 ;
924
                                DIG 3 ;
925
                                DUP 4 ;
926
                                PAIR ;
927
                                SOME ;
928
                                DUP 4 ;
929
                                UPDATE ;
930
                                UPDATE 14 ;
931
                                DUP ;
932
                                GET 13 ;
933
                                DUP 4 ;
934
                                GET 4 ;
935
                                SOME ;
936
                                DUP 4 ;
937
                                UPDATE ;
938
                                UPDATE 13 ;
939
                                DUP ;
940
                                GET 3 ;
941
                                DUP 4 ;
942
                                GET 4 ;
943
                                SOME ;
944
                                DIG 3 ;
945
                                DIG 4 ;
946
                                CAR ;
947
                                PAIR ;
948
                                UPDATE ;
949
                                UPDATE 3 ;
950
                                DUP ;
951
                                GET 7 ;
952
                                PUSH nat 1 ;
953
                                ADD ;
954
                                UPDATE 7 ;
955
                                SWAP } } ;
956
                     DROP ;
957
                     SWAP ;
958
                     DROP ;
959
                     SWAP ;
960
                     DROP ;
961
                     SWAP ;
962
                     DROP ;
963
                     SWAP ;
964
                     DROP ;
965
                     SWAP ;
966
                     DROP ;
967
                     SWAP ;
968
                     DROP ;
969
                     SWAP ;
970
                     DROP ;
971
                     SWAP ;
972
                     DROP ;
973
                     SWAP ;
974
                     DROP ;
975
                     SWAP ;
976
                     DROP }
977
                   { DIG 2 ;
978
                     DROP ;
979
                     DIG 2 ;
980
                     DROP ;
981
                     DIG 2 ;
982
                     DROP ;
983
                     DIG 2 ;
984
                     DROP ;
985
                     DIG 2 ;
986
                     DROP ;
987
                     DIG 2 ;
988
                     DROP ;
989
                     DIG 3 ;
990
                     DROP ;
991
                     DIG 3 ;
992
                     DROP ;
993
                     DIG 3 ;
994
                     DROP ;
995
                     DIG 2 ;
996
                     UNIT ;
997
                     SWAP ;
998
                     DIG 3 ;
999
                     DIG 2 ;
1000
                     PAIR ;
1001
                     EXEC ;
1002
                     UNPAIR ;
1003
                     SWAP ;
1004
                     DUG 2 ;
1005
                     IF {} { PUSH string "FA2_NOT_ADMIN" ; FAILWITH } ;
1006
                     UPDATE 1 } ;
1007
                 NIL operation } }
1008
           { IF_LEFT
1009
               { IF_LEFT
1010
                   { DIG 2 ;
1011
                     DROP ;
1012
                     DIG 2 ;
1013
                     DROP ;
1014
                     DIG 2 ;
1015
                     DROP ;
1016
                     DIG 2 ;
1017
                     DROP ;
1018
                     DIG 2 ;
1019
                     DROP ;
1020
                     DIG 2 ;
1021
                     DROP ;
1022
                     DIG 3 ;
1023
                     DROP ;
1024
                     DIG 3 ;
1025
                     DROP ;
1026
                     DIG 3 ;
1027
                     DROP ;
1028
                     DIG 2 ;
1029
                     UNIT ;
1030
                     SWAP ;
1031
                     DIG 3 ;
1032
                     DIG 2 ;
1033
                     PAIR ;
1034
                     EXEC ;
1035
                     UNPAIR ;
1036
                     SWAP ;
1037
                     DUG 2 ;
1038
                     IF {} { PUSH string "FA2_NOT_ADMIN" ; FAILWITH } ;
1039
                     UPDATE 5 }
1040
                   { DIG 2 ;
1041
                     DROP ;
1042
                     DIG 2 ;
1043
                     DROP ;
1044
                     DIG 2 ;
1045
                     DROP ;
1046
                     DIG 2 ;
1047
                     DROP ;
1048
                     DIG 2 ;
1049
                     DROP ;
1050
                     DIG 2 ;
1051
                     DROP ;
1052
                     DIG 3 ;
1053
                     DROP ;
1054
                     DIG 3 ;
1055
                     DROP ;
1056
                     DIG 3 ;
1057
                     DROP ;
1058
                     DIG 2 ;
1059
                     UNIT ;
1060
                     SWAP ;
1061
                     DIG 3 ;
1062
                     DIG 2 ;
1063
                     PAIR ;
1064
                     EXEC ;
1065
                     UNPAIR ;
1066
                     SWAP ;
1067
                     DUG 2 ;
1068
                     IF {} { PUSH string "FA2_NOT_ADMIN" ; FAILWITH } ;
1069
                     UPDATE 11 } }
1070
               { IF_LEFT
1071
                   { DUP 3 ;
1072
                     GET 6 ;
1073
                     IF
1074
                       { DUP ;
1075
                         ITER { DUP ;
1076
                                CDR ;
1077
                                ITER { DUP 10 ;
1078
                                       SWAP ;
1079
                                       DUP ;
1080
                                       GET 3 ;
1081
                                       DIG 2 ;
1082
                                       DIG 5 ;
1083
                                       DIG 2 ;
1084
                                       PAIR ;
1085
                                       EXEC ;
1086
                                       UNPAIR ;
1087
                                       DUG 14 ;
1088
                                       DUG 14 ;
1089
                                       DUG 14 ;
1090
                                       DUG 14 ;
1091
                                       DUG 14 ;
1092
                                       DIG 11 ;
1093
                                       DIG 14 ;
1094
                                       DIG 14 ;
1095
                                       DIG 14 ;
1096
                                       DIG 14 ;
1097
                                       IF
1098
                                         {}
1099
                                         { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
1100
                                       DUP 12 ;
1101
                                       DUP 2 ;
1102
                                       GET 3 ;
1103
                                       DUP 3 ;
1104
                                       CAR ;
1105
                                       DUP 5 ;
1106
                                       CAR ;
1107
                                       PAIR 3 ;
1108
                                       SWAP ;
1109
                                       DIG 5 ;
1110
                                       DIG 2 ;
1111
                                       PAIR ;
1112
                                       EXEC ;
1113
                                       CDR ;
1114
                                       DUG 13 ;
1115
                                       DUG 13 ;
1116
                                       DUG 13 ;
1117
                                       DUG 13 ;
1118
                                       DIG 10 ;
1119
                                       DIG 13 ;
1120
                                       DIG 13 ;
1121
                                       DIG 13 ;
1122
                                       PUSH nat 0 ;
1123
                                       DUP 2 ;
1124
                                       GET 4 ;
1125
                                       COMPARE ;
1126
                                       GT ;
1127
                                       IF
1128
                                         { DUP 2 ;
1129
                                           CAR ;
1130
                                           PAIR ;
1131
                                           DUP 6 ;
1132
                                           DIG 4 ;
1133
                                           DIG 2 ;
1134
                                           PAIR ;
1135
                                           EXEC ;
1136
                                           CDR ;
1137
                                           DUG 12 ;
1138
                                           DUG 12 ;
1139
                                           DUG 12 ;
1140
                                           DIG 10 ;
1141
                                           DIG 12 ;
1142
                                           DIG 12 }
1143
                                         { DROP } } ;
1144
                                DROP } ;
1145
                         DROP ;
1146
                         SWAP ;
1147
                         DROP ;
1148
                         SWAP ;
1149
                         DROP ;
1150
                         SWAP ;
1151
                         DROP ;
1152
                         SWAP ;
1153
                         DROP ;
1154
                         SWAP ;
1155
                         DROP ;
1156
                         SWAP ;
1157
                         DROP ;
1158
                         SWAP ;
1159
                         DROP ;
1160
                         SWAP ;
1161
                         DROP ;
1162
                         SWAP ;
1163
                         DROP ;
1164
                         SWAP ;
1165
                         DROP }
1166
                       { PUSH string "FA2_TX_DENIED" ; FAILWITH } }
1167
                   { DUP 3 ;
1168
                     GET 5 ;
1169
                     IF
1170
                       { DUP ;
1171
                         ITER { IF_LEFT
1172
                                  { DUP 12 ;
1173
                                    DUP 2 ;
1174
                                    SWAP ;
1175
                                    DIG 4 ;
1176
                                    DIG 2 ;
1177
                                    PAIR ;
1178
                                    EXEC ;
1179
                                    CDR ;
1180
                                    DUG 12 ;
1181
                                    DUG 12 ;
1182
                                    DUG 12 ;
1183
                                    DIG 10 ;
1184
                                    DIG 12 ;
1185
                                    DIG 12 ;
1186
                                    DIG 2 ;
1187
                                    DUP ;
1188
                                    GET 9 ;
1189
                                    PUSH (option unit) (Some Unit) ;
1190
                                    DIG 3 ;
1191
                                    UPDATE ;
1192
                                    UPDATE 9 ;
1193
                                    SWAP }
1194
                                  { DUP 12 ;
1195
                                    DUP 2 ;
1196
                                    SWAP ;
1197
                                    DIG 4 ;
1198
                                    DIG 2 ;
1199
                                    PAIR ;
1200
                                    EXEC ;
1201
                                    CDR ;
1202
                                    DUG 12 ;
1203
                                    DUG 12 ;
1204
                                    DUG 12 ;
1205
                                    DIG 10 ;
1206
                                    DIG 12 ;
1207
                                    DIG 12 ;
1208
                                    DIG 2 ;
1209
                                    DUP ;
1210
                                    GET 9 ;
1211
                                    NONE unit ;
1212
                                    DIG 3 ;
1213
                                    UPDATE ;
1214
                                    UPDATE 9 ;
1215
                                    SWAP } } ;
1216
                         DROP ;
1217
                         SWAP ;
1218
                         DROP ;
1219
                         SWAP ;
1220
                         DROP ;
1221
                         SWAP ;
1222
                         DROP ;
1223
                         SWAP ;
1224
                         DROP ;
1225
                         SWAP ;
1226
                         DROP ;
1227
                         SWAP ;
1228
                         DROP ;
1229
                         SWAP ;
1230
                         DROP ;
1231
                         SWAP ;
1232
                         DROP ;
1233
                         SWAP ;
1234
                         DROP ;
1235
                         SWAP ;
1236
                         DROP }
1237
                       { PUSH string "FA2_OPERATORS_UNSUPPORTED" ; FAILWITH } } } ;
1238
             NIL operation } ;
1239
         PAIR } ;
1240
  view "get_balance_of" (list (pair (address %owner) (nat %token_id)))
1241
        (list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance)))
1242
        { UNPAIR ;
1243
          LAMBDA
1244
            (pair
1245
              (pair
1246
                (lambda
1247
                  (pair nat
1248
                        (pair address
1249
                              (pair (big_map (pair address nat) nat)
1250
                                    (pair (big_map string bytes)
1251
                                          (pair nat
1252
                                                (pair
1253
                                                  (big_map
1254
                                                    (pair address (pair address nat))
1255
                                                    unit)
1256
                                                  (pair bool
1257
                                                        (pair (big_map nat nat)
1258
                                                              (big_map nat
1259
                                                                       (pair nat
1260
                                                                             (map string
1261
                                                                                  bytes)))))))))))
1262
                  (pair bool
1263
                        (pair address
1264
                              (pair (big_map (pair address nat) nat)
1265
                                    (pair (big_map string bytes)
1266
                                          (pair nat
1267
                                                (pair
1268
                                                  (big_map
1269
                                                    (pair address (pair address nat))
1270
                                                    unit)
1271
                                                  (pair bool
1272
                                                        (pair (big_map nat nat)
1273
                                                              (big_map nat
1274
                                                                       (pair nat
1275
                                                                             (map string
1276
                                                                                  bytes))))))))))))
1277
                (pair address nat))
1278
              (pair address
1279
                    (pair (big_map (pair address nat) nat)
1280
                          (pair (big_map string bytes)
1281
                                (pair nat
1282
                                      (pair
1283
                                        (big_map (pair address (pair address nat)) unit)
1284
                                        (pair bool
1285
                                              (pair (big_map nat nat)
1286
                                                    (big_map nat
1287
                                                             (pair nat
1288
                                                                   (map string bytes)))))))))))
1289
            (pair nat
1290
                  (pair address
1291
                        (pair (big_map (pair address nat) nat)
1292
                              (pair (big_map string bytes)
1293
                                    (pair nat
1294
                                          (pair
1295
                                            (big_map (pair address (pair address nat))
1296
                                                     unit)
1297
                                            (pair bool
1298
                                                  (pair (big_map nat nat)
1299
                                                        (big_map nat
1300
                                                                 (pair nat
1301
                                                                       (map string bytes)))))))))))
1302
            { UNPAIR ;
1303
              UNPAIR ;
1304
              SWAP ;
1305
              DUP ;
1306
              CDR ;
1307
              DIG 2 ;
1308
              DIG 3 ;
1309
              DIG 2 ;
1310
              PAIR ;
1311
              EXEC ;
1312
              UNPAIR ;
1313
              SWAP ;
1314
              DUG 2 ;
1315
              IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
1316
              SWAP ;
1317
              DUP ;
1318
              GET 3 ;
1319
              DIG 2 ;
1320
              GET ;
1321
              IF_NONE { PUSH nat 0 } {} ;
1322
              PAIR } ;
1323
          SWAP ;
1324
          LAMBDA
1325
            (pair nat
1326
                  (pair address
1327
                        (pair (big_map (pair address nat) nat)
1328
                              (pair (big_map string bytes)
1329
                                    (pair nat
1330
                                          (pair
1331
                                            (big_map (pair address (pair address nat))
1332
                                                     unit)
1333
                                            (pair bool
1334
                                                  (pair (big_map nat nat)
1335
                                                        (big_map nat
1336
                                                                 (pair nat
1337
                                                                       (map string bytes)))))))))))
1338
            (pair bool
1339
                  (pair address
1340
                        (pair (big_map (pair address nat) nat)
1341
                              (pair (big_map string bytes)
1342
                                    (pair nat
1343
                                          (pair
1344
                                            (big_map (pair address (pair address nat))
1345
                                                     unit)
1346
                                            (pair bool
1347
                                                  (pair (big_map nat nat)
1348
                                                        (big_map nat
1349
                                                                 (pair nat
1350
                                                                       (map string bytes)))))))))))
1351
            { UNPAIR ; SWAP ; DUP ; GET 14 ; DIG 2 ; MEM ; PAIR } ;
1352
          SWAP ;
1353
          LAMBDA
1354
            (pair
1355
              (pair (pair address nat)
1356
                    (pair
1357
                      (lambda
1358
                        (pair nat
1359
                              (pair address
1360
                                    (pair (big_map (pair address nat) nat)
1361
                                          (pair (big_map string bytes)
1362
                                                (pair nat
1363
                                                      (pair
1364
                                                        (big_map
1365
                                                          (pair address
1366
                                                                (pair address nat))
1367
                                                          unit)
1368
                                                        (pair bool
1369
                                                              (pair (big_map nat nat)
1370
                                                                    (big_map nat
1371
                                                                             (pair nat
1372
                                                                                   (map
1373
                                                                                     string
1374
                                                                                     bytes)))))))))))
1375
                        (pair bool
1376
                              (pair address
1377
                                    (pair (big_map (pair address nat) nat)
1378
                                          (pair (big_map string bytes)
1379
                                                (pair nat
1380
                                                      (pair
1381
                                                        (big_map
1382
                                                          (pair address
1383
                                                                (pair address nat))
1384
                                                          unit)
1385
                                                        (pair bool
1386
                                                              (pair (big_map nat nat)
1387
                                                                    (big_map nat
1388
                                                                             (pair nat
1389
                                                                                   (map
1390
                                                                                     string
1391
                                                                                     bytes))))))))))))
1392
                      (lambda
1393
                        (pair
1394
                          (pair
1395
                            (lambda
1396
                              (pair nat
1397
                                    (pair address
1398
                                          (pair (big_map (pair address nat) nat)
1399
                                                (pair (big_map string bytes)
1400
                                                      (pair nat
1401
                                                            (pair
1402
                                                              (big_map
1403
                                                                (pair address
1404
                                                                      (pair address nat))
1405
                                                                unit)
1406
                                                              (pair bool
1407
                                                                    (pair
1408
                                                                      (big_map nat nat)
1409
                                                                      (big_map nat
1410
                                                                               (pair nat
1411
                                                                                     (map
1412
                                                                                       string
1413
                                                                                       bytes)))))))))))
1414
                              (pair bool
1415
                                    (pair address
1416
                                          (pair (big_map (pair address nat) nat)
1417
                                                (pair (big_map string bytes)
1418
                                                      (pair nat
1419
                                                            (pair
1420
                                                              (big_map
1421
                                                                (pair address
1422
                                                                      (pair address nat))
1423
                                                                unit)
1424
                                                              (pair bool
1425
                                                                    (pair
1426
                                                                      (big_map nat nat)
1427
                                                                      (big_map nat
1428
                                                                               (pair nat
1429
                                                                                     (map
1430
                                                                                       string
1431
                                                                                       bytes))))))))))))
1432
                            (pair address nat))
1433
                          (pair address
1434
                                (pair (big_map (pair address nat) nat)
1435
                                      (pair (big_map string bytes)
1436
                                            (pair nat
1437
                                                  (pair
1438
                                                    (big_map
1439
                                                      (pair address (pair address nat))
1440
                                                      unit)
1441
                                                    (pair bool
1442
                                                          (pair (big_map nat nat)
1443
                                                                (big_map nat
1444
                                                                         (pair nat
1445
                                                                               (map
1446
                                                                                 string
1447
                                                                                 bytes)))))))))))
1448
                        (pair nat
1449
                              (pair address
1450
                                    (pair (big_map (pair address nat) nat)
1451
                                          (pair (big_map string bytes)
1452
                                                (pair nat
1453
                                                      (pair
1454
                                                        (big_map
1455
                                                          (pair address
1456
                                                                (pair address nat))
1457
                                                          unit)
1458
                                                        (pair bool
1459
                                                              (pair (big_map nat nat)
1460
                                                                    (big_map nat
1461
                                                                             (pair nat
1462
                                                                                   (map
1463
                                                                                     string
1464
                                                                                     bytes))))))))))))))
1465
              (pair address
1466
                    (pair (big_map (pair address nat) nat)
1467
                          (pair (big_map string bytes)
1468
                                (pair nat
1469
                                      (pair
1470
                                        (big_map (pair address (pair address nat)) unit)
1471
                                        (pair bool
1472
                                              (pair (big_map nat nat)
1473
                                                    (big_map nat
1474
                                                             (pair nat
1475
                                                                   (map string bytes)))))))))))
1476
            (pair (pair (pair address nat) nat)
1477
                  (pair address
1478
                        (pair (big_map (pair address nat) nat)
1479
                              (pair (big_map string bytes)
1480
                                    (pair nat
1481
                                          (pair
1482
                                            (big_map (pair address (pair address nat))
1483
                                                     unit)
1484
                                            (pair bool
1485
                                                  (pair (big_map nat nat)
1486
                                                        (big_map nat
1487
                                                                 (pair nat
1488
                                                                       (map string bytes)))))))))))
1489
            { UNPAIR ;
1490
              UNPAIR 3 ;
1491
              DIG 2 ;
1492
              DUP 2 ;
1493
              DIG 3 ;
1494
              PAIR ;
1495
              SWAP ;
1496
              DIG 3 ;
1497
              DIG 2 ;
1498
              PAIR ;
1499
              EXEC ;
1500
              UNPAIR ;
1501
              SWAP ;
1502
              DUG 2 ;
1503
              SWAP ;
1504
              PAIR ;
1505
              PAIR } ;
1506
          DUP 2 ;
1507
          MAP { DUP 2 ; DUP 6 ; DUP 6 ; PAIR ; DIG 2 ; PAIR ; SWAP ; DIG 6 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; SWAP ; DUG 5 } ;
1508
          SWAP ;
1509
          DROP ;
1510
          SWAP ;
1511
          DROP ;
1512
          SWAP ;
1513
          DROP ;
1514
          SWAP ;
1515
          DROP ;
1516
          SWAP ;
1517
          DROP } }