diff --git a/quickcheck/aefate_code_eqc.erl b/quickcheck/aefate_code_eqc.erl index 7938d7b..72726a4 100644 --- a/quickcheck/aefate_code_eqc.erl +++ b/quickcheck/aefate_code_eqc.erl @@ -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) -> diff --git a/src/aeb_aevm_abi.erl b/src/aeb_aevm_abi.erl index 1d62f36..6b3bfdf 100644 --- a/src/aeb_aevm_abi.erl +++ b/src/aeb_aevm_abi.erl @@ -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 diff --git a/src/aeb_fate_abi.erl b/src/aeb_fate_abi.erl index 55fb5fc..b54227d 100644 --- a/src/aeb_fate_abi.erl +++ b/src/aeb_fate_abi.erl @@ -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)),