BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Mainnet
  • /
  • Tether Token
FA2Ledger
operations (1.42M)Storage Code Interact Tokens Metadata Fork Statistics Details
Latest
​x
530
 
1
parameter (or
2
            (or
3
              (or
4
                (or (pair %add_token (nat %token_id) (map %token_info string bytes))
5
                    (list %burn (pair (address %owner)
6
                                     (pair (nat %token_id) (nat %token_amount)))))
7
                (or (list %freeze (pair (address %address) (nat %token_id)))
8
                    (list %mint (pair (address %owner)
9
                                     (pair (nat %token_id) (nat %token_amount))))))
10
              (or
11
                (or
12
                  (list %revoke (pair (address %owner)
13
                                     (pair (nat %token_id) (nat %token_amount))))
14
                  (list %transfer (pair (address %from_)
15
                                       (list %txs (pair (address %to_)
16
                                                       (pair (nat %token_id)
17
                                                             (nat %amount)))))))
18
                (or
19
                  (list %transfer_frozen_assets (pair (address %from_)
20
                                                     (list %txs (pair (address %to_)
21
                                                                     (pair
22
                                                                       (nat %token_id)
23
                                                                       (nat %amount))))))
24
                  (list %unfreeze (pair (address %address) (nat %token_id))))))
25
            (or
26
              (or
27
                (pair %balance_of
28
                  (list %requests (pair (address %owner) (nat %token_id)))
29
                  (contract %callback (list (pair
30
                                            (pair %request (address %owner)
31
                                                           (nat %token_id))
32
                                            (nat %balance)))))
33
                (or (lambda %execute unit (list operation))
34
                    (address %propose_administrator)))
35
              (or (or (address %remove_administrator) (unit %set_administrator))
36
                  (or
37
                    (pair %update_entrypoints
38
                      (or %entrypoint
39
                        (or (or (unit %add_token) (unit %burn))
40
                            (or (unit %freeze) (unit %mint)))
41
                        (or (or (unit %revoke) (unit %transfer))
42
                            (or (unit %transfer_frozen_assets) (unit %unfreeze))))
43
                      (lambda %new_lambda
44
                        (pair
45
                          (or
46
                            (or
47
                              (or
48
                                (pair %add_token (nat %token_id)
49
                                                 (map %token_info string bytes))
50
                                (list %burn (pair (address %owner)
51
                                                 (pair (nat %token_id)
52
                                                       (nat %token_amount)))))
53
                              (or
54
                                (list %freeze (pair (address %address) (nat %token_id)))
55
                                (list %mint (pair (address %owner)
56
                                                 (pair (nat %token_id)
57
                                                       (nat %token_amount))))))
58
                            (or
59
                              (or
60
                                (list %revoke (pair (address %owner)
61
                                                   (pair (nat %token_id)
62
                                                         (nat %token_amount))))
63
                                (list %transfer (pair (address %from_)
64
                                                     (list %txs (pair (address %to_)
65
                                                                     (pair
66
                                                                       (nat %token_id)
67
                                                                       (nat %amount)))))))
68
                              (or
69
                                (list %transfer_frozen_assets (pair (address %from_)
70
                                                                   (list %txs (pair
71
                                                                               (address %to_)
72
                                                                               (pair
73
                                                                                 (nat %token_id)
74
                                                                                 (nat %amount))))))
75
                                (list %unfreeze (pair (address %address) (nat %token_id))))))
76
                          (pair
77
                            (pair (big_map %administrators address nat)
78
                                  (pair
79
                                    (big_map %frozen_accounts
80
                                      (pair (address %address) (nat %token_id))
81
                                      unit)
82
                                    (big_map %ledger
83
                                      (pair (address %owner) (nat %token_id))
84
                                      nat)))
85
                            (pair
86
                              (pair (big_map %metadata string bytes)
87
                                    (big_map %operators
88
                                      (pair (address %owner)
89
                                            (pair (address %operator) (nat %token_id)))
90
                                      unit))
91
                              (pair
92
                                (big_map %token_metadata nat
93
                                                         (pair (nat %token_id)
94
                                                               (map %token_info string
95
                                                                                bytes)))
96
                                (big_map %total_supply nat nat)))))
97
                        (pair (list operation)
98
                              (pair
99
                                (pair (big_map %administrators address nat)
100
                                      (pair
101
                                        (big_map %frozen_accounts
102
                                          (pair (address %address) (nat %token_id))
103
                                          unit)
104
                                        (big_map %ledger
105
                                          (pair (address %owner) (nat %token_id))
106
                                          nat)))
107
                                (pair
108
                                  (pair (big_map %metadata string bytes)
109
                                        (big_map %operators
110
                                          (pair (address %owner)
111
                                                (pair (address %operator)
112
                                                      (nat %token_id)))
113
                                          unit))
114
                                  (pair
115
                                    (big_map %token_metadata nat
116
                                                             (pair (nat %token_id)
117
                                                                   (map %token_info
118
                                                                     string
119
                                                                     bytes)))
120
                                    (big_map %total_supply nat nat)))))))
121
                    (list %update_operators (or
122
                                             (pair %add_operator (address %owner)
123
                                                                 (pair
124
                                                                   (address %operator)
125
                                                                   (nat %token_id)))
126
                                             (pair %remove_operator (address %owner)
127
                                                                    (pair
128
                                                                      (address %operator)
129
                                                                      (nat %token_id)))))))));
