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§
- Constructor
Output Value - Stores the actual value of the constructor return type.
- Scale
Encoding - Marker type for SCALE encoding. Used with
AbiEncodeWith
,AbiDecodeWith
andDecodeMessageResult
. - SolEncoding
- Marker type for Solidity ABI encoding. Used with
AbiEncodeWith
,AbiDecodeWith
andDecodeMessageResult
. - Trait
Definition Registry - Type that is guaranteed by ink! to implement all ink! trait definitions.
Enums§
- Dispatch
Error - An error that can occur during dispatch of ink! dispatchables.
todo: add tests for other errors beside
PaidUnpayableMessage
- Encoding
- todo: comment
Traits§
- AbiDecode
With - Trait for ABI-specific decoding.
- AbiEncode
With - Trait for ABI-specific encoding with support for both slice and vector buffers.
- Constructor
Output - Guards against using invalid contract initializer types.
- Contract
Constructor Decoder - Generated type used to decode all dispatchable ink! constructors of the ink! smart contract.
- Contract
Message Decoder - Generated type used to decode all dispatchable ink! messages of the ink! smart contract.
- Contract
Name - Stores the name of the ink! smart contract.
- Decode
Dispatch - Decodes an ink! dispatch input into a known selector and its expected parameters.
- Dispatchable
Constructor Info - Stores various information of the respective dispatchable ink! constructor.
- Dispatchable
Message Info - Stores various information of the respective dispatchable ink! message.
- Execute
Dispatchable - Starts the execution of the respective ink! message or constructor call.
- Trait
Info - Captures info about an ink! trait definition.
- Trait
Message Info - Stores information for every ink! trait message of an ink! trait definition.