Crate casper_types[][src]

Expand description

Types used to allow creation of Wasm contracts and tests for use on the Casper Platform.

no_std

By default, the library is no_std, however you can enable full std functionality by enabling the crate’s std feature.

Re-exports

pub use crypto::*;

Modules

Contains types and constants associated with user accounts.

Contains ApiError and associated helper functions.

Contains serialization and deserialization code for types used throughout the system.

Data types for supporting contract headers feature.

Cryptographic types and operations on them

Home of RuntimeArgs for calling contracts

System modules, formerly known as “system contracts”

Macros

Macro that makes it easier to construct named arguments.

Structs

A struct which behaves like a set of bitflags to define access rights associated with a URef.

A newtype wrapping a u64 which represents the block time.

Error while converting a CLValue into a given type.

A Casper value, i.e. a value which can be stored and manipulated by smart contracts.

Methods and type signatures supported by a contract.

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

Contract definition, metadata, and security container.

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

Major element of ProtocolVersion combined with ContractVersion.

A container for contract’s WASM bytes.

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

A newtype wrapping a [u8; DEPLOY_HASH_LENGTH] which is the raw bytes of the deploy hash.

Information relating to the given Deploy.

Type signature of a method. Order of arguments matter since can be referenced by index as well as name.

Collection of named entry points

Era ID newtype.

The effect of executing a single deploy.

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.

Named arguments to a contract

A named key.

An operation performed while executing a deploy.

Parameter to a method

A newtype wrapping a SemVer which represents a Casper Platform protocol version.

Represents a collection of arguments passed to a smart contract.

A struct for semantic versioning.

Represents a transfer from one purse to another

A newtype wrapping a [u8; TRANSFER_ADDR_LENGTH] which is the raw bytes of the transfer address.

A transformation performed while executing a deploy.

Little-endian large integer type

Little-endian large integer type

Little-endian large integer type

Represents an unforgeable reference, containing an address in the network’s global storage and the AccessRights of the reference.

Enums

Errors which can be encountered while running a smart contract.

Casper types, i.e. types which can be stored and manipulated by smart contracts.

Error relating to CLValue operations.

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

Context of method execution

The result of executing a single deploy.

The type under which data (e.g. CLValues, smart contracts, user accounts) are indexed on the network.

The type of operation performed while executing a deploy.

Parsing error when creating a SemVer.

The phase in which a given contract is executing.

Error returned when decoding a TransferAddr from a formatted string.

The result of a successful transfer between purses.

The actual transformation performed while executing a deploy.

Error type for parsing U128, U256, U512 from a string.

Error while parsing a URef from a formatted string.

Constants

The number of bytes in a serialized AccessRights.

The number of bytes in a Blake2b hash

The number of bytes in a serialized BlockTime.

The length of a deploy hash.

The maximum length for a dictionary_item_key.

The number of bytes in a Key::Dictionary.

The number of bytes in a Key::Hash.

The number of bytes in a serialized Phase.

Length of SemVer when serialized

The length of a transfer address.

The number of bytes in a URef address.

The number of bytes in a serialized URef where the AccessRights are not None.

Traits

A type which can be described as a CLType.

The quality of having a tag

Functions

Serializes the given data structure as a pretty-printed String of JSON using serde_json::to_string_pretty(), but after first reducing any large hex-string values.

Returns the CLType describing a “named key” on the system, i.e. a (String, Key).

Type Definitions

Automatically incremented value for a contract version within a major ProtocolVersion.

An alias for Keys dictionary variant.

An alias for Keys hash variant.

The result of an attempt to transfer between purses.