diff --git a/apps/explorer/lib/explorer/third_party_integrations/solidityscan.ex b/apps/explorer/lib/explorer/third_party_integrations/solidityscan.ex index 27a53f5b6a..fc34f0339f 100644 --- a/apps/explorer/lib/explorer/third_party_integrations/solidityscan.ex +++ b/apps/explorer/lib/explorer/third_party_integrations/solidityscan.ex @@ -6,7 +6,6 @@ defmodule Explorer.ThirdPartyIntegrations.SolidityScan do require Logger alias Explorer.Helper - @blockscout_platform_id "16" @recv_timeout 60_000 @doc """ @@ -37,12 +36,16 @@ defmodule Explorer.ThirdPartyIntegrations.SolidityScan do defp base_url(address_hash_string) do if chain_id() && api_key() do - "https://api.solidityscan.com/api/v1/quickscan/#{@blockscout_platform_id}/#{chain_id()}/#{address_hash_string}" + "https://api.solidityscan.com/api/v1/quickscan/#{platform_id()}/#{chain_id()}/#{address_hash_string}" else nil end end + defp platform_id do + Application.get_env(:explorer, __MODULE__)[:platform_id] + end + defp chain_id do Application.get_env(:explorer, __MODULE__)[:chain_id] end diff --git a/config/runtime.exs b/config/runtime.exs index 29feadfdd4..b4bfedcc9a 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -457,6 +457,7 @@ config :explorer, Explorer.ThirdPartyIntegrations.Sourcify, repo_url: System.get_env("SOURCIFY_REPO_URL") || "https://repo.sourcify.dev/contracts" config :explorer, Explorer.ThirdPartyIntegrations.SolidityScan, + platform_id: System.get_env("SOLIDITYSCAN_PLATFORM_ID", "16"), chain_id: System.get_env("SOLIDITYSCAN_CHAIN_ID"), api_key: System.get_env("SOLIDITYSCAN_API_TOKEN") diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index 3f880b7089..709233596e 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -378,6 +378,7 @@ SOURCIFY_SERVER_URL= SOURCIFY_REPO_URL= SHOW_TENDERLY_LINK=false TENDERLY_CHAIN_PATH= +# SOLIDITYSCAN_PLATFORM_ID= # SOLIDITYSCAN_CHAIN_ID= # SOLIDITYSCAN_API_TOKEN= # NOVES_FI_BASE_API_URL=