Skip to content

Provide parser from Michelson to LIGO value

For our case (LIGO debugger) we need a way to convert a Michelson value to LIGO value given its LIGO type.

For instance:

> ligo parse cameligo '{1; 2}' 'nat list' 
[1n, 2n]

> ligo parse cameligo 'Pair 1 1 "q"' my_product_type
record [ num = 1; num_nat = 1n; str = "q" ]

Entries in value and type should be able to refer to definitions in a particular contract.

How hard would it be to make ligo provide a command this such semantics?

Edited by Konstantin Ivanov