package archetype

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

Module Archetype.MichelsonSource

Sourcetype 'a with_annot = {
  1. node : 'a;
  2. annotation : Ident.ident option;
}
Sourcetype prim = {
  1. prim : Ident.ident;
  2. args : obj_micheline list;
  3. annots : Ident.ident list;
}
Sourceand obj_micheline =
  1. | Oprim of prim
  2. | Ostring of string
  3. | Obytes of string
  4. | Oint of string
  5. | Oarray of obj_micheline list
  6. | Ovar of obj_micheline_var
Sourceand obj_micheline_var =
  1. | OMVfree of Ident.ident
  2. | OMVint of Ident.ident * bool
  3. | OMVstring of Ident.ident
  4. | OMVbytes of Ident.ident
  5. | OMVif of Ident.ident * obj_micheline * obj_micheline
Sourceval prim_to_yojson : prim -> Yojson.Safe.t
Sourceval obj_micheline_to_yojson : obj_micheline -> Yojson.Safe.t
Sourceval obj_micheline_var_to_yojson : obj_micheline_var -> Yojson.Safe.t
Sourcetype type_node =
  1. | Taddress
  2. | Tbig_map of type_ * type_
  3. | Tbool
  4. | Tbytes
  5. | Tchain_id
  6. | Tcontract of type_
  7. | Tint
  8. | Tkey
  9. | Tkey_hash
  10. | Tlambda of type_ * type_
  11. | Tlist of type_
  12. | Tmap of type_ * type_
  13. | Tmutez
  14. | Tnat
  15. | Toperation
  16. | Toption of type_
  17. | Tor of type_ * type_
  18. | Tpair of type_ list
  19. | Tset of type_
  20. | Tsignature
  21. | Tstring
  22. | Ttimestamp
  23. | Tunit
  24. | Tticket of type_
  25. | Tsapling_state of int
  26. | Tsapling_transaction of int
  27. | Tbls12_381_fr
  28. | Tbls12_381_g1
  29. | Tbls12_381_g2
  30. | Tnever
  31. | Tchest
  32. | Tchest_key
  33. | Ttx_rollup_l2_address
Sourcetype data =
  1. | Dint of Core.big_int
  2. | Dstring of string
  3. | Dbytes of string
  4. | Dunit
  5. | Dtrue
  6. | Dfalse
  7. | Dpair of data * data
  8. | Dleft of data
  9. | Dright of data
  10. | Dsome of data
  11. | Dnone
  12. | Dlist of data list
  13. | Delt of data * data
  14. | Dvar of Ident.ident * type_ * bool
  15. | DIrCode of Ident.ident * instruction
  16. | Dcode of code
