> cat state.arl
archetype state_machine_demo(value : tez, holder : address)
states =
| Created initial
| Initialized
transition initialize () {
from Created to Initialized
when { transferred > value }
}
> ./archetype-x64-linux-rev1 -c state.arl > state.arl.tz
> cat state.arl.tz
{ storage (pair (mutez %value) (address %holder) (int %_state)) ;
parameter (unit %initialize) ;
code { UNPAIR ;
DIP 1 { UNPAIR 3 } ;
DROP 1 ;
DUP 3 ;
DUP ;
PUSH int 0 ;
COMPARE ;
EQ ;
IF { DUP 2 ;
AMOUNT ;
COMPARE ;
GT ;
IF { PUSH int 1 ; DIP 1 { DIG 3 ; DROP 1 } ; DUG 3 } {} }
{ PUSH string "INVALID_STATE" ; FAILWITH } ;
DROP 1 ;
PAIR 3 ;
NIL operation ;
PAIR } }
> ./archetype-x64-linux-rev1 -d state.arl.tz
Fatal error: exception Archetype.Mtyping.MichelsonTypingError