|
|
@ -415,10 +415,13 @@ defmodule BlockScoutWeb.API.V2.TransactionView do |
|
|
|
|> Map.put("polygon_edge_withdrawal", polygon_edge_withdrawal(transaction.hash, conn)) |
|
|
|
|> Map.put("polygon_edge_withdrawal", polygon_edge_withdrawal(transaction.hash, conn)) |
|
|
|
|
|
|
|
|
|
|
|
"polygon_zkevm" -> |
|
|
|
"polygon_zkevm" -> |
|
|
|
result |
|
|
|
extended_result = |
|
|
|
|> add_optional_transaction_field(transaction, "zkevm_batch_number", :zkevm_batch, :number) |
|
|
|
result |
|
|
|
|> add_optional_transaction_field(transaction, "zkevm_sequence_hash", :zkevm_sequence_txn, :hash) |
|
|
|
|> add_optional_transaction_field(transaction, "zkevm_batch_number", :zkevm_batch, :number) |
|
|
|
|> add_optional_transaction_field(transaction, "zkevm_verify_hash", :zkevm_verify_txn, :hash) |
|
|
|
|> add_optional_transaction_field(transaction, "zkevm_sequence_hash", :zkevm_sequence_txn, :hash) |
|
|
|
|
|
|
|
|> add_optional_transaction_field(transaction, "zkevm_verify_hash", :zkevm_verify_txn, :hash) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map.put(extended_result, "zkevm_status", zkevm_status(extended_result)) |
|
|
|
|
|
|
|
|
|
|
|
_ -> result |
|
|
|
_ -> result |
|
|
|
end |
|
|
|
end |
|
|
@ -431,6 +434,14 @@ defmodule BlockScoutWeb.API.V2.TransactionView do |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defp zkevm_status(result_map) do |
|
|
|
|
|
|
|
if is_nil(Map.get(result_map, "zkevm_sequence_hash")) do |
|
|
|
|
|
|
|
"Confirmed by Sequencer" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
"L1 Confirmed" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def token_transfers(_, _conn, false), do: nil |
|
|
|
def token_transfers(_, _conn, false), do: nil |
|
|
|
def token_transfers(%NotLoaded{}, _conn, _), do: nil |
|
|
|
def token_transfers(%NotLoaded{}, _conn, _), do: nil |
|
|
|
|
|
|
|
|
|
|
|