seedelf_cli::transaction

Function wallet_minimum_lovelace_with_assets

Source
pub fn wallet_minimum_lovelace_with_assets(tokens: Assets) -> u64
Expand description

Calculates the minimum lovelace required for a wallet transaction output with assets.

This function constructs a staged transaction output that includes:

  • Inline datum.
  • A list of assets (policy IDs, token names, and amounts).

The function iterates over the provided Assets to add each asset to the output and then calculates the minimum required lovelace using calculate_min_required_utxo.

§Arguments

  • tokens - An Assets struct containing a list of assets (policy ID, token name, and amount).

§Returns

  • u64 - The minimum lovelace required for the transaction output.