|
|
|
@ -6391,7 +6391,20 @@ defmodule Explorer.Chain do |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
def zkevm_batch(number, options \\ []) when is_list(options) do |
|
|
|
|
def zkevm_batch(number, options \\ []) |
|
|
|
|
|
|
|
|
|
def zkevm_batch(:latest, options) when is_list(options) do |
|
|
|
|
ZkevmTxnBatch |
|
|
|
|
|> order_by(desc: :number) |
|
|
|
|
|> limit(1) |
|
|
|
|
|> select_repo(options).one() |
|
|
|
|
|> case do |
|
|
|
|
nil -> {:error, :not_found} |
|
|
|
|
batch -> {:ok, batch} |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def zkevm_batch(number, options) when is_list(options) do |
|
|
|
|
necessity_by_association = Keyword.get(options, :necessity_by_association, %{}) |
|
|
|
|
|
|
|
|
|
ZkevmTxnBatch |
|
|
|
|