From cf4a3856b9ee26b4eab20e69b6bdf6b3ff2318ed Mon Sep 17 00:00:00 2001 From: Craig Everett Date: Sat, 23 May 2026 17:53:43 +0900 Subject: [PATCH] Fix non-existance account dry run problem --- src/gd_v_call.erl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gd_v_call.erl b/src/gd_v_call.erl index 474896c..e87ebf8 100644 --- a/src/gd_v_call.erl +++ b/src/gd_v_call.erl @@ -447,7 +447,8 @@ do_dry_run(State = #s{action = #w{wx = ActionB}}, ConID, TX) -> end. -dry_run2(State = #s{funret = ReturnType, +dry_run2(State = #s{j = J, + funret = ReturnType, return = #w{wx = ReturnT}, copy = #w{wx = CopyB}, tx_data = TXData, @@ -458,16 +459,21 @@ dry_run2(State = #s{funret = ReturnType, case TXInfo of #{"results" := [#{"call_obj" := - #{"return_type" := "revert", + #{"return_type" := "revert", "return_value" := ReturnCB}, "result" := "ok","type" := "contract_call"}]} -> io_lib:format("Revert: ~ts", [hz:decode_bytearray(ReturnCB, sophia)]); #{"results" := [#{"call_obj" := - #{"return_type" := "ok", + #{"return_type" := "ok", "return_value" := ReturnCB}, "result" := "ok","type" := "contract_call"}]} -> hz:decode_bytearray(ReturnCB, {sophia, ReturnType}); + #{"results" := + [#{"reason" := "Internal error:\n account_not_found\n", + "result" := "error", + "type" := "contract_call"}]} -> + ["[", J("The calling account requires funds"), "]"]; Other -> io_lib:format("???: ~tp", [Other]) end,