Crate casper_types
source ·Expand description
Types used to allow creation of Wasm contracts and tests for use on the Casper Platform.
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.
- 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 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
. - 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 aU512
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§
- 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.
- Used to indicate if a granted
URef
was already held by the context. - The type under which data (e.g.
CLValue
s, smart contracts, user accounts) are indexed on the network. - Errors produced when converting a
String
into aKey
. - The type of operation performed while executing a deploy.
- Parsing error when creating a SemVer.
- The phase in which a given contract is executing.
- StoredValue represents all possible variants of values stored in Global State.
- 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 while parsing a URef from a formatted string.
- The result of
ProtocolVersion::check_next_version
.
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.
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 usingserde_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)
.