130
storage (pair
131
          (pair
132
            (pair (big_map %administrators address nat)
133
                  (pair
134
                    (big_map %frozen_accounts (pair (address %address) (nat %token_id))
135
                                              unit)
136
                    (big_map %ledger (pair (address %owner) (nat %token_id)) nat)))
137
            (pair
138
              (pair (big_map %metadata string bytes)
139
                    (big_map %operators
140
                      (pair (address %owner) (pair (address %operator) (nat %token_id)))
141
                      unit))
142
              (pair
143
                (big_map %token_metadata nat
144
                                         (pair (nat %token_id)
145
                                               (map %token_info string bytes)))
146
                (big_map %total_supply nat nat))))
147
          (big_map nat
148
                   (lambda
149
                     (pair
150
                       (or
151
                         (or
152
                           (or (pair nat (map string bytes))
153
                               (list (pair address (pair nat nat))))
154
                           (or (list (pair address nat))
155
                               (list (pair address (pair nat nat)))))
156
                         (or
157
                           (or (list (pair address (pair nat nat)))
158
                               (list (pair address (list (pair address (pair nat nat))))))
159
                           (or
160
                             (list (pair address (list (pair address (pair nat nat)))))
161
                             (list (pair address nat)))))
162
                       (pair
163
                         (pair (big_map address nat)
164
                               (pair (big_map (pair address nat) unit)
165
                                     (big_map (pair address nat) nat)))
166
                         (pair
167
                           (pair (big_map string bytes)
168
                                 (big_map (pair address (pair address nat)) unit))
169
                           (pair (big_map nat (pair nat (map string bytes)))
170
                                 (big_map nat nat)))))
171
                     (pair (list operation)
172
                           (pair
173
                             (pair (big_map address nat)
174
                                   (pair (big_map (pair address nat) unit)
175
                                         (big_map (pair address nat) nat)))
176
                             (pair
177
                               (pair (big_map string bytes)
178
                                     (big_map (pair address (pair address nat)) unit))
179
                               (pair (big_map nat (pair nat (map string bytes)))
180
                                     (big_map nat nat))))))));
