Merge pull request #8544 from blockscout/mf-fix-null-structlogs

Fix `nil` `"structLogs"`
pull/8579/head
Victor Baranov 1 year ago committed by GitHub
commit 68e54281af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 14
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth.ex

@ -4,6 +4,7 @@
### Features
- [#8544](https://github.com/blockscout/blockscout/pull/8544) - Fix `nil` `"structLogs"`
- [#8561](https://github.com/blockscout/blockscout/pull/8561), [#8564](https://github.com/blockscout/blockscout/pull/8564) - Get historical market cap data from CoinGecko
- [#8386](https://github.com/blockscout/blockscout/pull/8386) - Add `owner_address_hash` to the `token_instances`
- [#8530](https://github.com/blockscout/blockscout/pull/8530) - Add `block_type` to search results

@ -143,11 +143,15 @@ defmodule EthereumJSONRPC.Geth do
else: Tracer
responses
|> Enum.map(fn %{id: id, result: %{"structLogs" => _} = result} ->
debug_trace_transaction_response_to_internal_transactions_params(
%{id: id, result: tracer.replay(result, Map.fetch!(receipts_map, id), Map.fetch!(txs_map, id))},
id_to_params
)
|> Enum.map(fn
%{result: %{"structLogs" => nil}} ->
[]
%{id: id, result: %{"structLogs" => _} = result} ->
debug_trace_transaction_response_to_internal_transactions_params(
%{id: id, result: tracer.replay(result, Map.fetch!(receipts_map, id), Map.fetch!(txs_map, id))},
id_to_params
)
end)
|> reduce_internal_transactions_params()
|> fetch_missing_data(json_rpc_named_arguments)

Loading…
Cancel
Save