This commit is contained in:
2026-05-28 14:17:55 +09:00
parent d095e821a6
commit 05dd7c5992
+3 -3
View File
@@ -31,13 +31,13 @@ start([ConID]) ->
Fun = "resolve", Fun = "resolve",
{ok, UnsignedTX} = hz:contract_call(CallerID, Nonce, Gas, GP, Amount, TTL, AACI, ConID, Fun, []), {ok, UnsignedTX} = hz:contract_call(CallerID, Nonce, Gas, GP, Amount, TTL, AACI, ConID, Fun, []),
{ok, #{"results" := [#{"call_obj" := #{"return_value" := Return}}]}} = hz:dry_run(UnsignedTX), {ok, #{"results" := [#{"call_obj" := #{"return_value" := Return}}]}} = hz:dry_run(UnsignedTX),
R_Type = maps:get(Fun, element(3, AACI)), R_Type = element(2, maps:get(Fun, element(3, AACI))),
Sophia = hz:decode_bytearray(Return, {sophia, R_Type}), Sophia = hz:decode_bytearray(Return, {sophia, R_Type}),
io:format("~ts~n", [Sophia]), io:format("~ts~n", [Sophia]),
% TODO: The Erlang decoding is still broken, but won't be shortly. % TODO: The Erlang decoding is still broken, but won't be shortly.
% Erlang = hz:decode_bytearray(Return, {erlang, R_Type}), {ok, Erlang} = hz:decode_bytearray(Return, {erlang, R_Type}),
% {IPs, Port, Salt, ValidIDs} = Erlang, % {IPs, Port, Salt, ValidIDs} = Erlang,
% ok = tell(info, "Decoded Erlang: ~tp", [Erlang]), io:format("~tp~n", [Erlang]),
zx:silent_stop(); zx:silent_stop();
start(Poop) -> start(Poop) ->
ok = tell(info, "Bad arg: ~tp", [Poop]), ok = tell(info, "Bad arg: ~tp", [Poop]),