Re-exports§
pub use self::chain_extension::IsResultType;pub use ink_env as env;pub use ink_metadata as metadata;pub use ink_prelude as prelude;pub use ink_primitives as primitives;pub use scale;pub use scale_info;
Modules§
- Definitions and utilities for ink! smart contract static reflection.
Macros§
- Computes and expands into the BLAKE2b 256-bit hash of the string input.
- Macro defines the combined chain extension via structure definition. Each sub-extension can be accessed by the corresponding field.
- Generates a wrapper which can be used for interacting with the contract.
- Computes the ink! selector of the string and expands into its byte representation.
- Computes the ink! selector of the string and expands into its
u32representation.
Structs§
- The API behind the
self.env()andSelf::env()syntax in ink!. - Represents some abstract value that is returned by a function. Currently acts as a placeholder.
Enums§
- An error emitted by the smart contracting language.
Constants§
- A well know selector reserved for the message required to be defined alongside a wildcard selector. See IIP-2.
Traits§
- Trait implemented by chain extensions.
- Only implemented for
ValueReturned. - Implemented by contracts that are compiled as dependencies.
Type Aliases§
- The
Resulttype for ink! constructors. - The
Resulttype for ink! messages.
Attribute Macros§
- Defines the interface for a chain extension.
- Entry point for writing ink! smart contracts.
- Implements the necessary traits for a
structto be emitted as an event from a contract. - Derive the re-exported traits
ink::scale::Encode,ink::scale::Decodeandink::scale_info::TypeInfo. It enables using the built in derive macros for these traits without depending directly on theparity-scale-codecandscale-infocrates. - Prepares the type to be fully compatible and usable with the storage. It implements all necessary traits and calculates the storage key for types.
Packedtypes don’t have a storage key, but non-packed types (likeMapping,Lazyetc.) require calculating the storage key during compilation. - Defines a unit test that makes use of ink!’s off-chain testing capabilities.
- Marks trait definitions to ink! as special ink! trait definitions.
Derive Macros§
- Derives an implementation of the [
ink::Event] trait for the givenstruct. - Derives the [
ink::EventMetadata] trait for the givenstruct, which provides metadata about the event definition.