Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dune-network
Submodule dune-network updated from 7ddbe8 to 9ee1a9
238 changes: 156 additions & 82 deletions libs/dune-network-lib/build.ocp2
Original file line number Diff line number Diff line change
Expand Up @@ -379,92 +379,104 @@ OCaml.library("dune-network-lib-env",
"dune-network-lib-love-parsing", ["Dune_love_parsing"];
]));

proto_files = [
(* Love *)
from_dune_proto("contract_hash.ml");
"storage_description.ml";
from_dune_proto("contract_repr.ml");
from_dune_proto("qty_repr.ml");
from_dune_proto("tez_repr.ml");
from_dune_proto("script_int_repr.ml");
from_dune_proto("period_repr.ml");
from_dune_proto("time_repr.ml");
from_dune_proto("script_timestamp_repr.ml");
from_dune_proto("script_expr_hash.ml");
from_dune_proto("love_pervasives.ml");
from_dune_proto("love_type.ml");
from_dune_proto("love_type_list.ml");
from_dune_proto("love_primitive.ml");
from_dune_proto("love_ast.ml");
from_dune_proto("love_runtime_ast.ml");
from_dune_proto("love_value.ml");
from_dune_proto("love_printer.ml");
from_dune_proto("love_encoding_sig.ml");
from_dune_proto("love_json_encoding.ml");
from_dune_proto("love_tenv.ml");

from_dune_proto("gas_limit_repr.ml");
from_dune_proto("michelson_v1_primitives.ml");
from_dune_proto("script_repr.ml");
(* from_dune_proto("gas_limit_repr.ml");
* from_dune_proto("michelson_v1_primitives.ml");
* from_dune_proto("script_repr.ml");
* from_dune_proto("lang1_repr.ml");
* from_dune_proto("lang1_script_repr.ml");
* from_dune_proto("love_repr.ml");
* from_dune_proto("love_script_repr.ml");
* from_dune_proto("dune_lang_repr.ml");
* from_dune_proto("dune_script_sig.ml");
* from_dune_proto("dune_script_registration.ml");
* from_dune_proto("dune_script_repr.ml");
* from_dune_proto("dune_misc.ml");
* from_dune_proto("love_size.ml");
* from_dune_proto("love_binary_buffer.ml");
* from_dune_proto("love_binary_encoding.ml");
* from_dune_proto("love_encoding.ml");
* from_dune_proto("nonce_hash.ml");
* from_dune_proto("blinded_public_key_hash.ml");
* from_dune_proto("dune_parameters_repr.ml");
* from_dune_proto("commitment_repr.ml");
* from_dune_proto("constants_repr.ml");
* from_dune_proto("constants_repr.ml");
* from_dune_proto("alpha_context.ml"); *)

(* from_dune_proto("love_script_repr.ml"); *)

(* from_dune_proto("love_size.ml"); *)
from_dune_proto("love_binary_buffer.ml");
from_dune_proto("love_binary_processor.ml");
from_dune_proto("love_binary_encoding.ml");
from_dune_proto("love_encoding.ml");
from_dune_proto("raw_level_repr.ml");
from_dune_proto("cycle_repr.ml");
from_dune_proto("voting_period_repr.ml");

"alpha_context.ml";
from_dune_proto("love_size.ml");
from_dune_proto("love_gas.ml");
(* from_dune_proto("love_michelson.ml"); *)
from_dune_proto("love_context.ml");
from_dune_proto("love_free_vars.ml");
from_dune_proto("love_env.ml");
"love_translator.ml";
"love_michelson.ml";
(* from_dune_proto("love_translator.ml"); *)
from_dune_proto("love_typechecker.ml");
from_dune_proto("love_prim_interp.ml");
from_dune_proto("love_prim_list.ml");

(* "alpha_context.ml"; *)
(* from_dune_proto("love_context.ml");
* from_dune_proto("love_prim_interp.ml");
* from_dune_proto("love_prim_list.ml"); *)
];

