WIP
This commit is contained in:
+3
-3
@@ -31,13 +31,13 @@ start([ConID]) ->
|
||||
Fun = "resolve",
|
||||
{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),
|
||||
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}),
|
||||
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}),
|
||||
{ok, Erlang} = hz:decode_bytearray(Return, {erlang, R_Type}),
|
||||
% {IPs, Port, Salt, ValidIDs} = Erlang,
|
||||
% ok = tell(info, "Decoded Erlang: ~tp", [Erlang]),
|
||||
io:format("~tp~n", [Erlang]),
|
||||
zx:silent_stop();
|
||||
start(Poop) ->
|
||||
ok = tell(info, "Bad arg: ~tp", [Poop]),
|
||||
|
||||
Reference in New Issue
Block a user