An archetype contract starts with the
archetype keyword followed by a contract identifier.
A contract may have parameters. A parameter value is not in the source code and is provided at deployment (origination) time. For example, the address of the contract owner is typically a contract parameter.
By default, a contract parameter is an element of the contract storage. It is defined by an identifier and a type. The list of parameters follows the contract's identifier between parenthesis and separated by comma.
buyer addresses then need to be set at deployment time with the completium CLI's
deploy command; for example:
If a contract parameter is not meant to be modified, nor to appear in the storage, it may be declared
const. Its value, provided at deployment time as for variable parameter, is then inlined, that it replaces each occurence of the parmeter.
For example, the declaration of the
FA 1.2 token contract:
This adds the
metadata map to the storage.
A metadata template is provided here.