-
Notifications
You must be signed in to change notification settings - Fork 0
/
frozen.tz
38 lines (38 loc) · 975 Bytes
/
frozen.tz
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ parameter (pair mutez address) ;
storage (pair (set address) timestamp) ;
code { DUP ;
AMOUNT ;
PUSH mutez 0 ;
COMPARE ;
NEQ ;
IF { FAILWITH } {} ;
{ DUP ; CAR ; DIP 1 { CDR } } ;
DIP 1 { { DUP ; CAR ; DIP 1 { CDR } } } ;
SWAP ;
SOURCE ;
MEM ;
IF {} { FAILWITH } ;
SWAP ;
NOW ;
COMPARE ;
LT ;
IF { FAILWITH } {} ;
{ DUP ; CAR ; DIP 1 { CDR } } ;
DUP ;
BALANCE ;
COMPARE ;
LT ;
IF { FAILWITH } {} ;
PUSH mutez 0 ;
COMPARE ;
EQ ;
IF { FAILWITH } {} ;
DROP 1 ;
{ DUP ; CAR ; DIP 1 { CDR } } ;
{ DUP ; CAR ; DIP 1 { CDR } } ;
SWAP ;
CONTRACT unit ;
IF_NONE { FAILWITH } { SWAP ; PUSH unit Unit ; TRANSFER_TOKENS } ;
DIP 1 { NIL operation } ;
CONS ;
PAIR } }