Fix some log topics for Suave and Polygon Edge

pull/9102/head
POA 11 months ago
parent 61d72759d0
commit f21b2672f7
  1. 4
      .dialyzer-ignore
  2. 13
      apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex
  3. 7
      apps/indexer/lib/indexer/fetcher/polygon_edge/deposit_execute.ex

@ -14,8 +14,8 @@ lib/phoenix/router.ex:324
lib/phoenix/router.ex:402
lib/explorer/smart_contract/reader.ex:435
lib/indexer/fetcher/polygon_edge.ex:737
lib/indexer/fetcher/polygon_edge/deposit_execute.ex:146
lib/indexer/fetcher/polygon_edge/deposit_execute.ex:190
lib/indexer/fetcher/polygon_edge/deposit_execute.ex:151
lib/indexer/fetcher/polygon_edge/deposit_execute.ex:195
lib/indexer/fetcher/polygon_edge/withdrawal.ex:166
lib/indexer/fetcher/polygon_edge/withdrawal.ex:210
lib/indexer/fetcher/zkevm/transaction_batch.ex:116

@ -561,7 +561,18 @@ defmodule BlockScoutWeb.API.V2.TransactionView do
end
defp sanitize_log_first_topic(first_topic) do
if is_nil(first_topic), do: "", else: String.downcase(first_topic)
if is_nil(first_topic) do
""
else
sanitized =
if is_binary(first_topic) do
first_topic
else
Hash.to_string(first_topic)
end
String.downcase(sanitized)
end
end
def token_transfers(_, _conn, false), do: nil

@ -134,11 +134,16 @@ defmodule Indexer.Fetcher.PolygonEdge.DepositExecute do
|> log_topic_to_string()
|> quantity_to_integer()
status =
third_topic
|> log_topic_to_string()
|> quantity_to_integer()
%{
msg_id: msg_id,
l2_transaction_hash: l2_transaction_hash,
l2_block_number: quantity_to_integer(l2_block_number),
success: quantity_to_integer(third_topic) != 0
success: status != 0
}
end

Loading…
Cancel
Save