pub fn decode_input<T>() -> Result<T>where
Returns the execution input to the executed contract and decodes it as
- The input is the 4-bytes selector followed by the arguments of the called function in their SCALE encoded representation.
- No prior interaction with the environment must take place before calling this procedure.
Normally contracts define their own
enum dispatch types respective
to their exported constructors and messages that implement
according to the constructors or messages selectors and their arguments.
enum dispatch types are then given to this procedure as the
When using ink! users do not have to construct those enum dispatch types themselves as they are normally generated by the ink! code generation automatically.
If the given
T cannot be properly decoded from the expected input.