Sourceand code_node =
  1. | SEQ of code list
  2. | APPLY
  3. | EXEC
  4. | FAILWITH
  5. | IF of code list * code list
  6. | IF_CONS of code list * code list
  7. | IF_LEFT of code list * code list
  8. | IF_NONE of code list * code list
  9. | ITER of code list
  10. | LAMBDA of type_ * type_ * code list
  11. | LOOP of code list
  12. | LOOP_LEFT of code list
  13. | DIG of int
  14. | DIP of int * code list
  15. | DROP of int
  16. | DUG of int
  17. | DUP
  18. | DUP_N of int
  19. | PUSH of type_ * data
  20. | SWAP
  21. | ABS
  22. | ADD
  23. | COMPARE
  24. | EDIV
  25. | EQ
  26. | GE
  27. | GT
  28. | INT
  29. | ISNAT
  30. | LE
  31. | LSL
  32. | LSR
  33. | LT
  34. | MUL
  35. | NEG
  36. | NEQ
  37. | SUB
  38. | SUB_MUTEZ
  39. | AND
  40. | NOT
  41. | OR
  42. | XOR
  43. | BLAKE2B
  44. | CHECK_SIGNATURE
  45. | HASH_KEY
  46. | KECCAK
  47. | PAIRING_CHECK
  48. | SAPLING_EMPTY_STATE of int
  49. | SAPLING_VERIFY_UPDATE
  50. | SHA256
  51. | SHA512
  52. | SHA3
  53. | ADDRESS
  54. | AMOUNT
  55. | BALANCE
  56. | CHAIN_ID
  57. | CONTRACT of type_ * Ident.ident option
  58. | CREATE_CONTRACT of obj_micheline
  59. | EMIT of type_ * Ident.ident option
  60. | IMPLICIT_ACCOUNT
  61. | LEVEL
  62. | NOW
  63. | SELF of Ident.ident option
  64. | SELF_ADDRESS
  65. | SENDER
  66. | SET_DELEGATE
  67. | SOURCE
  68. | TOTAL_VOTING_POWER
  69. | TRANSFER_TOKENS
  70. | VOTING_POWER
  71. | CAR
  72. | CDR
  73. | CONCAT
  74. | CONS
  75. | EMPTY_BIG_MAP of type_ * type_
  76. | EMPTY_MAP of type_ * type_
  77. | EMPTY_SET of type_
  78. | GET
  79. | GET_N of int
  80. | GET_AND_UPDATE
  81. | LEFT of type_
  82. | MAP of code list
  83. | MEM
  84. | NEVER
  85. | NIL of type_
  86. | NONE of type_
  87. | PACK
  88. | PAIR
  89. | PAIR_N of int
  90. | RIGHT of type_
  91. | SIZE
  92. | SLICE
  93. | SOME
  94. | UNIT
  95. | UNPACK of type_
  96. | UNPAIR
  97. | UNPAIR_N of int
  98. | UPDATE
  99. | UPDATE_N of int
  100. | JOIN_TICKETS
  101. | READ_TICKET
  102. | SPLIT_TICKET
  103. | TICKET
  104. | CAST of type_
  105. | RENAME
  106. | VIEW of Ident.ident * type_
  107. | OPEN_CHEST
  108. | CAR_N of int
  109. | CDR_N of int
Sourceand code = {
  1. node : code_node;
  2. type_ : type_ list option ref;
}
Sourceand z_operator =
  1. | Znow
  2. | Zamount
  3. | Zbalance
  4. | Zsource
  5. | Zsender
  6. | Zaddress
  7. | Zchain_id
  8. | Zself of Ident.ident option
  9. | Zself_address
  10. | Znone of type_
  11. | Zunit
  12. | Znil of type_
  13. | Zemptyset of type_
  14. | Zemptymap of type_ * type_
  15. | Zemptybigmap of type_ * type_
  16. | Ztotalvotingpower
  17. | Zlevel
  18. | Zsapling_empty_state of int
Sourceand un_operator =
  1. | Ucar
  2. | Ucdr
  3. | Uleft of type_
  4. | Uright of type_
  5. | Uneg
  6. | Uint
  7. | Unot
  8. | Uabs
  9. | Uisnat
  10. | Usome
  11. | Usize
  12. | Upack
  13. | Uunpack of type_
  14. | Ublake2b
  15. | Usha256
  16. | Usha512
  17. | Usha3
  18. | Ukeccak
  19. | Uhash_key
  20. | Ufail
  21. | Ucontract of type_ * Ident.ident option
  22. | Usetdelegate
  23. | Uimplicitaccount
  24. | Ueq
  25. | Une
  26. | Ugt
  27. | Uge
  28. | Ult
  29. | Ule
  30. | Uvotingpower
  31. | Ureadticket
  32. | Ujointickets
  33. | Upairing_check
  34. | Uconcat
  35. | Uaddress
  36. | UcarN of int
  37. | UcdrN of int
  38. | UforcePair
  39. | Uemit of type_ * Ident.ident option
Sourceand bin_operator =
  1. | Badd
  2. | Bsub
  3. | Bmul
  4. | Bediv
  5. | Blsl
  6. | Blsr
  7. | Bor
  8. | Band
  9. | Bxor
  10. | Bcompare
  11. | Bget
  12. | Bmem
  13. | Bconcat
  14. | Bcons
  15. | Bpair
  16. | Bexec
  17. | Bapply
  18. | Bcreateticket
  19. | Bsplitticket
  20. | Bsapling_verify_update
  21. | Bview of Ident.ident * type_
  22. | Bsubmutez
