A contract parameter is a storage element whose value is set at deployment (origination) time.
For example, the following declares the
By default, the first field serves as the asset key. Any comparable field of the asset may be declared as the asset key with the
identified by modifier; hence the declaration above is equivalent to:
Several fields may be declared to form the asset key; for example the
liquidity asset is identified by two fields:
The key is then the tuple of fields' value, which is in Michelson the right comb of pairs of values; for example, the expression to retrieve the amount of token
See access operator
 for more information.
Default field value
It is possible to define a default value for an asset field; for example:
Fields with default value are not required when adding a new asset in collection; for example, the following instruction adds a new
vehicle asset with release date equal to
now and nbdoors equal to
add instruction for more information.
to big_map modifier compiles the collection as a
Iterable big map
to iterable_big_map modifier compiles the collection as an
It is possible to specify the initial value of the asset collection at origination with the
initialized with modifier followed by the collection literal: a set of asset definitions.
For example, the following declaration initializes the vehicle asset with 2 assets:
The initial value of an asset collection is interpreted by the completium CLI's
deploy command to set the initial storage Michelson value.
An asset with only one field is compiled to a Michelson set.
For example, the declaration above is quasi equivalent to the following lower-level code: