BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Ushuaianet
  • /
  • KT1VTwT...yDqY
Delegatable
operations (6)Storage Code Interact Tokens Fork Details
Latest
​x
33
 
1
parameter (or (pair %transfer address mutez)
2
              (or (option %set_delegate key_hash) (unit %default)));
3
storage address;
4
code { UNPAIR ;
5
       IF_LEFT
6
         { UNPAIR ;
7
           DUP 3 ;
8
           SENDER ;
9
           COMPARE ;
10
           EQ ;
11
           IF {} { PUSH string "failed assertion" ; FAILWITH } ;
12
           CONTRACT unit ;
13
           IF_NONE { PUSH string "none" ; FAILWITH } {} ;
14
           SWAP ;
15
           UNIT ;
16
           TRANSFER_TOKENS ;
17
           SWAP ;
18
           NIL operation ;
19
           DIG 2 ;
20
           CONS }
21
         { IF_LEFT
22
             { DUP 2 ;
23
               SENDER ;
24
               COMPARE ;
25
               EQ ;
26
               IF {} { PUSH string "failed assertion" ; FAILWITH } ;
27
               SET_DELEGATE ;
28
               SWAP ;
29
               NIL operation ;
30
               DIG 2 ;
31
               CONS }
32
             { DROP ; NIL operation } } ;
33
       PAIR }