This is a reference of how modules and contract instances are referenced on-chain.
Modules are referenced via their module reference. A reference for a module is simply its SHA256 hash.
Example of a module reference:
If you hash a module, e.g., using sha256sum, you will not get the same hash as is used on-chain. This is because on-chain modules are prepended with four additional bytes that describe which API-version of the Concordium tools they were built with.
Contract instances are referenced via their address. An address consists of an index and a subindex, both of which are non-negative integers.
Example of a contract instance address:
Currently, only indexes are used.
Subindices will be used when the deletion of instances has been implemented.
Until then, subindices default to the value