|
|
|
@ -22,8 +22,8 @@ defmodule Explorer.MicroserviceInterfaces.Metadata do |
|
|
|
|
with :ok <- Microservice.check_enabled(__MODULE__) do |
|
|
|
|
body = %{ |
|
|
|
|
addresses: Enum.join(addresses, ","), |
|
|
|
|
tagsLimit: @tags_per_address_limit, |
|
|
|
|
chainId: Application.get_env(:block_scout_web, :chain_id) |
|
|
|
|
tags_limit: @tags_per_address_limit, |
|
|
|
|
chain_id: Application.get_env(:block_scout_web, :chain_id) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
http_get_request(addresses_metadata_url(), body) |
|
|
|
@ -38,8 +38,8 @@ defmodule Explorer.MicroserviceInterfaces.Metadata do |
|
|
|
|
with :ok <- Microservice.check_enabled(__MODULE__) do |
|
|
|
|
params = |
|
|
|
|
params |
|
|
|
|
|> Map.put("pageSize", @page_size) |
|
|
|
|
|> Map.put("chainId", Application.get_env(:block_scout_web, :chain_id)) |
|
|
|
|
|> Map.put("page_size", @page_size) |
|
|
|
|
|> Map.put("chain_id", Application.get_env(:block_scout_web, :chain_id)) |
|
|
|
|
|
|
|
|
|
http_get_request_for_proxy_method(addresses_url(), params, &prepare_addresses_response/1) |
|
|
|
|
end |
|
|
|
@ -136,11 +136,11 @@ defmodule Explorer.MicroserviceInterfaces.Metadata do |
|
|
|
|
Map.put(tag, "meta", Jason.decode!(meta)) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
defp prepare_addresses_response({:ok, %{"addresses" => addresses} = response}) do |
|
|
|
|
defp prepare_addresses_response({:ok, %{"items" => addresses} = response}) do |
|
|
|
|
{:ok, |
|
|
|
|
Map.put( |
|
|
|
|
response, |
|
|
|
|
"addresses", |
|
|
|
|
"items", |
|
|
|
|
addresses |
|
|
|
|
|> Chain.hashes_to_addresses( |
|
|
|
|
necessity_by_association: %{names: :optional, smart_contract: :optional, proxy_implementations: :optional} |
|
|
|
|