From 4fec6f16243522e3c4b1368e0dbb5fcc2618a80c Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Thu, 29 Aug 2019 13:12:06 +0200 Subject: [PATCH] naively connects big_map to the transpiler --- src/contracts/big_map.ligo | 5 +++++ src/transpiler/transpiler.ml | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 src/contracts/big_map.ligo diff --git a/src/contracts/big_map.ligo b/src/contracts/big_map.ligo new file mode 100644 index 000000000..2b6f97581 --- /dev/null +++ b/src/contracts/big_map.ligo @@ -0,0 +1,5 @@ +type storage_ is big_map(int, int) * unit + +function main(const p : unit; const s : storage_) : list(operation) * storage_ is + block { skip } + with ((nil : list(operation)), s) \ No newline at end of file diff --git a/src/transpiler/transpiler.ml b/src/transpiler/transpiler.ml index 7d4db9321..3c8ad1ae3 100644 --- a/src/transpiler/transpiler.ml +++ b/src/transpiler/transpiler.ml @@ -113,6 +113,9 @@ let rec translate_type (t:AST.type_value) : type_value result = | T_constant ("map", [key;value]) -> let%bind kv' = bind_map_pair translate_type (key, value) in ok (T_map kv') + | T_constant ("big_map", [key;value] ) -> + let%bind kv' = bind_map_pair translate_type (key, value) in + ok (T_map kv') | T_constant ("list", [t]) -> let%bind t' = translate_type t in ok (T_list t')