Skip to content

Fatal error: exception Archetype.Mtyping.MichelsonTypingError #358

@ristiisa

Description

@ristiisa
> 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions