cairo_lang_sierra_gas

Function calc_gas_precost_info

Source
pub fn calc_gas_precost_info(
    program: &Program,
    function_set_costs: OrderedHashMap<FunctionId, OrderedHashMap<CostTokenType, i32>>,
) -> Result<GasInfo, CostError>
Expand description

Calculates gas pre-cost information for a given program - the gas costs of non-step tokens.

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