text stringlengths 0 601k |
|---|
let check_constr_annot : Script . location -> string list -> unit tzresult = fun loc annot -> parse_annots ~ allow_special_field : true loc annot >>? classify_annot loc >>? fun ( vars , types , fields ) -> get_one_annot loc vars >>? fun ( _v : var_annot option ) -> get_one_annot loc types >>? fun ( _t : type_annot opti... |
let check_two_var_annot : Script . location -> string list -> unit tzresult = fun loc annot -> parse_annots loc annot >>? classify_annot loc >>? fun ( vars , types , fields ) -> error_unexpected_annot loc types >>? fun ( ) -> error_unexpected_annot loc fields >>? fun ( ) -> get_two_annot loc vars >|? fun ( _a1 , _a2 ) ... |
let check_destr_annot : Script . location -> string list -> unit tzresult = fun loc annot -> parse_annots loc ~ allow_special_var : true annot >>? classify_annot loc >>? fun ( vars , types , fields ) -> error_unexpected_annot loc types >>? fun ( ) -> get_one_annot loc vars >>? fun ( _v : var_annot option ) -> get_one_a... |
let check_unpair_annot : Script . location -> string list -> unit tzresult = fun loc annot -> parse_annots loc ~ allow_special_var : true annot >>? classify_annot loc >>? fun ( vars , types , fields ) -> error_unexpected_annot loc types >>? fun ( ) -> get_two_annot loc vars >>? fun ( _vcar , _vcdr ) -> get_two_annot lo... |
let parse_entrypoint_annot : Script . location -> string list -> field_annot option tzresult = fun loc annot -> parse_annots loc annot >>? classify_annot loc >>? fun ( vars , types , fields ) -> error_unexpected_annot loc types >>? fun ( ) -> get_one_annot loc fields >>? fun f -> get_one_annot loc vars >|? fun ( _v : v... |
let parse_entrypoint_annot_strict loc annot = parse_entrypoint_annot loc annot >>? function | None -> Ok Entrypoint . default | Some ( Field_annot a ) -> Entrypoint . of_annot_strict ~ loc a |
let parse_entrypoint_annot_lax loc annot = parse_entrypoint_annot loc annot >>? function | None -> Ok Entrypoint . default | Some ( Field_annot annot ) -> Entrypoint . of_annot_lax annot |
let check_var_type_annot : Script . location -> string list -> unit tzresult = fun loc annot -> parse_annots loc annot >>? classify_annot loc >>? fun ( vars , types , fields ) -> error_unexpected_annot loc fields >>? fun ( ) -> get_one_annot loc vars >>? fun ( _v : var_annot option ) -> get_one_annot loc types >|? fun ... |
type ex_stack_ty = Ex_stack_ty : ( ' a , ' s ) stack_ty -> ex_stack_ty |
type ( ' a , ' s , ' b , ' u ) cinstr = { apply : ' r ' f . ( ' a , ' s ) kinfo -> ( ' b , ' u , ' r , ' f ) kinstr -> ( ' a , ' s , ' r , ' f ) kinstr ; } |
type ( ' a , ' s , ' b , ' u ) descr = { loc : Script . location ; bef : ( ' a , ' s ) stack_ty ; aft : ( ' b , ' u ) stack_ty ; instr : ( ' a , ' s , ' b , ' u ) cinstr ; } |
let close_descr { loc ; bef ; aft ; instr } = let kinfo = { iloc = loc ; kstack_ty = aft } in let kinfo ' = { iloc = loc ; kstack_ty = bef } in let kinstr = instr . apply kinfo ' ( IHalt kinfo ) in { kloc = loc ; kbef = bef ; kaft = aft ; kinstr } |
let kinfo_of_descr { loc ; bef ; _ } = { iloc = loc ; kstack_ty = bef } |
let compose_descr : type a s b u c v . Script . location -> ( a , s , b , u ) descr -> ( b , u , c , v ) descr -> ( a , s , c , v ) descr = fun loc d1 d2 -> { loc ; bef = d1 . bef ; aft = d2 . aft ; instr = { apply = ( fun _ k -> d1 . instr . apply ( kinfo_of_descr d1 ) ( d2 . instr . apply ( kinfo_of_descr d2 ) k ) ) ... |
type unparsing_mode = Optimized | Readable | Optimized_legacy |
type type_logger = Script . location -> Script . expr list -> Script . expr list -> unit |
let location = function | Prim ( loc , _ , _ , _ ) | Int ( loc , _ ) | String ( loc , _ ) | Bytes ( loc , _ ) | Seq ( loc , _ ) -> loc |
let kind_equal a b = match ( a , b ) with | ( Int_kind , Int_kind ) | ( String_kind , String_kind ) | ( Bytes_kind , Bytes_kind ) | ( Prim_kind , Prim_kind ) | ( Seq_kind , Seq_kind ) -> true | _ -> false |
let kind = function | Int _ -> Int_kind | String _ -> String_kind | Bytes _ -> Bytes_kind | Prim _ -> Prim_kind | Seq _ -> Seq_kind |
let unexpected expr exp_kinds exp_ns exp_prims = match expr with | Int ( loc , _ ) -> Invalid_kind ( loc , Prim_kind :: exp_kinds , Int_kind ) | String ( loc , _ ) -> Invalid_kind ( loc , Prim_kind :: exp_kinds , String_kind ) | Bytes ( loc , _ ) -> Invalid_kind ( loc , Prim_kind :: exp_kinds , Bytes_kind ) | Seq ( loc... |
let check_kind kinds expr = let kind = kind expr in if List . exists ( kind_equal kind ) kinds then Result . return_unit else let loc = location expr in error ( Invalid_kind ( loc , kinds , kind ) ) |
let rec ty_of_comparable_ty : type a . a comparable_ty -> a ty = function | Unit_key -> Unit_t | Never_key -> Never_t | Int_key -> Int_t | Nat_key -> Nat_t | Signature_key -> Signature_t | String_key -> String_t | Bytes_key -> Bytes_t | Mutez_key -> Mutez_t | Bool_key -> Bool_t | Key_hash_key -> Key_hash_t | Key_key ->... |
let rec unparse_comparable_ty_uncarbonated : type a loc . loc : loc -> a comparable_ty -> loc Script . michelson_node = fun ~ loc -> function | Unit_key -> Prim ( loc , T_unit , [ ] , [ ] ) | Never_key -> Prim ( loc , T_never , [ ] , [ ] ) | Int_key -> Prim ( loc , T_int , [ ] , [ ] ) | Nat_key -> Prim ( loc , T_nat , ... |
let unparse_memo_size ~ loc memo_size = let z = Sapling . Memo_size . unparse_to_z memo_size in Int ( loc , z ) |
let rec unparse_ty_entrypoints_uncarbonated : type a loc . loc : loc -> a ty -> a entrypoints -> loc Script . michelson_node = fun ~ loc ty { nested = nested_entrypoints ; name = entrypoint_name } -> let ( name , args ) = match ty with | Unit_t -> ( T_unit , [ ] ) | Int_t -> ( T_int , [ ] ) | Nat_t -> ( T_nat , [ ] ) |... |
let unparse_ty_uncarbonated ~ loc ty = unparse_ty_entrypoints_uncarbonated ~ loc ty no_entrypoints |
let unparse_ty ~ loc ctxt ty = Gas . consume ctxt ( Unparse_costs . unparse_type ty ) >|? fun ctxt -> ( unparse_ty_uncarbonated ~ loc ty , ctxt ) |
let unparse_comparable_ty ~ loc ctxt comp_ty = Gas . consume ctxt ( Unparse_costs . unparse_comparable_type comp_ty ) >|? fun ctxt -> ( unparse_comparable_ty_uncarbonated ~ loc comp_ty , ctxt ) |
let unparse_parameter_ty ~ loc ctxt ty ~ entrypoints = Gas . consume ctxt ( Unparse_costs . unparse_type ty ) >|? fun ctxt -> ( unparse_ty_entrypoints_uncarbonated ~ loc ty entrypoints , ctxt ) | ( Int _ | String _ | Bytes _ ) as atom -> atom | Seq ( loc , args ) -> Seq ( loc , List . map strip_var_annots args ) | Prim... |
let serialize_ty_for_error ty = let ty = unparse_ty_uncarbonated ~ loc ( ) : ty in Micheline . strip_locations ( strip_var_annots ty ) type a . context -> Script . location -> a ty -> ( a comparable_ty * context ) tzresult = fun ctxt loc ty -> Gas . consume ctxt Typecheck_costs . comparable_ty_of_ty_cycle >>? fun ctxt ... |
let rec unparse_stack_uncarbonated : type a s . ( a , s ) stack_ty -> Script . expr list = function | Bot_t -> [ ] | Item_t ( ty , rest ) -> let uty = unparse_ty_uncarbonated ~ loc ( ) : ty in let urest = unparse_stack_uncarbonated rest in strip_locations uty :: urest |
let serialize_stack_for_error ctxt stack_ty = match Gas . level ctxt with | Unaccounted -> unparse_stack_uncarbonated stack_ty | Limited _ -> [ ] |
let unparse_unit ~ loc ctxt ( ) = ok ( Prim ( loc , D_Unit , [ ] , [ ] ) , ctxt ) |
let unparse_int ~ loc ctxt v = ok ( Int ( loc , Script_int . to_zint v ) , ctxt ) |
let unparse_nat ~ loc ctxt v = ok ( Int ( loc , Script_int . to_zint v ) , ctxt ) |
let unparse_string ~ loc ctxt s = ok ( String ( loc , Script_string . to_string s ) , ctxt ) |
let unparse_bytes ~ loc ctxt s = ok ( Bytes ( loc , s ) , ctxt ) |
let unparse_bool ~ loc ctxt b = ok ( Prim ( loc , ( if b then D_True else D_False ) , [ ] , [ ] ) , ctxt ) |
let unparse_timestamp ~ loc ctxt mode t = match mode with | Optimized | Optimized_legacy -> ok ( Int ( loc , Script_timestamp . to_zint t ) , ctxt ) | Readable -> ( Gas . consume ctxt Unparse_costs . timestamp_readable >>? fun ctxt -> match Script_timestamp . to_notation t with | None -> ok ( Int ( loc , Script_timesta... |
let unparse_address ~ loc ctxt mode { destination ; entrypoint } = Gas . consume ctxt Unparse_costs . contract >|? fun ctxt -> match mode with | Optimized | Optimized_legacy -> let bytes = Data_encoding . Binary . to_bytes_exn Data_encoding . ( tup2 Destination . encoding Entrypoint . value_encoding ) ( destination , e... |
let unparse_contract ~ loc ctxt mode { arg_ty = _ ; address } = unparse_address ~ loc ctxt mode address |
let unparse_signature ~ loc ctxt mode s = let s = Script_signature . get s in match mode with | Optimized | Optimized_legacy -> Gas . consume ctxt Unparse_costs . signature_optimized >|? fun ctxt -> let bytes = Data_encoding . Binary . to_bytes_exn Signature . encoding s in ( Bytes ( loc , bytes ) , ctxt ) | Readable -... |
let unparse_mutez ~ loc ctxt v = ok ( Int ( loc , Z . of_int64 ( Tez . to_mutez v ) ) , ctxt ) |
let unparse_key ~ loc ctxt mode k = match mode with | Optimized | Optimized_legacy -> Gas . consume ctxt Unparse_costs . public_key_optimized >|? fun ctxt -> let bytes = Data_encoding . Binary . to_bytes_exn Signature . Public_key . encoding k in ( Bytes ( loc , bytes ) , ctxt ) | Readable -> Gas . consume ctxt Unparse... |
let unparse_key_hash ~ loc ctxt mode k = match mode with | Optimized | Optimized_legacy -> Gas . consume ctxt Unparse_costs . key_hash_optimized >|? fun ctxt -> let bytes = Data_encoding . Binary . to_bytes_exn Signature . Public_key_hash . encoding k in ( Bytes ( loc , bytes ) , ctxt ) | Readable -> Gas . consume ctxt... |
let unparse_operation ~ loc ctxt { piop ; lazy_storage_diff = _ } = let bytes = Data_encoding . Binary . to_bytes_exn Operation . internal_operation_encoding piop in Gas . consume ctxt ( Unparse_costs . operation bytes ) >|? fun ctxt -> ( Bytes ( loc , bytes ) , ctxt ) |
let unparse_chain_id ~ loc ctxt mode chain_id = match mode with | Optimized | Optimized_legacy -> Gas . consume ctxt Unparse_costs . chain_id_optimized >|? fun ctxt -> let bytes = Data_encoding . Binary . to_bytes_exn Script_chain_id . encoding chain_id in ( Bytes ( loc , bytes ) , ctxt ) | Readable -> Gas . consume ct... |
let unparse_bls12_381_g1 ~ loc ctxt x = Gas . consume ctxt Unparse_costs . bls12_381_g1 >|? fun ctxt -> let bytes = Script_bls . G1 . to_bytes x in ( Bytes ( loc , bytes ) , ctxt ) |
let unparse_bls12_381_g2 ~ loc ctxt x = Gas . consume ctxt Unparse_costs . bls12_381_g2 >|? fun ctxt -> let bytes = Script_bls . G2 . to_bytes x in ( Bytes ( loc , bytes ) , ctxt ) |
let unparse_bls12_381_fr ~ loc ctxt x = Gas . consume ctxt Unparse_costs . bls12_381_fr >|? fun ctxt -> let bytes = Script_bls . Fr . to_bytes x in ( Bytes ( loc , bytes ) , ctxt ) |
let unparse_with_data_encoding ~ loc ctxt s unparse_cost encoding = Lwt . return ( Gas . consume ctxt unparse_cost >|? fun ctxt -> let bytes = Data_encoding . Binary . to_bytes_exn encoding s in ( Bytes ( loc , bytes ) , ctxt ) ) |
type ( ' ty , ' depth ) comb_witness = | Comb_Pair : ( ' t , ' d ) comb_witness -> ( _ * ' t , unit -> ' d ) comb_witness | Comb_Any : ( _ , _ ) comb_witness |
let unparse_pair ( type r ) ~ loc unparse_l unparse_r ctxt mode ( r_comb_witness : ( r , unit -> unit -> _ ) comb_witness ) ( l , ( r : r ) ) = unparse_l ctxt l >>=? fun ( l , ctxt ) -> unparse_r ctxt r >|=? fun ( r , ctxt ) -> let res = match ( mode , r_comb_witness , r ) with | ( Optimized , Comb_Pair _ , Micheline .... |
let unparse_union ~ loc unparse_l unparse_r ctxt = function | L l -> unparse_l ctxt l >|=? fun ( l , ctxt ) -> ( Prim ( loc , D_Left , [ l ] , [ ] ) , ctxt ) | R r -> unparse_r ctxt r >|=? fun ( r , ctxt ) -> ( Prim ( loc , D_Right , [ r ] , [ ] ) , ctxt ) |
let unparse_option ~ loc unparse_v ctxt = function | Some v -> unparse_v ctxt v >|=? fun ( v , ctxt ) -> ( Prim ( loc , D_Some , [ v ] , [ ] ) , ctxt ) | None -> return ( Prim ( loc , D_None , [ ] , [ ] ) , ctxt ) |
let comparable_comb_witness2 : type t . t comparable_ty -> ( t , unit -> unit -> unit ) comb_witness = function | Pair_key ( _ , Pair_key _ , _ ) -> Comb_Pair ( Comb_Pair Comb_Any ) | Pair_key _ -> Comb_Pair Comb_Any | _ -> Comb_Any type a loc . loc : loc -> context -> unparsing_mode -> a comparable_ty -> a -> ( loc Sc... |
let pack_node unparsed ctxt = Gas . consume ctxt ( Script . strip_locations_cost unparsed ) >>? fun ctxt -> let bytes = Data_encoding . Binary . to_bytes_exn expr_encoding ( Micheline . strip_locations unparsed ) in Gas . consume ctxt ( Script . serialized_cost bytes ) >|? fun ctxt -> let bytes = Bytes . cat ( Bytes . ... |
let pack_comparable_data ctxt typ data ~ mode = unparse_comparable_data ~ loc ( ) : ctxt mode typ data >>=? fun ( unparsed , ctxt ) -> Lwt . return @@ pack_node unparsed ctxt |
let hash_bytes ctxt bytes = Gas . consume ctxt ( Michelson_v1_gas . Cost_of . Interpreter . blake2b bytes ) >|? fun ctxt -> ( Script_expr_hash . ( hash_bytes [ bytes ] ) , ctxt ) |
let hash_comparable_data ctxt typ data = pack_comparable_data ctxt typ data ~ mode : Optimized_legacy >>=? fun ( bytes , ctxt ) -> Lwt . return @@ hash_bytes ctxt bytes |
let check_dupable_comparable_ty : type a . a comparable_ty -> unit = function | Unit_key | Never_key | Int_key | Nat_key | Signature_key | String_key | Bytes_key | Mutez_key | Bool_key | Key_hash_key | Key_key | Timestamp_key | Chain_id_key | Address_key | Pair_key _ | Union_key _ | Option_key _ -> ( ) |
let check_dupable_ty ctxt loc ty = let rec aux : type a . location -> a ty -> ( unit , error trace ) Gas_monad . t = fun loc ty -> let open Gas_monad in consume_gas Typecheck_costs . check_dupable_cycle >>$ fun ( ) -> match ty with | Unit_t -> return_unit | Int_t -> return_unit | Nat_t -> return_unit | Signature_t -> r... |
type ( ' ta , ' tb ) eq = Eq : ( ' same , ' same ) eq |
let merge_type_metadata : type error_trace . error_details : error_trace error_details -> ' a ty_metadata -> ' b ty_metadata -> ( ' a ty_metadata , error_trace ) result = fun ~ error_details { size = size_a } { size = size_b } -> Type_size . merge ~ error_details size_a size_b >|? fun size -> { size } |
let default_merge_type_error ty1 ty2 = let ty1 = serialize_ty_for_error ty1 in let ty2 = serialize_ty_for_error ty2 in Inconsistent_types ( None , ty1 , ty2 ) |
let rec merge_comparable_types : type ta tb error_trace . error_details : error_trace error_details -> ta comparable_ty -> tb comparable_ty -> ( ( ta comparable_ty , tb comparable_ty ) eq * ta comparable_ty , error_trace ) Gas_monad . t = let open Gas_monad in fun ~ error_details ta tb -> consume_gas Typecheck_costs . ... |
let comparable_ty_eq : type ta tb . context -> ta comparable_ty -> tb comparable_ty -> ( ( ta comparable_ty , tb comparable_ty ) eq * context ) tzresult = fun ctxt ta tb -> Gas_monad . run ctxt ( merge_comparable_types ~ error_details : Informative ta tb ) >>? fun ( eq_ty , ctxt ) -> eq_ty >|? fun ( eq , _ty ) -> ( eq ... |
let merge_memo_sizes : type error_trace . error_details : error_trace error_details -> Sapling . Memo_size . t -> Sapling . Memo_size . t -> ( Sapling . Memo_size . t , error_trace ) result = fun ~ error_details ms1 ms2 -> if Sapling . Memo_size . equal ms1 ms2 then ok ms1 else Error ( match error_details with | Fast -... |
let merge_types : type a b error_trace . error_details : error_trace error_details -> Script . location -> a ty -> b ty -> ( ( a ty , b ty ) eq * a ty , error_trace ) Gas_monad . t = let open Gas_monad in fun ~ error_details loc ty1 ty2 -> let merge_type_metadata meta1 meta2 = of_result @@ merge_type_metadata ~ error_d... |
let ty_eq : type ta tb . context -> Script . location -> ta ty -> tb ty -> ( ( ta ty , tb ty ) eq * context ) tzresult = fun ctxt loc ta tb -> Gas_monad . run ctxt @@ merge_types ~ error_details : Informative loc ta tb >>? fun ( eq_ty , ctxt ) -> eq_ty >|? fun ( eq , _ty ) -> ( eq , ctxt ) |
let merge_stacks : type ta tb ts tu . Script . location -> context -> int -> ( ta , ts ) stack_ty -> ( tb , tu ) stack_ty -> ( ( ( ta , ts ) stack_ty , ( tb , tu ) stack_ty ) eq * ( ta , ts ) stack_ty * context ) tzresult = fun loc -> let rec help : type ta tb ts tu . context -> int -> ( ta , ts ) stack_ty -> ( tb , tu... |
type ( ' a , ' s ) judgement = | Typed : ( ' a , ' s , ' b , ' u ) descr -> ( ' a , ' s ) judgement | Failed : { descr : ' b ' u . ( ' b , ' u ) stack_ty -> ( ' a , ' s , ' b , ' u ) descr ; } -> ( ' a , ' s ) judgement |
type ( ' a , ' s , ' b , ' u , ' c , ' v ) branch = { branch : ' r ' f . ( ' a , ' s , ' r , ' f ) descr -> ( ' b , ' u , ' r , ' f ) descr -> ( ' c , ' v , ' r , ' f ) descr ; } [ @@ unboxed ] |
let merge_branches : type a s b u c v . context -> Script . location -> ( a , s ) judgement -> ( b , u ) judgement -> ( a , s , b , u , c , v ) branch -> ( ( c , v ) judgement * context ) tzresult = fun ctxt loc btr bfr { branch } -> match ( btr , bfr ) with | ( Typed ( { aft = aftbt ; _ } as dbt ) , Typed ( { aft = af... |
let parse_memo_size ( n : ( location , _ ) Micheline . node ) : Sapling . Memo_size . t tzresult = match n with | Int ( _ , z ) -> ( match Sapling . Memo_size . parse_z z with | Ok _ as ok_memo_size -> ok_memo_size [ @ coq_cast ] | Error msg -> error @@ Invalid_syntactic_constant ( location n , strip_locations n , msg ... |
type ex_comparable_ty = | Ex_comparable_ty : ' a comparable_ty -> ex_comparable_ty stack_depth : int -> context -> Script . node -> ( ex_comparable_ty * context ) tzresult = fun ~ stack_depth ctxt ty -> Gas . consume ctxt Typecheck_costs . parse_type_cycle >>? fun ctxt -> if Compare . Int . ( stack_depth > 10000 ) then... |
type ex_ty = Ex_ty : ' a ty -> ex_ty |
type ex_parameter_ty_and_entrypoints = | Ex_parameter_ty_and_entrypoints : { arg_type : ' a ty ; entrypoints : ' a entrypoints ; } -> ex_parameter_ty_and_entrypoints |
type ( ' ret , ' name ) parse_ty_ret = | Don ' t_parse_entrypoints : ( ex_ty , unit ) parse_ty_ret | Parse_entrypoints : ( ex_parameter_ty_and_entrypoints , Entrypoint . t option ) parse_ty_ret type ret name . context -> stack_depth : int -> legacy : bool -> allow_lazy_storage : bool -> allow_operation : bool -> allow_... |
let parse_packable_ty ctxt ~ stack_depth ~ legacy node = ( parse_ty [ @ tailcall ] ) ctxt ~ stack_depth ~ legacy ~ allow_lazy_storage : false ~ allow_operation : false ~ allow_contract : legacy ~ allow_ticket : false ~ ret : Don ' t_parse_entrypoints node |
let parse_view_input_ty ctxt ~ stack_depth ~ legacy node = ( parse_ty [ @ tailcall ] ) ctxt ~ stack_depth ~ legacy ~ allow_lazy_storage : false ~ allow_operation : false ~ allow_contract : true ~ allow_ticket : false ~ ret : Don ' t_parse_entrypoints node |
let parse_view_output_ty ctxt ~ stack_depth ~ legacy node = ( parse_ty [ @ tailcall ] ) ctxt ~ stack_depth ~ legacy ~ allow_lazy_storage : false ~ allow_operation : false ~ allow_contract : true ~ allow_ticket : false ~ ret : Don ' t_parse_entrypoints node |
let parse_normal_storage_ty ctxt ~ stack_depth ~ legacy node = ( parse_ty [ @ tailcall ] ) ctxt ~ stack_depth ~ legacy ~ allow_lazy_storage : true ~ allow_operation : false ~ allow_contract : legacy ~ allow_ticket : true ~ ret : Don ' t_parse_entrypoints node |
let parse_storage_ty : context -> stack_depth : int -> legacy : bool -> Script . node -> ( ex_ty * context ) tzresult = fun ctxt ~ stack_depth ~ legacy node -> match node with | Prim ( loc , T_pair , [ Prim ( big_map_loc , T_big_map , args , map_annot ) ; remaining_storage ] , storage_annot ) when legacy -> ( match sto... |
let check_packable ~ legacy loc root = let rec check : type t . t ty -> unit tzresult = function | Big_map_t _ -> error ( Unexpected_lazy_storage loc ) | Sapling_state_t _ -> error ( Unexpected_lazy_storage loc ) | Operation_t -> error ( Unexpected_operation loc ) | Unit_t -> Result . return_unit | Int_t -> Result . re... |
type toplevel = { code_field : Script . node ; arg_type : Script . node ; storage_type : Script . node ; views : view SMap . t ; } |
type ( ' arg , ' storage ) code = { code : ( ( ' arg , ' storage ) pair , ( operation boxed_list , ' storage ) pair ) lambda ; arg_type : ' arg ty ; storage_type : ' storage ty ; views : view SMap . t ; entrypoints : ' arg entrypoints ; code_size : Cache_memory_helpers . sint ; } |
type ex_script = Ex_script : ( ' a , ' c ) script -> ex_script |
type ex_code = Ex_code : ( ' a , ' c ) code -> ex_code |
type ' storage ex_view = | Ex_view : ( ' input * ' storage , ' output ) Script_typed_ir . lambda -> ' storage ex_view |
type ( _ , _ ) dig_proof_argument = | Dig_proof_argument : ( ' x , ' a * ' s , ' a , ' s , ' b , ' t , ' c , ' u ) stack_prefix_preservation_witness * ' x ty * ( ' c , ' u ) stack_ty -> ( ' b , ' t ) dig_proof_argument |
type ( _ , _ , _ ) dug_proof_argument = | Dug_proof_argument : ( ( ' a , ' s , ' x , ' a * ' s , ' b , ' t , ' c , ' u ) stack_prefix_preservation_witness * ( ' c , ' u ) stack_ty ) -> ( ' b , ' t , ' x ) dug_proof_argument |
type ( _ , _ ) dipn_proof_argument = | Dipn_proof_argument : ( ' fa , ' fs , ' fb , ' fu , ' a , ' s , ' b , ' u ) stack_prefix_preservation_witness * context * ( ' fa , ' fs , ' fb , ' fu ) descr * ( ' b , ' u ) stack_ty -> ( ' a , ' s ) dipn_proof_argument |
type ( _ , _ ) dropn_proof_argument = | Dropn_proof_argument : ( ' fa , ' fs , ' fa , ' fs , ' a , ' s , ' a , ' s ) stack_prefix_preservation_witness * ( ' fa , ' fs ) stack_ty -> ( ' a , ' s ) dropn_proof_argument |
type ' before comb_proof_argument = | Comb_proof_argument : ( ' a * ' s , ' b * ' u ) comb_gadt_witness * ( ' b , ' u ) stack_ty -> ( ' a * ' s ) comb_proof_argument |
type ' before uncomb_proof_argument = | Uncomb_proof_argument : ( ' a * ' s , ' b * ' u ) uncomb_gadt_witness * ( ' b , ' u ) stack_ty -> ( ' a * ' s ) uncomb_proof_argument |
type ' before comb_get_proof_argument = | Comb_get_proof_argument : ( ' before , ' after ) comb_get_gadt_witness * ' after ty -> ' before comb_get_proof_argument |
type ( ' rest , ' before ) comb_set_proof_argument = | Comb_set_proof_argument : ( ' rest , ' before , ' after ) comb_set_gadt_witness * ' after ty -> ( ' rest , ' before ) comb_set_proof_argument |
type ' before dup_n_proof_argument = | Dup_n_proof_argument : ( ' before , ' a ) dup_n_gadt_witness * ' a ty -> ' before dup_n_proof_argument |
let find_entrypoint ( type full error_trace ) ( ~ error_details : error_trace error_details ) ( full : full ty ) ( entrypoints : full entrypoints ) entrypoint : ( ( Script . node -> Script . node ) * ex_ty , error_trace ) Gas_monad . t = let open Gas_monad in let loc = Micheline . dummy_location in let rec find_entrypo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.