pub fn output_asset_id(index: u64) -> Option<AssetId> 
Expand description

Gets the AssetId of the output if it is a Output::Coin.

Arguments

  • index: [u64] - The index of the output to get the AssetId of.

Returns

  • [Option] - The AssetId of the output if it is a Output::Coin. None otherwise.

Reverts

  • When the output type is unrecognized. This should never happen.

Examples

use std::outputs::output_asset_id;

fn foo() {
    let output_asset_id = output_asset_id(0);
    log(output_asset_id);
}