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