Skip to main content

Types

Basic types

Boolean type to represent truth values


String of characters type to represent textual values


Natural type to represent long positive integers


Integer type to represent long integers


Rational type to represent floating point values


Date type to represent ISO date values


Duration type to represent difference of dates


Bytes type to represent any serialised value


Tez type to represent an amount in tez currency


Address type to represent an account or contract address


List of all available types.

Conversion

List of conversion functions

Converts an address to contract


Converts bytes to a natural


Converts a contract to an address


Converts an integer to bytes


Converts an integer to a date


Converts an integer to natural


Converts a key hash to contract (without entrypoint)


Converts key to address


Converts key to hash key


Converts a mutez amount to natural


Converts a natural to bytes


Converts a natural to its string representation


Properties

Comparable

Comparable values have a natural order used to order elements in containers (set and map's key). Comparison operators < <= > and >= are available the order of two value.

All types are comparable except: big_map iterable_big_map bls12_381_fr bls12_381_g1 bls12_381_g2 contract lambda list map operation sapling_state sapling_transaction set ticket


Packable

A packable value can be serialised with pack and deserialised with unpack.

All types are packable except: big_map iterable_big_map operation sapling_state ticket


Passable

A passable value can be the parameter of an entrypoint, a lambda and (not inlined) function.

All types are passable except: operation


Storable

A storable value may be a contract's storage element.

All types are storable except: contract operation