manager.tz 355 Bytes
Newer Older
1
parameter
2
  (or
3
     (lambda unit (list operation))
4
     unit);
5
storage key_hash;
6 7 8 9 10 11 12 13
code
  { UNPAIR ;
    IF_LEFT
      { DUUP ;
        IMPLICIT_ACCOUNT ; ADDRESS ;
        SENDER ;
        IFCMPNEQ
          { SENDER ; PUSH string "Only the owner can operate." ; PAIR ; FAILWITH }
14
          { UNIT ; EXEC ; PAIR }}
15
      { DROP ; NIL operation ; PAIR }};