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)),