Module reflect

Expand description

Definitions and utilities for ink! smart contract static reflection.

§Note

The ink! smart contract codegen uses these reflections in order to structure, solidify and manage the generated code.

However, the definitions in this module might be useful to ink! smart contract authors as well as they allow to inspect compile time information about the ink! smart contract at hand.

Structs§

ConstructorOutputValue
Stores the actual value of the constructor return type.
ScaleEncoding
Marker type for SCALE encoding. Used with AbiEncodeWith, AbiDecodeWith and DecodeMessageResult.
SolEncoding
Marker type for Solidity ABI encoding. Used with AbiEncodeWith, AbiDecodeWith and DecodeMessageResult.
TraitDefinitionRegistry
Type that is guaranteed by ink! to implement all ink! trait definitions.

Enums§

DispatchError
An error that can occur during dispatch of ink! dispatchables. todo: add tests for other errors beside PaidUnpayableMessage
Encoding
todo: comment

Traits§

AbiDecodeWith
Trait for ABI-specific decoding.
AbiEncodeWith
Trait for ABI-specific encoding with support for both slice and vector buffers.
ConstructorOutput
Guards against using invalid contract initializer types.
ContractConstructorDecoder
Generated type used to decode all dispatchable ink! constructors of the ink! smart contract.
ContractMessageDecoder
Generated type used to decode all dispatchable ink! messages of the ink! smart contract.
ContractName
Stores the name of the ink! smart contract.
DecodeDispatch
Decodes an ink! dispatch input into a known selector and its expected parameters.
DispatchableConstructorInfo
Stores various information of the respective dispatchable ink! constructor.
DispatchableMessageInfo
Stores various information of the respective dispatchable ink! message.
ExecuteDispatchable
Starts the execution of the respective ink! message or constructor call.
TraitInfo
Captures info about an ink! trait definition.
TraitMessageInfo
Stores information for every ink! trait message of an ink! trait definition.