package tezos-protocol-012-Psithaca

  1. Overview
  2. Docs
Module type
Class type
val node_too_large : Script.node -> bool

node_too_large node returns true if:

  • The number of sub-nodes in the node exceeds Global_constants_storage.node_size_limit.
  • The sum of the bytes in String, Int, and Bytes sub-nodes of node exceeds Global_constants_storage.bytes_size_limit.

Otherwise returns false.

val bottom_up_fold_cps : 'accumulator -> 'loc Script.michelson_node -> ('accumulator -> 'loc Script.michelson_node -> 'return) -> ('accumulator -> 'loc Script.michelson_node -> ('accumulator -> 'loc Script.michelson_node -> 'return) -> 'return) -> 'return

bottom_up_fold_cps initial_accumulator node initial_k f folds node and all its sub-nodes if any, starting from initial_accumulator, using an initial continuation initial_k. At each node, f is called to transform the continuation k into the next one. This explicit manipulation of the continuation is typically useful to short-circuit.

Notice that a common source of bug is to forget to properly call the continuation in `f`.

val expr_to_address_in_context : t -> Script.expr -> (t * Script_expr_hash.t, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) result

expr_to_address_in_context context expr converts expr into a unique hash represented by a Script_expr_hash.t.

Consumes gas corresponding to the cost of converting expr to bytes and hashing the bytes.


Innovation. Community. Security.