Function std::inputs::input_type
pub fn input_type(index: u64) -> Option<Input>
Expand description
Gets the type of the input at index
.
Additional Information
The Input can be of 3 variants, Input::Coin
, Input::Contract
or Input::Message
.
Arguments
index
: [u64] - The index of the input to check.
Returns
- [Option] - The type of the input at
index
.
Examples
use std::inputs::input_type;
fn foo() {
let input_type = input_type(0).unwrap();
assert(input_type == Input::Coin);
}