diff --git a/src/aeso_ast_infer_types.erl b/src/aeso_ast_infer_types.erl index f157eb7..a24aaea 100644 --- a/src/aeso_ast_infer_types.erl +++ b/src/aeso_ast_infer_types.erl @@ -359,7 +359,7 @@ global_env() -> Fun1 = fun(S, T) -> Fun([S], T) end, TVar = fun(X) -> {tvar, Ann, "'" ++ X} end, SignId = {id, Ann, "signature"}, - SignDef = {tuple, Ann, [{int, Ann, 0}, {int, Ann, 0}]}, + SignDef = {bytes, Ann, <<0:64/unit:8>>}, Signature = {named_arg_t, Ann, SignId, SignId, {typed, Ann, SignDef, SignId}}, SignFun = fun(Ts, T) -> {type_sig, Ann, [Signature], Ts, T} end, TTL = {qid, Ann, ["Chain", "ttl"]}, diff --git a/src/aeso_ast_to_fcode.erl b/src/aeso_ast_to_fcode.erl index 1fac9ba..57ab3b3 100644 --- a/src/aeso_ast_to_fcode.erl +++ b/src/aeso_ast_to_fcode.erl @@ -294,6 +294,8 @@ type_to_fcode(Env, Sub, {tuple_t, _, Types}) -> type_to_fcode(Env, Sub, {record_t, Fields}) -> FieldType = fun({field_t, _, _, Ty}) -> Ty end, type_to_fcode(Env, Sub, {tuple_t, [], lists:map(FieldType, Fields)}); +type_to_fcode(_Env, _Sub, {bytes_t, _, _N}) -> + string; %% TODO: add bytes type to FATE? type_to_fcode(_Env, Sub, {tvar, _, X}) -> maps:get(X, Sub, any); type_to_fcode(_Env, _Sub, Type) -> @@ -321,6 +323,8 @@ expr_to_fcode(_Env, _Type, {contract_pubkey, _, K}) -> {contract_pubkey, K}; expr_to_fcode(_Env, _Type, {oracle_pubkey, _, K}) -> {oracle_pubkey, K}; expr_to_fcode(_Env, _Type, {oracle_query_id, _, K}) -> {oracle_query_id, K}; +expr_to_fcode(_Env, _Type, {bytes, _, Bin}) -> {string, Bin}; + %% Variables expr_to_fcode(Env, _Type, {id, _, X}) -> resolve_var(Env, [X]); expr_to_fcode(Env, _Type, {qid, _, X}) -> resolve_var(Env, X);