Correctly handle ArgTypes in create_calldata

This commit is contained in:
Hans Svensson
2019-02-28 14:44:16 +01:00
parent 62aa06cc3a
commit eb77a73d15
2 changed files with 10 additions and 7 deletions
+3 -1
View File
@@ -388,7 +388,9 @@ to_bytecode([Op|Rest], Options) ->
to_bytecode([], _) -> [].
extract_type_info(#{functions := Functions} =_Icode) ->
TypeInfo = [aeso_abi:function_type_info(list_to_binary(lists:last(Name)), Args, TypeRep)
ArgTypesOnly = fun(As) -> [ T || {_, T} <- As ] end,
TypeInfo = [aeso_abi:function_type_info(list_to_binary(lists:last(Name)),
ArgTypesOnly(Args), TypeRep)
|| {Name, Attrs, Args,_Body, TypeRep} <- Functions,
not is_tuple(Name),
not lists:member(private, Attrs)