Expand description
Types related to contract schemas. These are optional annotations in modules that allow the users of smart contracts to interact with them in a way that is better than constructing raw bytes as parameters.
Structs§
- Contract
V0 - Describes all the schemas of a V0 smart contract.
The
Default
instance produces an empty schema. - Contract
V1 - Describes all the schemas of a V1 smart contract.
The
Default
instance produces an empty schema. - Contract
V2 - Describes all the schemas of a V1 smart contract with a V2 schema.
The
Default
instance produces an empty schema. - Contract
V3 - Describes all the schemas of a V1 smart contract with a V3 schema.
The
Default
instance produces an empty schema. - Function
V2 - Describes the schema of an init or a receive function for V1 contracts with
V3 schemas. Differs from
FunctionV1
in that a schema for the error can be included. - Module
V0 - Contains all the contract schemas for a smart contract module V0.
- Module
V1 - Contains all the contract schemas for a smart contract module V1.
- Module
V2 - Contains all the contract schemas for a smart contract module V1 with a V2 schema.
- Module
V3 - Contains all the contract schemas for a smart contract module V1 with a V3 schema.
Enums§
- Fields
- Schema for the fields of a struct or some enum variant.
- Function
V1 - Describes the schema of an init or a receive function for V1 contracts with V1 schemas.
- Size
Length - Type of the variable used to encode the length of Sets, List, Maps
- Type
- Schema type used to describe the different types in a smart contract, their serialization and how to represent the types in JSON.
- Versioned
Module Schema - Represents the different schema versions.
Traits§
- Schema
Type - The
SchemaType
trait provides means to generate a schema for structures. Schemas are used to make structures human readable and to avoid dealing directly with bytes, such as the contract state or parameters for contract interaction.
Functions§
- deserial_
length - Deserialize a length of provided size.
- serial_
length - Try to convert the
len
to the provided size and serialize it.