package tezos-protocol-014-PtKathma

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

This module re-exports definitions from Script_repr and Michelson_v1_primitives.

type prim = Michelson_v1_primitives.prim =
  1. | K_parameter
  2. | K_storage
  3. | K_code
  4. | K_view
  5. | D_False
  6. | D_Elt
  7. | D_Left
  8. | D_None
  9. | D_Pair
  10. | D_Right
  11. | D_Some
  12. | D_True
  13. | D_Unit
  14. | I_PACK
  15. | I_UNPACK
  16. | I_BLAKE2B
  17. | I_SHA256
  18. | I_SHA512
  19. | I_ABS
  20. | I_ADD
  21. | I_AMOUNT
  22. | I_AND
  23. | I_BALANCE
  24. | I_CAR
  25. | I_CDR
  26. | I_CHAIN_ID
  27. | I_CHECK_SIGNATURE
  28. | I_COMPARE
  29. | I_CONCAT
  30. | I_CONS
  31. | I_CREATE_ACCOUNT
  32. | I_CREATE_CONTRACT
  33. | I_IMPLICIT_ACCOUNT
  34. | I_DIP
  35. | I_DROP
  36. | I_DUP
  37. | I_VIEW
  38. | I_EDIV
  39. | I_EMPTY_BIG_MAP
  40. | I_EMPTY_MAP
  41. | I_EMPTY_SET
  42. | I_EQ
  43. | I_EXEC
  44. | I_APPLY
  45. | I_FAILWITH
  46. | I_GE
  47. | I_GET
  48. | I_GET_AND_UPDATE
  49. | I_GT
  50. | I_HASH_KEY
  51. | I_IF
  52. | I_IF_CONS
  53. | I_IF_LEFT
  54. | I_IF_NONE
  55. | I_INT
  56. | I_LAMBDA
  57. | I_LE
  58. | I_LEFT
  59. | I_LEVEL
  60. | I_LOOP
  61. | I_LSL
  62. | I_LSR
  63. | I_LT
  64. | I_MAP
  65. | I_MEM
  66. | I_MUL
  67. | I_NEG
  68. | I_NEQ
  69. | I_NIL
  70. | I_NONE
  71. | I_NOT
  72. | I_NOW
  73. | I_MIN_BLOCK_TIME
  74. | I_OR
  75. | I_PAIR
  76. | I_UNPAIR
  77. | I_PUSH
  78. | I_RIGHT
  79. | I_SIZE
  80. | I_SOME
  81. | I_SOURCE
  82. | I_SENDER
  83. | I_SELF
  84. | I_SELF_ADDRESS
  85. | I_SLICE
  86. | I_STEPS_TO_QUOTA
  87. | I_SUB
  88. | I_SUB_MUTEZ
  89. | I_SWAP
  90. | I_TRANSFER_TOKENS
  91. | I_SET_DELEGATE
  92. | I_UNIT
  93. | I_UPDATE
  94. | I_XOR
  95. | I_ITER
  96. | I_LOOP_LEFT
  97. | I_ADDRESS
  98. | I_CONTRACT
  99. | I_ISNAT
  100. | I_CAST
  101. | I_RENAME
  102. | I_SAPLING_EMPTY_STATE
  103. | I_SAPLING_VERIFY_UPDATE
  104. | I_DIG
  105. | I_DUG
  106. | I_NEVER
  107. | I_VOTING_POWER
  108. | I_TOTAL_VOTING_POWER
  109. | I_KECCAK
  110. | I_SHA3
  111. | I_PAIRING_CHECK
  112. | I_TICKET
  113. | I_READ_TICKET
  114. | I_SPLIT_TICKET
  115. | I_JOIN_TICKETS
  116. | I_OPEN_CHEST
  117. | I_EMIT
  118. | T_bool
  119. | T_contract
  120. | T_int
  121. | T_key
  122. | T_key_hash
  123. | T_lambda
  124. | T_list
  125. | T_map
  126. | T_big_map
  127. | T_nat
  128. | T_option
  129. | T_or
  130. | T_pair
  131. | T_set
  132. | T_signature
  133. | T_string
  134. | T_bytes
  135. | T_mutez
  136. | T_timestamp
  137. | T_unit
  138. | T_operation
  139. | T_address
  140. | T_tx_rollup_l2_address
  141. | T_sapling_transaction
  142. | T_sapling_transaction_deprecated
  143. | T_sapling_state
  144. | T_chain_id
  145. | T_never
  146. | T_bls12_381_g1
  147. | T_bls12_381_g2
  148. | T_bls12_381_fr
  149. | T_ticket
  150. | T_chest_key
  151. | T_chest
  152. | H_constant
val lazy_expr : expr -> lazy_expr
type 'location michelson_node = ('location, prim) Tezos_protocol_environment_014_PtKathma.Micheline.node
type t = {
  1. code : lazy_expr;
  2. storage : lazy_expr;
}
val deserialization_cost_estimated_from_bytes : int -> Gas.cost
val deserialized_cost : expr -> Gas.cost
val serialized_cost : bytes -> Gas.cost
val bytes_node_cost : bytes -> Gas.cost
type consume_deserialization_gas =
  1. | Always
  2. | When_needed

Mode of deserialization gas consumption in force_decode:

  • Always: the gas is taken independently of the internal state of the lazy_expr
  • When_needed: the gas is consumed only if the lazy_expr has never been deserialized before.
val force_decode_in_context : consume_deserialization_gas:consume_deserialization_gas -> context -> lazy_expr -> (expr * context) Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult

Decode an expression in the context after consuming the deserialization gas cost (see consume_deserialization_gas).

Decode an expression in the context after consuming the deserialization gas cost.

consume_decoding_gas available_gas lexpr subtracts (a lower bound on) the cost to deserialize lexpr from available_gas. The cost does not depend on the internal state of the lazy_expr.

  • returns

    Error Operation_quota_exceeded if the remaining gas would fall below 0.

    This mimics the gas consuming part of force_decode_in_context called with consume_deserialization_gas:Always.

val unit_parameter : lazy_expr
val strip_locations_cost : _ michelson_node -> Gas.cost
val strip_annotations_cost : node -> Gas.cost
val strip_annotations : node -> node
OCaml

Innovation. Community. Security.