package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
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_OR
  74. | I_PAIR
  75. | I_UNPAIR
  76. | I_PUSH
  77. | I_RIGHT
  78. | I_SIZE
  79. | I_SOME
  80. | I_SOURCE
  81. | I_SENDER
  82. | I_SELF
  83. | I_SELF_ADDRESS
  84. | I_SLICE
  85. | I_STEPS_TO_QUOTA
  86. | I_SUB
  87. | I_SUB_MUTEZ
  88. | I_SWAP
  89. | I_TRANSFER_TOKENS
  90. | I_SET_DELEGATE
  91. | I_UNIT
  92. | I_UPDATE
  93. | I_XOR
  94. | I_ITER
  95. | I_LOOP_LEFT
  96. | I_ADDRESS
  97. | I_CONTRACT
  98. | I_ISNAT
  99. | I_CAST
  100. | I_RENAME
  101. | I_SAPLING_EMPTY_STATE
  102. | I_SAPLING_VERIFY_UPDATE
  103. | I_DIG
  104. | I_DUG
  105. | I_NEVER
  106. | I_VOTING_POWER
  107. | I_TOTAL_VOTING_POWER
  108. | I_KECCAK
  109. | I_SHA3
  110. | I_PAIRING_CHECK
  111. | I_TICKET
  112. | I_READ_TICKET
  113. | I_SPLIT_TICKET
  114. | I_JOIN_TICKETS
  115. | I_OPEN_CHEST
  116. | T_bool
  117. | T_contract
  118. | T_int
  119. | T_key
  120. | T_key_hash
  121. | T_lambda
  122. | T_list
  123. | T_map
  124. | T_big_map
  125. | T_nat
  126. | T_option
  127. | T_or
  128. | T_pair
  129. | T_set
  130. | T_signature
  131. | T_string
  132. | T_bytes
  133. | T_mutez
  134. | T_timestamp
  135. | T_unit
  136. | T_operation
  137. | T_address
  138. | T_sapling_transaction
  139. | T_sapling_state
  140. | T_chain_id
  141. | T_never
  142. | T_bls12_381_g1
  143. | T_bls12_381_g2
  144. | T_bls12_381_fr
  145. | T_ticket
  146. | T_chest_key
  147. | T_chest
  148. | H_constant
type annot = string list
type lazy_expr = expr Data_encoding.lazy_t
val lazy_expr : expr -> lazy_expr
type 'location michelson_node = ('location, prim) Tezos_micheline.Micheline.node
type unlocated_michelson_node = unit michelson_node
type t = {
  1. code : lazy_expr;
  2. storage : lazy_expr;
}
val location_encoding : location Data_encoding.t
val expr_encoding : expr Data_encoding.t
val prim_encoding : prim Data_encoding.t
val encoding : t Data_encoding.t
val lazy_expr_encoding : lazy_expr Data_encoding.t
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_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result

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

val force_bytes_in_context : context -> lazy_expr -> (bytes * context, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result
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