Sourceand ter_operator =
  1. | Tcheck_signature
  2. | Tslice
  3. | Tupdate
  4. | Ttransfer_tokens
  5. | Topen_chest
  6. | Tcreate_contract of obj_micheline
Sourceand g_operator = [
  1. | `Zop of z_operator
  2. | `Uop of un_operator
  3. | `Bop of bin_operator
  4. | `Top of ter_operator
]
Sourceand cmp_operator =
  1. | Ceq
  2. | Cne
  3. | Cgt
  4. | Cge
  5. | Clt
  6. | Cle
Sourceand builtin =
  1. | Bmin of type_
  2. | Bmax of type_
  3. | Bfloor
  4. | Bceil
  5. | BlistContains of type_
  6. | BlistNth of type_
  7. | Bnattostring
  8. | Bratcmp
  9. | Bratnorm
  10. | Brataddsub
  11. | Bratdiv
  12. | Bratmul
  13. | Bratuminus
  14. | Bratabs
  15. | Brattez
  16. | Bratdur
  17. | Bmuteztonat
Sourceand instruction =
  1. | Iseq of instruction list
  2. | IletIn of Ident.ident * instruction * instruction * bool
  3. | Ivar of Ident.ident
  4. | Icall of Ident.ident * instruction list * bool
  5. | Iassign of Ident.ident * instruction
  6. | Iassigntuple of Ident.ident * int * int * instruction
  7. | Iif of instruction * instruction * instruction * type_
  8. | Iifnone of instruction * instruction * Ident.ident * instruction * type_
  9. | Iifleft of instruction * Ident.ident * instruction * Ident.ident * instruction * type_
  10. | Iifcons of instruction * Ident.ident * Ident.ident * instruction * instruction * type_
  11. | Iloop of instruction * instruction
  12. | Iiter of Ident.ident list * instruction * instruction
  13. | Iloopleft of instruction * Ident.ident * instruction
  14. | Ilambda of type_ * Ident.ident * type_ * instruction
  15. | Izop of z_operator
  16. | Iunop of un_operator * instruction
  17. | Ibinop of bin_operator * instruction * instruction
  18. | Iterop of ter_operator * instruction * instruction * instruction
  19. | Iupdate of ukind * aoperator
  20. | Iconst of type_ * data
  21. | Icompare of cmp_operator * instruction * instruction
  22. | Iset of type_ * instruction list
  23. | Ilist of type_ * instruction list
  24. | Imap of bool * type_ * type_ * (instruction * instruction) list
  25. | Irecord of ritem
  26. | Irecupdate of instruction * ruitem
  27. | Imap_ of instruction * Ident.ident * instruction
  28. | Ifold of Ident.ident * Ident.ident option * Ident.ident * instruction * instruction * instruction
  29. | Ireverse of type_ * instruction
  30. | Imichelson of instruction list * code * Ident.ident list
  31. | Iwildcard of type_ * Ident.ident
Sourceand ritem =
  1. | Rtuple of instruction list
  2. | Rnodes of ritem list
Sourceand ruitem =
  1. | RUnodes of int * (int * ruitem) list
  2. | RUassign of int * (int * instruction) list
Sourceand aoperator =
  1. | Aunop of un_operator
  2. | Abinop of bin_operator * instruction
  3. | Aterop of ter_operator * instruction * instruction
Sourceand ukind =
  1. | Uvar of Ident.ident
  2. | Urec of Ident.ident * (int * int) list
Sourcetype implem =
  1. | Concrete of (Ident.ident * type_) list * instruction
  2. | Abstract of builtin
