Module Mavryk_raw_protocol_001_PtAtLas.Carbonated_map_costs

The type of the cost.

The Carbonated_map_costs module contains gas cost functions for Carbonated_map.

val find_cost : compare_key_cost:cost -> size:int -> cost

find_cost ~compare_key_cost ~size returns the gas cost for looking up an element from a map of size size. The user of this function is responsible for providing a correct value of compare_key_cost, representing the cost of comparing elements with a given key.

val update_cost : compare_key_cost:cost -> size:int -> cost

update_cost ~compare_key_cost ~size returns the gas cost for updating an element in a map of size size. The user of this function is responsible for providing a correct value of compare_key_cost, representing the cost of comparing elements with a given key.

val fold_cost : size:int -> cost

fold_cost ~size returns the cost of folding over a list of size size.