Crate odra_schema

Crate odra_schema 

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

NamedCLTyped
Trait for types that can be represented as a NamedCLType.
SchemaCustomElement
Represents a custom element in the schema.
SchemaCustomTypes
Trait for defining custom types in a schema.
SchemaEntrypoints
Trait representing schema entrypoints.
SchemaErrors
A trait for defining schema user errors.
SchemaEvents
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.