Expand description
Types used to allow creation of Wasm contracts and tests for use on the CasperLabs 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::ContractPackage;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 runtime_args::NamedArg;pub use runtime_args::RuntimeArgs;pub use system_contract_type::SystemContractType;
Modules§
- account
- Contains types and constants associated with user accounts.
- api_
error - Contains
ApiErrorand associated helper functions. - bytesrepr
- Contains serialization and deserialization code for types used throughout the system.
- contracts
- Data types for supporting contract headers feature.
- runtime_
args - Home of RuntimeArgs for calling contracts
- system_
contract_ errors - Home of error types returned by system contracts.
- system_
contract_ type - Home of system contract type enum.
Macros§
- runtime_
args - Macro that makes it easier to construct named arguments.
Structs§
- Access
Rights - A struct which behaves like a set of bitflags to define access rights associated with a
URef. - Block
Time - A newtype wrapping a
u64which represents the block time. - CLType
Mismatch - Error while converting a
CLValueinto a given type. - CLValue
- A CasperLabs value, i.e. a value which can be stored and manipulated by smart contracts.
- Contract
Wasm - A container for contract’s WASM bytes.
- Protocol
Version - A newtype wrapping a
SemVerwhich represents a CasperLabs Platform protocol version. - SemVer
- A struct for semantic versioning.
- U128
- Little-endian large integer type
- U256
- Little-endian large integer type
- U512
- Little-endian large integer type
- URef
- Represents an unforgeable reference, containing an address in the network’s global storage and
the
AccessRightsof the reference.
Enums§
- ApiError
- Errors which can be encountered while running a smart contract.
- CLType
- CasperLabs types, i.e. types which can be stored and manipulated by smart contracts.
- CLValue
Error - Error relating to
CLValueoperations. - Key
- The type under which data (e.g.
CLValues, smart contracts, user accounts) are indexed on the network. - Phase
- The phase in which a given contract is executing.
- Transferred
To - The result of a successful transfer between purses.
- UInt
Parse Error - Error type for parsing
U128,U256,U512from a string. - Version
Check Result - The result of
ProtocolVersion::check_next_version.
Constants§
- ACCESS_
RIGHTS_ SERIALIZED_ LENGTH - The number of bytes in a serialized
AccessRights. - BLAK
E2B_ DIGEST_ LENGTH - The number of bytes in a Blake2b hash
- BLOCKTIME_
SERIALIZED_ LENGTH - The number of bytes in a serialized
BlockTime. - KEY_
HASH_ LENGTH - The number of bytes in a
Key::Hash. - PHASE_
SERIALIZED_ LENGTH - The number of bytes in a serialized
Phase. - SEM_
VER_ SERIALIZED_ LENGTH - Length of SemVer when serialized
- UREF_
ADDR_ LENGTH - The number of bytes in a
URefaddress. - UREF_
SERIALIZED_ LENGTH - The number of bytes in a serialized
URefwhere theAccessRightsare notNone.
Traits§
Functions§
- named_
key_ type - Returns the
CLTypedescribing a “named key” on the system, i.e. a(String, Key).
Type Aliases§
- Contract
Hash - An alias for
Keys hash variant. - Contract
Package Hash - An alias for
Keys hash variant. - Contract
Wasm Hash - An alias for
Keys hash variant. - Hash
Addr - An alias for
Keys hash variant. - Transfer
Result - The result of an attempt to transfer between purses.