BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Mainnet
  • /
  • TezID Store
Delegatable
operations (1.13K)Storage Code Interact Tokens Metadata Fork Views Statistics Details
Latest
​x
320
 
1
{ parameter (or
2
              (or (or (address %addAdmin) (unit %default))
3
                  (or (address %delAdmin)
4
                      (or (pair %delProof (address %address) (string %prooftype))
5
                          (pair %getProofs (address %address)
6
                                           (address %callback_address)))))
7
              (or
8
                (or (address %removeIdentity)
9
                    (or (pair %send (mutez %amount) (address %receiverAddress))
10
                        (option %setBaker key_hash)))
11
                (or
12
                  (pair %setProof (address %address)
13
                                  (pair
14
                                    (pair %proof (map %meta string string)
15
                                                 (pair (timestamp %register_date)
16
                                                       (bool %verified)))
17
                                    (string %prooftype)))
18
                  (or
19
                    (map %setProofs address
20
                                    (map string
21
                                         (pair (map %meta string string)
22
                                               (pair (timestamp %register_date)
23
                                                     (bool %verified)))))
24
                    (pair %triggerLambda
25
                      (lambda %logic
26
                        (pair (bytes %params)
27
                              (pair %storage (set %admins address)
28
                                             (pair
29
                                               (big_map %identities address
30
                                                                    (map string
31
                                                                         (pair
32
                                                                           (map %meta
33
                                                                             string
34
                                                                             string)
35
                                                                           (pair
36
                                                                             (timestamp %register_date)
37
                                                                             (bool %verified)))))
38
                                               (big_map %metadata string bytes))))
39
                        (pair (set %admins address)
40
                              (pair
41
                                (big_map %identities address
42
                                                     (map string
43
                                                          (pair
44
                                                            (map %meta string string)
45
                                                            (pair
46
                                                              (timestamp %register_date)
47
                                                              (bool %verified)))))
48
                                (big_map %metadata string bytes))))
49
                      (bytes %params)))))) ;
50
  storage (pair (set %admins address)
51
                (pair
52
                  (big_map %identities address
53
                                       (map string
54
                                            (pair (map %meta string string)
55
                                                  (pair (timestamp %register_date)
56
                                                        (bool %verified)))))
57
                  (big_map %metadata string bytes))) ;
58
  code { LAMBDA
59
           (pair unit
60
                 (pair (set address)
61
                       (pair
62
                         (big_map address
63
                                  (map string
64
                                       (pair (map string string) (pair timestamp bool))))
65
                         (big_map string bytes))))
66
           (pair unit
67
                 (pair (set address)
68
                       (pair
69
                         (big_map address
70
                                  (map string
71
                                       (pair (map string string) (pair timestamp bool))))
72
                         (big_map string bytes))))
73
           { CDR ;
74
             DUP ;
75
             CAR ;
76
             SENDER ;
77
             MEM ;
78
             IF {} { PUSH string "Only admin can call this entrypoint" ; FAILWITH } ;
79
             UNIT ;
80
             PAIR } ;
81
         SWAP ;
82
         UNPAIR ;
83
         IF_LEFT
84
           { IF_LEFT
85
               { IF_LEFT
86
                   { DIG 2 ;
87
                     UNIT ;
88
                     SWAP ;
89
                     DIG 3 ;
90
                     DIG 2 ;
91
                     PAIR ;
92
                     EXEC ;
93
                     CDR ;
94
                     DUP ;
95
                     CAR ;
96
                     PUSH bool True ;
97
                     DIG 3 ;
98
                     UPDATE ;
99
                     UPDATE 1 }
100
                   { DROP ; SWAP ; DROP } ;
101
                 NIL operation }
102
               { IF_LEFT
103
                   { DIG 2 ;
104
                     UNIT ;
105
                     SWAP ;
106
                     DIG 3 ;
107
                     DIG 2 ;
108
                     PAIR ;
109
                     EXEC ;
110
                     CDR ;
111
                     DUP ;
112
                     CAR ;
113
                     PUSH bool False ;
114
                     DIG 3 ;
115
                     UPDATE ;
116
                     UPDATE 1 ;
117
                     NIL operation }
118
                   { IF_LEFT
119
                       { DIG 2 ;
120
                         UNIT ;
121
                         SWAP ;
122
                         DIG 3 ;
123
                         DIG 2 ;
124
                         PAIR ;
125
                         EXEC ;
126
                         CDR ;
127
                         DUP ;
128
                         GET 3 ;
129
                         DUP ;
130
                         DUP 4 ;
131
                         CAR ;
132
                         DUP ;
133
                         DUG 2 ;
134
                         GET ;
135
                         IF_NONE { PUSH int 66 ; FAILWITH } {} ;
136
                         NONE (pair (map string string) (pair timestamp bool)) ;
137
                         DIG 5 ;
138
                         CDR ;
139
                         UPDATE ;
140
                         SOME ;
141
                         SWAP ;
142
                         UPDATE ;
143
                         UPDATE 3 ;
144
                         NIL operation }
145
                       { EMPTY_MAP string
146
                                    (pair (map string string) (pair timestamp bool)) ;
147
                         DUP 3 ;
148
                         GET 3 ;
149
                         DUP 3 ;
150
                         CAR ;
151
                         MEM ;
152
                         IF
153
                           { DROP ;
154
                             DIG 2 ;
155
                             DROP ;
156
                             SWAP ;
157
                             DUP ;
158
                             DUG 2 ;
159
                             GET 3 ;
160
                             SWAP ;
161
                             DUP ;
162
                             DUG 2 ;
163
                             CAR ;
164
                             GET ;
165
                             IF_NONE { PUSH int 102 ; FAILWITH } {} }
166
                           { DIG 3 ; DROP } ;
167
                         NIL operation ;
168
                         DUP 3 ;
169
                         CDR ;
170
                         CONTRACT (pair (address %address)
171
                                        (map %proofs string
172
                                                     (pair (map %meta string string)
173
                                                           (pair
174
                                                             (timestamp %register_date)
175
                                                             (bool %verified))))) ;
176
                         IF_NONE { PUSH int 103 ; FAILWITH } {} ;
177
                         PUSH mutez 0 ;
178
                         DIG 3 ;
179
                         DIG 4 ;
180
                         CAR ;
181
                         PAIR ;
182
                         TRANSFER_TOKENS ;
183
                         CONS } } } }
184
           { IF_LEFT
185
               { IF_LEFT
186
                   { DIG 2 ;
187
                     UNIT ;
188
                     SWAP ;
189
                     DIG 3 ;
190
                     DIG 2 ;
191
                     PAIR ;
192
                     EXEC ;
193
                     CDR ;
194
                     DUP ;
195
                     GET 3 ;
196
                     NONE (map string (pair (map string string) (pair timestamp bool))) ;
197
                     DIG 3 ;
198
                     UPDATE ;
199
                     UPDATE 3 ;
200
                     NIL operation }
201
                   { IF_LEFT
202
                       { DIG 2 ;
203
                         UNIT ;
204
                         SWAP ;
205
                         DIG 3 ;
206
                         DIG 2 ;
207
                         PAIR ;
208
                         EXEC ;
209
                         CDR ;
210
                         SWAP ;
211
                         DUP ;
212
                         CDR ;
213
                         CONTRACT unit ;
214
                         IF_NONE { PUSH int 54 ; FAILWITH } {} ;
215
                         NIL operation ;
216
                         SWAP ;
217
                         DIG 2 ;
218
                         CAR ;
219
                         UNIT ;
220
                         TRANSFER_TOKENS ;
221
                         CONS }
222
                       { DIG 2 ;
223
                         UNIT ;
224
                         SWAP ;
225
                         DIG 3 ;
226
                         DIG 2 ;
227
                         PAIR ;
228
                         EXEC ;
229
                         CDR ;
230
                         SWAP ;
231
                         SET_DELEGATE ;
232
                         NIL operation ;
233
                         SWAP ;
234
                         CONS } } }
235
               { IF_LEFT
236
                   { DIG 2 ;
237
                     UNIT ;
238
                     SWAP ;
239
                     DIG 3 ;
240
                     DIG 2 ;
241
                     PAIR ;
242
                     EXEC ;
243
                     CDR ;
244
                     SWAP ;
245
                     PUSH bool False ;
246
                     DUP 3 ;
247
                     GET 3 ;
248
                     DUP 3 ;
249
                     CAR ;
250
                     MEM ;
251
                     COMPARE ;
252
                     EQ ;
253
                     IF
254
                       { SWAP ;
255
                         DUP ;
256
                         GET 3 ;
257
                         PUSH (option (map string
258
                                       (pair (map string string) (pair timestamp bool)))) (Some {}) ;
259
                         DUP 4 ;
260
                         CAR ;
261
                         UPDATE ;
262
                         UPDATE 3 ;
263
                         SWAP }
264
                       {} ;
265
                     SWAP ;
266
                     DUP ;
267
                     GET 3 ;
268
                     DUP ;
269
                     DUP 4 ;
270
                     CAR ;
271
                     DUP ;
272
                     DUG 2 ;
273
                     GET ;
274
                     IF_NONE { PUSH int 61 ; FAILWITH } {} ;
275
                     DUP 5 ;
276
                     GET 3 ;
277
                     SOME ;
278
                     DIG 5 ;
279
                     GET 4 ;
280
                     UPDATE ;
281
                     SOME ;
282
                     SWAP ;
283
                     UPDATE ;
284
                     UPDATE 3 }
285
                   { IF_LEFT
286
                       { DUP 3 ;
287
                         UNIT ;
288
                         SWAP ;
289
                         DIG 3 ;
290
                         DIG 2 ;
291
                         PAIR ;
292
                         EXEC ;
293
                         UNPAIR ;
294
                         DIG 3 ;
295
                         DIG 2 ;
296
                         DIG 3 ;
297
                         DIG 3 ;
298
                         SWAP ;
299
                         DUP ;
300
                         DUG 2 ;
301
                         ITER { DIG 3 ; DUP ; GET 3 ; DUP 3 ; CDR ; SOME ; DIG 3 ; CAR ; UPDATE ; UPDATE 3 ; DUG 2 } ;
302
                         DROP 2 ;
303
                         SWAP ;
304
                         DROP }
305
                       { DIG 2 ; UNIT ; SWAP ; DIG 3 ; DIG 2 ; PAIR ; EXEC ; CDR ; SWAP ; DUP ; CAR ; DUG 2 ; CDR ; PAIR ; EXEC } } ;
306
                 NIL operation } } ;
307
         PAIR } ;
308
  view "getProofsForAddress" address
309
        (map string
310
             (pair (map %meta string string)
311
                   (pair (timestamp %register_date) (bool %verified))))
312
        { UNPAIR ;
313
          EMPTY_MAP string (pair (map string string) (pair timestamp bool)) ;
314
          DUP 3 ;
315
          GET 3 ;
316
          DUP 3 ;
317
          MEM ;
318
          IF
319
            { DROP ; SWAP ; GET 3 ; SWAP ; GET ; IF_NONE { PUSH int 110 ; FAILWITH } {} }
320
            { SWAP ; DROP ; SWAP ; DROP } } }