Sourcetype ctx_func = {
  1. args : (Ident.ident * type_) list;
  2. stovars : Ident.ident list;
}
Sourcetype func = {
  1. name : Ident.ident;
  2. targ : type_;
  3. tret : type_;
  4. ctx : ctx_func;
  5. body : implem;
}
Sourcetype entry = {
  1. name : Ident.ident;
  2. args : (Ident.ident * type_) list;
  3. eargs : (Ident.ident * type_) list;
  4. body : instruction;
}
Sourcetype ir = {
  1. name : Ident.ident;
  2. storage_type : type_;
  3. storage_data : data;
  4. storage_list : (Ident.ident * type_ * data) list;
  5. with_operations : bool;
  6. parameter : type_;
  7. funs : func list;
  8. views : func list;
  9. offchain_views : func list;
  10. entries : entry list;
  11. parameters : Ident.ident list;
}
Sourcetype view_struct = {
  1. id : Ident.ident;
  2. param : type_;
  3. ret : type_;
  4. body : code;
}
Sourcetype michelson = {
  1. storage : type_;
  2. parameter : type_;
  3. code : code;
  4. views : view_struct list;
  5. parameters : Ident.ident list;
}
Sourcetype micheline = {
  1. code : obj_micheline list;
  2. storage : obj_micheline;
  3. parameters : Ident.ident list;
  4. views : obj_micheline list;
}
Sourcetype annotation_struct = {
  1. name : string;
  2. description : string;
}
Sourcetype michelson_storage_view_struct = {
  1. code : obj_micheline;
  2. parameter : obj_micheline option;
  3. returnType : obj_micheline option;
  4. annotations : annotation_struct list;
  5. version : string option;
}
Sourceval show_michelson_storage_view_struct : michelson_storage_view_struct -> Ppx_deriving_runtime.string
Sourcetype rest_api_query_struct = {
  1. specificationUri : string;
  2. baseUri : string;
  3. path : string;
}
Sourceval show_rest_api_query_struct : rest_api_query_struct -> Ppx_deriving_runtime.string
Sourcetype offchain_view_implem_kind =
  1. | OVIKMichelsonStorageView of michelson_storage_view_struct
  2. | OVIKRestApiQuery of rest_api_query_struct
Sourceval show_offchain_view_implem_kind : offchain_view_implem_kind -> Ppx_deriving_runtime.string
Sourcetype offchain_view = {
  1. name : Ident.ident;
  2. implementations : offchain_view_implem_kind list;
}
Sourcetype dvar = [
  1. | `VLocal of int
  2. | `VGlobal of Ident.ident
]
Sourceand dexpr =
  1. | Dvar of dvar
  2. | Depair of dexpr * dexpr
  3. | Ddata of type_ * data
  4. | Dfun of g_operator * dexpr list
Sourcetype dinstr =
  1. | DIAssign of dvar * dexpr
  2. | DIIf of dexpr * dcode * dcode
  3. | DIMatch of dexpr * (Ident.ident * dpattern list * dcode) list
  4. | DIFailwith of dexpr
  5. | DIWhile of dexpr * dcode
  6. | DIIter of dtyvar * dexpr * dcode
  7. | DILoop of dtyvar * dcode
Sourceand dtyvar = dvar
Sourceand dpattern =
  1. | DVar of int
  2. | DPair of dpattern * dpattern
