Module Archetype.Michelson

type 'a with_annot = {
node : 'a;
annotation : Ident.ident option;
}
val pp_with_annot : a. (Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) -> Ppx_deriving_runtime.Format.formatter -> 'a with_annot -> Ppx_deriving_runtime.unit
val show_with_annot : a. (Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) -> 'a with_annot -> Ppx_deriving_runtime.string
type type_node =
| Taddress
| Tbig_map of type_ * type_
| Tbool
| Tbytes
| Tchain_id
| Tcontract of type_
| Tint
| Tkey
| Tkey_hash
| Tlambda of type_ * type_
| Tlist of type_
| Tmap of type_ * type_
| Tmutez
| Tnat
| Toperation
| Toption of type_
| Tor of type_ * type_
| Tpair of type_ * type_
| Tset of type_
| Tsignature
| Tstring
| Ttimestamp
| Tunit
| Tticket of type_
| Tsapling_state of int
| Tsapling_transaction of int
| Tbls12_381_fr
| Tbls12_381_g1
| Tbls12_381_g2
| Tnever
and type_ = type_node with_annot
val pp_type_node : Ppx_deriving_runtime.Format.formatter -> type_node -> Ppx_deriving_runtime.unit
val show_type_node : type_node -> Ppx_deriving_runtime.string
val pp_type_ : Ppx_deriving_runtime.Format.formatter -> type_ -> Ppx_deriving_runtime.unit
val show_type_ : type_ -> Ppx_deriving_runtime.string
type data =
| Dint of Core.big_int
| Dstring of string
| Dbytes of string
| Dunit
| Dtrue
| Dfalse
| Dpair of data * data
| Dleft of data
| Dright of data
| Dsome of data
| Dnone
| Dlist of data list
| Delt of data * data
| Dvar of Ident.ident * type_
val pp_data : Ppx_deriving_runtime.Format.formatter -> data -> Ppx_deriving_runtime.unit
val show_data : data -> Ppx_deriving_runtime.string
type code =
| SEQ of code list
| APPLY
| EXEC
| FAILWITH
| IF of code list * code list
| IF_CONS of code list * code list
| IF_LEFT of code list * code list
| IF_NONE of code list * code list
| ITER of code list
| LAMBDA of type_ * type_ * code list
| LOOP of code list
| LOOP_LEFT of code list
| DIG of int
| DIP of int * code list
| DROP of int
| DUG of int
| DUP
| PUSH of type_ * data
| SWAP
| ABS
| ADD
| COMPARE
| EDIV
| EQ
| GE
| GT
| INT
| ISNAT
| LE
| LSL
| LSR
| LT
| MUL
| NEG
| NEQ
| SUB
| AND
| NOT
| OR
| XOR
| BLAKE2B
| CHECK_SIGNATURE
| HASH_KEY
| SHA256
| SHA512
| ADDRESS
| AMOUNT
| BALANCE
| CHAIN_ID
| CONTRACT of type_ * Ident.ident option
| CREATE_CONTRACT of type_ * type_ * code
| IMPLICIT_ACCOUNT
| NOW
| SELF of Ident.ident option
| SENDER
| SET_DELEGATE
| SOURCE
| TRANSFER_TOKENS
| CAR
| CDR
| CONCAT
| CONS
| EMPTY_BIG_MAP of type_ * type_
| EMPTY_MAP of type_ * type_
| EMPTY_SET of type_
| GET
| LEFT of type_
| MAP of code list
| MEM
| NIL of type_
| NONE of type_
| PACK
| PAIR
| RIGHT of type_
| SIZE
| SLICE
| SOME
| UNIT
| UNPACK of type_
| UPDATE
| JOIN_TICKETS
| READ_TICKET
| SPLIT_TICKET
| TICKET
| UNPAIR
| SELF_ADDRESS
| CAST of type_
| CREATE_ACCOUNT
| RENAME
| STEPS_TO_QUOTA
| LEVEL
| SAPLING_EMPTY_STATE of int
| SAPLING_VERIFY_UPDATE
| NEVER
| VOTING_POWER
| TOTAL_VOTING_POWER
| KECCAK
| SHA3
| PAIRING_CHECK
| SUBMIT_PROPOSALS
| SUBMIT_BALLOT
| SET_BAKER_ACTIVE
| TOGGLE_BAKER_DELEGATIONS
| SET_BAKER_CONSENSUS_KEY
| SET_BAKER_PVSS_KEY
val pp_code : Ppx_deriving_runtime.Format.formatter -> code -> Ppx_deriving_runtime.unit
val show_code : code -> Ppx_deriving_runtime.string
type z_operator =
| Znow
| Zamount
| Zbalance
| Zsource
| Zsender
| Zaddress
| Zchain_id
| Zself of Ident.ident option
| Zself_address
| Znone of type_
| Zunit
| Znil of type_
| Zemptyset of type_
| Zemptymap of type_ * type_
| Zemptybigmap of type_ * type_
| Ztotalvotingpower
| Zlevel
| Zsapling_empty_state of int
val pp_z_operator : Ppx_deriving_runtime.Format.formatter -> z_operator -> Ppx_deriving_runtime.unit
val show_z_operator : z_operator -> Ppx_deriving_runtime.string
type un_operator =
| Ucar
| Ucdr
| Uleft of type_
| Uright of type_
| Uneg
| Uint
| Unot
| Uabs
| Uisnat
| Usome
| Usize
| Upack
| Uunpack of type_
| Ublake2b
| Usha256
| Usha512
| Usha3
| Ukeccak
| Uhash_key
| Ufail
| Ucontract of type_ * Ident.ident option
| Usetdelegate
| Uimplicitaccount
| Ueq
| Une
| Ugt
| Uge
| Ult
| Ule
| Uvotingpower
| Ureadticket
| Ujointickets
| Upairing_check
val pp_un_operator : Ppx_deriving_runtime.Format.formatter -> un_operator -> Ppx_deriving_runtime.unit
val show_un_operator : un_operator -> Ppx_deriving_runtime.string
type bin_operator =
| Badd
| Bsub
| Bmul
| Bediv
| Blsl
| Blsr
| Bor
| Band
| Bxor
| Bcompare
| Bget
| Bmem
| Bconcat
| Bcons
| Bpair
| Bexec
| Bapply
| Bcreateticket
| Bsplitticket
| Bsapling_verify_update
val pp_bin_operator : Ppx_deriving_runtime.Format.formatter -> bin_operator -> Ppx_deriving_runtime.unit
val show_bin_operator : bin_operator -> Ppx_deriving_runtime.string
type ter_operator =
| Tcheck_signature
| Tslice
| Tupdate
| Ttransfer_tokens
val pp_ter_operator : Ppx_deriving_runtime.Format.formatter -> ter_operator -> Ppx_deriving_runtime.unit
val show_ter_operator : ter_operator -> Ppx_deriving_runtime.string
type cmp_operator =
| Ceq
| Cne
| Cgt
| Cge
| Clt
| Cle
val pp_cmp_operator : Ppx_deriving_runtime.Format.formatter -> cmp_operator -> Ppx_deriving_runtime.unit
val show_cmp_operator : cmp_operator -> Ppx_deriving_runtime.string
type builtin =
| Bmin of type_
| Bmax of type_
| Bfloor
| Bceil
| BlistContains of type_
| BlistNth of type_
| Btostring of type_
| Bratcmp
| Bratnorm
| Brataddsub
| Bratdiv
| Bratmul
| Bratuminus
| Bratabs
| Brattez
| Bratdur
val pp_builtin : Ppx_deriving_runtime.Format.formatter -> builtin -> Ppx_deriving_runtime.unit
val show_builtin : builtin -> Ppx_deriving_runtime.string
type instruction =
| Iseq of instruction list
| IletIn of Ident.ident * instruction * instruction * bool
| Ivar of Ident.ident
| Icall of Ident.ident * instruction list * bool
| Iassign of Ident.ident * instruction
| Iif of instruction * instruction * instruction * type_
| Iifnone of instruction * instruction * Ident.ident * instruction * type_
| Iifleft of instruction * Ident.ident * instruction * Ident.ident * instruction * type_
| Iifcons of instruction * Ident.ident * Ident.ident * instruction * instruction * type_
| Iloop of instruction * instruction
| Iiter of Ident.ident list * instruction * instruction
| Iloopleft of instruction * Ident.ident * instruction
| Ilambda of type_ * Ident.ident * type_ * instruction
| Izop of z_operator
| Iunop of un_operator * instruction
| Ibinop of bin_operator * instruction * instruction
| Iterop of ter_operator * instruction * instruction * instruction
| Iconst of type_ * data
| Icompare of cmp_operator * instruction * instruction
| Iset of type_ * instruction list
| Ilist of type_ * instruction list
| Imap of bool * type_ * type_ * (instruction * instruction) list
| Irecord of ritem
| Irecupdate of instruction * ruitem
| Imap_ of instruction * Ident.ident * instruction
| Ifold of Ident.ident * Ident.ident option * Ident.ident * instruction * instruction * instruction
| Imichelson of instruction list * code * Ident.ident list
and ritem =
| Rtuple of instruction list
| Rnodes of ritem list
and ruitem =
| RUnodes of int * (int * ruitem) list
| RUassign of int * (int * instruction) list
val pp_instruction : Ppx_deriving_runtime.Format.formatter -> instruction -> Ppx_deriving_runtime.unit
val show_instruction : instruction -> Ppx_deriving_runtime.string
val pp_ritem : Ppx_deriving_runtime.Format.formatter -> ritem -> Ppx_deriving_runtime.unit
val show_ritem : ritem -> Ppx_deriving_runtime.string
val pp_ruitem : Ppx_deriving_runtime.Format.formatter -> ruitem -> Ppx_deriving_runtime.unit
val show_ruitem : ruitem -> Ppx_deriving_runtime.string
type implem =
| Concrete of (Ident.ident * type_) list * instruction
| Abstract of builtin
val pp_implem : Ppx_deriving_runtime.Format.formatter -> implem -> Ppx_deriving_runtime.unit
val show_implem : implem -> Ppx_deriving_runtime.string
type func = {
name : Ident.ident;
targ : type_;
tret : type_;
body : implem;
}
val pp_func : Ppx_deriving_runtime.Format.formatter -> func -> Ppx_deriving_runtime.unit
val show_func : func -> Ppx_deriving_runtime.string
type entry = {
name : Ident.ident;
args : (Ident.ident * type_) list;
eargs : (Ident.ident * type_) list;
body : instruction;
}
val pp_entry : Ppx_deriving_runtime.Format.formatter -> entry -> Ppx_deriving_runtime.unit
val show_entry : entry -> Ppx_deriving_runtime.string
type ir = {
name : Ident.ident;
storage_type : type_;
storage_data : data;
storage_list : (Ident.ident * type_) list;
with_operations : bool;
parameter : type_;
funs : func list;
entries : entry list;
parameters : Ident.ident list;
}
val pp_ir : Ppx_deriving_runtime.Format.formatter -> ir -> Ppx_deriving_runtime.unit
val show_ir : ir -> Ppx_deriving_runtime.string
type michelson = {
storage : type_;
parameter : type_;
code : code;
parameters : Ident.ident list;
}
val pp_michelson : Ppx_deriving_runtime.Format.formatter -> michelson -> Ppx_deriving_runtime.unit
val show_michelson : michelson -> Ppx_deriving_runtime.string
type prim = {
prim : Ident.ident;
args : obj_micheline list;
annots : Ident.ident list;
}
and obj_micheline =
| Oprim of prim
| Ostring of string
| Obytes of string
| Oint of string
| Oarray of obj_micheline list
| Ovar of obj_micheline_var
and obj_micheline_var =
| OMVfree of Ident.ident
| OMVint of Ident.ident
| OMVstring of Ident.ident
| OMVbytes of Ident.ident
| OMVif of Ident.ident * obj_micheline * obj_micheline
val pp_prim : Ppx_deriving_runtime.Format.formatter -> prim -> Ppx_deriving_runtime.unit
val show_prim : prim -> Ppx_deriving_runtime.string
val pp_obj_micheline : Ppx_deriving_runtime.Format.formatter -> obj_micheline -> Ppx_deriving_runtime.unit
val show_obj_micheline : obj_micheline -> Ppx_deriving_runtime.string
val pp_obj_micheline_var : Ppx_deriving_runtime.Format.formatter -> obj_micheline_var -> Ppx_deriving_runtime.unit
val show_obj_micheline_var : obj_micheline_var -> Ppx_deriving_runtime.string
type micheline = {
code : obj_micheline list;
storage : obj_micheline;
parameters : Ident.ident list;
}
val pp_micheline : Ppx_deriving_runtime.Format.formatter -> micheline -> Ppx_deriving_runtime.unit
val show_micheline : micheline -> Ppx_deriving_runtime.string
type alpha_ident = int
val pp_alpha_ident : Ppx_deriving_runtime.Format.formatter -> alpha_ident -> Ppx_deriving_runtime.unit
val show_alpha_ident : alpha_ident -> Ppx_deriving_runtime.string
type dexpr =
| Dalpha of alpha_ident
| Dvar of type_
| Dstorage of type_
| Doperations
| Dlbdparam
| Dlbdresult
| Ddata of data
| Dzop of z_operator
| Duop of un_operator * dexpr
| Dbop of bin_operator * dexpr * dexpr
| Dtop of ter_operator * dexpr * dexpr * dexpr
| Dapply of dexpr * dexpr
| Dexec of dexpr * dexpr
| Dlambda of type_ * type_ * dinstruction list
| Dloopleft of dexpr * dinstruction list
| Dmap of dexpr * dinstruction list
and dinstruction =
| Ddecl of alpha_ident * dexpr option
| Dassign of dexpr * dexpr
| Dfail of dexpr
| Dif of dexpr * dinstruction list * dinstruction list
| Difcons of dexpr * alpha_ident * alpha_ident * dinstruction list * dinstruction list
| Difleft of dexpr * alpha_ident * dinstruction list * alpha_ident * dinstruction list
| Difnone of dexpr * dinstruction list * alpha_ident * dinstruction list
| Dloop of dexpr * dinstruction list
| Diter of dexpr * dinstruction list
val pp_dexpr : Ppx_deriving_runtime.Format.formatter -> dexpr -> Ppx_deriving_runtime.unit
val show_dexpr : dexpr -> Ppx_deriving_runtime.string
val pp_dinstruction : Ppx_deriving_runtime.Format.formatter -> dinstruction -> Ppx_deriving_runtime.unit
val show_dinstruction : dinstruction -> Ppx_deriving_runtime.string
type dprogram = {
name : Ident.ident;
storage : type_;
parameter : type_;
storage_data : data;
code : dinstruction list;
}
val pp_dprogram : Ppx_deriving_runtime.Format.formatter -> dprogram -> Ppx_deriving_runtime.unit
val show_dprogram : dprogram -> Ppx_deriving_runtime.string
val mk_type : ?⁠annotation:Ident.ident -> type_node -> type_
val mk_func : Ident.ident -> type_ -> type_ -> implem -> func
val mk_entry : Ident.ident -> (Ident.ident * type_) list -> (Ident.ident * type_) list -> instruction -> entry
val mk_ir : ?⁠parameters:Ident.ident list -> Ident.ident -> type_ -> data -> (Ident.ident * type_) list -> ?⁠with_operations:bool -> type_ -> func list -> entry list -> ir
val mk_michelson : ?⁠parameters:Ident.ident list -> type_ -> type_ -> code -> michelson
val mk_prim : ?⁠args:obj_micheline list -> ?⁠annots:Ident.ident list -> Ident.ident -> prim
val mk_micheline : ?⁠parameters:Ident.ident list -> obj_micheline list -> obj_micheline -> micheline
val mk_dprogram : type_ -> type_ -> data -> Ident.ident -> dinstruction list -> dprogram
val toperation : type_
val tunit : type_
val tstring : type_
val tnat : type_
val tint : type_
val tbool : type_
val tmutez : type_
val taddress : type_
val ttimestamp : type_
val tbytes : type_
val tpair : type_ -> type_ -> type_
val tor : type_ -> type_ -> type_
val trat : type_
val tlist : type_ -> type_
val tset : type_ -> type_
val tmap : type_ -> type_ -> type_
val tlambda : type_ -> type_ -> type_
val itrue : instruction
val ifalse : instruction
val iint : Core.big_int -> instruction
val inat : Core.big_int -> instruction
val istring : string -> instruction
val imutez : Core.big_int -> instruction
val isome : instruction -> instruction
val inone : type_ -> instruction
val iunit : instruction
val inil : type_ -> instruction
val iemptyset : type_ -> instruction
val iemptymap : type_ -> type_ -> instruction
val iemptybigmap : type_ -> type_ -> instruction
val icar : instruction -> instruction
val icdr : instruction -> instruction
val ifail : string -> instruction
val iskip : instruction
val ileft : type_ -> instruction -> instruction
val iright : type_ -> instruction -> instruction
val ieq : instruction -> instruction -> instruction
val iadd : instruction -> instruction -> instruction
val isub : instruction -> instruction -> instruction
val imul : instruction -> instruction -> instruction
val idiv : instruction -> instruction -> instruction
val imod : instruction -> instruction -> instruction
val irecord : ritem -> instruction
val isrecord : instruction list -> instruction
val ctrue : code
val cfalse : code
val cint : Core.big_int -> code
val cnat : Core.big_int -> code
val cstring : string -> code
val cfail : string -> code
val cskip : code
val dalpha : alpha_ident -> dexpr
val cmp_ident : Tools.String.t -> Tools.String.t -> bool
val cmp_type : type_ -> type_ -> bool
val cmp_data : data -> data -> bool
val cmp_z_operator : z_operator -> z_operator -> bool
val cmp_un_operator : un_operator -> un_operator -> bool
val cmp_bin_operator : bin_operator -> bin_operator -> bool
val cmp_ter_operator : ter_operator -> ter_operator -> bool
val cmp_code : code -> code -> bool
val cmp_builtin : builtin -> builtin -> bool
val map_type : (type_ -> type_) -> type_ -> type_
val map_data : (data -> data) -> data -> data
val map_code_gen : (code -> code) -> (data -> data) -> (type_ -> type_) -> code -> code
val map_code : (code -> code) -> code -> code
val map_seq : (code list -> code list) -> code -> code
val cmp_dexpr : dexpr -> dexpr -> bool
val cmp_dinstruction : dinstruction -> dinstruction -> bool
val map_dexpr : (dexpr -> dexpr) -> (dinstruction -> dinstruction) -> (alpha_ident -> alpha_ident) -> dexpr -> dexpr
val map_dexpr_dinstr : (dinstruction -> dinstruction) -> (dexpr -> dexpr) -> (alpha_ident -> alpha_ident) -> dinstruction -> dinstruction
val fold_dexpr : ('a -> dexpr -> 'a) -> ('a -> dinstruction -> 'a) -> 'a -> dexpr -> 'a
val fold_dexpr_dinstr : ('a -> dinstruction -> 'a) -> ('a -> dexpr -> 'a) -> 'a -> dinstruction -> 'a
module Utils : sig ... end
val to_type : obj_micheline -> type_
val to_data : obj_micheline -> data