cairo_lang_sierra_gas::compute_costs

Function compute_costs

source
pub fn compute_costs<CostType: CostTypeTrait, SpecificCostContext: SpecificCostContextTrait<CostType>>(
    program: &Program,
    get_cost_fn: &dyn Fn(&ConcreteLibfuncId) -> Vec<BranchCost>,
    specific_cost_context: &SpecificCostContext,
    enforced_wallet_values: &OrderedHashMap<StatementIdx, CostType>,
) -> Result<GasInfo, CostError>
Expand description

Computes the GasInfo for a given program.

The specific_cost_context argument controls whether the computation is pre-cost or post-cost.