Sourceand dcode = dinstr list
Sourcetype dprogram = {
  1. name : Ident.ident;
  2. storage : type_;
  3. parameter : type_;
  4. storage_data : data;
  5. code : dcode;
  6. procs : (string * (string * type_) list * dcode) list;
}
Sourcetype rstack1 = [
  1. | dvar
  2. | `Paired of rstack1 * rstack1
]
Sourcetype rstack = rstack1 list
Sourceval mk_type : ?annotation:Ident.ident -> type_node -> type_
Sourceval mk_ctx_func : ?args:(Ident.ident * type_) list -> ?stovars:Ident.ident list -> 'a -> ctx_func
Sourceval mk_code : ?type_:type_ list -> code_node -> code
Sourceval mk_func : Ident.ident -> type_ -> type_ -> ctx_func -> implem -> func
Sourceval mk_entry : Ident.ident -> (Ident.ident * type_) list -> (Ident.ident * type_) list -> instruction -> entry
Sourceval mk_ir : ?parameters:Ident.ident list -> Ident.ident -> type_ -> data -> (Ident.ident * type_ * data) list -> ?with_operations:bool -> type_ -> func list -> func list -> func list -> entry list -> ir
Sourceval mk_view_struct : Ident.ident -> type_ -> type_ -> code -> view_struct
Sourceval mk_michelson : ?parameters:Ident.ident list -> type_ -> type_ -> ?views:view_struct list -> code -> michelson
Sourceval mk_prim : ?args:obj_micheline list -> ?annots:Ident.ident list -> Ident.ident -> prim
Sourceval mk_micheline : ?parameters:Ident.ident list -> ?views:obj_micheline list -> obj_micheline list -> obj_micheline -> micheline
Sourceval mk_dprogram : ?procs:(string * (string * type_) list * dcode) list -> type_ -> type_ -> data -> Ident.ident -> dcode -> dprogram
Sourceval toperation : type_
Sourceval tunit : type_
Sourceval tstring : type_
Sourceval tnat : type_
Sourceval tint : type_
Sourceval tbool : type_
Sourceval tmutez : type_
Sourceval taddress : type_
Sourceval ttimestamp : type_
Sourceval tchain_id : type_
Sourceval tbytes : type_
Sourceval tpair : type_ list -> type_
Sourceval tor : type_ -> type_ -> type_
Sourceval trat : type_
Sourceval tlist : type_ -> type_
Sourceval tset : type_ -> type_
Sourceval tmap : type_ -> type_ -> type_
Sourceval tlambda : type_ -> type_ -> type_
Sourceval toption : type_ -> type_
Sourceval tcontract : type_ -> type_
Sourceval tkey_hash : type_
Sourceval tticket : type_ -> type_
Sourceval itrue : instruction
Sourceval ifalse : instruction
Sourceval istring : string -> instruction
Sourceval inone : type_ -> instruction
Sourceval iunit : instruction
Sourceval inil : type_ -> instruction
Sourceval iemptyset : type_ -> instruction
Sourceval iemptymap : type_ -> type_ -> instruction
Sourceval iemptybigmap : type_ -> type_ -> instruction
Sourceval ifail : string -> instruction
Sourceval iskip : instruction
Sourceval irecord : ritem -> instruction
Sourceval isrecord : instruction list -> instruction
Sourceval icarn : int -> instruction -> instruction
Sourceval icdrn : int -> instruction -> instruction
Sourceval ctrue : code
Sourceval cfalse : code
Sourceval cnat : Core.big_int -> code
Sourceval cstring : string -> code
Sourceval cfail : string -> code
Sourceval cskip : code
Sourceval cseq : code list -> code
Sourceval capply : code
Sourceval cexec : code
Sourceval cfailwith : code
Sourceval cif : (code list * code list) -> code
Sourceval cifcons : (code list * code list) -> code
Sourceval cifleft : (code list * code list) -> code
Sourceval cifnone : (code list * code list) -> code
Sourceval citer : code list -> code
Sourceval clambda : (type_ * type_ * code list) -> code
Sourceval cloop : code list -> code
Sourceval cloop_left : code list -> code
Sourceval cdig : int -> code
Sourceval cdip : (int * code list) -> code
Sourceval cdrop : int -> code
Sourceval cdug : int -> code
Sourceval cdup : code
Sourceval cdup_n : int -> code
Sourceval cpush : (type_ * data) -> code
Sourceval cswap : code
Sourceval cabs : code
Sourceval cadd : code
Sourceval ccompare : code
Sourceval cediv : code
Sourceval ceq : code
Sourceval cge : code
Sourceval cgt : code
Sourceval cint : code
Sourceval cisnat : code
Sourceval cle : code
Sourceval clsl : code
Sourceval clsr : code
Sourceval clt : code
Sourceval cmul : code
Sourceval cneg : code
Sourceval cneq : code
Sourceval csub : code
Sourceval csub_mutez : code
Sourceval cand : code
Sourceval cnot : code
Sourceval cor : code
Sourceval cxor : code
Sourceval cblake2b : code
Sourceval ccheck_signature : code
Sourceval chash_key : code
Sourceval ckeccak : code
Sourceval cpairing_check : code
Sourceval csapling_empty_state : int -> code
Sourceval csapling_verify_update : code
Sourceval csha256 : code
Sourceval csha512 : code
Sourceval csha3 : code
Sourceval caddress : code
Sourceval camount : code
Sourceval cbalance : code
Sourceval cchain_id : code
Sourceval ccontract : (type_ * Ident.ident option) -> code
Sourceval cemit : (type_ * Ident.ident option) -> code
Sourceval cimplicit_account : code
Sourceval clevel : code
Sourceval cnow : code
Sourceval cself : Ident.ident option -> code
Sourceval cself_address : code
Sourceval csender : code
Sourceval cset_delegate : code
Sourceval csource : code
Sourceval ctotal_voting_power : code
Sourceval ctransfer_tokens : code
Sourceval cvoting_power : code
Sourceval ccar : code
Sourceval ccdr : code
Sourceval cconcat : code
Sourceval ccons : code
Sourceval cempty_big_map : (type_ * type_) -> code
Sourceval cempty_map : (type_ * type_) -> code
Sourceval cempty_set : type_ -> code
Sourceval cget : code
Sourceval cget_n : int -> code
Sourceval cget_and_update : code
Sourceval cleft : type_ -> code
Sourceval cmap : code list -> code
Sourceval cmem : code
Sourceval cnever : code
Sourceval cnil : type_ -> code
Sourceval cnone : type_ -> code
Sourceval cpack : code
Sourceval cpair : code
Sourceval cpair_n : int -> code
Sourceval cright : type_ -> code
Sourceval csize : code
Sourceval cslice : code
Sourceval csome : code
Sourceval cunit : code
Sourceval cunpair : code
Sourceval cunpair_n : int -> code
Sourceval cunpack : type_ -> code
Sourceval cupdate : code
Sourceval cupdate_n : int -> code
Sourceval cjoin_tickets : code
Sourceval cread_ticket : code
Sourceval csplit_ticket : code
Sourceval cticket : code
Sourceval ccast : type_ -> code
Sourceval crename : code
Sourceval cview : (Ident.ident * type_) -> code
Sourceval copen_chest : code
Sourceval ccreate_contract : obj_micheline -> code
Sourceval ccarn : int -> code
Sourceval ccdrn : int -> code
Sourceval cmp_ident : Tools.String.t -> Tools.String.t -> bool
Sourceval cmp_type : type_ -> type_ -> bool
Sourceval cmp_data : data -> data -> bool
Sourceval cmp_z_operator : z_operator -> z_operator -> bool
Sourceval cmp_un_operator : un_operator -> un_operator -> bool
Sourceval cmp_bin_operator : bin_operator -> bin_operator -> bool
Sourceval cmp_ter_operator : ter_operator -> ter_operator -> bool
Sourceval cmp_code : code -> code -> bool
Sourceval cmp_builtin : builtin -> builtin -> bool
Sourceval map_type : (type_ -> type_) -> type_ -> type_
Sourceval cmp_dvar : dvar -> dvar -> bool
Sourceval cmp_dlocal : dexpr option ref -> dexpr option ref -> bool
Sourceval cmp_dexpr : dexpr -> dexpr -> bool
Sourceval map_data : (data -> data) -> data -> data
Sourceval map_code_gen : (code -> code) -> (data -> data) -> (type_ -> type_) -> code -> code
Sourceval map_code : (code -> code) -> code -> code
Sourceval map_seq : (code list -> code list) -> code -> code
Sourcemodule Utils : sig ... end
Sourceval to_type : obj_micheline -> type_
Sourceval to_data : obj_micheline -> data
Sourceval to_micheline_ : obj_micheline -> micheline_
OCaml

Innovation. Community. Security.