cairo_lang_sierra_gas

Function calc_gas_postcost_info

Source
pub fn calc_gas_postcost_info<ApChangeVarValue: Fn(StatementIdx) -> usize>(
    program: &Program,
    function_set_costs: OrderedHashMap<FunctionId, OrderedHashMap<CostTokenType, i32>>,
    precost_gas_info: &GasInfo,
    ap_change_var_value: ApChangeVarValue,
) -> Result<GasInfo, CostError>
Expand description

Calculates gas postcost information for a given program - the gas costs of step token.

Note that this calculation is deprecated and is only done for backwards compatibility with old Sierra classes. Generally, the new compute_postcost_info is used.