Pt 167126818 #180

Merged
zxq9 merged 2 commits from PT-167126818 into master 2019-08-06 20:15:39 +09:00
3 changed files with 14 additions and 2 deletions

View File

@ -77,7 +77,7 @@ prop_opcodes() ->
valid_opcodes() ->
lists:seq(0, 16#75) ++ lists:seq(16#fa, 16#fd).
lists:seq(0, 16#7c) ++ lists:seq(16#fa, 16#fd).
fate_code(Failure) ->

View File

@ -19,6 +19,7 @@
, typereps_from_type_hash/2
, function_name_from_type_hash/2
, get_function_hash_from_calldata/1
, abi_version/0
]).
-type hash() :: <<_:256>>. %% 256 = ?HASH_SIZE * 8.
@ -35,6 +36,11 @@
%%% API
%%%===================================================================
%% Shall match ?ABI_AEVM_SOPHIA_1
-spec abi_version() -> integer().
abi_version() ->
1.
%%%===================================================================
%%% Handle calldata

View File

@ -13,7 +13,8 @@
, decode_calldata/2
, get_function_hash_from_calldata/1
, get_function_name_from_function_hash/2
, get_function_type_from_function_hash/2 ]).
, get_function_type_from_function_hash/2
, abi_version/0 ]).
-include("../include/aeb_fate_data.hrl").
@ -21,6 +22,11 @@
%%% API
%%%===================================================================
%% Shall match ?ABI_FATE_SOPHIA_1
-spec abi_version() -> integer().
abi_version() ->
3.
-spec create_calldata(list(), [term()]) -> {ok, binary()}.
create_calldata(FunName, Args) ->
FunctionId = aeb_fate_code:symbol_identifier(list_to_binary(FunName)),