Skip to content

Commit

Permalink
fix: missing onlyTopCall option on some geth networks (blockscout#10309)
Browse files Browse the repository at this point in the history
  • Loading branch information
k1rill-fedoseev authored Jun 25, 2024
1 parent 5789382 commit 7c08ba0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,20 @@ defmodule EthereumJSONRPC.Geth do
id_to_params
|> debug_trace_transaction_requests(true)
|> json_rpc(json_rpc_named_arguments_corrected_timeout),
{:ok, [first_trace]} <-
{:ok, traces} <-
debug_trace_transaction_responses_to_internal_transactions_params(
responses,
id_to_params,
json_rpc_named_arguments_corrected_timeout
) do
%{block_hash: block_hash} = transactions_params |> Enum.at(0)
case {traces, transactions_params} do
{[%{} = first_trace | _], [%{block_hash: block_hash} | _]} ->
{:ok,
[%{first_trace: first_trace, block_hash: block_hash, json_rpc_named_arguments: json_rpc_named_arguments}]}

{:ok, [%{first_trace: first_trace, block_hash: block_hash, json_rpc_named_arguments: json_rpc_named_arguments}]}
_ ->
{:error, :not_found}
end
end
end

Expand Down

0 comments on commit 7c08ba0

Please sign in to comment.