package tezos-protocol-alpha

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

Innovation. Community. Security.