Adjust to hz 0.9.2

This commit is contained in:
2026-05-27 17:56:58 +09:00
parent 03e668875b
commit d095e821a6
+3 -1
View File
@@ -18,7 +18,7 @@
start([ConID]) -> start([ConID]) ->
ok = hakuzaru:start(), ok = hakuzaru:start(),
ok = hz:chain_nodes([{"tsuriai.jp", 4013}]), ok = hz:chain_nodes([{"tsuriai.jp", 4013}]),
{project, [{_, Source}]} = hz:contract_source(ConID), {ok, Source} = hz:contract_source(ConID),
{ok, Built} = so_compiler:from_string(Source, [{aci, json}]), {ok, Built} = so_compiler:from_string(Source, [{aci, json}]),
AACI = hz_aaci:prepare(maps:get(aci, Built)), AACI = hz_aaci:prepare(maps:get(aci, Built)),
% Dry runs require a caller that is known, and the contract owner is definitely known % Dry runs require a caller that is known, and the contract owner is definitely known
@@ -34,7 +34,9 @@ start([ConID]) ->
R_Type = maps:get(Fun, element(3, AACI)), R_Type = 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.
% Erlang = hz:decode_bytearray(Return, {erlang, R_Type}), % Erlang = hz:decode_bytearray(Return, {erlang, R_Type}),
% {IPs, Port, Salt, ValidIDs} = Erlang,
% ok = tell(info, "Decoded Erlang: ~tp", [Erlang]), % ok = tell(info, "Decoded Erlang: ~tp", [Erlang]),
zx:silent_stop(); zx:silent_stop();
start(Poop) -> start(Poop) ->