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 contracts::Contract;
pub use contracts::ContractHash;
pub use contracts::ContractPackage;
pub use contracts::ContractPackageHash;
pub use contracts::ContractVersion;
pub use contracts::ContractVersionKey;
pub use contracts::EntryPoint;
pub use contracts::EntryPointAccess;
pub use contracts::EntryPointType;
pub use contracts::EntryPoints;
pub use contracts::Group;
pub use contracts::Parameter;
pub use crypto::*;
pub use runtime_args::NamedArg;
pub use runtime_args::RuntimeArgs;
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.
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.
Era ID newtype.
The effect of executing a single deploy.
A named key.
An operation performed while executing a deploy.
A newtype wrapping a SemVer
which represents a Casper Platform protocol version.
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.
The result of executing a single deploy.
The type under which data (e.g. CLValue
s, 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 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 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
Functions
Serialize the given data structure as a pretty-printed String of JSON using
serde_json::to_string_pretty()
, but after first reducing any string values over
MAX_STRING_LEN
to display the field’s number of chars instead of the actual value.
Returns the CLType
describing a “named key” on the system, i.e. a (String, Key)
.
Type Definitions
An alias for Key
s hash variant.
The result of an attempt to transfer between purses.