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 is Input::Coin or Input::Message, else None.

Examples

use std::inputs::input_amount;

fn foo() {
    let input_amount = input_amount(0);
    assert(input_amount.unwrap() == 100);
}