Crate casper_types

source ·
Expand description

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

Re-exports§

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.
  • Checksummed hex encoding following an EIP-55-like scheme.
  • 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.
  • Access rights for a given runtime context.
  • Methods and type signatures supported by a contract.
  • A newtype wrapping a HashAddr which references a Contract in the global state.
  • Contract definition, metadata, and security container.
  • A newtype wrapping a HashAddr which references a ContractPackage in the global state.
  • 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 journal of execution transforms from a single deploy.
  • The Gas struct represents a U512 amount of gas.
  • 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.
  • A struct representing a number of Motes.
  • 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.
  • An error struct representing a type mismatch in StoredValue operations.
  • A time difference between two timestamps.
  • A timestamp type, representing a concrete moment in time.
  • 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§

Constants§

Traits§

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 Aliases§

  • 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.
  • The address of a URef (unforgeable reference) on the network.