x
24
parameter (or (nat %is_update_safe) (unit %touch));storage (pair (nat %touch_level) (address %toucher));code { UNPAIR ; IF_LEFT { DUP 2 ; CAR ; COMPARE ; LT ; IF {} { PUSH string "LEVEL_IN_PAST" ; FAILWITH } } { DUP 2 ; CDR ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "CANT_TOUCH_ME" ; FAILWITH } ; LEVEL ; DUP 3 ; CAR ; COMPARE ; LT ; IF {} { PUSH string "LEVEL_IN_PAST" ; FAILWITH } ; SWAP ; LEVEL ; DIG 2 ; DROP ; UPDATE 1 } ; NIL operation ; PAIR }