Module casper_types::contracts
source · Expand description
Data types for supporting contract headers feature.
Structs
- Methods and type signatures supported by a contract.
- A newtype wrapping a
HashAddr
which references aContract
in the global state. - Contract definition, metadata, and security container.
- A newtype wrapping a
HashAddr
which references aContractPackage
in the global state. - Major element of
ProtocolVersion
combined withContractVersion
. - Type signature of a method. Order of arguments matter since can be referenced by index as well as name.
- Collection of named entry points
- A (labelled) “user group”. Each method of a versioned contract may be associated with one or more user groups which are allowed to call it.
- Parameter to a method
- Associated error type of
TryFrom<&[u8]>
forContractHash
.
Enums
- A enum to determine the lock status of the contract package.
- Enum describing the possible access control options for a contract entry point (method).
- Context of method execution
- Set of errors which may happen when working with contract headers.
- An error from parsing a formatted contract string
Constants
- Within each discrete major
ProtocolVersion
, contract version resets to this value. - Serialized length of
ContractVersionKey
. - Default name for an entry point
- Default name for an installer entry point
- Maximum number of distinct user groups.
- Maximum number of URefs which can be assigned across all user groups.
- Default name for an upgrade entry point
Type Definitions
- Automatically incremented value for a contract version within a major
ProtocolVersion
. - Collection of contract versions.
- Collection of disabled contract versions. The runtime will not permit disabled contract versions to be executed.
- Type alias for a container used inside
EntryPoints
. - Collection of named groups.
- Collection of named keys
- Collection of entry point parameters.
- Major element of
ProtocolVersion
aContractVersion
is compatible with.