Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
blockscout/lib/explorer_web/controllers/transaction_log_controller.ex

17 lines
468 B

defmodule ExplorerWeb.TransactionLogController do
use ExplorerWeb, :controller
import Ecto.Query
alias Explorer.Log
alias Explorer.Repo.NewRelic, as: Repo
def index(conn, params) do
hash = params["transaction_id"]
logs = from log in Log,
join: transaction in assoc(log, :transaction),
preload: [:address],
where: transaction.hash == ^hash
render(conn, "index.html", logs: Repo.paginate(logs), transaction_id: hash)
end
end