Remove oracle type references

This commit is contained in:
2025-01-05 14:17:00 +09:00
parent d5eb3ad0fb
commit 969a845203
9 changed files with 9 additions and 87 deletions
-2
View File
@@ -15,8 +15,6 @@
, {contract_pubkey , 32}
, {transaction , not_applicable}
, {tx_hash , 32}
, {oracle_pubkey , 32}
, {oracle_query_id , 32}
, {account_pubkey , 32}
, {signature , 64}
, {name , not_applicable}
-19
View File
@@ -11,7 +11,6 @@
-define(ACCOUNT, aeser_id:create(account, <<1:256>>)).
-define(CONTRACT, aeser_id:create(contract, <<2:256>>)).
-define(NAME, aeser_id:create(name, <<3:256>>)).
-define(ORACLE, aeser_id:create(oracle, <<3:256>>)).
-define(NETWORK_ID, <<"my_fancy_network"/utf8>>).
@@ -27,14 +26,6 @@ encode_correct_test_() ->
{"Encode aens wildcard sig",
fun() ->
aeser_delegation:aens_sig(?NETWORK_ID, ?ACCOUNT, ?CONTRACT)
end},
{"Encode oracle sig",
fun() ->
aeser_delegation:oracle_sig(?NETWORK_ID, ?ACCOUNT, ?CONTRACT)
end},
{"Encode oracle response sig",
fun() ->
aeser_delegation:oracle_response_sig(?NETWORK_ID, ?ORACLE, ?CONTRACT)
end}
].
@@ -53,15 +44,5 @@ encode_fail_test_() ->
fun() ->
?assertError(_, aeser_delegation:aens_sig(?NETWORK_ID, ?ACCOUNT, <<42:256>>)),
?assertError(_, aeser_delegation:aens_sig(?NETWORK_ID, ?CONTRACT, ?CONTRACT))
end},
{"Bad encoding oracle sig",
fun() ->
?assertError(_, aeser_delegation:oracle_sig(?NETWORK_ID, <<42:256>>, ?CONTRACT)),
?assertError(_, aeser_delegation:oracle_sig(?NETWORK_ID, ?ACCOUNT, ?ACCOUNT))
end},
{"Bad encoding oracle response sig",
fun() ->
?assertError(_, aeser_delegation:oracle_response_sig(?NETWORK_ID, <<42:256>>, ?CONTRACT)),
?assertError(_, aeser_delegation:oracle_response_sig(?NETWORK_ID, ?ORACLE, ?ORACLE))
end}
].