BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Mainnet
  • /
  • TezID Controller
Delegatable
operations (1.98K)Storage Code Interact Tokens Metadata Fork Statistics Details
Latest
​x
574
 
1
parameter (or
2
            (or (or (unit %default) (or (unit %enableKYC) (string %enableKYCPlatform)))
3
                (or (or (string %registerProof) (address %removeIdentity))
4
                    (or (pair %removeProof (address %address) (string %prooftype))
5
                        (pair %send (mutez %amount) (address %receiverAddress)))))
6
            (or
7
              (or (address %setAdmin) (or (option %setBaker key_hash) (mutez %setCost)))
8
              (or
9
                (or (set %setKycPlatforms string)
10
                    (pair %setProofMeta (pair (address %address) (string %key))
11
                                        (pair (string %prooftype) (string %value))))
12
                (or (address %setStore)
13
                    (pair %verifyProof (address %address) (string %prooftype))))));
14
storage (pair (pair (address %admin) (mutez %cost))
15
              (pair (address %idstore)
16
                    (pair (set %kycPlatforms string) (big_map %metadata string bytes))));
17
code { LAMBDA
18
         (pair unit
19
               (pair (pair address mutez)
20
                     (pair address (pair (set string) (big_map string bytes)))))
21
         (pair unit
22
               (pair (pair address mutez)
23
                     (pair address (pair (set string) (big_map string bytes)))))
24
         { CDR ;
25
           DUP ;
26
           CAR ;
27
           CAR ;
28
           SENDER ;
29
           COMPARE ;
30
           EQ ;
31
           IF {} { PUSH string "Only admin can call this entrypoint" ; FAILWITH } ;
32
           UNIT ;
33
           PAIR } ;
34
       SWAP ;
35
       UNPAIR ;
36
       IF_LEFT
37
         { IF_LEFT
38
             { IF_LEFT
39
                 { DROP ; SWAP ; DROP ; NIL operation }
40
                 { IF_LEFT
41
                     { SWAP ;
42
                       DUP ;
43
                       DUG 2 ;
44
                       GET 3 ;
45
                       SENDER ;
46
                       VIEW "getProofsForAddress"
47
                             (map string
48
                                  (pair (map %meta string string)
49
                                        (pair (timestamp %register_date)
50
                                              (bool %verified)))) ;
51
                       IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
52
                       PUSH string "gov" ;
53
                       MEM ;
54
                       IF
55
                         {}
56
                         { PUSH string "Missing required proof for this entrypoint" ;
57
                           FAILWITH } ;
58
                       PUSH bool False ;
59
                       NOW ;
60
                       EMPTY_MAP string string ;
61
                       PAIR 3 ;
62
                       DUP 3 ;
63
                       GET 3 ;
64
                       SENDER ;
65
                       VIEW "getProofsForAddress"
66
                             (map string
67
                                  (pair (map %meta string string)
68
                                        (pair (timestamp %register_date)
69
                                              (bool %verified)))) ;
70
                       IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
71
                       PUSH string "gov" ;
72
                       MEM ;
73
                       IF
74
                         { DROP 2 ;
75
                           SWAP ;
76
                           DROP ;
77
                           DUP ;
78
                           GET 3 ;
79
                           SENDER ;
80
                           VIEW "getProofsForAddress"
81
                                 (map string
82
                                      (pair (map %meta string string)
83
                                            (pair (timestamp %register_date)
84
                                                  (bool %verified)))) ;
85
                           IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
86
                           PUSH string "gov" ;
87
                           GET ;
88
                           IF_NONE { PUSH int 47 ; FAILWITH } {} }
89
                         { SWAP ; DROP ; DIG 2 ; DROP } ;
90
                       DUP ;
91
                       CAR ;
92
                       PUSH (option string) (Some "true") ;
93
                       PUSH string "kyc" ;
94
                       UPDATE ;
95
                       UPDATE 1 ;
96
                       PUSH bool False ;
97
                       UPDATE 4 ;
98
                       NIL operation ;
99
                       DUP 3 ;
100
                       GET 3 ;
101
                       CONTRACT %setProof (pair (address %address)
102
                                                (pair
103
                                                  (pair %proof (map %meta string string)
104
                                                               (pair
105
                                                                 (timestamp %register_date)
106
                                                                 (bool %verified)))
107
                                                  (string %prooftype))) ;
108
                       IF_NONE { PUSH int 111 ; FAILWITH } {} ;
109
                       PUSH mutez 0 ;
110
                       PUSH string "gov" ;
111
                       DIG 4 ;
112
                       SENDER ;
113
                       PAIR 3 ;
114
                       TRANSFER_TOKENS ;
115
                       CONS }
116
                     { SWAP ;
117
                       DUP ;
118
                       DUG 2 ;
119
                       GET 5 ;
120
                       SWAP ;
121
                       DUP ;
122
                       DUG 2 ;
123
                       MEM ;
124
                       IF {} { PUSH string "KYC platform not supported" ; FAILWITH } ;
125
                       SWAP ;
126
                       DUP ;
127
                       DUG 2 ;
128
                       GET 3 ;
129
                       SENDER ;
130
                       VIEW "getProofsForAddress"
131
                             (map string
132
                                  (pair (map %meta string string)
133
                                        (pair (timestamp %register_date)
134
                                              (bool %verified)))) ;
135
                       IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
136
                       PUSH string "gov" ;
137
                       MEM ;
138
                       IF
139
                         {}
140
                         { PUSH string "Missing required proof for this entrypoint" ;
141
                           FAILWITH } ;
142
                       PUSH bool False ;
143
                       NOW ;
144
                       EMPTY_MAP string string ;
145
                       PAIR 3 ;
146
                       DUP 3 ;
147
                       GET 3 ;
148
                       SENDER ;
149
                       VIEW "getProofsForAddress"
150
                             (map string
151
                                  (pair (map %meta string string)
152
                                        (pair (timestamp %register_date)
153
                                              (bool %verified)))) ;
154
                       IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
155
                       PUSH string "gov" ;
156
                       MEM ;
157
                       IF
158
                         { DROP ;
159
                           DIG 2 ;
160
                           DROP ;
161
                           SWAP ;
162
                           DUP ;
163
                           DUG 2 ;
164
                           GET 3 ;
165
                           SENDER ;
166
                           VIEW "getProofsForAddress"
167
                                 (map string
168
                                      (pair (map %meta string string)
169
                                            (pair (timestamp %register_date)
170
                                                  (bool %verified)))) ;
171
                           IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
172
                           PUSH string "gov" ;
173
                           GET ;
174
                           IF_NONE { PUSH int 47 ; FAILWITH } {} }
175
                         { DIG 3 ; DROP } ;
176
                       DUP ;
177
                       CAR ;
178
                       PUSH (option string) (Some "true") ;
179
                       DIG 3 ;
180
                       UPDATE ;
181
                       UPDATE 1 ;
182
                       NIL operation ;
183
                       DUP 3 ;
184
                       GET 3 ;
185
                       CONTRACT %setProof (pair (address %address)
186
                                                (pair
187
                                                  (pair %proof (map %meta string string)
188
                                                               (pair
189
                                                                 (timestamp %register_date)
190
                                                                 (bool %verified)))
191
                                                  (string %prooftype))) ;
192
                       IF_NONE { PUSH int 121 ; FAILWITH } {} ;
193
                       PUSH mutez 0 ;
194
                       PUSH string "gov" ;
195
                       DIG 4 ;
196
                       SENDER ;
197
                       PAIR 3 ;
198
                       TRANSFER_TOKENS ;
199
                       CONS } } }
200
             { IF_LEFT
201
                 { IF_LEFT
202
                     { SWAP ;
203
                       DUP ;
204
                       DUG 2 ;
205
                       CAR ;
206
                       CDR ;
207
                       AMOUNT ;
208
                       COMPARE ;
209
                       LT ;
210
                       IF { PUSH string "Amount too low" ; FAILWITH } {} ;
211
                       PUSH bool False ;
212
                       NOW ;
213
                       EMPTY_MAP string string ;
214
                       PAIR 3 ;
215
                       DUP 3 ;
216
                       GET 3 ;
217
                       SENDER ;
218
                       VIEW "getProofsForAddress"
219
                             (map string
220
                                  (pair (map %meta string string)
221
                                        (pair (timestamp %register_date)
222
                                              (bool %verified)))) ;
223
                       IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
224
                       DUP 3 ;
225
                       MEM ;
226
                       IF
227
                         { DROP ;
228
                           DIG 2 ;
229
                           DROP ;
230
                           SWAP ;
231
                           DUP ;
232
                           DUG 2 ;
233
                           GET 3 ;
234
                           SENDER ;
235
                           VIEW "getProofsForAddress"
236
                                 (map string
237
                                      (pair (map %meta string string)
238
                                            (pair (timestamp %register_date)
239
                                                  (bool %verified)))) ;
240
                           IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
241
                           SWAP ;
242
                           DUP ;
243
                           DUG 2 ;
244
                           GET ;
245
                           IF_NONE { PUSH int 47 ; FAILWITH } {} }
246
                         { DIG 3 ; DROP } ;
247
                       PUSH bool False ;
248
                       UPDATE 4 ;
249
                       NOW ;
250
                       UPDATE 3 ;
251
                       NIL operation ;
252
                       DUP 4 ;
253
                       GET 3 ;
254
                       CONTRACT %setProof (pair (address %address)
255
                                                (pair
256
                                                  (pair %proof (map %meta string string)
257
                                                               (pair
258
                                                                 (timestamp %register_date)
259
                                                                 (bool %verified)))
260
                                                  (string %prooftype))) ;
261
                       IF_NONE { PUSH int 101 ; FAILWITH } {} ;
262
                       PUSH mutez 0 ;
263
                       DIG 4 ;
264
                       DIG 4 ;
265
                       SENDER ;
266
                       PAIR 3 ;
267
                       TRANSFER_TOKENS ;
268
                       CONS }
269
                     { DIG 2 ;
270
                       UNIT ;
271
                       SWAP ;
272
                       DIG 3 ;
273
                       DIG 2 ;
274
                       PAIR ;
275
                       EXEC ;
276
                       CDR ;
277
                       SWAP ;
278
                       NIL operation ;
279
                       DUP 3 ;
280
                       GET 3 ;
281
                       CONTRACT %removeIdentity address ;
282
                       IF_NONE { PUSH int 156 ; FAILWITH } {} ;
283
                       PUSH mutez 0 ;
284
                       DIG 3 ;
285
                       TRANSFER_TOKENS ;
286
                       CONS } }
287
                 { IF_LEFT
288
                     { DIG 2 ;
289
                       UNIT ;
290
                       SWAP ;
291
                       DIG 3 ;
292
                       DIG 2 ;
293
                       PAIR ;
294
                       EXEC ;
295
                       CDR ;
296
                       SWAP ;
297
                       NIL operation ;
298
                       DUP 3 ;
299
                       GET 3 ;
300
                       CONTRACT %delProof (pair (address %address) (string %prooftype)) ;
301
                       IF_NONE { PUSH int 150 ; FAILWITH } {} ;
302
                       PUSH mutez 0 ;
303
                       DIG 3 ;
304
                       TRANSFER_TOKENS ;
305
                       CONS }
306
                     { DIG 2 ;
307
                       UNIT ;
308
                       SWAP ;
309
                       DIG 3 ;
310
                       DIG 2 ;
311
                       PAIR ;
312
                       EXEC ;
313
                       CDR ;
314
                       SWAP ;
315
                       DUP ;
316
                       CDR ;
317
                       CONTRACT unit ;
318
                       IF_NONE { PUSH int 78 ; FAILWITH } {} ;
319
                       NIL operation ;
320
                       SWAP ;
321
                       DIG 2 ;
322
                       CAR ;
323
                       UNIT ;
324
                       TRANSFER_TOKENS ;
325
                       CONS } } } }
326
         { IF_LEFT
327
             { IF_LEFT
328
                 { DIG 2 ;
329
                   UNIT ;
330
                   SWAP ;
331
                   DIG 3 ;
332
                   DIG 2 ;
333
                   PAIR ;
334
                   EXEC ;
335
                   CDR ;
336
                   UNPAIR ;
337
                   CDR ;
338
                   DIG 2 ;
339
                   PAIR ;
340
                   PAIR ;
341
                   NIL operation }
342
                 { IF_LEFT
343
                     { DIG 2 ;
344
                       UNIT ;
345
                       SWAP ;
346
                       DIG 3 ;
347
                       DIG 2 ;
348
                       PAIR ;
349
                       EXEC ;
350
                       CDR ;
351
                       SWAP ;
352
                       SET_DELEGATE ;
353
                       NIL operation ;
354
                       SWAP ;
355
                       CONS }
356
                     { DIG 2 ;
357
                       UNIT ;
358
                       SWAP ;
359
                       DIG 3 ;
360
                       DIG 2 ;
361
                       PAIR ;
362
                       EXEC ;
363
                       CDR ;
364
                       UNPAIR ;
365
                       CAR ;
366
                       DIG 2 ;
367
                       SWAP ;
368
                       PAIR ;
369
                       PAIR ;
370
                       NIL operation } } }
371
             { IF_LEFT
372
                 { IF_LEFT
373
                     { DIG 2 ; UNIT ; SWAP ; DIG 3 ; DIG 2 ; PAIR ; EXEC ; CDR ; SWAP ; UPDATE 5 ; NIL operation }
374
                     { DUP 3 ;
375
                       UNIT ;
376
                       SWAP ;
377
                       DIG 3 ;
378
                       DIG 2 ;
379
                       PAIR ;
380
                       EXEC ;
381
                       UNPAIR ;
382
                       DIG 3 ;
383
                       DIG 2 ;
384
                       DIG 3 ;
385
                       DIG 3 ;
386
                       DUP 3 ;
387
                       GET 3 ;
388
                       DUP 3 ;
389
                       CAR ;
390
                       CAR ;
391
                       VIEW "getProofsForAddress"
392
                             (map string
393
                                  (pair (map %meta string string)
394
                                        (pair (timestamp %register_date)
395
                                              (bool %verified)))) ;
396
                       IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
397
                       DUP 3 ;
398
                       GET 3 ;
399
                       MEM ;
400
                       IF
401
                         {}
402
                         { PUSH string "Missing required proof for this entrypoint" ;
403
                           FAILWITH } ;
404
                       PUSH bool False ;
405
                       NOW ;
406
                       EMPTY_MAP string string ;
407
                       PAIR 3 ;
408
                       DUP 4 ;
409
                       GET 3 ;
410
                       DUP 4 ;
411
                       CAR ;
412
                       CAR ;
413
                       VIEW "getProofsForAddress"
414
                             (map string
415
                                  (pair (map %meta string string)
416
                                        (pair (timestamp %register_date)
417
                                              (bool %verified)))) ;
418
                       IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
419
                       DUP 4 ;
420
                       GET 3 ;
421
                       MEM ;
422
                       IF
423
                         { DROP 2 ;
424
                           DIG 2 ;
425
                           DROP ;
426
                           SWAP ;
427
                           DUP ;
428
                           DUG 2 ;
429
                           GET 3 ;
430
                           SWAP ;
431
                           DUP ;
432
                           DUG 2 ;
433
                           CAR ;
434
                           CAR ;
435
                           VIEW "getProofsForAddress"
436
                                 (map string
437
                                      (pair (map %meta string string)
438
                                            (pair (timestamp %register_date)
439
                                                  (bool %verified)))) ;
440
                           IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
441
                           SWAP ;
442
                           DUP ;
443
                           DUG 2 ;
444
                           GET 3 ;
445
                           GET ;
446
                           IF_NONE { PUSH int 47 ; FAILWITH } {} }
447
                         { SWAP ; DROP ; DIG 3 ; DROP } ;
448
                       DUP ;
449
                       CAR ;
450
                       DUP 3 ;
451
                       GET 4 ;
452
                       SOME ;
453
                       DUP 4 ;
454
                       CAR ;
455
                       CDR ;
456
                       UPDATE ;
457
                       UPDATE 1 ;
458
                       NIL operation ;
459
                       DUP 4 ;
460
                       GET 3 ;
461
                       CONTRACT %setProof (pair (address %address)
462
                                                (pair
463
                                                  (pair %proof (map %meta string string)
464
                                                               (pair
465
                                                                 (timestamp %register_date)
466
                                                                 (bool %verified)))
467
                                                  (string %prooftype))) ;
468
                       IF_NONE { PUSH int 144 ; FAILWITH } {} ;
469
                       PUSH mutez 0 ;
470
                       DUP 5 ;
471
                       GET 3 ;
472
                       DIG 4 ;
473
                       DIG 5 ;
474
                       CAR ;
475
                       CAR ;
476
                       PAIR 3 ;
477
                       TRANSFER_TOKENS ;
478
                       CONS } }
479
                 { IF_LEFT
480
                     { DIG 2 ; UNIT ; SWAP ; DIG 3 ; DIG 2 ; PAIR ; EXEC ; CDR ; SWAP ; UPDATE 3 ; NIL operation }
481
                     { DUP 3 ;
482
                       UNIT ;
483
                       SWAP ;
484
                       DIG 3 ;
485
                       DIG 2 ;
486
                       PAIR ;
487
                       EXEC ;
488
                       UNPAIR ;
489
                       DIG 3 ;
490
                       DIG 2 ;
491
                       DIG 3 ;
492
                       DIG 3 ;
493
                       DUP 3 ;
494
                       GET 3 ;
495
                       DUP 3 ;
496
                       CAR ;
497
                       VIEW "getProofsForAddress"
498
                             (map string
499
                                  (pair (map %meta string string)
500
                                        (pair (timestamp %register_date)
501
                                              (bool %verified)))) ;
502
                       IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
503
                       DUP 3 ;
504
                       CDR ;
505
                       MEM ;
506
                       IF
507
                         {}
508
                         { PUSH string "Missing required proof for this entrypoint" ;
509
                           FAILWITH } ;
510
                       PUSH bool False ;
511
                       NOW ;
512
                       EMPTY_MAP string string ;
513
                       PAIR 3 ;
514
                       DUP 4 ;
515
                       GET 3 ;
516
                       DUP 4 ;
517
                       CAR ;
518
                       VIEW "getProofsForAddress"
519
                             (map string
520
                                  (pair (map %meta string string)
521
                                        (pair (timestamp %register_date)
522
                                              (bool %verified)))) ;
523
                       IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
524
                       DUP 4 ;
525
                       CDR ;
526
                       MEM ;
527
                       IF
528
                         { DROP 2 ;
529
                           DIG 2 ;
530
                           DROP ;
531
                           SWAP ;
532
                           DUP ;
533
                           DUG 2 ;
534
                           GET 3 ;
535
                           SWAP ;
536
                           DUP ;
537
                           DUG 2 ;
538
                           CAR ;
539
                           VIEW "getProofsForAddress"
540
                                 (map string
541
                                      (pair (map %meta string string)
542
                                            (pair (timestamp %register_date)
543
                                                  (bool %verified)))) ;
544
                           IF_NONE { PUSH string "Invalid view" ; FAILWITH } {} ;
545
                           SWAP ;
546
                           DUP ;
547
                           DUG 2 ;
548
                           CDR ;
549
                           GET ;
550
                           IF_NONE { PUSH int 47 ; FAILWITH } {} }
551
                         { SWAP ; DROP ; DIG 3 ; DROP } ;
552
                       PUSH bool True ;
553
                       UPDATE 4 ;
554
                       NIL operation ;
555
                       DUP 4 ;
556
                       GET 3 ;
557
                       CONTRACT %setProof (pair (address %address)
558
                                                (pair
559
                                                  (pair %proof (map %meta string string)
560
                                                               (pair
561
                                                                 (timestamp %register_date)
562
                                                                 (bool %verified)))
563
                                                  (string %prooftype))) ;
564
                       IF_NONE { PUSH int 134 ; FAILWITH } {} ;
565
                       PUSH mutez 0 ;
566
                       DUP 5 ;
567
                       CDR ;
568
                       DIG 4 ;
569
                       DIG 5 ;
570
                       CAR ;
571
                       PAIR 3 ;
572
                       TRANSFER_TOKENS ;
573
                       CONS } } } } ;
574
       PAIR }