181
code { CAST (pair
182
              (or
183
                (or
184
                  (or
185
                    (or (pair nat (map string bytes))
186
                        (list (pair address (pair nat nat))))
187
                    (or (list (pair address nat)) (list (pair address (pair nat nat)))))
188
                  (or
189
                    (or (list (pair address (pair nat nat)))
190
                        (list (pair address (list (pair address (pair nat nat))))))
191
                    (or (list (pair address (list (pair address (pair nat nat)))))
192
                        (list (pair address nat)))))
193
                (or
194
                  (or
195
                    (pair (list (pair address nat))
196
                          (contract (list (pair (pair address nat) nat))))
197
                    (or (lambda unit (list operation)) address))
198
                  (or (or address unit)
199
                      (or
200
                        (pair
201
                          (or (or (or unit unit) (or unit unit))
202
                              (or (or unit unit) (or unit unit)))
203
                          (lambda
204
                            (pair
205
                              (or
206
                                (or
207
                                  (or (pair nat (map string bytes))
208
                                      (list (pair address (pair nat nat))))
209
                                  (or (list (pair address nat))
210
                                      (list (pair address (pair nat nat)))))
211
                                (or
212
                                  (or (list (pair address (pair nat nat)))
213
                                      (list (pair address
214
                                                 (list (pair address (pair nat nat))))))
215
                                  (or
216
                                    (list (pair address
217
                                               (list (pair address (pair nat nat)))))
218
                                    (list (pair address nat)))))
219
                              (pair
220
                                (pair (big_map address nat)
221
                                      (pair (big_map (pair address nat) unit)
222
                                            (big_map (pair address nat) nat)))
223
                                (pair
224
                                  (pair (big_map string bytes)
225
                                        (big_map (pair address (pair address nat)) unit))
226
                                  (pair (big_map nat (pair nat (map string bytes)))
227
                                        (big_map nat nat)))))
228
                            (pair (list operation)
229
                                  (pair
230
                                    (pair (big_map address nat)
231
                                          (pair (big_map (pair address nat) unit)
232
                                                (big_map (pair address nat) nat)))
233
                                    (pair
234
                                      (pair (big_map string bytes)
235
                                            (big_map (pair address (pair address nat))
236
                                                     unit))
237
                                      (pair (big_map nat (pair nat (map string bytes)))
238
                                            (big_map nat nat)))))))
239
                        (list (or (pair address (pair address nat))
240
                                 (pair address (pair address nat))))))))
241
              (pair
242
                (pair
243
                  (pair (big_map address nat)
244
                        (pair (big_map (pair address nat) unit)
245
                              (big_map (pair address nat) nat)))
246
                  (pair
247
                    (pair (big_map string bytes)
248
                          (big_map (pair address (pair address nat)) unit))
249
                    (pair (big_map nat (pair nat (map string bytes))) (big_map nat nat))))
250
                (big_map nat
251
                         (lambda
252
                           (pair
253
                             (or
254
                               (or
255
                                 (or (pair nat (map string bytes))
256
                                     (list (pair address (pair nat nat))))
257
                                 (or (list (pair address nat))
258
                                     (list (pair address (pair nat nat)))))
259
                               (or
260
                                 (or (list (pair address (pair nat nat)))
261
                                     (list (pair address
262
                                                (list (pair address (pair nat nat))))))
263
                                 (or
264
                                   (list (pair address
265
                                              (list (pair address (pair nat nat)))))
266
                                   (list (pair address nat)))))
267
                             (pair
268
                               (pair (big_map address nat)
269
                                     (pair (big_map (pair address nat) unit)
270
                                           (big_map (pair address nat) nat)))
271
                               (pair
272
                                 (pair (big_map string bytes)
273
                                       (big_map (pair address (pair address nat)) unit))
274
                                 (pair (big_map nat (pair nat (map string bytes)))
275
                                       (big_map nat nat)))))
276
                           (pair (list operation)
277
                                 (pair
278
                                   (pair (big_map address nat)
279
                                         (pair (big_map (pair address nat) unit)
280
                                               (big_map (pair address nat) nat)))
281
                                   (pair
282
                                     (pair (big_map string bytes)
283
                                           (big_map (pair address (pair address nat))
284
                                                    unit))
285
                                     (pair (big_map nat (pair nat (map string bytes)))
286
                                           (big_map nat nat))))))))) ;
287
       UNPAIR 3 ;
288
       IF_LEFT
289
         { DUP ;
290
           IF_LEFT
291
             { IF_LEFT
292
                 { IF_LEFT { DROP ; PUSH nat 0 } { DROP ; PUSH nat 1 } }
293
                 { IF_LEFT { DROP ; PUSH nat 2 } { DROP ; PUSH nat 3 } } }
294
             { IF_LEFT
295
                 { IF_LEFT { DROP ; PUSH nat 4 } { DROP ; PUSH nat 5 } }
296
                 { IF_LEFT { DROP ; PUSH nat 6 } { DROP ; PUSH nat 7 } } } ;
297
           DUP 4 ;
298
           SWAP ;
299
           GET ;
300
           IF_NONE { PUSH int -1 ; FAILWITH } {} ;
301
           DUG 2 ;
302
           PAIR ;
303
           EXEC ;
304
           UNPAIR }
305
         { IF_LEFT
306
             { IF_LEFT
307
                 { NIL (pair (pair address nat) nat) ;
308
                   SWAP ;
309
                   DUP ;
310
                   DUG 2 ;
311
                   CAR ;
312
                   ITER { DUP 4 ;
313
                          GET 5 ;
314
                          SWAP ;
315
                          DUP ;
316
                          DUG 2 ;
317
                          CDR ;
318
                          MEM ;
319
                          IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
320
                          SWAP ;
321
                          DUP 4 ;
322
                          CAR ;
323
                          GET 4 ;
324
                          DUP 3 ;
325
                          GET ;
326
                          IF_NONE { PUSH nat 0 } {} ;
327
                          DIG 2 ;
328
                          PAIR ;
329
                          CONS } ;
330
                   NIL operation ;
331
                   DIG 2 ;
332
                   CDR ;
333
                   PUSH mutez 0 ;
334
                   DIG 3 ;
335
                   TRANSFER_TOKENS ;
336
                   CONS }
337
                 { IF_LEFT
338
                     { PUSH nat 1 ;
339
                       DUP 3 ;
340
                       CAR ;
341
                       CAR ;
342
                       SENDER ;
343
                       GET ;
344
                       IF_NONE { PUSH int 29 ; FAILWITH } {} ;
345
                       COMPARE ;
346
                       EQ ;
347
                       IF {} { PUSH string "ADMIN_FA2_NOT_ADMIN" ; FAILWITH } ;
348
                       NIL operation ;
349
                       SWAP ;
350
                       UNIT ;
351
                       EXEC ;
352
                       NIL operation ;
353
                       SWAP ;
354
                       ITER { CONS } ;
355
                       ITER { CONS } }
356
                     { PUSH nat 1 ;
357
                       DUP 3 ;
358
                       CAR ;
359
                       CAR ;
360
                       SENDER ;
361
                       GET ;
362
                       IF_NONE { PUSH int 29 ; FAILWITH } {} ;
363
                       COMPARE ;
364
                       EQ ;
365
                       IF {} { PUSH string "ADMIN_FA2_NOT_ADMIN" ; FAILWITH } ;
366
                       SWAP ;
367
                       UNPAIR ;
368
                       UNPAIR ;
369
                       PUSH (option nat) (Some 0) ;
370
                       DIG 4 ;
371
                       UPDATE ;
372
                       PAIR ;
373
                       PAIR ;
374
                       NIL operation } } }
375
             { IF_LEFT
376
                 { IF_LEFT
377
                     { PUSH nat 1 ;
378
                       DUP 3 ;
379
                       CAR ;
380
                       CAR ;
381
                       SENDER ;
382
                       GET ;
383
                       IF_NONE { PUSH int 29 ; FAILWITH } {} ;
384
                       COMPARE ;
385
                       EQ ;
386
                       IF {} { PUSH string "ADMIN_FA2_NOT_ADMIN" ; FAILWITH } ;
387
                       SWAP ;
388
                       UNPAIR ;
389
                       UNPAIR ;
390
                       NONE nat ;
391
                       DIG 4 ;
392
                       UPDATE ;
393
                       PAIR ;
394
                       PAIR }
395
                     { DROP ;
396
                       DUP ;
397
                       CAR ;
398
                       CAR ;
399
                       PUSH nat 0 ;
400
                       SWAP ;
401
                       SENDER ;
402
                       GET ;
403
                       IF_NONE { PUSH int 51 ; FAILWITH } {} ;
404
                       COMPARE ;
405
                       EQ ;
406
                       IF {} { PUSH string "ADMIN_FA2_NOT_PROPOSED_ADMIN" ; FAILWITH } ;
407
                       UNPAIR ;
408
                       UNPAIR ;
409
                       PUSH (option nat) (Some 1) ;
410
                       SENDER ;
411
                       UPDATE ;
412
                       PAIR ;
413
                       PAIR } }
414
                 { IF_LEFT
415
                     { PUSH nat 1 ;
416
                       DUP 3 ;
417
                       CAR ;
418
                       CAR ;
419
                       SENDER ;
420
                       GET ;
421
                       IF_NONE { PUSH int 29 ; FAILWITH } {} ;
422
                       COMPARE ;
423
                       EQ ;
424
                       IF {} { PUSH string "ADMIN_FA2_NOT_ADMIN" ; FAILWITH } ;
425
                       DUP ;
426
                       CAR ;
427
                       IF_LEFT
428
                         { IF_LEFT
429
                             { IF_LEFT
430
                                 { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 0 ; UPDATE ; SWAP }
431
                                 { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 1 ; UPDATE ; SWAP } }
432
                             { IF_LEFT
433
                                 { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 2 ; UPDATE ; SWAP }
434
                                 { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 3 ; UPDATE ; SWAP } } }
435
                         { IF_LEFT
436
                             { IF_LEFT
437
                                 { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 4 ; UPDATE ; SWAP }
438
                                 { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 5 ; UPDATE ; SWAP } }
439
                             { IF_LEFT
440
                                 { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 6 ; UPDATE ; SWAP }
441
                                 { DROP ; DIG 2 ; SWAP ; CDR ; SOME ; PUSH nat 7 ; UPDATE ; SWAP } } } }
442
                     { DUP ;
443
                       ITER { IF_LEFT
444
                                { DUP 3 ;
445
                                  GET 5 ;
446
                                  SWAP ;
447
                                  DUP ;
448
                                  DUG 2 ;
449
                                  GET 4 ;
450
                                  MEM ;
451
                                  IF
452
                                    {}
453
                                    { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
454
                                  DUP ;
455
                                  CAR ;
456
                                  SENDER ;
457
                                  COMPARE ;
458
                                  EQ ;
459
                                  IF {} { PUSH string "FA2_NOT_OWNER" ; FAILWITH } ;
460
                                  DIG 2 ;
461
                                  UNPAIR ;
462
                                  SWAP ;
463
                                  UNPAIR ;
464
                                  UNPAIR ;
465
                                  SWAP ;
466
                                  PUSH (option unit) (Some Unit) ;
467
                                  DIG 5 ;
468
                                  DUP ;
469
                                  GET 4 ;
470
                                  SWAP ;
471
                                  DUP ;
472
                                  GET 3 ;
473
                                  SWAP ;
474
                                  CAR ;
475
                                  PAIR 3 ;
476
                                  UPDATE ;
477
                                  SWAP ;
478
                                  PAIR ;
479
                                  PAIR ;
480
                                  SWAP ;
481
                                  PAIR ;
482
                                  SWAP }
483
                                { DUP 3 ;
484
                                  GET 5 ;
485
                                  SWAP ;
486
                                  DUP ;
487
                                  DUG 2 ;
488
                                  GET 4 ;
489
                                  MEM ;
490
                                  IF
491
                                    {}
492
                                    { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ;
493
                                  DUP ;
494
                                  CAR ;
495
                                  SENDER ;
496
                                  COMPARE ;
497
                                  EQ ;
498
                                  IF {} { PUSH string "FA2_NOT_OWNER" ; FAILWITH } ;
499
                                  DIG 2 ;
500
                                  UNPAIR ;
501
                                  SWAP ;
502
                                  UNPAIR ;
503
                                  UNPAIR ;
504
                                  SWAP ;
505
                                  NONE unit ;
506
                                  DIG 5 ;
507
                                  DUP ;
508
                                  GET 4 ;
509
                                  SWAP ;
510
                                  DUP ;
511
                                  GET 3 ;
512
                                  SWAP ;
513
                                  CAR ;
514
                                  PAIR 3 ;
515
                                  UPDATE ;
516
                                  SWAP ;
517
                                  PAIR ;
518
                                  PAIR ;
519
                                  SWAP ;
520
                                  PAIR ;
521
                                  SWAP } } ;
522
                       DROP } } ;
523
               NIL operation } } ;
524
       NIL operation ;
525
       SWAP ;
526
       ITER { CONS } ;
527
       DUG 2 ;
528
       PAIR ;
529
       SWAP ;
530
       PAIR }