pub fn input_address(index: u64) -> Option<Address> 
Expand description

Gets the owner field from the input at index, if it’s a coin,
or the recipient of the input message, if it is a message.

Arguments

  • index: [u64] - The index of the input to check.

Returns

  • [Option] - The owner of the input at index, if the input’s type is Input::Coin, or the recipient of the input message, if the input’s type is Input::Message, else None.

Examples

use std::inputs::input_address;

fn foo() {
    let input_address = input_address(0).unwrap();
    assert(input_address != Address::zero());
}