seedelf_cli::transaction

Function total_computation_fee

Source
pub fn total_computation_fee(budgets: Vec<(u64, u64)>) -> u64
Expand description

Calculates the total computation fee for a list of CPU and memory budgets.

This function iterates through a vector of (CPU, Memory) tuples and computes the fee for each pair using the computation_fee function. The resulting fees are summed to produce the total computation fee.

§Arguments

  • budgets - A vector of tuples where each tuple contains:
    • u64 - CPU units.
    • u64 - Memory units.

§Returns

  • u64 - The total computation fee for all provided budgets.