Module contracts

Source
Expand description

Data types for supporting contract headers feature.

Structs§

Contract
Methods and type signatures supported by a contract.
ContractHash
A newtype wrapping a HashAddr which references a Contract in the global state.
ContractPackage
Contract definition, metadata, and security container.
ContractPackageHash
A newtype wrapping a HashAddr which references a ContractPackage in the global state.
ContractVersionKey
Major element of ProtocolVersion combined with ContractVersion.
EntryPoint
Type signature of a method. Order of arguments matter since can be referenced by index as well as name.
EntryPoints
Collection of named entry points.
NamedKeys
A collection of named keys.
TryFromSliceForContractHashError
Associated error type of TryFrom<&[u8]> for ContractHash.

Enums§

ContractPackageStatus
A enum to determine the lock status of the contract package.
Error
Set of errors which may happen when working with contract headers.
FromStrError
An error from parsing a formatted contract string

Constants§

CONTRACT_INITIAL_VERSION
Within each discrete major ProtocolVersion, contract version resets to this value.
CONTRACT_VERSION_KEY_SERIALIZED_LENGTH
Serialized length of ContractVersionKey.
DEFAULT_ENTRY_POINT_NAME
Default name for an entry point
ENTRY_POINT_NAME_INSTALL
Default name for an installer entry point
UPGRADE_ENTRY_POINT_NAME
Default name for an upgrade entry point

Type Aliases§

ContractVersion
Automatically incremented value for a contract version within a major ProtocolVersion.
ContractVersions
Collection of contract versions.
DisabledVersions
Collection of disabled contract versions. The runtime will not permit disabled contract versions to be executed.
ProtocolVersionMajor
Major element of ProtocolVersion a ContractVersion is compatible with.