Module casper_types::contracts[][src]

Data types for supporting contract headers feature.

Structs

Contract

Methods and type signatures supported by a contract.

ContractHash

A newtype wrapping a HashAddr which is the raw bytes of the ContractHash

ContractPackage

Contract definition, metadata, and security container.

ContractPackageHash

A newtype wrapping a HashAddr which is the raw bytes of the ContractPackageHash

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

Group

A (labelled) “user group”. Each method of a versioned contract may be assoicated with one or more user groups which are allowed to call it.

Parameter

Parameter to a method

TryFromSliceForContractHashError

Associated error type of TryFrom<&[u8]> for ContractHash.

Enums

ContractPackageStatus

A enum to determine the lock status of the contract package.

EntryPointAccess

Enum describing the possible access control options for a contract entry point (method).

EntryPointType

Context of method execution

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

MAX_GROUPS

Maximum number of distinct user groups.

MAX_TOTAL_UREFS

Maximum number of URefs which can be assigned across all user groups.

UPGRADE_ENTRY_POINT_NAME

Default name for an upgrader entry point

Type Definitions

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.

EntryPointsMap

Type alias for a container used inside EntryPoints.

Groups

Collection of named groups.

NamedKeys

Collection of named keys

Parameters

Collection of entry point parameters.

ProtocolVersionMajor

Major element of ProtocolVersion a ContractVersion is compatible with.