solidity_files = [
from_dune_proto("solidity_common.ml");
from_dune_proto("solidity_ast.ml");
from_dune_proto("solidity_runtime_ast.ml");
from_dune_proto("solidity_visitor.ml");
from_dune_proto("solidity_json_encoding.ml");
from_dune_proto("solidity_printer.ml");
];


OCaml.library("dune-network-lib-protocol",
with_libs(ocaml + {
bytelink = [ "-custom" ];
files =
OCaml.pack("Tezos_protocol",
OCaml.pack("Protocol", [
(* Love *)
from_dune_proto("contract_hash.ml");
"storage_description.ml";
from_dune_proto("contract_repr.ml");
from_dune_proto("qty_repr.ml");
from_dune_proto("tez_repr.ml");
from_dune_proto("script_int_repr.ml");
from_dune_proto("period_repr.ml");
from_dune_proto("time_repr.ml");
from_dune_proto("script_timestamp_repr.ml");
from_dune_proto("script_expr_hash.ml");
from_dune_proto("love_pervasives.ml");
from_dune_proto("love_type.ml");
from_dune_proto("love_type_list.ml");
from_dune_proto("love_primitive.ml");
from_dune_proto("love_ast.ml");
from_dune_proto("love_runtime_ast.ml");
from_dune_proto("love_value.ml");
from_dune_proto("love_printer.ml");
from_dune_proto("love_encoding_sig.ml");
from_dune_proto("love_json_encoding.ml");
from_dune_proto("love_tenv.ml");

from_dune_proto("gas_limit_repr.ml");
from_dune_proto("michelson_v1_primitives.ml");
from_dune_proto("script_repr.ml");
(* from_dune_proto("gas_limit_repr.ml");
* from_dune_proto("michelson_v1_primitives.ml");
* from_dune_proto("script_repr.ml");
* from_dune_proto("lang1_repr.ml");
* from_dune_proto("lang1_script_repr.ml");
* from_dune_proto("love_repr.ml");
* from_dune_proto("love_script_repr.ml");
* from_dune_proto("dune_lang_repr.ml");
* from_dune_proto("dune_script_sig.ml");
* from_dune_proto("dune_script_registration.ml");
* from_dune_proto("dune_script_repr.ml");
* from_dune_proto("dune_misc.ml");
* from_dune_proto("love_size.ml");
* from_dune_proto("love_binary_buffer.ml");
* from_dune_proto("love_binary_encoding.ml");
* from_dune_proto("love_encoding.ml");
* from_dune_proto("nonce_hash.ml");
* from_dune_proto("blinded_public_key_hash.ml");
* from_dune_proto("dune_parameters_repr.ml");
* from_dune_proto("commitment_repr.ml");
* from_dune_proto("constants_repr.ml");
* from_dune_proto("constants_repr.ml");
* from_dune_proto("alpha_context.ml"); *)

(* from_dune_proto("love_script_repr.ml"); *)

(* from_dune_proto("love_size.ml"); *)
from_dune_proto("love_binary_buffer.ml");
from_dune_proto("love_binary_processor.ml");
from_dune_proto("love_binary_encoding.ml");
from_dune_proto("love_encoding.ml");
from_dune_proto("raw_level_repr.ml");
from_dune_proto("cycle_repr.ml");
from_dune_proto("voting_period_repr.ml");

"alpha_context.ml";
from_dune_proto("love_size.ml");
from_dune_proto("love_gas.ml");
(* from_dune_proto("love_michelson.ml"); *)
from_dune_proto("love_context.ml");
from_dune_proto("love_free_vars.ml");
from_dune_proto("love_env.ml");
"love_translator.ml";
"love_michelson.ml";
(* from_dune_proto("love_translator.ml"); *)
from_dune_proto("love_typechecker.ml");
from_dune_proto("love_prim_interp.ml");
from_dune_proto("love_prim_list.ml");

(* "alpha_context.ml"; *)
(* from_dune_proto("love_context.ml");
* from_dune_proto("love_prim_interp.ml");
* from_dune_proto("love_prim_list.ml"); *)
]));
OCaml.pack("Protocol", proto_files));
requires = [];

}, [ "dune-network-lib-env", [ "Environment", { filename = "environment" };
Expand All @@ -473,7 +485,6 @@ OCaml.library("dune-network-lib-protocol",
"dune-network-lib-config", ["Dune_config"];
]));


OCaml.library("dune-network-lib-love-parsing",
with_libs(ocaml + {
files = OCaml.pack("Dune_love_parsing", [
Expand All @@ -491,6 +502,69 @@ OCaml.library("dune-network-lib-love-parsing",
"dune-network-lib-base_s", ["Tezos_base_S"];
]));

OCaml.library("dune-network-lib-protocol-with-solidity",
with_libs(ocaml + {
bytelink = [ "-custom" ];
files =
OCaml.pack("Tezos_protocol_sol",
OCaml.pack("Protocol", proto_files + solidity_files));
requires = [];

}, [ "dune-network-lib-env", [ "Environment", { filename = "environment" };
"Error_monad", { dep = false } ];
"dune-network-lib-rpc", ["Tezos_rpc"];
"dune-network-lib-config", ["Dune_config"];
]));

(*
OCaml.library("dune-network-lib-solidity-parsing",
with_libs(ocaml + {
files = OCaml.pack("Dune_solidity_parsing", [
from_dune_proto_client("solidity_parser.mly"), {
ocamlyacc = [ "menhir"; "--fixed-exception" ] };
from_dune_proto_client("solidity_lexer.mll");
]);
}, [
"dune-network-lib-protocol-with-solidity", ["Tezos_protocol_sol"];
"dune-network-lib-base", ["Tezos_base";
"TzPervasives", { dep = false } ];
"dune-network-lib-base_s", ["Tezos_base_S"];
])); *)

open_tezos = ["-open"; "Tezos_protocol_sol" ];

open_std = [
"-open"; "Tezos_stdlib" ;
"-open"; "Tezos_base" ;
"-open"; "Tezos_protocol_sol" ;
"-open"; "Tezos_crypto" ;
];

with_tezos = {
asmcomp = ocaml.asmcomp + open_tezos;
bytecomp = ocaml.bytecomp + open_tezos;
};

with_base = {
asmcomp = ocaml.asmcomp + open_std;
bytecomp = ocaml.bytecomp + open_std;
};

OCaml.library("dune-network-lib-solidity-parsing", ocaml + {
files = [
from_dune_proto_client("solidity_parser.mly"), {
ocamlyacc = [ "menhir"; "--fixed-exception" ] } + with_tezos ;
from_dune_proto_client("solidity_lexer.mll"), with_base;
];
requires = [
"dune-network-lib-protocol-with-solidity";
"dune-network-lib-stdlib";
"dune-network-lib-base";
"dune-network-lib-crypto";
]
});


OCaml.library("dune-network-lib-michelson-macros",
with_libs(ocaml + {
files = [
Expand Down
14 changes: 13 additions & 1 deletion tools/client/build.ocp2
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

OCaml.library("ocplib-liquidity-client-functor",
ocaml + {
files = [
Expand All @@ -8,6 +7,8 @@ OCaml.library("ocplib-liquidity-client-functor",
"liquidClientSigs.ml";
"liquidClientRequest.ml";
"liquidClientTypes.ml";
"liquidTraceRepr.mli";
"liquidTraceRepr.ml";
"liquidClientErrors.ml";
"liquidClientRPCs.ml";
"liquidClient.ml";
Expand Down Expand Up @@ -52,6 +53,16 @@ OCaml.library("ocplib-liquidity-to-love-client",
];
});

OCaml.library("ocplib-solidity-client",
ocaml + {
files = [ "solidityLang.ml" ];
requires = [
"dune-network-lib-protocol-with-solidity";
"dune-network-lib-solidity-parsing";
"ocplib-liquidity-client-functor";
];
});

OCaml.program("liquidity-client",
ocaml + {
bytelink = ["-cclib"; "-lsodium_stubs -lsodium"];
Expand All @@ -66,6 +77,7 @@ OCaml.program("liquidity-client",
"ocplib-liquidity-base";
"ocplib-liquidity-init";
"ezcmd";
"ocplib-solidity-client";
];
});

Expand Down
Loading