toplevel
type string
type bytes
type int
type nat
type unit
type operation
type tez
type address
type signature
type key
type key_hash
type timestamp
type list
type big_map
type map
type set
type contract
type michelson_or
type michelson_pair
type chain_id
type baker_hash
type pvss_key
type sapling_state
type sapling_transaction
type baker_operation
type bls12_381_g1
type bls12_381_g2
type bls12_381_fr
type never
type ticket
type chest
type chest_key
type external_ediv
type external_and
type external_or
type external_xor
type external_lsl
type external_lsr
type external_bytes
type entrypoint<param, storage> = (_: param) => (_: storage) => [list<operation>, storage]
Type of entrypointstype bool = bool
Type of the booleans. Note: Values true and false are
predefined constants.
type option<a> = option<a>
Type of optional values. They are useful, for example, when a
function can fail, but the caller wants to be able to handle the
failure, which is then denoted by the result None(). Note:
Assertions and failwith do not allow handling.
unit: unit
Unit type. It is useful for typing side-effects, for example failures, some iterators and implicit accounts.ignore: <a>(_: a) => unit
The call ignore(v) evaluates v and ignores its value, returning
instead the unit value. This is useful when the argument of ignore
performs side-effects.
failwith: <err, a>(_: err) => a
The call failwith(e) terminates the execution with the value e,
standing for an error. Note: Using a string for an error message can
be costly in terms of size.
bytes: <a>(_: a) => external_bytes<a>
The function bytes encodes an integer or a natural number to bytes
using the big-endian encoding. For integers, negative numbers are
considered in two's complement representation.
abs: (_: int) => nat
The call abs(i) is the absolute value of i.
is_nat: (_: int) => option<nat>
The call is_nat(i) is ["Some" as "Some", n], where n is the
absolute value of i, if, and only if, i is positive or zero.
int: <a>(_: a) => int
The call int(v) casts the value v to an integer.
For natural numbers, the function int is the identity cast from
nat to int. For BLS12-381 field elements, the returned value is
always between 0 (inclusive) and the order of the BLS12-381 field
(exclusive). For bytes, the function int decodes the bytes using the
big-endian encoding, where negative numbers are considered in two's
complement representation.
nat: (_: bytes) => nat
The call nat(b) casts the bytes b into a natural number.
ediv: <a, b>(left: a, right: b) => external_ediv<a, b>
The call ediv(z1, z2), where z1 and z2 are either of type int
or nat, returns None() if z2 is zero; otherwise, it returns the
pair [q,r], where q is the quotient and r the positive
remainder, as is the convention of the mathematical Euclidian
division. The function ediv is also overloaded to work on values of
type tez. When z1 and z2 are of type tez and z2 is nonzero,
we get a nat quotient and a tez remainder. When z1 is a tez
and z2 is a nonzero nat, the calls yields a quotient and a
remainder both of type tez.
type big_set<elt> = Big_set.t<elt>
The type of the big sets is based on big_map.
type dynamic_entrypoints = big_map<nat, bytes>
Dynamic entrypointsDynamic entrypoints are lazy entrypoints stored in the contract within a big_map. They can then be updated or removed without deploying a new contract.
A contract with dynamic entrypoints must have at least one @entry
declaration (as any other contract); it also must obey some
convention on storage type definition and have at least one
@dyn_entry declaration.
LIGO will then include the defined dynamic entries into the contract initial storage.