Function std::inputs::input_amount
pub fn input_amount(index: u64) -> Option<u64>
Expand description
Gets amount field from input at index
.
Arguments
index
: [u64] - The index of the input to check.
Returns
- [Option] - The amount of the input at
index
, if the input’s type isInput::Coin
orInput::Message
, elseNone
.
Examples
use std::inputs::input_amount;
fn foo() {
let input_amount = input_amount(0);
assert(input_amount.unwrap() == 100);
}