package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

The Carbonated_map_costs module contains gas cost functions for Carbonated_map.

val find_cost : compare_key_cost:Alpha_context.Gas.cost -> size:int -> Alpha_context.Gas.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:Alpha_context.Gas.cost -> size:int -> Alpha_context.Gas.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 to_list_cost : size:int -> Alpha_context.Gas.cost

to_list_cost ~size returns the cost of transforming a map of size size to a list of key-value pairs.