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/apps/explorer/lib/explorer/custom_contracts_helpers.ex

22 lines
564 B

defmodule Explorer.CustomContractsHelpers do
@moduledoc """
Helpers to enable custom contracts themes
"""
def get_custom_addresses_list(env_var) do
addresses_var = get_raw_custom_addresses_list(env_var)
addresses_list = (addresses_var && String.split(addresses_var, ",")) || []
formatted_addresses_list =
addresses_list
|> Enum.map(fn addr ->
String.downcase(addr)
end)
formatted_addresses_list
end
def get_raw_custom_addresses_list(env_var) do
Application.get_env(:block_scout_web, env_var)
end
end