seedelf_cli::transaction

Function address_minimum_lovelace_with_assets

Source
pub fn address_minimum_lovelace_with_assets(
    address: &str,
    tokens: Assets,
) -> u64
Expand description

Calculates the minimum lovelace required for a given address with assets.

This function constructs a transaction output for the specified address with a base lovelace amount and iterates over the provided list of assets to add them to the output. It then calculates the minimum required lovelace using calculate_min_required_utxo.

§Arguments

  • address - A string slice containing the Bech32-encoded address.
  • 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.