Skip to main content

Version 1.5.0

· 2 min read
Benoit Rognier
Guillaume Duhamel

We are very glad to present version 1.5.0 of Archetype.

Added

Debugger

A debugger for the Archetype language is now available as part of the Archetype extension for VSCode.

It provides step by step entrypoint execution.

Below is a debug session of the transfer entrypoint from the FA 1.2 contract:

Debug sessionDebug session

Multiple declarations

It is now possible to declare several local variables from a tuple literal value.

For example, the following declares a and b from couple (1, "Hello"):

const a, b = (1, "Hello");

It may be necessary to specify the type of a and b when it is not decidable from literal values:

const a, b = (int, nat) = (1, 3);

match_detach

match_detach is a new instruction that reads and extract the value from an option and set the option to none.

In the following example, the o is deconstructed and sets to none:

const o = some(2tz);
match_detach o with
| some v -> transfer v to caller
| none -> ()
end;
/* o is now 'none' */
Debug sessionDebug session