Expand description
A module providing functionality for defining the Casper Contract Schema.
It includes traits for defining entrypoints, events, custom types, and errors, as well as functions for creating various schema elements such as arguments, entrypoints, struct members, enum variants, custom types, events, and errors.
Re-exports§
pub use casper_contract_schema;
Traits§
- NamedCL
Typed - Trait for types that can be represented as a NamedCLType.
- Schema
Custom Element - Represents a custom element in the schema.
- Schema
Custom Types - Trait for defining custom types in a schema.
- Schema
Entrypoints - Trait representing schema entrypoints.
- Schema
Errors - A trait for defining schema user errors.
- Schema
Events - Trait representing schema events.
Functions§
- argument
- Creates a new argument.
- camel_
to_ snake - Converts a string from camel case to snake case.
- custom_
enum - Creates a new CustomType of type enum.
- custom_
struct - Creates a new CustomType of type struct.
- entry_
point - Creates a new entrypoint.
- enum_
custom_ type_ variant - Creates a new enum variant of type NamedCLType::Custom.
- enum_
typed_ variant - Creates a new enum variant.
- enum_
variant - Creates a new enum variant of type NamedCLType::Unit.
- error
- Creates a new UserError.
- event
- Creates a new Event.
- find_
schema_ file_ path - Finds the path to the schema file for the given contract name.
- find_
schemas_ file_ paths - Finds all schema file paths in the given directory.
- schema
- Creates an instance of ContractSchema.
- struct_
member - Creates a new struct member.