BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Shadownet
  • /
  • KT1KrWN...w1vp
operations (337K)Storage Code Interact Tokens Fork Events Statistics Details
Latest
​x
94
 
1
parameter (or (bytes %set_bools)
2
              (or (bytes %set_rects)
3
                  (or (pair %set_bools_and_rects bytes bytes)
4
                      (or (address %set_writer)
5
                          (or (address %set_reader)
6
                              (or (key %set_reader_pubkey) (unit %read)))))));
7
storage (pair (address %admin)
8
              (pair (address %writer)
9
                    (pair (address %reader)
10
                          (pair (key %reader_pubkey)
11
                                (pair (bytes %bools) (bytes %rects))))));
12
code { LAMBDA
13
         (pair address (pair address (pair address (pair key (pair bytes bytes)))))
14
         unit
15
         { CAR ; SENDER ; COMPARE ; NEQ ; IF { PUSH string "NOT_ADMIN" ; FAILWITH } {} ; UNIT } ;
16
       LAMBDA
17
         (pair address (pair address (pair address (pair key (pair bytes bytes)))))
18
         unit
19
         { GET 3 ; SENDER ; COMPARE ; NEQ ; IF { PUSH string "NOT_WRITER" ; FAILWITH } {} ; UNIT } ;
20
       DIG 2 ;
21
       UNPAIR ;
22
       IF_LEFT
23
         { DIG 3 ;
24
           DROP ;
25
           DUP 2 ;
26
           DIG 3 ;
27
           SWAP ;
28
           EXEC ;
29
           DROP ;
30
           UPDATE 9 ;
31
           NIL operation ;
32
           UNIT ;
33
           EMIT %bools_changed unit ;
34
           CONS }
35
         { IF_LEFT
36
             { DIG 3 ;
37
               DROP ;
38
               DUP 2 ;
39
               DIG 3 ;
40
               SWAP ;
41
               EXEC ;
42
               DROP ;
43
               UPDATE 10 ;
44
               NIL operation ;
45
               UNIT ;
46
               EMIT %rects_changed unit ;
47
               CONS }
48
             { IF_LEFT
49
                 { DIG 3 ;
50
                   DROP ;
51
                   UNPAIR ;
52
                   DUP 3 ;
53
                   DIG 4 ;
54
                   SWAP ;
55
                   EXEC ;
56
                   DROP ;
57
                   NIL operation ;
58
                   UNIT ;
59
                   EMIT %rects_changed unit ;
60
                   CONS ;
61
                   UNIT ;
62
                   EMIT %bools_changed unit ;
63
                   CONS ;
64
                   DIG 3 ;
65
                   DIG 2 ;
66
                   UPDATE 9 ;
67
                   DIG 2 ;
68
                   UPDATE 10 ;
69
                   SWAP }
70
                 { DIG 2 ;
71
                   DROP ;
72
                   IF_LEFT
73
                     { DUP 2 ; DIG 3 ; SWAP ; EXEC ; DROP ; UPDATE 3 ; NIL operation }
74
                     { IF_LEFT
75
                         { DUP 2 ; DIG 3 ; SWAP ; EXEC ; DROP ; UPDATE 5 ; NIL operation }
76
                         { IF_LEFT
77
                             { DUP 2 ; DIG 3 ; SWAP ; EXEC ; DROP ; UPDATE 7 ; NIL operation }
78
                             { DROP ;
79
                               SWAP ;
80
                               DROP ;
81
                               DUP ;
82
                               GET 5 ;
83
                               SENDER ;
84
                               COMPARE ;
85
                               NEQ ;
86
                               IF { PUSH string "NOT_READER" ; FAILWITH } {} ;
87
                               NIL operation ;
88
                               UNIT ;
89
                               EMIT %rects_changed unit ;
90
                               CONS ;
91
                               UNIT ;
92
                               EMIT %bools_changed unit ;
93
                               CONS } } } } } } ;
94
       PAIR }