From 5aa6561edbbe5861e21255e4974bf41f1cd8ec6e Mon Sep 17 00:00:00 2001 From: Andrew Cravenho Date: Tue, 14 Aug 2018 01:02:54 -0400 Subject: [PATCH] Change ExplorerWeb to BlockScoutWeb --- README.md | 2 +- apps/block_scout_web/config/config.exs | 14 ++++----- apps/block_scout_web/config/dev.exs | 4 +-- .../config/dev.secret.exs.example | 2 +- apps/block_scout_web/config/prod.exs | 4 +-- apps/block_scout_web/config/test.exs | 4 +-- apps/block_scout_web/lib/block_scout_web.ex | 22 +++++++------- .../lib/block_scout_web/application.ex | 8 ++--- .../lib/block_scout_web/chain.ex | 2 +- .../channels/address_channel.ex | 12 ++++---- .../block_scout_web/channels/block_channel.ex | 8 ++--- .../channels/transaction_channel.ex | 8 ++--- .../block_scout_web/channels/user_socket.ex | 8 ++--- .../lib/block_scout_web/controller.ex | 6 ++-- .../address_contract_controller.ex | 6 ++-- ...ddress_contract_verification_controller.ex | 4 +-- .../controllers/address_controller.ex | 4 +-- ...address_internal_transaction_controller.ex | 8 ++--- .../address_read_contract_controller.ex | 6 ++-- .../address_transaction_controller.ex | 8 ++--- .../controllers/api/rpc/address_controller.ex | 4 +-- .../controllers/api/rpc/block_controller.ex | 6 ++-- .../controllers/api/rpc/rpc_translator.ex | 4 +-- .../controllers/api/v1/supply_controller.ex | 4 +-- .../controllers/api_docs_controller.ex | 6 ++-- .../controllers/block_controller.ex | 6 ++-- .../block_transaction_controller.ex | 6 ++-- .../controllers/chain_controller.ex | 6 ++-- .../pending_transaction_controller.ex | 6 ++-- .../controllers/token_controller.ex | 6 ++-- .../controllers/transaction_controller.ex | 6 ++-- ...saction_internal_transaction_controller.ex | 6 ++-- .../controllers/transaction_log_controller.ex | 6 ++-- .../lib/block_scout_web/csp_header.ex | 2 +- .../lib/block_scout_web/endpoint.ex | 6 ++-- .../lib/block_scout_web/etherscan.ex | 2 +- .../lib/block_scout_web/event_handler.ex | 4 +-- .../lib/block_scout_web/exchange_rates/usd.ex | 2 +- .../lib/block_scout_web/gettext.ex | 4 +-- .../lib/block_scout_web/notifier.ex | 4 +-- .../lib/block_scout_web/router.ex | 18 +++++------ .../lib/block_scout_web/social_media.ex | 2 +- .../templates/address/_link.html.eex | 4 +-- .../address/_responsive_hash.html.eex | 2 +- .../templates/address/overview.html.eex | 8 ++--- .../templates/address_contract/index.html.eex | 2 +- .../_internal_transaction.html.eex | 14 ++++----- .../index.html.eex | 2 +- .../address_read_contract/index.html.eex | 2 +- .../address_transaction/_transaction.html.eex | 30 +++++++++---------- .../address_transaction/index.html.eex | 2 +- .../templates/api_docs/index.html.eex | 2 +- .../templates/block/_tile.html.eex | 4 +-- .../templates/block/index.html.eex | 2 +- .../templates/block/overview.html.eex | 2 +- .../block_transaction/index.html.eex | 4 +-- .../templates/chain/_block.html.eex | 4 +-- .../templates/chain/show.html.eex | 8 ++--- .../templates/layout/app.html.eex | 4 +-- .../pending_transaction/index.html.eex | 16 +++++----- .../templates/token/_token_transfer.html.eex | 12 ++++---- .../templates/transaction/_link.html.eex | 2 +- .../templates/transaction/_tile.html.eex | 18 +++++------ .../templates/transaction/index.html.eex | 2 +- .../templates/transaction/overview.html.eex | 8 ++--- .../_internal_transaction.html.eex | 8 ++--- .../index.html.eex | 2 +- .../templates/transaction_log/index.html.eex | 2 +- .../address_contract_verification_view.ex | 4 +-- .../views/address_contract_view.ex | 6 ++-- .../address_internal_transaction_view.ex | 6 ++-- .../views/address_read_contract_view.ex | 6 ++-- .../views/address_transaction_view.ex | 6 ++-- .../lib/block_scout_web/views/address_view.ex | 6 ++-- .../views/api/rpc/address_view.ex | 6 ++-- .../views/api/rpc/block_view.ex | 6 ++-- .../block_scout_web/views/api/rpc/rpc_view.ex | 4 +-- .../views/api/v1/supply_view.ex | 4 +-- .../block_scout_web/views/api_docs_view.ex | 4 +-- .../views/block_transaction_view.ex | 6 ++-- .../lib/block_scout_web/views/block_view.ex | 4 +-- .../lib/block_scout_web/views/chain_view.ex | 6 ++-- .../lib/block_scout_web/views/cldr/number.ex | 2 +- .../block_scout_web/views/currency_helpers.ex | 14 ++++----- .../block_scout_web/views/error_helpers.ex | 6 ++-- .../lib/block_scout_web/views/error_view.ex | 4 +-- .../lib/block_scout_web/views/icons_view.ex | 4 +-- .../views/internal_transaction_view.ex | 4 +-- .../lib/block_scout_web/views/layout_view.ex | 6 ++-- .../views/pending_transaction_view.ex | 4 +-- .../block_scout_web/views/token_helpers.ex | 6 ++-- .../lib/block_scout_web/views/token_view.ex | 4 +-- .../transaction_internal_transaction_view.ex | 4 +-- .../views/transaction_log_view.ex | 4 +-- .../block_scout_web/views/transaction_view.ex | 10 +++---- .../lib/block_scout_web/views/wei_helpers.ex | 6 ++-- apps/block_scout_web/mix.exs | 4 +-- .../test/explorer_web/chain_test.exs | 4 +-- .../channels/address_channel_test.exs | 8 ++--- .../channels/transaction_channel_test.exs | 6 ++-- .../address_contract_controller_test.exs | 14 ++++----- .../controllers/address_controller_test.exs | 4 +-- ...s_internal_transaction_controller_test.exs | 16 +++++----- .../address_read_contract_controller_test.exs | 6 ++-- .../address_transaction_controller_test.exs | 16 +++++----- .../api/rpc/address_controller_test.exs | 4 +-- .../api/rpc/block_controller_test.exs | 4 +-- .../api/rpc/rpc_translator_test.exs | 8 ++--- .../api/v1/supply_controller_test.exs | 4 +-- .../controllers/api_docs_controller_test.exs | 10 +++---- .../controllers/block_controller_test.exs | 4 +-- .../block_transaction_controller_test.exs | 16 +++++----- .../controllers/chain_controller_test.exs | 8 ++--- .../pending_transaction_controller_test.exs | 20 ++++++------- .../transaction_controller_test.exs | 10 +++---- ...n_internal_transaction_controller_test.exs | 24 +++++++-------- .../transaction_log_controller_test.exs | 8 ++--- .../explorer_web/exchange_rates/usd_test.exs | 4 +-- .../address_contract_verification_test.exs | 4 +-- .../features/pages/address_page.ex | 2 +- .../features/pages/block_list_page.ex | 2 +- .../explorer_web/features/pages/block_page.ex | 2 +- .../explorer_web/features/pages/chain_page.ex | 2 +- .../features/pages/transaction_list_page.ex | 2 +- .../features/pages/transaction_logs_page.ex | 6 ++-- .../features/pages/transaction_page.ex | 2 +- .../features/viewing_addresses_test.exs | 14 ++++----- .../features/viewing_blocks_test.exs | 6 ++-- .../features/viewing_chain_test.exs | 8 ++--- .../features/viewing_transactions_test.exs | 6 ++-- .../test/explorer_web/social_media_test.exs | 8 ++--- .../views/address_read_contract_view_test.exs | 6 ++-- .../views/address_transaction_view_test.exs | 6 ++-- .../explorer_web/views/address_view_test.exs | 6 ++-- .../explorer_web/views/chain_view_test.exs | 6 ++-- .../views/currency_helpers_test.exs | 8 ++--- .../explorer_web/views/error_helpers_test.exs | 6 ++-- .../explorer_web/views/error_view_test.exs | 12 ++++---- .../views/internal_transaction_view_test.exs | 6 ++-- .../explorer_web/views/layout_view_test.exs | 4 +-- .../explorer_web/views/token_helpers_test.exs | 6 ++-- .../explorer_web/views/token_view_test.exs | 6 ++-- .../views/transaction_view_test.exs | 6 ++-- .../explorer_web/views/wei_helpers_test.exs | 4 +-- .../test/support/channel_case.ex | 6 ++-- .../block_scout_web/test/support/conn_case.ex | 6 ++-- .../test/support/fake_adapter.ex | 2 +- .../test/support/feature_case.ex | 6 ++-- apps/block_scout_web/test/test_helper.exs | 2 +- 149 files changed, 472 insertions(+), 472 deletions(-) diff --git a/README.md b/README.md index 7c0c1d3773..e9859f1dbd 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Each OTP application has a restricted domain. |:------------------------|:--------------------|:------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `apps/ethereum_jsonrpc` | `:ethereum_jsonrpc` | `EthereumJSONRPC` | Ethereum JSONRPC client. It is allowed to know `Explorer`'s param format, but it cannot directly depend on `:explorer` | | `apps/explorer` | `:explorer` | `Explorer` | Storage for the indexed chain. Can read and write to the backing storage. MUST be able to boot in a read-only mode when run independently from `:indexer`, so cannot depend on `:indexer` as that would start `:indexer` indexing. | -| `apps/block_scout_web` | `:block_scout_web` | `ExplorerWeb` | Phoenix interface to `:explorer`. The minimum interface to allow web access should go in `:block_scout_web`. Any business rules or interface not tied directly to `Phoenix` or `Plug` should go in `:explorer`. MUST be able to boot in a read-only mode when run independently from `:indexer`, so cannot depend on `:indexer` as that would start `:indexer` indexing. | +| `apps/block_scout_web` | `:block_scout_web` | `BlockScoutWeb` | Phoenix interface to `:explorer`. The minimum interface to allow web access should go in `:block_scout_web`. Any business rules or interface not tied directly to `Phoenix` or `Plug` should go in `:explorer`. MUST be able to boot in a read-only mode when run independently from `:indexer`, so cannot depend on `:indexer` as that would start `:indexer` indexing. | | `apps/indexer` | `:indexer` | `Indexer` | Uses `:ethereum_jsonrpc` to index chain and batch import data into `:explorer`. Any process, `Task`, or `GenServer` that automatically reads from the chain and writes to `:explorer` should be in `:indexer`. This restricts automatic writes to `:indexer` and read-only mode can be achieved by not running `:indexer`. | diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index 1bc9e924f0..34482990e0 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -7,19 +7,19 @@ use Mix.Config # General application configuration config :block_scout_web, - namespace: ExplorerWeb, + namespace: BlockScoutWeb, ecto_repos: [Explorer.Repo] # Configures the endpoint -config :block_scout_web, ExplorerWeb.Endpoint, +config :block_scout_web, BlockScoutWeb.Endpoint, url: [host: "localhost"], - render_errors: [view: ExplorerWeb.ErrorView, accepts: ~w(html json)], - pubsub: [name: ExplorerWeb.PubSub, adapter: Phoenix.PubSub.PG2] + render_errors: [view: BlockScoutWeb.ErrorView, accepts: ~w(html json)], + pubsub: [name: BlockScoutWeb.PubSub, adapter: Phoenix.PubSub.PG2] # Configures gettext -config :block_scout_web, ExplorerWeb.Gettext, locales: ~w(en), default_locale: "en" +config :block_scout_web, BlockScoutWeb.Gettext, locales: ~w(en), default_locale: "en" -config :block_scout_web, ExplorerWeb.SocialMedia, +config :block_scout_web, BlockScoutWeb.SocialMedia, twitter: "PoaNetwork", telegram: "oraclesnetwork", facebook: "PoaNetwork", @@ -28,7 +28,7 @@ config :block_scout_web, ExplorerWeb.SocialMedia, config :ex_cldr, default_locale: "en", locales: ["en"], - gettext: ExplorerWeb.Gettext + gettext: BlockScoutWeb.Gettext # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. diff --git a/apps/block_scout_web/config/dev.exs b/apps/block_scout_web/config/dev.exs index ada8930441..371063d2a6 100644 --- a/apps/block_scout_web/config/dev.exs +++ b/apps/block_scout_web/config/dev.exs @@ -6,7 +6,7 @@ use Mix.Config # The watchers configuration can be used to run external # watchers to your application. For example, we use it # with webpack to recompile .js and .css sources. -config :block_scout_web, ExplorerWeb.Endpoint, +config :block_scout_web, BlockScoutWeb.Endpoint, http: [port: 4000], debug_errors: true, code_reloader: true, @@ -38,7 +38,7 @@ config :block_scout_web, ExplorerWeb.Endpoint, # different ports. # Watch static and templates for browser reloading. -config :block_scout_web, ExplorerWeb.Endpoint, +config :block_scout_web, BlockScoutWeb.Endpoint, live_reload: [ patterns: [ ~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$}, diff --git a/apps/block_scout_web/config/dev.secret.exs.example b/apps/block_scout_web/config/dev.secret.exs.example index 48f5b910c4..3c358188f2 100644 --- a/apps/block_scout_web/config/dev.secret.exs.example +++ b/apps/block_scout_web/config/dev.secret.exs.example @@ -1,5 +1,5 @@ use Mix.Config # Configures the endpoint -config :block_scout_web, ExplorerWeb.Endpoint, +config :block_scout_web, BlockScoutWeb.Endpoint, secret_key_base: "RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5" diff --git a/apps/block_scout_web/config/prod.exs b/apps/block_scout_web/config/prod.exs index ed2c1b9463..0a0ef2733e 100644 --- a/apps/block_scout_web/config/prod.exs +++ b/apps/block_scout_web/config/prod.exs @@ -3,7 +3,7 @@ use Mix.Config # For production, we often load configuration from external # sources, such as your system environment. For this reason, # you won't find the :http configuration below, but set inside -# ExplorerWeb.Endpoint.init/2 when load_from_system_env is +# BlockScoutWeb.Endpoint.init/2 when load_from_system_env is # true. Any dynamic configuration should be done there. # # Don't forget to configure the url host to something meaningful, @@ -13,7 +13,7 @@ use Mix.Config # containing the digested version of static files. This # manifest is generated by the mix phx.digest task # which you typically run after static files are built. -config :block_scout_web, ExplorerWeb.Endpoint, +config :block_scout_web, BlockScoutWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json", force_ssl: false, secret_key_base: System.get_env("SECRET_KEY_BASE"), diff --git a/apps/block_scout_web/config/test.exs b/apps/block_scout_web/config/test.exs index 65a4f53a2e..8bdd542e2d 100644 --- a/apps/block_scout_web/config/test.exs +++ b/apps/block_scout_web/config/test.exs @@ -4,7 +4,7 @@ config :block_scout_web, :sql_sandbox, true # We don't run a server during test. If one is required, # you can enable the server option below. -config :block_scout_web, ExplorerWeb.Endpoint, +config :block_scout_web, BlockScoutWeb.Endpoint, http: [port: 4001], secret_key_base: "27Swe6KtEtmN37WyEYRjKWyxYULNtrxlkCEKur4qoV+Lwtk8lafsR16ifz1XBBYj", server: true @@ -12,4 +12,4 @@ config :block_scout_web, ExplorerWeb.Endpoint, # Configure wallaby config :wallaby, screenshot_on_failure: true -config :block_scout_web, :fake_adapter, ExplorerWeb.FakeAdapter +config :block_scout_web, :fake_adapter, BlockScoutWeb.FakeAdapter diff --git a/apps/block_scout_web/lib/block_scout_web.ex b/apps/block_scout_web/lib/block_scout_web.ex index bd446da640..81809ce1f5 100644 --- a/apps/block_scout_web/lib/block_scout_web.ex +++ b/apps/block_scout_web/lib/block_scout_web.ex @@ -1,12 +1,12 @@ -defmodule ExplorerWeb do +defmodule BlockScoutWeb do @moduledoc """ The entrypoint for defining your web interface, such as controllers, views, channels and so on. This can be used in your application as: - use ExplorerWeb, :controller - use ExplorerWeb, :view + use BlockScoutWeb, :controller + use BlockScoutWeb, :view The definitions below will be executed for every view, controller, etc, so keep them short and clean, focused @@ -19,12 +19,12 @@ defmodule ExplorerWeb do def controller do quote do - use Phoenix.Controller, namespace: ExplorerWeb + use Phoenix.Controller, namespace: BlockScoutWeb - import ExplorerWeb.Controller - import ExplorerWeb.Router.Helpers - import ExplorerWeb.Gettext - import ExplorerWeb.ErrorHelpers + import BlockScoutWeb.Controller + import BlockScoutWeb.Router.Helpers + import BlockScoutWeb.Gettext + import BlockScoutWeb.ErrorHelpers import Plug.Conn end end @@ -33,7 +33,7 @@ defmodule ExplorerWeb do quote do use Phoenix.View, root: "lib/block_scout_web/templates", - namespace: ExplorerWeb + namespace: BlockScoutWeb # Import convenience functions from controllers import Phoenix.Controller, only: [get_flash: 2, view_module: 1] @@ -41,7 +41,7 @@ defmodule ExplorerWeb do # Use all HTML functionality (forms, tags, etc) use Phoenix.HTML - import ExplorerWeb.{ + import BlockScoutWeb.{ CurrencyHelpers, ErrorHelpers, Gettext, @@ -65,7 +65,7 @@ defmodule ExplorerWeb do quote do use Phoenix.Channel - import ExplorerWeb.Gettext + import BlockScoutWeb.Gettext end end diff --git a/apps/block_scout_web/lib/block_scout_web/application.ex b/apps/block_scout_web/lib/block_scout_web/application.ex index b253b333b2..d50709d1ab 100644 --- a/apps/block_scout_web/lib/block_scout_web/application.ex +++ b/apps/block_scout_web/lib/block_scout_web/application.ex @@ -1,11 +1,11 @@ -defmodule ExplorerWeb.Application do +defmodule BlockScoutWeb.Application do @moduledoc """ - Supervises `ExplorerWeb.Endpoint` in order to serve Web UI. + Supervises `BlockScoutWeb.Endpoint` in order to serve Web UI. """ use Application - alias ExplorerWeb.{Endpoint, EventHandler} + alias BlockScoutWeb.{Endpoint, EventHandler} def start(_type, _args) do import Supervisor.Spec @@ -21,7 +21,7 @@ defmodule ExplorerWeb.Application do # See https://hexdocs.pm/elixir/Supervisor.html # for other strategies and supported options - opts = [strategy: :one_for_one, name: ExplorerWeb.Supervisor] + opts = [strategy: :one_for_one, name: BlockScoutWeb.Supervisor] Supervisor.start_link(children, opts) end diff --git a/apps/block_scout_web/lib/block_scout_web/chain.ex b/apps/block_scout_web/lib/block_scout_web/chain.ex index e73cac7679..7f0a1af1e1 100644 --- a/apps/block_scout_web/lib/block_scout_web/chain.ex +++ b/apps/block_scout_web/lib/block_scout_web/chain.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.Chain do +defmodule BlockScoutWeb.Chain do @moduledoc """ Converts the `param` to the corresponding resource that uses that format of param. """ diff --git a/apps/block_scout_web/lib/block_scout_web/channels/address_channel.ex b/apps/block_scout_web/lib/block_scout_web/channels/address_channel.ex index 1c24c8d706..94345913d3 100644 --- a/apps/block_scout_web/lib/block_scout_web/channels/address_channel.ex +++ b/apps/block_scout_web/lib/block_scout_web/channels/address_channel.ex @@ -1,10 +1,10 @@ -defmodule ExplorerWeb.AddressChannel do +defmodule BlockScoutWeb.AddressChannel do @moduledoc """ Establishes pub/sub channel for address page live updates. """ - use ExplorerWeb, :channel + use BlockScoutWeb, :channel - alias ExplorerWeb.{AddressTransactionView, AddressView} + alias BlockScoutWeb.{AddressTransactionView, AddressView} alias Phoenix.View intercept(["balance_update", "count", "transaction"]) @@ -18,7 +18,7 @@ defmodule ExplorerWeb.AddressChannel do %{address: address, exchange_rate: exchange_rate}, socket ) do - Gettext.put_locale(ExplorerWeb.Gettext, socket.assigns.locale) + Gettext.put_locale(BlockScoutWeb.Gettext, socket.assigns.locale) rendered = View.render_to_string( @@ -34,7 +34,7 @@ defmodule ExplorerWeb.AddressChannel do end def handle_out("count", %{count: count}, socket) do - Gettext.put_locale(ExplorerWeb.Gettext, socket.assigns.locale) + Gettext.put_locale(BlockScoutWeb.Gettext, socket.assigns.locale) push(socket, "count", %{count: Cldr.Number.to_string!(count, format: "#,###")}) @@ -42,7 +42,7 @@ defmodule ExplorerWeb.AddressChannel do end def handle_out("transaction", %{address: address, transaction: transaction}, socket) do - Gettext.put_locale(ExplorerWeb.Gettext, socket.assigns.locale) + Gettext.put_locale(BlockScoutWeb.Gettext, socket.assigns.locale) rendered = View.render_to_string( diff --git a/apps/block_scout_web/lib/block_scout_web/channels/block_channel.ex b/apps/block_scout_web/lib/block_scout_web/channels/block_channel.ex index 9a6d7d51d7..eebd8ef09f 100644 --- a/apps/block_scout_web/lib/block_scout_web/channels/block_channel.ex +++ b/apps/block_scout_web/lib/block_scout_web/channels/block_channel.ex @@ -1,10 +1,10 @@ -defmodule ExplorerWeb.BlockChannel do +defmodule BlockScoutWeb.BlockChannel do @moduledoc """ Establishes pub/sub channel for live updates of block events. """ - use ExplorerWeb, :channel + use BlockScoutWeb, :channel - alias ExplorerWeb.{BlockView, ChainView} + alias BlockScoutWeb.{BlockView, ChainView} alias Phoenix.View intercept(["new_block"]) @@ -14,7 +14,7 @@ defmodule ExplorerWeb.BlockChannel do end def handle_out("new_block", %{block: block, average_block_time: average_block_time}, socket) do - Gettext.put_locale(ExplorerWeb.Gettext, socket.assigns.locale) + Gettext.put_locale(BlockScoutWeb.Gettext, socket.assigns.locale) rendered_block = View.render_to_string( diff --git a/apps/block_scout_web/lib/block_scout_web/channels/transaction_channel.ex b/apps/block_scout_web/lib/block_scout_web/channels/transaction_channel.ex index dfa8900302..b2747b9cdd 100644 --- a/apps/block_scout_web/lib/block_scout_web/channels/transaction_channel.ex +++ b/apps/block_scout_web/lib/block_scout_web/channels/transaction_channel.ex @@ -1,10 +1,10 @@ -defmodule ExplorerWeb.TransactionChannel do +defmodule BlockScoutWeb.TransactionChannel do @moduledoc """ Establishes pub/sub channel for live updates of transaction events. """ - use ExplorerWeb, :channel + use BlockScoutWeb, :channel - alias ExplorerWeb.TransactionView + alias BlockScoutWeb.TransactionView alias Phoenix.View intercept(["new_transaction"]) @@ -14,7 +14,7 @@ defmodule ExplorerWeb.TransactionChannel do end def handle_out("new_transaction", %{transaction: transaction}, socket) do - Gettext.put_locale(ExplorerWeb.Gettext, socket.assigns.locale) + Gettext.put_locale(BlockScoutWeb.Gettext, socket.assigns.locale) rendered_transaction = View.render_to_string( diff --git a/apps/block_scout_web/lib/block_scout_web/channels/user_socket.ex b/apps/block_scout_web/lib/block_scout_web/channels/user_socket.ex index c71abadfb3..d251a55441 100644 --- a/apps/block_scout_web/lib/block_scout_web/channels/user_socket.ex +++ b/apps/block_scout_web/lib/block_scout_web/channels/user_socket.ex @@ -1,9 +1,9 @@ -defmodule ExplorerWeb.UserSocket do +defmodule BlockScoutWeb.UserSocket do use Phoenix.Socket - channel("addresses:*", ExplorerWeb.AddressChannel) - channel("blocks:*", ExplorerWeb.BlockChannel) - channel("transactions:*", ExplorerWeb.TransactionChannel) + channel("addresses:*", BlockScoutWeb.AddressChannel) + channel("blocks:*", BlockScoutWeb.BlockChannel) + channel("transactions:*", BlockScoutWeb.TransactionChannel) transport(:websocket, Phoenix.Transports.WebSocket, timeout: 45_000) # transport :longpoll, Phoenix.Transports.LongPoll diff --git a/apps/block_scout_web/lib/block_scout_web/controller.ex b/apps/block_scout_web/lib/block_scout_web/controller.ex index 41290de3fa..f914e10b53 100644 --- a/apps/block_scout_web/lib/block_scout_web/controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controller.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.Controller do +defmodule BlockScoutWeb.Controller do @moduledoc """ Common controller error responses """ @@ -12,14 +12,14 @@ defmodule ExplorerWeb.Controller do def not_found(conn) do conn |> put_status(:not_found) - |> put_view(ExplorerWeb.ErrorView) + |> put_view(BlockScoutWeb.ErrorView) |> render("404.html") end def unprocessable_entity(conn) do conn |> put_status(:unprocessable_entity) - |> put_view(ExplorerWeb.ErrorView) + |> put_view(BlockScoutWeb.ErrorView) |> render("422.html") end end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex index 5b88c8a2d9..377be35b3c 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.AddressContractController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.AddressContractController do + use BlockScoutWeb, :controller - import ExplorerWeb.AddressController, only: [transaction_count: 1] + import BlockScoutWeb.AddressController, only: [transaction_count: 1] alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_verification_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_verification_controller.ex index e1973f4b5b..84bdd78500 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_verification_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_verification_controller.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.AddressContractVerificationController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.AddressContractVerificationController do + use BlockScoutWeb, :controller alias Explorer.Chain.SmartContract alias Explorer.SmartContract.{Solidity.CompilerVersion, Publisher} diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_controller.ex index d82f30bcd9..e631a4f0aa 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_controller.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.AddressController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.AddressController do + use BlockScoutWeb, :controller alias Explorer.Chain alias Explorer.Chain.Address diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex index 8c4b4853d5..cf70be275d 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex @@ -1,12 +1,12 @@ -defmodule ExplorerWeb.AddressInternalTransactionController do +defmodule BlockScoutWeb.AddressInternalTransactionController do @moduledoc """ Manages the displaying of information about internal transactions as they relate to addresses """ - use ExplorerWeb, :controller + use BlockScoutWeb, :controller - import ExplorerWeb.AddressController, only: [transaction_count: 1] - import ExplorerWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] + import BlockScoutWeb.AddressController, only: [transaction_count: 1] + import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex index 2879e9eca0..28b4ada396 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex @@ -1,11 +1,11 @@ -defmodule ExplorerWeb.AddressReadContractController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.AddressReadContractController do + use BlockScoutWeb, :controller alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token alias Explorer.SmartContract.Reader - import ExplorerWeb.AddressController, only: [transaction_count: 1] + import BlockScoutWeb.AddressController, only: [transaction_count: 1] def index(conn, %{"address_id" => address_hash_string}) do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex index 0fea25a906..5c406dcc63 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex @@ -1,12 +1,12 @@ -defmodule ExplorerWeb.AddressTransactionController do +defmodule BlockScoutWeb.AddressTransactionController do @moduledoc """ Display all the Transactions that terminate at this Address. """ - use ExplorerWeb, :controller + use BlockScoutWeb, :controller - import ExplorerWeb.AddressController, only: [transaction_count: 1] - import ExplorerWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] + import BlockScoutWeb.AddressController, only: [transaction_count: 1] + import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/address_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/address_controller.ex index 23ba38f843..732f24022e 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/address_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/address_controller.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.API.RPC.AddressController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.API.RPC.AddressController do + use BlockScoutWeb, :controller alias Explorer.{Etherscan, Chain} alias Explorer.Chain.{Address, Wei} diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/block_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/block_controller.ex index 6bdcbd00c6..4e18a34b3a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/block_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/block_controller.ex @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.API.RPC.BlockController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.API.RPC.BlockController do + use BlockScoutWeb, :controller alias Explorer.Chain - alias ExplorerWeb.Chain, as: ChainWeb + alias BlockScoutWeb.Chain, as: ChainWeb def getblockreward(conn, params) do with {:block_param, {:ok, unsafe_block_number}} <- {:block_param, Map.fetch(params, "blockno")}, diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/rpc_translator.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/rpc_translator.ex index 9ce5f22752..8f5fd3ce14 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/rpc_translator.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/rpc_translator.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.API.RPC.RPCTranslator do +defmodule BlockScoutWeb.API.RPC.RPCTranslator do @moduledoc """ Converts an RPC-style request into a controller action. @@ -15,7 +15,7 @@ defmodule ExplorerWeb.API.RPC.RPCTranslator do import Plug.Conn - alias ExplorerWeb.API.RPC.RPCView + alias BlockScoutWeb.API.RPC.RPCView alias Plug.Conn alias Phoenix.Controller diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/v1/supply_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/v1/supply_controller.ex index a122a333df..6b3cf3edd6 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/v1/supply_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/v1/supply_controller.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.API.V1.SupplyController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.API.V1.SupplyController do + use BlockScoutWeb, :controller alias Explorer.Chain diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api_docs_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api_docs_controller.ex index c4ee235c22..1c5ba68229 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api_docs_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api_docs_controller.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.APIDocsController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.APIDocsController do + use BlockScoutWeb, :controller - alias ExplorerWeb.Etherscan + alias BlockScoutWeb.Etherscan def index(conn, _params) do conn diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/block_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/block_controller.ex index 50d83c42d9..dc0aa7357d 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/block_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/block_controller.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.BlockController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.BlockController do + use BlockScoutWeb, :controller - import ExplorerWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] + import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias Explorer.Chain diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/block_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/block_transaction_controller.ex index 8233510678..569ada51d4 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/block_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/block_transaction_controller.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.BlockTransactionController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.BlockTransactionController do + use BlockScoutWeb, :controller - import ExplorerWeb.Chain, + import BlockScoutWeb.Chain, only: [paging_options: 1, param_to_block_number: 1, next_page_params: 3, split_list_by_page: 1] alias Explorer.Chain diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/chain_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/chain_controller.ex index 6782d0ac4b..131a042f38 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/chain_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/chain_controller.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.ChainController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.ChainController do + use BlockScoutWeb, :controller alias Explorer.{Chain, PagingOptions, Repo} alias Explorer.Chain.{Address, Block, Transaction} @@ -42,7 +42,7 @@ defmodule ExplorerWeb.ChainController do def search(conn, %{"q" => query}) do query |> String.trim() - |> ExplorerWeb.Chain.from_param() + |> BlockScoutWeb.Chain.from_param() |> case do {:ok, item} -> redirect_search_results(conn, item) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/pending_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/pending_transaction_controller.ex index 12e0906f92..7e04c1824a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/pending_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/pending_transaction_controller.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.PendingTransactionController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.PendingTransactionController do + use BlockScoutWeb, :controller - import ExplorerWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] + import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias Explorer.Chain diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/token_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/token_controller.ex index 9bd0434120..385f54fcc7 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/token_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/token_controller.ex @@ -1,9 +1,9 @@ -defmodule ExplorerWeb.TokenController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.TokenController do + use BlockScoutWeb, :controller alias Explorer.Chain - import ExplorerWeb.Chain, only: [split_list_by_page: 1, paging_options: 1, next_page_params: 3] + import BlockScoutWeb.Chain, only: [split_list_by_page: 1, paging_options: 1, next_page_params: 3] def show(conn, %{"id" => address_hash_string} = params) do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex index b988cb8974..af08d2c01c 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.TransactionController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.TransactionController do + use BlockScoutWeb, :controller - import ExplorerWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] + import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias Explorer.Chain diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex index 8e8d7db1bd..8a89794834 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.TransactionInternalTransactionController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.TransactionInternalTransactionController do + use BlockScoutWeb, :controller - import ExplorerWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] + import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex index fcc69b9c85..d833d3cdca 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.TransactionLogController do - use ExplorerWeb, :controller +defmodule BlockScoutWeb.TransactionLogController do + use BlockScoutWeb, :controller - import ExplorerWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] + import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token diff --git a/apps/block_scout_web/lib/block_scout_web/csp_header.ex b/apps/block_scout_web/lib/block_scout_web/csp_header.ex index 5ab6565150..199ee9f189 100644 --- a/apps/block_scout_web/lib/block_scout_web/csp_header.ex +++ b/apps/block_scout_web/lib/block_scout_web/csp_header.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.CSPHeader do +defmodule BlockScoutWeb.CSPHeader do @moduledoc """ Plug to set content-security-policy with websocket endpoints """ diff --git a/apps/block_scout_web/lib/block_scout_web/endpoint.ex b/apps/block_scout_web/lib/block_scout_web/endpoint.ex index 58a533b425..ec014adf29 100644 --- a/apps/block_scout_web/lib/block_scout_web/endpoint.ex +++ b/apps/block_scout_web/lib/block_scout_web/endpoint.ex @@ -1,11 +1,11 @@ -defmodule ExplorerWeb.Endpoint do +defmodule BlockScoutWeb.Endpoint do use Phoenix.Endpoint, otp_app: :block_scout_web if Application.get_env(:block_scout_web, :sql_sandbox) do plug(Phoenix.Ecto.SQL.Sandbox, repo: Explorer.Repo) end - socket("/socket", ExplorerWeb.UserSocket) + socket("/socket", BlockScoutWeb.UserSocket) # Serve at "/" the static files from "priv/static" directory. # @@ -50,7 +50,7 @@ defmodule ExplorerWeb.Endpoint do signing_salt: "iC2ksJHS" ) - plug(ExplorerWeb.Router) + plug(BlockScoutWeb.Router) def init(_key, config) do if config[:load_from_system_env] do diff --git a/apps/block_scout_web/lib/block_scout_web/etherscan.ex b/apps/block_scout_web/lib/block_scout_web/etherscan.ex index 0d4b8807d4..9fc47e7056 100644 --- a/apps/block_scout_web/lib/block_scout_web/etherscan.ex +++ b/apps/block_scout_web/lib/block_scout_web/etherscan.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.Etherscan do +defmodule BlockScoutWeb.Etherscan do @moduledoc """ Documentation data for Etherscan-compatible API. """ diff --git a/apps/block_scout_web/lib/block_scout_web/event_handler.ex b/apps/block_scout_web/lib/block_scout_web/event_handler.ex index c752fbe12b..937a97d678 100644 --- a/apps/block_scout_web/lib/block_scout_web/event_handler.ex +++ b/apps/block_scout_web/lib/block_scout_web/event_handler.ex @@ -1,11 +1,11 @@ -defmodule ExplorerWeb.EventHandler do +defmodule BlockScoutWeb.EventHandler do @moduledoc """ Subscribing process for broadcast events from Chain context. """ use GenServer alias Explorer.Chain - alias ExplorerWeb.Notifier + alias BlockScoutWeb.Notifier # Client diff --git a/apps/block_scout_web/lib/block_scout_web/exchange_rates/usd.ex b/apps/block_scout_web/lib/block_scout_web/exchange_rates/usd.ex index 9cbcfc1a43..34b2a1f258 100644 --- a/apps/block_scout_web/lib/block_scout_web/exchange_rates/usd.ex +++ b/apps/block_scout_web/lib/block_scout_web/exchange_rates/usd.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.ExchangeRates.USD do +defmodule BlockScoutWeb.ExchangeRates.USD do @moduledoc """ Struct and associated conversion functions for USD currency """ diff --git a/apps/block_scout_web/lib/block_scout_web/gettext.ex b/apps/block_scout_web/lib/block_scout_web/gettext.ex index 1d13ea70a7..9b8a7833f2 100644 --- a/apps/block_scout_web/lib/block_scout_web/gettext.ex +++ b/apps/block_scout_web/lib/block_scout_web/gettext.ex @@ -1,11 +1,11 @@ -defmodule ExplorerWeb.Gettext do +defmodule BlockScoutWeb.Gettext do @moduledoc """ A module providing Internationalization with a gettext-based API. By using [Gettext](https://hexdocs.pm/gettext), your module gains a set of macros for translations, for example: - import ExplorerWeb.Gettext + import BlockScoutWeb.Gettext # Simple translation gettext "Here is the string to translate" diff --git a/apps/block_scout_web/lib/block_scout_web/notifier.ex b/apps/block_scout_web/lib/block_scout_web/notifier.ex index ad05bbc560..bd86c0cbbc 100644 --- a/apps/block_scout_web/lib/block_scout_web/notifier.ex +++ b/apps/block_scout_web/lib/block_scout_web/notifier.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.Notifier do +defmodule BlockScoutWeb.Notifier do @moduledoc """ Responds to events from EventHandler by sending appropriate channel updates to front-end. """ @@ -6,7 +6,7 @@ defmodule ExplorerWeb.Notifier do alias Explorer.{Chain, Market, Repo} alias Explorer.Chain.Address alias Explorer.ExchangeRates.Token - alias ExplorerWeb.Endpoint + alias BlockScoutWeb.Endpoint def handle_event({:chain_event, :addresses, addresses}) do address_count_module = Application.get_env(:block_scout_web, :fake_adapter) || Chain diff --git a/apps/block_scout_web/lib/block_scout_web/router.ex b/apps/block_scout_web/lib/block_scout_web/router.ex index cf06ea319d..ed86d78066 100644 --- a/apps/block_scout_web/lib/block_scout_web/router.ex +++ b/apps/block_scout_web/lib/block_scout_web/router.ex @@ -1,12 +1,12 @@ -defmodule ExplorerWeb.Router do - use ExplorerWeb, :router +defmodule BlockScoutWeb.Router do + use BlockScoutWeb, :router pipeline :browser do plug(:accepts, ["html"]) plug(:fetch_session) plug(:fetch_flash) plug(:protect_from_forgery) - plug(ExplorerWeb.CSPHeader) + plug(BlockScoutWeb.CSPHeader) end pipeline :api do @@ -14,19 +14,19 @@ defmodule ExplorerWeb.Router do end pipeline :set_locale do - plug(SetLocale, gettext: ExplorerWeb.Gettext, default_locale: "en") + plug(SetLocale, gettext: BlockScoutWeb.Gettext, default_locale: "en") end - scope "/api/v1", ExplorerWeb.API.V1, as: :api_v1 do + scope "/api/v1", BlockScoutWeb.API.V1, as: :api_v1 do pipe_through(:api) get("/supply", SupplyController, :supply) end - scope "/api", ExplorerWeb.API.RPC do + scope "/api", BlockScoutWeb.API.RPC do pipe_through(:api) - alias ExplorerWeb.API.RPC + alias BlockScoutWeb.API.RPC forward("/", RPCTranslator, %{ "block" => RPC.BlockController, @@ -34,13 +34,13 @@ defmodule ExplorerWeb.Router do }) end - scope "/", ExplorerWeb do + scope "/", BlockScoutWeb do pipe_through(:browser) pipe_through(:set_locale) resources("/", ChainController, only: [:show], singleton: true, as: :chain) end - scope "/:locale", ExplorerWeb do + scope "/:locale", BlockScoutWeb do pipe_through(:browser) pipe_through(:set_locale) resources("/", ChainController, only: [:show], singleton: true, as: :chain) diff --git a/apps/block_scout_web/lib/block_scout_web/social_media.ex b/apps/block_scout_web/lib/block_scout_web/social_media.ex index 56fdcac032..7c13c7a687 100644 --- a/apps/block_scout_web/lib/block_scout_web/social_media.ex +++ b/apps/block_scout_web/lib/block_scout_web/social_media.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.SocialMedia do +defmodule BlockScoutWeb.SocialMedia do @moduledoc """ This module provides social media links """ diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_link.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_link.html.eex index 1cce942e4d..67957947e9 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_link.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_link.html.eex @@ -1,5 +1,5 @@ <%= if @address_hash do %> - <%= link to: address_path(ExplorerWeb.Endpoint, :show, @locale, @address_hash), "data-address-hash": @address_hash, "data-test": "address_hash_link" do %> - <%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @address_hash, contract: @contract %> + <%= link to: address_path(BlockScoutWeb.Endpoint, :show, @locale, @address_hash), "data-address-hash": @address_hash, "data-test": "address_hash_link" do %> + <%= render BlockScoutWeb.AddressView, "_responsive_hash.html", address_hash: @address_hash, contract: @contract %> <% end %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex index fec0178526..ba4a1fc903 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex @@ -1,4 +1,4 @@ <%= @address_hash %> - <%= ExplorerWeb.AddressView.trimmed_hash(@address_hash) %> + <%= BlockScoutWeb.AddressView.trimmed_hash(@address_hash) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex index 506c27ae79..4c0997ffe4 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex @@ -16,7 +16,7 @@

<%= address_title(@address) %> Details

-

<%= @address %>

+

<%= @address %>

<%= Cldr.Number.to_string!(@transaction_count, format: "#,###") %> <%= gettext "Transactions" %> @@ -26,7 +26,7 @@ <%= link( trimmed_hash(@address.contracts_creation_internal_transaction.from_address_hash), to: address_path( - ExplorerWeb.Endpoint, + BlockScoutWeb.Endpoint, :show, @locale, @address.contracts_creation_internal_transaction.from_address_hash @@ -38,7 +38,7 @@ <%= link( trimmed_hash(@address.contracts_creation_internal_transaction.transaction_hash), to: transaction_path( - ExplorerWeb.Endpoint, + BlockScoutWeb.Endpoint, :show, @locale, @address.contracts_creation_internal_transaction.transaction_hash @@ -52,7 +52,7 @@
- <%= render ExplorerWeb.AddressView, "_balance_card.html", address: @address, exchange_rate: @exchange_rate %> + <%= render BlockScoutWeb.AddressView, "_balance_card.html", address: @address, exchange_rate: @exchange_rate %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex index f717085f1a..1767000106 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex @@ -1,6 +1,6 @@
- <%= render ExplorerWeb.AddressView, "overview.html", assigns %> + <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/_internal_transaction.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/_internal_transaction.html.eex index f2d04fc656..7da5bf887c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/_internal_transaction.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/_internal_transaction.html.eex @@ -4,22 +4,22 @@ <%= gettext("Internal Transaction") %>
- <%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @internal_transaction.transaction_hash %> + <%= render BlockScoutWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @internal_transaction.transaction_hash %> <%= if @address.hash == @internal_transaction.from_address_hash do %> - <%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @internal_transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@internal_transaction.from_address) %> + <%= render BlockScoutWeb.AddressView, "_responsive_hash.html", address_hash: @internal_transaction.from_address_hash, contract: BlockScoutWeb.AddressView.contract?(@internal_transaction.from_address) %> <% else %> - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: @internal_transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@internal_transaction.from_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: @internal_transaction.from_address_hash, contract: BlockScoutWeb.AddressView.contract?(@internal_transaction.from_address), locale: @locale %> <% end %> → - <%= if @address.hash == ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction) do %> - <%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction), contract: ExplorerWeb.AddressView.contract?(@internal_transaction.to_address) %> + <%= if @address.hash == BlockScoutWeb.InternalTransactionView.to_address_hash(@internal_transaction) do %> + <%= render BlockScoutWeb.AddressView, "_responsive_hash.html", address_hash: BlockScoutWeb.InternalTransactionView.to_address_hash(@internal_transaction), contract: BlockScoutWeb.AddressView.contract?(@internal_transaction.to_address) %> <% else %> - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction), contract: ExplorerWeb.AddressView.contract?(@internal_transaction.to_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: BlockScoutWeb.InternalTransactionView.to_address_hash(@internal_transaction), contract: BlockScoutWeb.AddressView.contract?(@internal_transaction.to_address), locale: @locale %> <% end %> - <%= ExplorerWeb.TransactionView.value(@internal_transaction, include_label: false) %> <%= gettext "Ether" %> + <%= BlockScoutWeb.TransactionView.value(@internal_transaction, include_label: false) %> <%= gettext "Ether" %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex index c3052a80b6..60c29e03a9 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex @@ -1,6 +1,6 @@
- <%= render ExplorerWeb.AddressView, "overview.html", assigns %> + <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex index bc66402fef..613d94913b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex @@ -1,6 +1,6 @@
- <%= render ExplorerWeb.AddressView, "overview.html", assigns %> + <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/_transaction.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/_transaction.html.eex index d41e79feb4..353e270f47 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/_transaction.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/_transaction.html.eex @@ -1,37 +1,37 @@ -
+
- <%= ExplorerWeb.TransactionView.transaction_display_type(@transaction) %> + <%= BlockScoutWeb.TransactionView.transaction_display_type(@transaction) %> - <%= ExplorerWeb.TransactionView.formatted_status(@transaction) %> + <%= BlockScoutWeb.TransactionView.formatted_status(@transaction) %>
- <%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @transaction.hash %> + <%= render BlockScoutWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @transaction.hash %> <%= if @address.hash == @transaction.from_address_hash do %> - <%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@transaction.from_address) %> + <%= render BlockScoutWeb.AddressView, "_responsive_hash.html", address_hash: @transaction.from_address_hash, contract: BlockScoutWeb.AddressView.contract?(@transaction.from_address) %> <% else %> - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: @transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@transaction.from_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: @transaction.from_address_hash, contract: BlockScoutWeb.AddressView.contract?(@transaction.from_address), locale: @locale %> <% end %> → - <%= if @address.hash == ExplorerWeb.TransactionView.to_address_hash(@transaction) do %> - <%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(@transaction), contract: ExplorerWeb.AddressView.contract?(@transaction.to_address) %> + <%= if @address.hash == BlockScoutWeb.TransactionView.to_address_hash(@transaction) do %> + <%= render BlockScoutWeb.AddressView, "_responsive_hash.html", address_hash: BlockScoutWeb.TransactionView.to_address_hash(@transaction), contract: BlockScoutWeb.AddressView.contract?(@transaction.to_address) %> <% else %> - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(@transaction), contract: ExplorerWeb.AddressView.contract?(@transaction.to_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: BlockScoutWeb.TransactionView.to_address_hash(@transaction), contract: BlockScoutWeb.AddressView.contract?(@transaction.to_address), locale: @locale %> <% end %> - <%= ExplorerWeb.TransactionView.value(@transaction, include_label: false) %> <%= gettext "Ether" %> + <%= BlockScoutWeb.TransactionView.value(@transaction, include_label: false) %> <%= gettext "Ether" %> - <%= ExplorerWeb.TransactionView.formatted_fee(@transaction, denomination: :ether, include_label: false) %> <%= gettext "TX Fee" %> + <%= BlockScoutWeb.TransactionView.formatted_fee(@transaction, denomination: :ether, include_label: false) %> <%= gettext "TX Fee" %>
@@ -39,7 +39,7 @@ <%= link( gettext("Block #%{number}", number: to_string(@transaction.block.number)), - to: block_path(ExplorerWeb.Endpoint, :show, @locale, @transaction.block) + to: block_path(BlockScoutWeb.Endpoint, :show, @locale, @transaction.block) ) %> @@ -58,7 +58,7 @@ <% end %>
- <%= if ExplorerWeb.TransactionView.involves_token_transfers?(@transaction) do %> + <%= if BlockScoutWeb.TransactionView.involves_token_transfers?(@transaction) do %>

<%= gettext "Transfers" %>

@@ -69,11 +69,11 @@
- <%= ExplorerWeb.AddressView.display_address_hash(@address, token_transfer.from_address, @locale) %> + <%= BlockScoutWeb.AddressView.display_address_hash(@address, token_transfer.from_address, @locale) %> - <%= ExplorerWeb.AddressView.display_address_hash(@address, token_transfer.to_address, @locale) %> + <%= BlockScoutWeb.AddressView.display_address_hash(@address, token_transfer.to_address, @locale) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex index 04294fc7fd..0543cbf572 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex @@ -1,6 +1,6 @@
- <%= render ExplorerWeb.AddressView, "overview.html", assigns %> + <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex index d09c142588..049324aa1d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex @@ -3,7 +3,7 @@

API Documentation

- [ Base URL: <%= @conn.host %>/api ] + [ Base URL: <%= @conn.host %>/api ]

This API is provided for developers transitioning their applications from Etherscan to Explorer. It supports GET and POST requests.

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex index 48988ea76c..62cca229ee 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex @@ -5,7 +5,7 @@ <%= link( @block, class: "tile-title", - to: block_path(ExplorerWeb.Endpoint, :show, @locale, @block), + to: block_path(BlockScoutWeb.Endpoint, :show, @locale, @block), "data-test": "block_number", "data-block-number": to_string(@block.number) ) %> @@ -23,7 +23,7 @@ <%= gettext "Miner" %> - <%= link to: address_path(ExplorerWeb.Endpoint, :show, @locale, @block.miner_hash) do %> + <%= link to: address_path(BlockScoutWeb.Endpoint, :show, @locale, @block.miner_hash) do %> <%= @block.miner_hash %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex index d5edf5020a..f13f5be8d3 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex @@ -6,7 +6,7 @@ <%= for block <- @blocks do %> - <%= render ExplorerWeb.BlockView, "_tile.html", locale: @locale, block: block %> + <%= render BlockScoutWeb.BlockView, "_tile.html", locale: @locale, block: block %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex index 48e588671e..26e689431e 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex @@ -73,7 +73,7 @@
-

<%= link @block.miner, class: "text-white", to: address_path(ExplorerWeb.Endpoint, :show, @locale, @block.miner) %>

+

<%= link @block.miner, class: "text-white", to: address_path(BlockScoutWeb.Endpoint, :show, @locale, @block.miner) %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex index ef4b70f9ca..fd09de85db 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex @@ -1,6 +1,6 @@
- <%= render ExplorerWeb.BlockView, "overview.html", assigns %> + <%= render BlockScoutWeb.BlockView, "overview.html", assigns %>
@@ -36,7 +36,7 @@

<%= gettext "Transactions" %>

<%= for transaction <- @transactions do %> - <%= render ExplorerWeb.TransactionView, "_tile.html", locale: @locale, transaction: transaction %> + <%= render BlockScoutWeb.TransactionView, "_tile.html", locale: @locale, transaction: transaction %> <% end %> <% else %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex index dcc4f2e9f1..39ae55c4f5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex @@ -1,13 +1,13 @@
- <%= link(@block, to: block_path(ExplorerWeb.Endpoint, :show, @locale, @block), class: "tile-title") %> + <%= link(@block, to: block_path(BlockScoutWeb.Endpoint, :show, @locale, @block), class: "tile-title") %>
<%= Enum.count(@block.transactions) %> Transactions
<%= gettext "Miner" %> - <%= link to: address_path(ExplorerWeb.Endpoint, :show, @locale, @block.miner), + <%= link to: address_path(BlockScoutWeb.Endpoint, :show, @locale, @block.miner), "data-toggle": "tooltip", "data-placement": "top", title: @block.miner do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex index ed19477357..3babdd0395 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex @@ -54,11 +54,11 @@
- <%= link(gettext("View All Blocks →"), to: block_path(ExplorerWeb.Endpoint, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %> + <%= link(gettext("View All Blocks →"), to: block_path(BlockScoutWeb.Endpoint, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %>

<%= gettext "Blocks" %>

<%= for block <- @blocks do %> - <%= render ExplorerWeb.ChainView, "_block.html", locale: @locale, block: block %> + <%= render BlockScoutWeb.ChainView, "_block.html", locale: @locale, block: block %> <% end %>
@@ -71,11 +71,11 @@ <%= gettext "More transactions have come in" %>
- <%= link(gettext("View All Transactions →"), to: transaction_path(ExplorerWeb.Endpoint, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %> + <%= link(gettext("View All Transactions →"), to: transaction_path(BlockScoutWeb.Endpoint, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %>

<%= gettext "Transactions" %>

<%= for transaction <- @transactions do %> - <%= render ExplorerWeb.TransactionView, "_tile.html", locale: @locale, transaction: transaction %> + <%= render BlockScoutWeb.TransactionView, "_tile.html", locale: @locale, transaction: transaction %> <% end %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex index 5e41ac4794..cc65473817 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex @@ -10,13 +10,13 @@
- <%= render ExplorerWeb.LayoutView, "_topnav.html", assigns %> + <%= render BlockScoutWeb.LayoutView, "_topnav.html", assigns %>
<%= render @view_module, @view_template, assigns %>
- <%= render ExplorerWeb.LayoutView, "_footer.html", assigns %> + <%= render BlockScoutWeb.LayoutView, "_footer.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex index 065c474452..369d0ad418 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex @@ -47,26 +47,26 @@

<%= gettext("Showing %{count} Pending Transactions", count: @pending_transaction_count) %>

<%= for transaction <- @transactions do %> -
+
- <%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %> -
<%= ExplorerWeb.TransactionView.formatted_status(transaction) %>
+ <%= BlockScoutWeb.TransactionView.transaction_display_type(transaction) %> +
<%= BlockScoutWeb.TransactionView.formatted_status(transaction) %>
- <%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %> + <%= render BlockScoutWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %> - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: transaction.from_address_hash, contract: BlockScoutWeb.AddressView.contract?(transaction.from_address), locale: @locale %> → <%= if transaction.to_address_hash do %> - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.to_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.to_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: transaction.to_address_hash, contract: BlockScoutWeb.AddressView.contract?(transaction.to_address), locale: @locale %> <% else %> <%= gettext("Contract Address Pending") %> <% end %> - <%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> <%= gettext "Ether" %> - <%= ExplorerWeb.TransactionView.formatted_fee(transaction, denomination: :ether, include_label: false) %> <%= gettext "TX Fee" %> + <%= BlockScoutWeb.TransactionView.value(transaction, include_label: false) %> <%= gettext "Ether" %> + <%= BlockScoutWeb.TransactionView.formatted_fee(transaction, denomination: :ether, include_label: false) %> <%= gettext "TX Fee" %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/token/_token_transfer.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/token/_token_transfer.html.eex index 8982c6db9a..f251b4cd51 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/token/_token_transfer.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/token/_token_transfer.html.eex @@ -6,21 +6,21 @@

- <%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @transfer.transaction_hash %> + <%= render BlockScoutWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @transfer.transaction_hash %>

- <%= render ExplorerWeb.AddressView, + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: to_string(@transfer.from_address_hash), - contract: ExplorerWeb.AddressView.contract?(@transfer.from_address), + contract: BlockScoutWeb.AddressView.contract?(@transfer.from_address), locale: @locale %> → - <%= render ExplorerWeb.AddressView, + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: to_string(@transfer.to_address_hash), - contract: ExplorerWeb.AddressView.contract?(@transfer.to_address), + contract: BlockScoutWeb.AddressView.contract?(@transfer.to_address), locale: @locale %> @@ -40,7 +40,7 @@ number: @transfer.transaction.block_number ), class: "mr-2 mr-sm-0 text-muted", - to: block_path(ExplorerWeb.Endpoint, :show, @locale, @transfer.transaction.block_number) + to: block_path(BlockScoutWeb.Endpoint, :show, @locale, @transfer.transaction.block_number) ) %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_link.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_link.html.eex index 95e8960bbf..7d9cc4e353 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_link.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_link.html.eex @@ -1,4 +1,4 @@ <%= link(@transaction_hash, - to: transaction_path(ExplorerWeb.Endpoint, :show, @locale, @transaction_hash), + to: transaction_path(BlockScoutWeb.Endpoint, :show, @locale, @transaction_hash), "data-test": "transaction_hash_link", class: "text-truncate") %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex index d34a38f318..9b2bdff14c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex @@ -1,32 +1,32 @@ -
+
- <%= ExplorerWeb.TransactionView.transaction_display_type(@transaction) %> + <%= BlockScoutWeb.TransactionView.transaction_display_type(@transaction) %>
- <%= ExplorerWeb.TransactionView.formatted_status(@transaction) %> + <%= BlockScoutWeb.TransactionView.formatted_status(@transaction) %>
- <%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @transaction.hash %> + <%= render BlockScoutWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @transaction.hash %> - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: @transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@transaction.from_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: @transaction.from_address_hash, contract: BlockScoutWeb.AddressView.contract?(@transaction.from_address), locale: @locale %> → - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(@transaction), contract: ExplorerWeb.AddressView.contract?(@transaction.to_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: BlockScoutWeb.TransactionView.to_address_hash(@transaction), contract: BlockScoutWeb.AddressView.contract?(@transaction.to_address), locale: @locale %> - <%= ExplorerWeb.TransactionView.value(@transaction, include_label: false) %> <%= gettext "Ether" %> + <%= BlockScoutWeb.TransactionView.value(@transaction, include_label: false) %> <%= gettext "Ether" %> - <%= ExplorerWeb.TransactionView.formatted_fee(@transaction, denomination: :ether, include_label: false) %> <%= gettext "TX Fee" %> + <%= BlockScoutWeb.TransactionView.formatted_fee(@transaction, denomination: :ether, include_label: false) %> <%= gettext "TX Fee" %>
<%= link( gettext("Block #%{number}", number: to_string(@transaction.block.number)), - to: block_path(ExplorerWeb.Endpoint, :show, @locale, @transaction.block) + to: block_path(BlockScoutWeb.Endpoint, :show, @locale, @transaction.block) ) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex index d406397c97..0625cbd5aa 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex @@ -57,7 +57,7 @@

<%= gettext("Showing") %> <%= Cldr.Number.to_string!(@transaction_estimated_count, format: "#,###") %> <%= gettext("Validated Transactions") %>

<%= for transaction <- @transactions do %> - <%= render ExplorerWeb.TransactionView, "_tile.html", locale: @locale, transaction: transaction %> + <%= render BlockScoutWeb.TransactionView, "_tile.html", locale: @locale, transaction: transaction %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index 98d4294818..38aab03bd8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -8,17 +8,17 @@

<%= gettext "Transaction Details" %>

<%= @transaction %>

- <%= render ExplorerWeb.AddressView, "_link.html", address_hash: @transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@transaction.from_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: @transaction.from_address_hash, contract: BlockScoutWeb.AddressView.contract?(@transaction.from_address), locale: @locale %> <%= if @transaction.to_address_hash do %> - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: @transaction.to_address_hash, contract: ExplorerWeb.AddressView.contract?(@transaction.to_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: @transaction.to_address_hash, contract: BlockScoutWeb.AddressView.contract?(@transaction.to_address), locale: @locale %> <% else %> <%= gettext("Contract Address Pending") %> <% end %>
- <%= ExplorerWeb.TransactionView.transaction_display_type(@transaction) %> - <%= ExplorerWeb.TransactionView.formatted_status(@transaction) %> + <%= BlockScoutWeb.TransactionView.transaction_display_type(@transaction) %> + <%= BlockScoutWeb.TransactionView.formatted_status(@transaction) %> <%= if block do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/_internal_transaction.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/_internal_transaction.html.eex index 4a0151286a..ef680052e5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/_internal_transaction.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/_internal_transaction.html.eex @@ -4,15 +4,15 @@ <%= gettext("Internal Transaction") %>
- <%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @internal_transaction.transaction_hash %> + <%= render BlockScoutWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @internal_transaction.transaction_hash %> - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: @internal_transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@internal_transaction.from_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: @internal_transaction.from_address_hash, contract: BlockScoutWeb.AddressView.contract?(@internal_transaction.from_address), locale: @locale %> → - <%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction), contract: ExplorerWeb.AddressView.contract?(@internal_transaction.to_address), locale: @locale %> + <%= render BlockScoutWeb.AddressView, "_link.html", address_hash: BlockScoutWeb.InternalTransactionView.to_address_hash(@internal_transaction), contract: BlockScoutWeb.AddressView.contract?(@internal_transaction.to_address), locale: @locale %> - <%= ExplorerWeb.TransactionView.value(@internal_transaction, include_label: false) %> + <%= BlockScoutWeb.TransactionView.value(@internal_transaction, include_label: false) %> <%= gettext "Ether" %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex index 3c841b7244..b5cd9239d5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex @@ -1,5 +1,5 @@
- <%= render ExplorerWeb.TransactionView, "overview.html", assigns %> + <%= render BlockScoutWeb.TransactionView, "overview.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex index 8144efdef9..365e54c178 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex @@ -1,6 +1,6 @@
- <%= render ExplorerWeb.TransactionView, "overview.html", assigns %> + <%= render BlockScoutWeb.TransactionView, "overview.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_view.ex index eb1b4aab33..874b470406 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_view.ex @@ -1,3 +1,3 @@ -defmodule ExplorerWeb.AddressContractVerificationView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.AddressContractVerificationView do + use BlockScoutWeb, :view end diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex index 47db821975..d367b4c01a 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.AddressContractView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.AddressContractView do + use BlockScoutWeb, :view - import ExplorerWeb.AddressView, only: [smart_contract_verified?: 1, smart_contract_with_read_only_functions?: 1] + import BlockScoutWeb.AddressView, only: [smart_contract_verified?: 1, smart_contract_with_read_only_functions?: 1] def format_smart_contract_abi(abi), do: Poison.encode!(abi, pretty: true) diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_internal_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_internal_transaction_view.ex index 567e261085..e884253c68 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_internal_transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_internal_transaction_view.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.AddressInternalTransactionView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.AddressInternalTransactionView do + use BlockScoutWeb, :view - import ExplorerWeb.AddressView, + import BlockScoutWeb.AddressView, only: [contract?: 1, smart_contract_verified?: 1, smart_contract_with_read_only_functions?: 1] def format_current_filter(filter) do diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_read_contract_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_read_contract_view.ex index bbdf9f0a72..69a6260b36 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_read_contract_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_read_contract_view.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.AddressReadContractView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.AddressReadContractView do + use BlockScoutWeb, :view - import ExplorerWeb.AddressView, only: [smart_contract_verified?: 1] + import BlockScoutWeb.AddressView, only: [smart_contract_verified?: 1] def queryable?(inputs), do: Enum.any?(inputs) diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_transaction_view.ex index 2b45e869ed..2ec049f262 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_transaction_view.ex @@ -1,9 +1,9 @@ -defmodule ExplorerWeb.AddressTransactionView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.AddressTransactionView do + use BlockScoutWeb, :view alias Explorer.Chain.Address - import ExplorerWeb.AddressView, + import BlockScoutWeb.AddressView, only: [contract?: 1, smart_contract_verified?: 1, smart_contract_with_read_only_functions?: 1] def format_current_filter(filter) do diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex index b86fe07ef3..40ed4d9e1c 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex @@ -1,10 +1,10 @@ -defmodule ExplorerWeb.AddressView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.AddressView do + use BlockScoutWeb, :view alias Explorer.Chain.{Address, Hash, SmartContract, Wei} alias Explorer.ExchangeRates.Token - alias ExplorerWeb.ExchangeRates.USD + alias BlockScoutWeb.ExchangeRates.USD @dialyzer :no_match diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex index f3ead9375c..3796e24924 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.API.RPC.AddressView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.API.RPC.AddressView do + use BlockScoutWeb, :view - alias ExplorerWeb.API.RPC.RPCView + alias BlockScoutWeb.API.RPC.RPCView def render("balance.json", %{addresses: [address]}) do RPCView.render("show.json", data: "#{address.fetched_balance.value}") diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/block_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/block_view.ex index 39aa30b29f..2d68a0ba23 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/block_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/block_view.ex @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.API.RPC.BlockView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.API.RPC.BlockView do + use BlockScoutWeb, :view alias Explorer.Chain.{Hash, Wei} - alias ExplorerWeb.API.RPC.RPCView + alias BlockScoutWeb.API.RPC.RPCView def render("block_reward.json", %{block: block, reward: reward}) do reward_as_string = diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/rpc_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/rpc_view.ex index af0e1731a3..cda17d2278 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/rpc_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/rpc_view.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.API.RPC.RPCView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.API.RPC.RPCView do + use BlockScoutWeb, :view def render("show.json", %{data: data}) do %{ diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v1/supply_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v1/supply_view.ex index c27337113a..df76632e27 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/v1/supply_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v1/supply_view.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.API.V1.SupplyView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.API.V1.SupplyView do + use BlockScoutWeb, :view def render("supply.json", %{total: total_supply, circulating: circulating_supply}) do %{ diff --git a/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex index 4c93c8f08e..1a82237bb7 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.APIDocsView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.APIDocsView do + use BlockScoutWeb, :view def action_tile_id(module, action) do "#{module}-#{action}" diff --git a/apps/block_scout_web/lib/block_scout_web/views/block_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/block_transaction_view.ex index 0f84f5483d..c36e772b95 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/block_transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/block_transaction_view.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.BlockTransactionView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.BlockTransactionView do + use BlockScoutWeb, :view - alias ExplorerWeb.BlockView + alias BlockScoutWeb.BlockView defdelegate formatted_timestamp(block), to: BlockView end diff --git a/apps/block_scout_web/lib/block_scout_web/views/block_view.ex b/apps/block_scout_web/lib/block_scout_web/views/block_view.ex index 32f10721c8..e5a2d39d70 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/block_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/block_view.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.BlockView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.BlockView do + use BlockScoutWeb, :view import Math.Enum, only: [mean: 1] diff --git a/apps/block_scout_web/lib/block_scout_web/views/chain_view.ex b/apps/block_scout_web/lib/block_scout_web/views/chain_view.ex index 4e666c639e..b999b82661 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/chain_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/chain_view.ex @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.ChainView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.ChainView do + use BlockScoutWeb, :view alias Explorer.ExchangeRates.Token - alias ExplorerWeb.ExchangeRates.USD + alias BlockScoutWeb.ExchangeRates.USD def encode_market_history_data(market_history_data) do market_history_data diff --git a/apps/block_scout_web/lib/block_scout_web/views/cldr/number.ex b/apps/block_scout_web/lib/block_scout_web/views/cldr/number.ex index db0e943df1..2484646a74 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/cldr/number.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/cldr/number.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.Cldr.Number do +defmodule BlockScoutWeb.Cldr.Number do @moduledoc """ Work-arounds for `Cldr.Number` bugs """ diff --git a/apps/block_scout_web/lib/block_scout_web/views/currency_helpers.ex b/apps/block_scout_web/lib/block_scout_web/views/currency_helpers.ex index 6e10724d31..0e3f357225 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/currency_helpers.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/currency_helpers.ex @@ -1,15 +1,15 @@ -defmodule ExplorerWeb.CurrencyHelpers do +defmodule BlockScoutWeb.CurrencyHelpers do @moduledoc """ - Helper functions for interacting with `t:ExplorerWeb.ExchangeRates.USD.t/0` values. + Helper functions for interacting with `t:BlockScoutWeb.ExchangeRates.USD.t/0` values. """ - import ExplorerWeb.Gettext + import BlockScoutWeb.Gettext - alias ExplorerWeb.ExchangeRates.USD - alias ExplorerWeb.Cldr + alias BlockScoutWeb.ExchangeRates.USD + alias BlockScoutWeb.Cldr @doc """ - Formats a `ExplorerWeb.ExchangeRates.USD` value into USD and applies a unit label. + Formats a `BlockScoutWeb.ExchangeRates.USD` value into USD and applies a unit label. ## Examples @@ -39,7 +39,7 @@ defmodule ExplorerWeb.CurrencyHelpers do ## Examples - iex> ExplorerWeb.CurrencyHelpers.format_integer_to_currency(1000000) + iex> BlockScoutWeb.CurrencyHelpers.format_integer_to_currency(1000000) "1,000,000" """ @spec format_integer_to_currency(non_neg_integer()) :: String.t() diff --git a/apps/block_scout_web/lib/block_scout_web/views/error_helpers.ex b/apps/block_scout_web/lib/block_scout_web/views/error_helpers.ex index c95b058bb2..cbbee5c215 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/error_helpers.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/error_helpers.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.ErrorHelpers do +defmodule BlockScoutWeb.ErrorHelpers do @moduledoc """ Conveniences for translating and building error messages. """ @@ -32,9 +32,9 @@ defmodule ExplorerWeb.ErrorHelpers do # dgettext "errors", "is invalid" # if count = opts[:count] do - Gettext.dngettext(ExplorerWeb.Gettext, "errors", msg, msg, count, opts) + Gettext.dngettext(BlockScoutWeb.Gettext, "errors", msg, msg, count, opts) else - Gettext.dgettext(ExplorerWeb.Gettext, "errors", msg, opts) + Gettext.dgettext(BlockScoutWeb.Gettext, "errors", msg, opts) end end end diff --git a/apps/block_scout_web/lib/block_scout_web/views/error_view.ex b/apps/block_scout_web/lib/block_scout_web/views/error_view.ex index 6c8b8c00af..22da72d0a2 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/error_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/error_view.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.ErrorView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.ErrorView do + use BlockScoutWeb, :view def render("404.html", _assigns) do "Page not found" diff --git a/apps/block_scout_web/lib/block_scout_web/views/icons_view.ex b/apps/block_scout_web/lib/block_scout_web/views/icons_view.ex index e12ced4e12..40c5ee3a1d 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/icons_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/icons_view.ex @@ -1,3 +1,3 @@ -defmodule ExplorerWeb.IconsView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.IconsView do + use BlockScoutWeb, :view end diff --git a/apps/block_scout_web/lib/block_scout_web/views/internal_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/internal_transaction_view.ex index 5ee2d39aaf..b21088295d 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/internal_transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/internal_transaction_view.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.InternalTransactionView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.InternalTransactionView do + use BlockScoutWeb, :view @dialyzer :no_match alias Explorer.Chain.InternalTransaction diff --git a/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex b/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex index 6f8dc941fa..f5f294c716 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.LayoutView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.LayoutView do + use BlockScoutWeb, :view - alias ExplorerWeb.SocialMedia + alias BlockScoutWeb.SocialMedia def configured_social_media_services do SocialMedia.links() diff --git a/apps/block_scout_web/lib/block_scout_web/views/pending_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/pending_transaction_view.ex index 60831099db..12ba2fe742 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/pending_transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/pending_transaction_view.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.PendingTransactionView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.PendingTransactionView do + use BlockScoutWeb, :view @dialyzer :no_match end diff --git a/apps/block_scout_web/lib/block_scout_web/views/token_helpers.ex b/apps/block_scout_web/lib/block_scout_web/views/token_helpers.ex index 52cc4d5cde..0a0f7898f8 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/token_helpers.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/token_helpers.ex @@ -1,10 +1,10 @@ -defmodule ExplorerWeb.TokenHelpers do +defmodule BlockScoutWeb.TokenHelpers do @moduledoc """ - Helper functions for intereacting with `t:ExplorerWeb.Chain.Token` attributes. + Helper functions for intereacting with `t:BlockScoutWeb.Chain.Token` attributes. """ alias Explorer.Chain.{Token, TokenTransfer} - alias ExplorerWeb.{CurrencyHelpers} + alias BlockScoutWeb.{CurrencyHelpers} @doc """ Returns the token transfers' amount according to the token's type and decimails. diff --git a/apps/block_scout_web/lib/block_scout_web/views/token_view.ex b/apps/block_scout_web/lib/block_scout_web/views/token_view.ex index a14f88f14d..aa0f6c9c60 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/token_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/token_view.ex @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.TokenView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.TokenView do + use BlockScoutWeb, :view alias Explorer.Chain.Token diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_internal_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_internal_transaction_view.ex index 06ed3af2c7..74ff6042cc 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_internal_transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_internal_transaction_view.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.TransactionInternalTransactionView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.TransactionInternalTransactionView do + use BlockScoutWeb, :view @dialyzer :no_match end diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_log_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_log_view.ex index a3a2b7acce..96cf62fe9a 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_log_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_log_view.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.TransactionLogView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.TransactionLogView do + use BlockScoutWeb, :view @dialyzer :no_match end diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex index 7e0ceff3bc..a8cb4ddbc4 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex @@ -1,14 +1,14 @@ -defmodule ExplorerWeb.TransactionView do - use ExplorerWeb, :view +defmodule BlockScoutWeb.TransactionView do + use BlockScoutWeb, :view alias Cldr.Number alias Explorer.Chain alias Explorer.Chain.{Address, InternalTransaction, Transaction, Wei} alias Explorer.ExchangeRates.Token - alias ExplorerWeb.{AddressView, BlockView} - alias ExplorerWeb.ExchangeRates.USD + alias BlockScoutWeb.{AddressView, BlockView} + alias BlockScoutWeb.ExchangeRates.USD - import ExplorerWeb.Gettext + import BlockScoutWeb.Gettext defguardp is_transaction_type(mod) when mod in [InternalTransaction, Transaction] diff --git a/apps/block_scout_web/lib/block_scout_web/views/wei_helpers.ex b/apps/block_scout_web/lib/block_scout_web/views/wei_helpers.ex index ece43961ab..efb9d4f833 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/wei_helpers.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/wei_helpers.ex @@ -1,12 +1,12 @@ -defmodule ExplorerWeb.WeiHelpers do +defmodule BlockScoutWeb.WeiHelpers do @moduledoc """ Helper functions for interacting with `t:Explorer.Chain.Wei.t/0` values. """ - import ExplorerWeb.Gettext + import BlockScoutWeb.Gettext alias Explorer.Chain.Wei - alias ExplorerWeb.Cldr + alias BlockScoutWeb.Cldr @valid_units ~w(wei gwei ether)a diff --git a/apps/block_scout_web/mix.exs b/apps/block_scout_web/mix.exs index 2026059430..da63ec0f57 100644 --- a/apps/block_scout_web/mix.exs +++ b/apps/block_scout_web/mix.exs @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.Mixfile do +defmodule BlockScoutWeb.Mixfile do use Mix.Project def project do @@ -36,7 +36,7 @@ defmodule ExplorerWeb.Mixfile do # Type `mix help compile.app` for more information. def application do [ - mod: {ExplorerWeb.Application, []}, + mod: {BlockScoutWeb.Application, []}, extra_applications: extra_applications() ] end diff --git a/apps/block_scout_web/test/explorer_web/chain_test.exs b/apps/block_scout_web/test/explorer_web/chain_test.exs index 680d51772c..b951820a87 100644 --- a/apps/block_scout_web/test/explorer_web/chain_test.exs +++ b/apps/block_scout_web/test/explorer_web/chain_test.exs @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.ChainTest do +defmodule BlockScoutWeb.ChainTest do use Explorer.DataCase alias Explorer.Chain.{Address, Block, Transaction} - alias ExplorerWeb.Chain + alias BlockScoutWeb.Chain describe "from_param/1" do test "finds a block by block number with a valid block number" do diff --git a/apps/block_scout_web/test/explorer_web/channels/address_channel_test.exs b/apps/block_scout_web/test/explorer_web/channels/address_channel_test.exs index 358968bb36..321b4e0243 100644 --- a/apps/block_scout_web/test/explorer_web/channels/address_channel_test.exs +++ b/apps/block_scout_web/test/explorer_web/channels/address_channel_test.exs @@ -1,12 +1,12 @@ -defmodule ExplorerWeb.AddressChannelTest do - use ExplorerWeb.ChannelCase +defmodule BlockScoutWeb.AddressChannelTest do + use BlockScoutWeb.ChannelCase describe "addresses channel tests" do test "subscribed user can receive transaction event" do channel = "addresses" @endpoint.subscribe(channel) - ExplorerWeb.Endpoint.broadcast(channel, "transaction", %{body: "test"}) + BlockScoutWeb.Endpoint.broadcast(channel, "transaction", %{body: "test"}) receive do %Phoenix.Socket.Broadcast{event: "transaction", topic: ^channel, payload: %{body: body}} -> @@ -21,7 +21,7 @@ defmodule ExplorerWeb.AddressChannelTest do channel = "addresses" @endpoint.subscribe(channel) - ExplorerWeb.Endpoint.broadcast(channel, "overview", %{body: "test"}) + BlockScoutWeb.Endpoint.broadcast(channel, "overview", %{body: "test"}) receive do %Phoenix.Socket.Broadcast{event: "overview", topic: ^channel, payload: %{body: body}} -> diff --git a/apps/block_scout_web/test/explorer_web/channels/transaction_channel_test.exs b/apps/block_scout_web/test/explorer_web/channels/transaction_channel_test.exs index 82a24b9eec..d810567b3b 100644 --- a/apps/block_scout_web/test/explorer_web/channels/transaction_channel_test.exs +++ b/apps/block_scout_web/test/explorer_web/channels/transaction_channel_test.exs @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.AddressTransactionTest do - use ExplorerWeb.ChannelCase +defmodule BlockScoutWeb.AddressTransactionTest do + use BlockScoutWeb.ChannelCase describe "transactions channel tests" do test "subscribed user can receive block confirmations event" do @@ -13,7 +13,7 @@ defmodule ExplorerWeb.AddressTransactionTest do |> insert() |> with_block(block) - ExplorerWeb.Endpoint.broadcast(channel, "confirmations", %{max_block_number: 3, transaction: transaction}) + BlockScoutWeb.Endpoint.broadcast(channel, "confirmations", %{max_block_number: 3, transaction: transaction}) receive do %Phoenix.Socket.Broadcast{ diff --git a/apps/block_scout_web/test/explorer_web/controllers/address_contract_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/address_contract_controller_test.exs index 227c9e3475..ad303714f3 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/address_contract_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/address_contract_controller_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.AddressContractControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.AddressContractControllerTest do + use BlockScoutWeb.ConnCase - import ExplorerWeb.Router.Helpers, only: [address_contract_path: 4] + import BlockScoutWeb.Router.Helpers, only: [address_contract_path: 4] alias Explorer.Factory alias Explorer.Chain.Hash @@ -11,7 +11,7 @@ defmodule ExplorerWeb.AddressContractControllerTest do test "returns not found for unexistent address", %{conn: conn} do unexistent_address_hash = Hash.to_string(Factory.address_hash()) - conn = get(conn, address_contract_path(ExplorerWeb.Endpoint, :index, :en, unexistent_address_hash)) + conn = get(conn, address_contract_path(BlockScoutWeb.Endpoint, :index, :en, unexistent_address_hash)) assert html_response(conn, 404) end @@ -19,7 +19,7 @@ defmodule ExplorerWeb.AddressContractControllerTest do test "returns not found given an invalid address hash ", %{conn: conn} do invalid_hash = "invalid_hash" - conn = get(conn, address_contract_path(ExplorerWeb.Endpoint, :index, :en, invalid_hash)) + conn = get(conn, address_contract_path(BlockScoutWeb.Endpoint, :index, :en, invalid_hash)) assert html_response(conn, 404) end @@ -27,7 +27,7 @@ defmodule ExplorerWeb.AddressContractControllerTest do test "returns not found when the address isn't a contract", %{conn: conn} do address = insert(:address) - conn = get(conn, address_contract_path(ExplorerWeb.Endpoint, :index, :en, address)) + conn = get(conn, address_contract_path(BlockScoutWeb.Endpoint, :index, :en, address)) assert html_response(conn, 404) end @@ -44,7 +44,7 @@ defmodule ExplorerWeb.AddressContractControllerTest do created_contract_address: address ) - conn = get(conn, address_contract_path(ExplorerWeb.Endpoint, :index, :en, address)) + conn = get(conn, address_contract_path(BlockScoutWeb.Endpoint, :index, :en, address)) assert html_response(conn, 200) assert address.hash == conn.assigns.address.hash diff --git a/apps/block_scout_web/test/explorer_web/controllers/address_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/address_controller_test.exs index 3a0b155d53..e284612310 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/address_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/address_controller_test.exs @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.AddressControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.AddressControllerTest do + use BlockScoutWeb.ConnCase describe "GET show/3" do test "redirects to addresses/:address_id/transactions", %{conn: conn} do diff --git a/apps/block_scout_web/test/explorer_web/controllers/address_internal_transaction_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/address_internal_transaction_controller_test.exs index d75b5c3040..4018601a66 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/address_internal_transaction_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/address_internal_transaction_controller_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.AddressInternalTransactionControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.AddressInternalTransactionControllerTest do + use BlockScoutWeb.ConnCase - import ExplorerWeb.Router.Helpers, only: [address_internal_transaction_path: 4] + import BlockScoutWeb.Router.Helpers, only: [address_internal_transaction_path: 4] alias Explorer.Chain.{Block, InternalTransaction, Transaction} alias Explorer.ExchangeRates.Token @@ -10,7 +10,7 @@ defmodule ExplorerWeb.AddressInternalTransactionControllerTest do test "with invalid address hash", %{conn: conn} do conn = conn - |> get(address_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, "invalid_address")) + |> get(address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, "invalid_address")) assert html_response(conn, 404) end @@ -49,7 +49,7 @@ defmodule ExplorerWeb.AddressInternalTransactionControllerTest do test "includes USD exchange rate value for address in assigns", %{conn: conn} do address = insert(:address) - conn = get(conn, address_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, address.hash)) + conn = get(conn, address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, address.hash)) assert %Token{} = conn.assigns.exchange_rate end @@ -118,7 +118,7 @@ defmodule ExplorerWeb.AddressInternalTransactionControllerTest do |> insert(transaction: transaction_3, from_address: address, index: 11) conn = - get(conn, address_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, address.hash), %{ + get(conn, address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, address.hash), %{ "block_number" => Integer.to_string(b_block.number), "transaction_index" => Integer.to_string(transaction_3.index), "index" => Integer.to_string(index) @@ -152,7 +152,7 @@ defmodule ExplorerWeb.AddressInternalTransactionControllerTest do ) end) - conn = get(conn, address_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, address.hash)) + conn = get(conn, address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, address.hash)) assert %{"block_number" => ^number, "index" => 11, "transaction_index" => ^transaction_index} = conn.assigns.next_page_params @@ -176,7 +176,7 @@ defmodule ExplorerWeb.AddressInternalTransactionControllerTest do ) end) - conn = get(conn, address_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, address.hash)) + conn = get(conn, address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, address.hash)) refute conn.assigns.next_page_params end diff --git a/apps/block_scout_web/test/explorer_web/controllers/address_read_contract_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/address_read_contract_controller_test.exs index 885c810ac7..fb6c22a95e 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/address_read_contract_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/address_read_contract_controller_test.exs @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.AddressReadContractControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.AddressReadContractControllerTest do + use BlockScoutWeb.ConnCase describe "GET show/3" do test "only responds to ajax requests", %{conn: conn} do @@ -7,7 +7,7 @@ defmodule ExplorerWeb.AddressReadContractControllerTest do path = address_read_contract_path( - ExplorerWeb.Endpoint, + BlockScoutWeb.Endpoint, :show, :en, smart_contract.address_hash, diff --git a/apps/block_scout_web/test/explorer_web/controllers/address_transaction_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/address_transaction_controller_test.exs index 6057049791..fd3dfee94d 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/address_transaction_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/address_transaction_controller_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.AddressTransactionControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.AddressTransactionControllerTest do + use BlockScoutWeb.ConnCase - import ExplorerWeb.Router.Helpers, only: [address_transaction_path: 4] + import BlockScoutWeb.Router.Helpers, only: [address_transaction_path: 4] alias Explorer.Chain.{Block, Transaction} alias Explorer.ExchangeRates.Token @@ -50,7 +50,7 @@ defmodule ExplorerWeb.AddressTransactionControllerTest do insert(:transaction, from_address: address, to_address: address) - conn = get(conn, address_transaction_path(ExplorerWeb.Endpoint, :index, :en, address)) + conn = get(conn, address_transaction_path(BlockScoutWeb.Endpoint, :index, :en, address)) assert html_response(conn, 200) assert conn.status == 200 @@ -62,7 +62,7 @@ defmodule ExplorerWeb.AddressTransactionControllerTest do test "includes USD exchange rate value for address in assigns", %{conn: conn} do address = insert(:address) - conn = get(conn, address_transaction_path(ExplorerWeb.Endpoint, :index, :en, address.hash)) + conn = get(conn, address_transaction_path(BlockScoutWeb.Endpoint, :index, :en, address.hash)) assert %Token{} = conn.assigns.exchange_rate end @@ -82,7 +82,7 @@ defmodule ExplorerWeb.AddressTransactionControllerTest do |> with_block() conn = - get(conn, address_transaction_path(ExplorerWeb.Endpoint, :index, :en, address.hash), %{ + get(conn, address_transaction_path(BlockScoutWeb.Endpoint, :index, :en, address.hash), %{ "block_number" => Integer.to_string(block_number), "index" => Integer.to_string(index) }) @@ -103,7 +103,7 @@ defmodule ExplorerWeb.AddressTransactionControllerTest do |> insert_list(:transaction, from_address: address) |> with_block(block) - conn = get(conn, address_transaction_path(ExplorerWeb.Endpoint, :index, :en, address.hash)) + conn = get(conn, address_transaction_path(BlockScoutWeb.Endpoint, :index, :en, address.hash)) assert %{"block_number" => ^number, "index" => 10} = conn.assigns.next_page_params end @@ -115,7 +115,7 @@ defmodule ExplorerWeb.AddressTransactionControllerTest do |> insert(from_address: address) |> with_block() - conn = get(conn, address_transaction_path(ExplorerWeb.Endpoint, :index, :en, address.hash)) + conn = get(conn, address_transaction_path(BlockScoutWeb.Endpoint, :index, :en, address.hash)) refute conn.assigns.next_page_params end diff --git a/apps/block_scout_web/test/explorer_web/controllers/api/rpc/address_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/api/rpc/address_controller_test.exs index 882dc7ce76..b7abf36ff1 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/api/rpc/address_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/api/rpc/address_controller_test.exs @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.API.RPC.AddressControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.API.RPC.AddressControllerTest do + use BlockScoutWeb.ConnCase alias Explorer.Chain alias Explorer.Chain.Transaction diff --git a/apps/block_scout_web/test/explorer_web/controllers/api/rpc/block_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/api/rpc/block_controller_test.exs index c4f5ffe551..7722f2cf14 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/api/rpc/block_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/api/rpc/block_controller_test.exs @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.API.RPC.BlockControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.API.RPC.BlockControllerTest do + use BlockScoutWeb.ConnCase alias Explorer.Chain.{Hash, Wei} diff --git a/apps/block_scout_web/test/explorer_web/controllers/api/rpc/rpc_translator_test.exs b/apps/block_scout_web/test/explorer_web/controllers/api/rpc/rpc_translator_test.exs index 29b487d0de..6a847bbc5b 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/api/rpc/rpc_translator_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/api/rpc/rpc_translator_test.exs @@ -1,11 +1,11 @@ -defmodule ExplorerWeb.API.RPC.RPCTranslatorTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.API.RPC.RPCTranslatorTest do + use BlockScoutWeb.ConnCase - alias ExplorerWeb.API.RPC.RPCTranslator + alias BlockScoutWeb.API.RPC.RPCTranslator alias Plug.Conn defmodule TestController do - use ExplorerWeb, :controller + use BlockScoutWeb, :controller def test_action(conn, _) do json(conn, %{}) diff --git a/apps/block_scout_web/test/explorer_web/controllers/api/v1/supply_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/api/v1/supply_controller_test.exs index 5dfefe2252..268169a21c 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/api/v1/supply_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/api/v1/supply_controller_test.exs @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.API.V1.SupplyControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.API.V1.SupplyControllerTest do + use BlockScoutWeb.ConnCase alias Explorer.Chain diff --git a/apps/block_scout_web/test/explorer_web/controllers/api_docs_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/api_docs_controller_test.exs index a5056c98db..ec61434594 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/api_docs_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/api_docs_controller_test.exs @@ -1,13 +1,13 @@ -defmodule ExplorerWeb.APIDocsControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.APIDocsControllerTest do + use BlockScoutWeb.ConnCase - import ExplorerWeb.Router.Helpers, only: [api_docs_path: 3] + import BlockScoutWeb.Router.Helpers, only: [api_docs_path: 3] describe "GET index/2" do test "renders documentation tiles for each API module#action", %{conn: conn} do - conn = get(conn, api_docs_path(ExplorerWeb.Endpoint, :index, :en)) + conn = get(conn, api_docs_path(BlockScoutWeb.Endpoint, :index, :en)) - documentation = ExplorerWeb.Etherscan.get_documentation() + documentation = BlockScoutWeb.Etherscan.get_documentation() for module <- documentation, action <- module.actions do assert html_response(conn, 200) =~ action.name diff --git a/apps/block_scout_web/test/explorer_web/controllers/block_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/block_controller_test.exs index b675622ae7..3261c7d687 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/block_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/block_controller_test.exs @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.BlockControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.BlockControllerTest do + use BlockScoutWeb.ConnCase alias Explorer.Chain.Block @locale "en" diff --git a/apps/block_scout_web/test/explorer_web/controllers/block_transaction_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/block_transaction_controller_test.exs index 82ac1ff261..737dcdec7a 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/block_transaction_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/block_transaction_controller_test.exs @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.BlockTransactionControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.BlockTransactionControllerTest do + use BlockScoutWeb.ConnCase alias Explorer.Chain.Block - import ExplorerWeb.Router.Helpers, only: [block_transaction_path: 4] + import BlockScoutWeb.Router.Helpers, only: [block_transaction_path: 4] describe "GET index/2" do test "with invalid block number", %{conn: conn} do @@ -23,7 +23,7 @@ defmodule ExplorerWeb.BlockTransactionControllerTest do :transaction |> insert() |> with_block(block) :transaction |> insert(to_address: nil) |> with_block(block) - conn = get(conn, block_transaction_path(ExplorerWeb.Endpoint, :index, :en, block.number)) + conn = get(conn, block_transaction_path(BlockScoutWeb.Endpoint, :index, :en, block.number)) assert html_response(conn, 200) assert 2 == Enum.count(conn.assigns.transactions) @@ -33,7 +33,7 @@ defmodule ExplorerWeb.BlockTransactionControllerTest do insert(:transaction) block = insert(:block) - conn = get(conn, block_transaction_path(ExplorerWeb.Endpoint, :index, :en, block)) + conn = get(conn, block_transaction_path(BlockScoutWeb.Endpoint, :index, :en, block)) assert html_response(conn, 200) assert Enum.empty?(conn.assigns.transactions) @@ -43,7 +43,7 @@ defmodule ExplorerWeb.BlockTransactionControllerTest do block = insert(:block) insert(:transaction) - conn = get(conn, block_transaction_path(ExplorerWeb.Endpoint, :index, :en, block)) + conn = get(conn, block_transaction_path(BlockScoutWeb.Endpoint, :index, :en, block)) assert html_response(conn, 200) assert Enum.empty?(conn.assigns.transactions) @@ -56,7 +56,7 @@ defmodule ExplorerWeb.BlockTransactionControllerTest do |> insert_list(:transaction) |> with_block(block) - conn = get(conn, block_transaction_path(ExplorerWeb.Endpoint, :index, :en, block)) + conn = get(conn, block_transaction_path(BlockScoutWeb.Endpoint, :index, :en, block)) assert %{"block_number" => ^number, "index" => 10} = conn.assigns.next_page_params end @@ -68,7 +68,7 @@ defmodule ExplorerWeb.BlockTransactionControllerTest do |> insert() |> with_block(block) - conn = get(conn, block_transaction_path(ExplorerWeb.Endpoint, :index, :en, block)) + conn = get(conn, block_transaction_path(BlockScoutWeb.Endpoint, :index, :en, block)) refute conn.assigns.next_page_params end diff --git a/apps/block_scout_web/test/explorer_web/controllers/chain_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/chain_controller_test.exs index 98c0be9085..575266acba 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/chain_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/chain_controller_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.ChainControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.ChainControllerTest do + use BlockScoutWeb.ConnCase - import ExplorerWeb.Router.Helpers, only: [chain_path: 3, block_path: 4, transaction_path: 4, address_path: 4] + import BlockScoutWeb.Router.Helpers, only: [chain_path: 3, block_path: 4, transaction_path: 4, address_path: 4] describe "GET index/2 without a locale" do test "redirects to the en locale", %{conn: conn} do @@ -13,7 +13,7 @@ defmodule ExplorerWeb.ChainControllerTest do describe "GET index/2 with a locale" do test "returns a welcome message", %{conn: conn} do - conn = get(conn, chain_path(ExplorerWeb.Endpoint, :show, %{locale: :en})) + conn = get(conn, chain_path(BlockScoutWeb.Endpoint, :show, %{locale: :en})) assert(html_response(conn, 200) =~ "POA") end diff --git a/apps/block_scout_web/test/explorer_web/controllers/pending_transaction_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/pending_transaction_controller_test.exs index 5d1f7a8e7d..4707f4c98e 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/pending_transaction_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/pending_transaction_controller_test.exs @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.PendingTransactionControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.PendingTransactionControllerTest do + use BlockScoutWeb.ConnCase alias Explorer.Chain.{Hash, Transaction} - import ExplorerWeb.Router.Helpers, only: [pending_transaction_path: 3] + import BlockScoutWeb.Router.Helpers, only: [pending_transaction_path: 3] describe "GET index/2" do test "returns no transactions that are in a block", %{conn: conn} do @@ -10,7 +10,7 @@ defmodule ExplorerWeb.PendingTransactionControllerTest do |> insert() |> with_block() - conn = get(conn, pending_transaction_path(ExplorerWeb.Endpoint, :index, :en)) + conn = get(conn, pending_transaction_path(BlockScoutWeb.Endpoint, :index, :en)) assert html_response(conn, 200) assert Enum.empty?(conn.assigns.transactions) @@ -21,7 +21,7 @@ defmodule ExplorerWeb.PendingTransactionControllerTest do |> insert() |> with_block() - conn = get(conn, pending_transaction_path(ExplorerWeb.Endpoint, :index, :en)) + conn = get(conn, pending_transaction_path(BlockScoutWeb.Endpoint, :index, :en)) assert html_response(conn, 200) assert Enum.empty?(conn.assigns.transactions) @@ -30,7 +30,7 @@ defmodule ExplorerWeb.PendingTransactionControllerTest do test "returns pending transactions", %{conn: conn} do transaction = insert(:transaction) - conn = get(conn, pending_transaction_path(ExplorerWeb.Endpoint, :index, :en)) + conn = get(conn, pending_transaction_path(BlockScoutWeb.Endpoint, :index, :en)) actual_transaction_hashes = conn.assigns.transactions @@ -43,7 +43,7 @@ defmodule ExplorerWeb.PendingTransactionControllerTest do test "returns a count of pending transactions", %{conn: conn} do insert(:transaction) - conn = get(conn, pending_transaction_path(ExplorerWeb.Endpoint, :index, :en)) + conn = get(conn, pending_transaction_path(BlockScoutWeb.Endpoint, :index, :en)) assert html_response(conn, 200) assert 1 == conn.assigns.pending_transaction_count @@ -64,7 +64,7 @@ defmodule ExplorerWeb.PendingTransactionControllerTest do %Transaction{inserted_at: inserted_at, hash: hash} = insert(:transaction) conn = - get(conn, pending_transaction_path(ExplorerWeb.Endpoint, :index, :en), %{ + get(conn, pending_transaction_path(BlockScoutWeb.Endpoint, :index, :en), %{ "inserted_at" => DateTime.to_iso8601(inserted_at), "hash" => Hash.to_string(hash) }) @@ -85,7 +85,7 @@ defmodule ExplorerWeb.PendingTransactionControllerTest do converted_date = DateTime.to_iso8601(inserted_at) - conn = get(conn, pending_transaction_path(ExplorerWeb.Endpoint, :index, :en)) + conn = get(conn, pending_transaction_path(BlockScoutWeb.Endpoint, :index, :en)) assert %{"inserted_at" => ^converted_date, "hash" => ^hash} = conn.assigns.next_page_params end @@ -93,7 +93,7 @@ defmodule ExplorerWeb.PendingTransactionControllerTest do test "next_page_params are empty if on last page", %{conn: conn} do insert(:transaction) - conn = get(conn, pending_transaction_path(ExplorerWeb.Endpoint, :index, :en)) + conn = get(conn, pending_transaction_path(BlockScoutWeb.Endpoint, :index, :en)) refute conn.assigns.next_page_params end diff --git a/apps/block_scout_web/test/explorer_web/controllers/transaction_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/transaction_controller_test.exs index 0dbdb8ea50..c3aa1850c2 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/transaction_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/transaction_controller_test.exs @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.TransactionControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.TransactionControllerTest do + use BlockScoutWeb.ConnCase alias Explorer.Chain.{Block, Transaction} - import ExplorerWeb.Router.Helpers, only: [transaction_path: 4, transaction_internal_transaction_path: 4] + import BlockScoutWeb.Router.Helpers, only: [transaction_path: 4, transaction_internal_transaction_path: 4] describe "GET index/2" do test "returns a collated transactions", %{conn: conn} do @@ -101,9 +101,9 @@ defmodule ExplorerWeb.TransactionControllerTest do test "redirects to transactions/:transaction_id/internal_transactions", %{conn: conn} do locale = "en" hash = "0x9" - conn = get(conn, transaction_path(ExplorerWeb.Endpoint, :show, locale, hash)) + conn = get(conn, transaction_path(BlockScoutWeb.Endpoint, :show, locale, hash)) - assert redirected_to(conn) =~ transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, locale, hash) + assert redirected_to(conn) =~ transaction_internal_transaction_path(BlockScoutWeb.Endpoint, :index, locale, hash) end end end diff --git a/apps/block_scout_web/test/explorer_web/controllers/transaction_internal_transaction_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/transaction_internal_transaction_controller_test.exs index ce9f7c2c78..7c013aff7e 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/transaction_internal_transaction_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/transaction_internal_transaction_controller_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.TransactionInternalTransactionControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.TransactionInternalTransactionControllerTest do + use BlockScoutWeb.ConnCase - import ExplorerWeb.Router.Helpers, only: [transaction_internal_transaction_path: 4] + import BlockScoutWeb.Router.Helpers, only: [transaction_internal_transaction_path: 4] alias Explorer.Chain.{Block, InternalTransaction, Transaction} alias Explorer.ExchangeRates.Token @@ -9,13 +9,13 @@ defmodule ExplorerWeb.TransactionInternalTransactionControllerTest do describe "GET index/3" do test "with missing transaction", %{conn: conn} do hash = transaction_hash() - conn = get(conn, transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, hash)) + conn = get(conn, transaction_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, hash)) assert html_response(conn, 404) end test "with invalid transaction hash", %{conn: conn} do - conn = get(conn, transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, "nope")) + conn = get(conn, transaction_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, "nope")) assert html_response(conn, 404) end @@ -28,7 +28,7 @@ defmodule ExplorerWeb.TransactionInternalTransactionControllerTest do |> insert() |> with_block(block) - conn = get(conn, transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, transaction.hash)) + conn = get(conn, transaction_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, transaction.hash)) assert html_response(conn, 200) assert conn.assigns.transaction.hash == transaction.hash @@ -39,7 +39,7 @@ defmodule ExplorerWeb.TransactionInternalTransactionControllerTest do expected_internal_transaction = insert(:internal_transaction, transaction: transaction, index: 0) insert(:internal_transaction, transaction: transaction, index: 1) - path = transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, transaction.hash) + path = transaction_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, transaction.hash) conn = get(conn, path) @@ -55,7 +55,7 @@ defmodule ExplorerWeb.TransactionInternalTransactionControllerTest do test "includes USD exchange rate value for address in assigns", %{conn: conn} do transaction = insert(:transaction) - conn = get(conn, transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, transaction.hash)) + conn = get(conn, transaction_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, transaction.hash)) assert %Token{} = conn.assigns.exchange_rate end @@ -78,7 +78,7 @@ defmodule ExplorerWeb.TransactionInternalTransactionControllerTest do get( conn, transaction_internal_transaction_path( - ExplorerWeb.Endpoint, + BlockScoutWeb.Endpoint, :index, :en, internal_transaction.transaction_hash @@ -102,7 +102,7 @@ defmodule ExplorerWeb.TransactionInternalTransactionControllerTest do |> Enum.map(& &1.index) conn = - get(conn, transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, transaction.hash), %{ + get(conn, transaction_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, transaction.hash), %{ "index" => Integer.to_string(index) }) @@ -131,7 +131,7 @@ defmodule ExplorerWeb.TransactionInternalTransactionControllerTest do ) end) - conn = get(conn, transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, transaction.hash)) + conn = get(conn, transaction_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, transaction.hash)) assert %{"block_number" => ^number, "index" => 50, "transaction_index" => ^transaction_index} = conn.assigns.next_page_params @@ -152,7 +152,7 @@ defmodule ExplorerWeb.TransactionInternalTransactionControllerTest do ) end) - conn = get(conn, transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, transaction.hash)) + conn = get(conn, transaction_internal_transaction_path(BlockScoutWeb.Endpoint, :index, :en, transaction.hash)) refute conn.assigns.next_page_params end diff --git a/apps/block_scout_web/test/explorer_web/controllers/transaction_log_controller_test.exs b/apps/block_scout_web/test/explorer_web/controllers/transaction_log_controller_test.exs index 683197bd28..a02cb33efb 100644 --- a/apps/block_scout_web/test/explorer_web/controllers/transaction_log_controller_test.exs +++ b/apps/block_scout_web/test/explorer_web/controllers/transaction_log_controller_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.TransactionLogControllerTest do - use ExplorerWeb.ConnCase +defmodule BlockScoutWeb.TransactionLogControllerTest do + use BlockScoutWeb.ConnCase - import ExplorerWeb.Router.Helpers, only: [transaction_log_path: 4] + import BlockScoutWeb.Router.Helpers, only: [transaction_log_path: 4] alias Explorer.ExchangeRates.Token @@ -115,7 +115,7 @@ defmodule ExplorerWeb.TransactionLogControllerTest do test "includes USD exchange rate value for address in assigns", %{conn: conn} do transaction = insert(:transaction) - conn = get(conn, transaction_log_path(ExplorerWeb.Endpoint, :index, :en, transaction.hash)) + conn = get(conn, transaction_log_path(BlockScoutWeb.Endpoint, :index, :en, transaction.hash)) assert %Token{} = conn.assigns.exchange_rate end diff --git a/apps/block_scout_web/test/explorer_web/exchange_rates/usd_test.exs b/apps/block_scout_web/test/explorer_web/exchange_rates/usd_test.exs index d1781811e1..d63fd31e18 100644 --- a/apps/block_scout_web/test/explorer_web/exchange_rates/usd_test.exs +++ b/apps/block_scout_web/test/explorer_web/exchange_rates/usd_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.ExchangeRates.USDTest do +defmodule BlockScoutWeb.ExchangeRates.USDTest do use ExUnit.Case, async: true - alias ExplorerWeb.ExchangeRates.USD + alias BlockScoutWeb.ExchangeRates.USD alias Explorer.ExchangeRates.Token alias Explorer.Chain.Wei diff --git a/apps/block_scout_web/test/explorer_web/features/address_contract_verification_test.exs b/apps/block_scout_web/test/explorer_web/features/address_contract_verification_test.exs index cd3b010b7d..1f93e12fc5 100644 --- a/apps/block_scout_web/test/explorer_web/features/address_contract_verification_test.exs +++ b/apps/block_scout_web/test/explorer_web/features/address_contract_verification_test.exs @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.AddressContractVerificationTest do - use ExplorerWeb.FeatureCase, async: true +defmodule BlockScoutWeb.AddressContractVerificationTest do + use BlockScoutWeb.FeatureCase, async: true import Wallaby.Query diff --git a/apps/block_scout_web/test/explorer_web/features/pages/address_page.ex b/apps/block_scout_web/test/explorer_web/features/pages/address_page.ex index 88edbadd6d..b6c611c3ad 100644 --- a/apps/block_scout_web/test/explorer_web/features/pages/address_page.ex +++ b/apps/block_scout_web/test/explorer_web/features/pages/address_page.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.AddressPage do +defmodule BlockScoutWeb.AddressPage do @moduledoc false use Wallaby.DSL diff --git a/apps/block_scout_web/test/explorer_web/features/pages/block_list_page.ex b/apps/block_scout_web/test/explorer_web/features/pages/block_list_page.ex index 4c02ed435b..c6be65e0e8 100644 --- a/apps/block_scout_web/test/explorer_web/features/pages/block_list_page.ex +++ b/apps/block_scout_web/test/explorer_web/features/pages/block_list_page.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.BlockListPage do +defmodule BlockScoutWeb.BlockListPage do @moduledoc false use Wallaby.DSL diff --git a/apps/block_scout_web/test/explorer_web/features/pages/block_page.ex b/apps/block_scout_web/test/explorer_web/features/pages/block_page.ex index 8f86bbb588..507b9b41eb 100644 --- a/apps/block_scout_web/test/explorer_web/features/pages/block_page.ex +++ b/apps/block_scout_web/test/explorer_web/features/pages/block_page.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.BlockPage do +defmodule BlockScoutWeb.BlockPage do @moduledoc false use Wallaby.DSL diff --git a/apps/block_scout_web/test/explorer_web/features/pages/chain_page.ex b/apps/block_scout_web/test/explorer_web/features/pages/chain_page.ex index dc7673647c..02e5cf3671 100644 --- a/apps/block_scout_web/test/explorer_web/features/pages/chain_page.ex +++ b/apps/block_scout_web/test/explorer_web/features/pages/chain_page.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.ChainPage do +defmodule BlockScoutWeb.ChainPage do @moduledoc false use Wallaby.DSL diff --git a/apps/block_scout_web/test/explorer_web/features/pages/transaction_list_page.ex b/apps/block_scout_web/test/explorer_web/features/pages/transaction_list_page.ex index 53927f15b5..ca6dede9ae 100644 --- a/apps/block_scout_web/test/explorer_web/features/pages/transaction_list_page.ex +++ b/apps/block_scout_web/test/explorer_web/features/pages/transaction_list_page.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.TransactionListPage do +defmodule BlockScoutWeb.TransactionListPage do @moduledoc false use Wallaby.DSL diff --git a/apps/block_scout_web/test/explorer_web/features/pages/transaction_logs_page.ex b/apps/block_scout_web/test/explorer_web/features/pages/transaction_logs_page.ex index d93864a27b..0c95e11879 100644 --- a/apps/block_scout_web/test/explorer_web/features/pages/transaction_logs_page.ex +++ b/apps/block_scout_web/test/explorer_web/features/pages/transaction_logs_page.ex @@ -1,13 +1,13 @@ -defmodule ExplorerWeb.TransactionLogsPage do +defmodule BlockScoutWeb.TransactionLogsPage do @moduledoc false use Wallaby.DSL import Wallaby.Query, only: [css: 1, css: 2] - import ExplorerWeb.Router.Helpers, only: [transaction_log_path: 4] + import BlockScoutWeb.Router.Helpers, only: [transaction_log_path: 4] alias Explorer.Chain.{Address, Transaction} - alias ExplorerWeb.Endpoint + alias BlockScoutWeb.Endpoint def logs(count: count) do css("[data-test='transaction_log']", count: count) diff --git a/apps/block_scout_web/test/explorer_web/features/pages/transaction_page.ex b/apps/block_scout_web/test/explorer_web/features/pages/transaction_page.ex index 82538a6d8f..33fe3082c9 100644 --- a/apps/block_scout_web/test/explorer_web/features/pages/transaction_page.ex +++ b/apps/block_scout_web/test/explorer_web/features/pages/transaction_page.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.TransactionPage do +defmodule BlockScoutWeb.TransactionPage do @moduledoc false use Wallaby.DSL diff --git a/apps/block_scout_web/test/explorer_web/features/viewing_addresses_test.exs b/apps/block_scout_web/test/explorer_web/features/viewing_addresses_test.exs index 0dc9025acf..f8a3e19cc2 100644 --- a/apps/block_scout_web/test/explorer_web/features/viewing_addresses_test.exs +++ b/apps/block_scout_web/test/explorer_web/features/viewing_addresses_test.exs @@ -1,9 +1,9 @@ -defmodule ExplorerWeb.ViewingAddressesTest do - use ExplorerWeb.FeatureCase, async: true +defmodule BlockScoutWeb.ViewingAddressesTest do + use BlockScoutWeb.FeatureCase, async: true alias Explorer.Chain alias Explorer.Chain.{Address, Wei} - alias ExplorerWeb.{AddressPage, Notifier} + alias BlockScoutWeb.{AddressPage, Notifier} setup do block = insert(:block) @@ -53,8 +53,8 @@ defmodule ExplorerWeb.ViewingAddressesTest do created_contract_address: contract ) - address_hash = ExplorerWeb.AddressView.trimmed_hash(address.hash) - transaction_hash = ExplorerWeb.AddressView.trimmed_hash(transaction.hash) + address_hash = BlockScoutWeb.AddressView.trimmed_hash(address.hash) + transaction_hash = BlockScoutWeb.AddressView.trimmed_hash(transaction.hash) session |> AddressPage.visit_page(internal_transaction.created_contract_address) @@ -86,8 +86,8 @@ defmodule ExplorerWeb.ViewingAddressesTest do created_contract_address: another_contract ) - contract_hash = ExplorerWeb.AddressView.trimmed_hash(contract.hash) - transaction_hash = ExplorerWeb.AddressView.trimmed_hash(transaction.hash) + contract_hash = BlockScoutWeb.AddressView.trimmed_hash(contract.hash) + transaction_hash = BlockScoutWeb.AddressView.trimmed_hash(transaction.hash) session |> AddressPage.visit_page(internal_transaction.created_contract_address) diff --git a/apps/block_scout_web/test/explorer_web/features/viewing_blocks_test.exs b/apps/block_scout_web/test/explorer_web/features/viewing_blocks_test.exs index 8dd4690d9b..1302017c54 100644 --- a/apps/block_scout_web/test/explorer_web/features/viewing_blocks_test.exs +++ b/apps/block_scout_web/test/explorer_web/features/viewing_blocks_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.ViewingBlocksTest do - use ExplorerWeb.FeatureCase, async: true +defmodule BlockScoutWeb.ViewingBlocksTest do + use BlockScoutWeb.FeatureCase, async: true - alias ExplorerWeb.{BlockListPage, BlockPage, Notifier} + alias BlockScoutWeb.{BlockListPage, BlockPage, Notifier} setup do timestamp = Timex.now() |> Timex.shift(hours: -1) diff --git a/apps/block_scout_web/test/explorer_web/features/viewing_chain_test.exs b/apps/block_scout_web/test/explorer_web/features/viewing_chain_test.exs index 75d816d72b..e74b086043 100644 --- a/apps/block_scout_web/test/explorer_web/features/viewing_chain_test.exs +++ b/apps/block_scout_web/test/explorer_web/features/viewing_chain_test.exs @@ -1,9 +1,9 @@ -defmodule ExplorerWeb.ViewingChainTest do +defmodule BlockScoutWeb.ViewingChainTest do @moduledoc false - use ExplorerWeb.FeatureCase, async: true + use BlockScoutWeb.FeatureCase, async: true - alias ExplorerWeb.{AddressPage, BlockPage, ChainPage, Notifier, TransactionPage} + alias BlockScoutWeb.{AddressPage, BlockPage, ChainPage, Notifier, TransactionPage} setup do [oldest_block | _] = Enum.map(401..404, &insert(:block, number: &1)) @@ -52,7 +52,7 @@ defmodule ExplorerWeb.ViewingChainTest do end test "address count live updates", %{session: session} do - count = ExplorerWeb.FakeAdapter.address_estimated_count() + count = BlockScoutWeb.FakeAdapter.address_estimated_count() session |> ChainPage.visit_page() diff --git a/apps/block_scout_web/test/explorer_web/features/viewing_transactions_test.exs b/apps/block_scout_web/test/explorer_web/features/viewing_transactions_test.exs index 47cb4ebca2..88b9eae295 100644 --- a/apps/block_scout_web/test/explorer_web/features/viewing_transactions_test.exs +++ b/apps/block_scout_web/test/explorer_web/features/viewing_transactions_test.exs @@ -1,10 +1,10 @@ -defmodule ExplorerWeb.ViewingTransactionsTest do +defmodule BlockScoutWeb.ViewingTransactionsTest do @moduledoc false - use ExplorerWeb.FeatureCase, async: true + use BlockScoutWeb.FeatureCase, async: true alias Explorer.Chain.Wei - alias ExplorerWeb.{AddressPage, Notifier, TransactionListPage, TransactionLogsPage, TransactionPage} + alias BlockScoutWeb.{AddressPage, Notifier, TransactionListPage, TransactionLogsPage, TransactionPage} setup do block = diff --git a/apps/block_scout_web/test/explorer_web/social_media_test.exs b/apps/block_scout_web/test/explorer_web/social_media_test.exs index 6787fc25ac..8a102a60e1 100644 --- a/apps/block_scout_web/test/explorer_web/social_media_test.exs +++ b/apps/block_scout_web/test/explorer_web/social_media_test.exs @@ -1,12 +1,12 @@ -defmodule ExplorerWeb.SocialMediaTest do +defmodule BlockScoutWeb.SocialMediaTest do use Explorer.DataCase - alias ExplorerWeb.SocialMedia + alias BlockScoutWeb.SocialMedia test "it filters out unsupported services" do Application.put_env( :block_scout_web, - ExplorerWeb.SocialMedia, + BlockScoutWeb.SocialMedia, twitter: "MyTwitterProfile", myspace: "MyAwesomeProfile" ) @@ -17,7 +17,7 @@ defmodule ExplorerWeb.SocialMediaTest do end test "it prepends the service url" do - Application.put_env(:block_scout_web, ExplorerWeb.SocialMedia, twitter: "MyTwitterProfile") + Application.put_env(:block_scout_web, BlockScoutWeb.SocialMedia, twitter: "MyTwitterProfile") links = SocialMedia.links() assert links[:twitter] == "https://www.twitter.com/MyTwitterProfile" diff --git a/apps/block_scout_web/test/explorer_web/views/address_read_contract_view_test.exs b/apps/block_scout_web/test/explorer_web/views/address_read_contract_view_test.exs index ef68d5833b..1f98e26e5a 100644 --- a/apps/block_scout_web/test/explorer_web/views/address_read_contract_view_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/address_read_contract_view_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.AddressReadContractViewTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.AddressReadContractViewTest do + use BlockScoutWeb.ConnCase, async: true - alias ExplorerWeb.AddressReadContractView + alias BlockScoutWeb.AddressReadContractView describe "queryable?/1" do test "returns true if list of inputs is not empty" do diff --git a/apps/block_scout_web/test/explorer_web/views/address_transaction_view_test.exs b/apps/block_scout_web/test/explorer_web/views/address_transaction_view_test.exs index 21cbcb7aeb..cfde3315cd 100644 --- a/apps/block_scout_web/test/explorer_web/views/address_transaction_view_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/address_transaction_view_test.exs @@ -1,5 +1,5 @@ -defmodule ExplorerWeb.AddresstransactionViewTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.AddresstransactionViewTest do + use BlockScoutWeb.ConnCase, async: true - doctest ExplorerWeb.AddressTransactionView + doctest BlockScoutWeb.AddressTransactionView end diff --git a/apps/block_scout_web/test/explorer_web/views/address_view_test.exs b/apps/block_scout_web/test/explorer_web/views/address_view_test.exs index 47c3c5f13a..502b149c22 100644 --- a/apps/block_scout_web/test/explorer_web/views/address_view_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/address_view_test.exs @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.AddressViewTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.AddressViewTest do + use BlockScoutWeb.ConnCase, async: true alias Explorer.Chain.Data - alias ExplorerWeb.AddressView + alias BlockScoutWeb.AddressView alias Explorer.ExchangeRates.Token describe "contract?/1" do diff --git a/apps/block_scout_web/test/explorer_web/views/chain_view_test.exs b/apps/block_scout_web/test/explorer_web/views/chain_view_test.exs index 89c47e061e..75aced244b 100644 --- a/apps/block_scout_web/test/explorer_web/views/chain_view_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/chain_view_test.exs @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.ChainViewTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.ChainViewTest do + use BlockScoutWeb.ConnCase, async: true alias Explorer.ExchangeRates.Token - alias ExplorerWeb.ChainView + alias BlockScoutWeb.ChainView describe "format_exchange_rate/1" do test "returns a formatted usd value from a `Token`'s usd_value" do diff --git a/apps/block_scout_web/test/explorer_web/views/currency_helpers_test.exs b/apps/block_scout_web/test/explorer_web/views/currency_helpers_test.exs index c25972a664..4b00a6ad0d 100644 --- a/apps/block_scout_web/test/explorer_web/views/currency_helpers_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/currency_helpers_test.exs @@ -1,10 +1,10 @@ -defmodule ExplorerWeb.CurrencyHelpersTest do +defmodule BlockScoutWeb.CurrencyHelpersTest do use ExUnit.Case - alias ExplorerWeb.CurrencyHelpers - alias ExplorerWeb.ExchangeRates.USD + alias BlockScoutWeb.CurrencyHelpers + alias BlockScoutWeb.ExchangeRates.USD - doctest ExplorerWeb.CurrencyHelpers, import: true + doctest BlockScoutWeb.CurrencyHelpers, import: true test "with nil it returns nil" do assert nil == CurrencyHelpers.format_usd_value(nil) diff --git a/apps/block_scout_web/test/explorer_web/views/error_helpers_test.exs b/apps/block_scout_web/test/explorer_web/views/error_helpers_test.exs index 4da7ea41ad..f61256f383 100644 --- a/apps/block_scout_web/test/explorer_web/views/error_helpers_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/error_helpers_test.exs @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.ErrorHelpersTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.ErrorHelpersTest do + use BlockScoutWeb.ConnCase, async: true import Phoenix.HTML.Tag, only: [content_tag: 3] - alias ExplorerWeb.ErrorHelpers + alias BlockScoutWeb.ErrorHelpers @changeset %{ errors: [ diff --git a/apps/block_scout_web/test/explorer_web/views/error_view_test.exs b/apps/block_scout_web/test/explorer_web/views/error_view_test.exs index 95a86e8007..6babf7c0e2 100644 --- a/apps/block_scout_web/test/explorer_web/views/error_view_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/error_view_test.exs @@ -1,22 +1,22 @@ -defmodule ExplorerWeb.ErrorViewTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.ErrorViewTest do + use BlockScoutWeb.ConnCase, async: true # Bring render/3 and render_to_string/3 for testing custom views import Phoenix.View test "renders 404.html" do - assert render_to_string(ExplorerWeb.ErrorView, "404.html", []) == "Page not found" + assert render_to_string(BlockScoutWeb.ErrorView, "404.html", []) == "Page not found" end test "renders 422.html" do - assert render_to_string(ExplorerWeb.ErrorView, "422.html", []) == "Unprocessable entity" + assert render_to_string(BlockScoutWeb.ErrorView, "422.html", []) == "Unprocessable entity" end test "render 500.html" do - assert render_to_string(ExplorerWeb.ErrorView, "500.html", []) == "Internal server error" + assert render_to_string(BlockScoutWeb.ErrorView, "500.html", []) == "Internal server error" end test "render any other" do - assert render_to_string(ExplorerWeb.ErrorView, "505.html", []) == "Internal server error" + assert render_to_string(BlockScoutWeb.ErrorView, "505.html", []) == "Internal server error" end end diff --git a/apps/block_scout_web/test/explorer_web/views/internal_transaction_view_test.exs b/apps/block_scout_web/test/explorer_web/views/internal_transaction_view_test.exs index 4effc5564d..a9db136014 100644 --- a/apps/block_scout_web/test/explorer_web/views/internal_transaction_view_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/internal_transaction_view_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.InternalTransactionViewTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.InternalTransactionViewTest do + use BlockScoutWeb.ConnCase, async: true - alias ExplorerWeb.InternalTransactionView + alias BlockScoutWeb.InternalTransactionView describe "create?/1" do test "with internal transaction of type create returns true" do diff --git a/apps/block_scout_web/test/explorer_web/views/layout_view_test.exs b/apps/block_scout_web/test/explorer_web/views/layout_view_test.exs index d4cc65ea88..932d60ef1b 100644 --- a/apps/block_scout_web/test/explorer_web/views/layout_view_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/layout_view_test.exs @@ -1,3 +1,3 @@ -defmodule ExplorerWeb.LayoutViewTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.LayoutViewTest do + use BlockScoutWeb.ConnCase, async: true end diff --git a/apps/block_scout_web/test/explorer_web/views/token_helpers_test.exs b/apps/block_scout_web/test/explorer_web/views/token_helpers_test.exs index a0425118bd..aa9942dd6b 100644 --- a/apps/block_scout_web/test/explorer_web/views/token_helpers_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/token_helpers_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.TokenHelpersTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.TokenHelpersTest do + use BlockScoutWeb.ConnCase, async: true - alias ExplorerWeb.{TokenHelpers} + alias BlockScoutWeb.{TokenHelpers} describe "token_transfer_amount/1" do test "returns the symbol -- with ERC-20 token and amount nil" do diff --git a/apps/block_scout_web/test/explorer_web/views/token_view_test.exs b/apps/block_scout_web/test/explorer_web/views/token_view_test.exs index 8794feba45..e57159f442 100644 --- a/apps/block_scout_web/test/explorer_web/views/token_view_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/token_view_test.exs @@ -1,7 +1,7 @@ -defmodule ExplorerWeb.TokenViewTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.TokenViewTest do + use BlockScoutWeb.ConnCase, async: true - alias ExplorerWeb.TokenView + alias BlockScoutWeb.TokenView describe "decimals?/1" do test "returns true when Token has decimals" do diff --git a/apps/block_scout_web/test/explorer_web/views/transaction_view_test.exs b/apps/block_scout_web/test/explorer_web/views/transaction_view_test.exs index 996c3cb071..71390da173 100644 --- a/apps/block_scout_web/test/explorer_web/views/transaction_view_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/transaction_view_test.exs @@ -1,10 +1,10 @@ -defmodule ExplorerWeb.TransactionViewTest do - use ExplorerWeb.ConnCase, async: true +defmodule BlockScoutWeb.TransactionViewTest do + use BlockScoutWeb.ConnCase, async: true alias Explorer.Chain.Wei alias Explorer.ExchangeRates.Token alias Explorer.Repo - alias ExplorerWeb.TransactionView + alias BlockScoutWeb.TransactionView describe "formatted_fee/2" do test "pending transaction with no Receipt" do diff --git a/apps/block_scout_web/test/explorer_web/views/wei_helpers_test.exs b/apps/block_scout_web/test/explorer_web/views/wei_helpers_test.exs index 19291f5534..1453e7f40e 100644 --- a/apps/block_scout_web/test/explorer_web/views/wei_helpers_test.exs +++ b/apps/block_scout_web/test/explorer_web/views/wei_helpers_test.exs @@ -1,8 +1,8 @@ -defmodule ExplorerWeb.WeiHelpersTest do +defmodule BlockScoutWeb.WeiHelpersTest do use ExUnit.Case # Needed for doctest alias Explorer.Chain.Wei - doctest ExplorerWeb.WeiHelpers, import: true + doctest BlockScoutWeb.WeiHelpers, import: true end diff --git a/apps/block_scout_web/test/support/channel_case.ex b/apps/block_scout_web/test/support/channel_case.ex index 9e644a4d7f..cfa4007c9f 100644 --- a/apps/block_scout_web/test/support/channel_case.ex +++ b/apps/block_scout_web/test/support/channel_case.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.ChannelCase do +defmodule BlockScoutWeb.ChannelCase do @moduledoc """ This module defines the test case to be used by channel tests. @@ -21,7 +21,7 @@ defmodule ExplorerWeb.ChannelCase do use Phoenix.ChannelTest # The default endpoint for testing - @endpoint ExplorerWeb.Endpoint + @endpoint BlockScoutWeb.Endpoint import Explorer.Factory end @@ -36,6 +36,6 @@ defmodule ExplorerWeb.ChannelCase do end :ok - # {k:ok, conn: %Plug.Conn{} |> Plug.Conn.put_private(:phoenix_endpoint, ExplorerWeb.Endpoint)} + # {k:ok, conn: %Plug.Conn{} |> Plug.Conn.put_private(:phoenix_endpoint, BlockScoutWeb.Endpoint)} end end diff --git a/apps/block_scout_web/test/support/conn_case.ex b/apps/block_scout_web/test/support/conn_case.ex index c69dcea3a8..27be2a708d 100644 --- a/apps/block_scout_web/test/support/conn_case.ex +++ b/apps/block_scout_web/test/support/conn_case.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.ConnCase do +defmodule BlockScoutWeb.ConnCase do @moduledoc """ This module defines the test case to be used by tests that require setting up a connection. @@ -19,10 +19,10 @@ defmodule ExplorerWeb.ConnCase do quote do # Import conveniences for testing with connections use Phoenix.ConnTest - import ExplorerWeb.Router.Helpers + import BlockScoutWeb.Router.Helpers # The default endpoint for testing - @endpoint ExplorerWeb.Endpoint + @endpoint BlockScoutWeb.Endpoint import Explorer.Factory end diff --git a/apps/block_scout_web/test/support/fake_adapter.ex b/apps/block_scout_web/test/support/fake_adapter.ex index b92b353557..754bc0d6af 100644 --- a/apps/block_scout_web/test/support/fake_adapter.ex +++ b/apps/block_scout_web/test/support/fake_adapter.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.FakeAdapter do +defmodule BlockScoutWeb.FakeAdapter do alias Explorer.Chain.Address alias Explorer.Repo diff --git a/apps/block_scout_web/test/support/feature_case.ex b/apps/block_scout_web/test/support/feature_case.ex index bd8e3a0e6d..14f02c13d8 100644 --- a/apps/block_scout_web/test/support/feature_case.ex +++ b/apps/block_scout_web/test/support/feature_case.ex @@ -1,4 +1,4 @@ -defmodule ExplorerWeb.FeatureCase do +defmodule BlockScoutWeb.FeatureCase do use ExUnit.CaseTemplate use Wallaby.DSL @@ -13,8 +13,8 @@ defmodule ExplorerWeb.FeatureCase do import Ecto.Changeset import Ecto.Query import Explorer.Factory - import ExplorerWeb.FeatureCase - import ExplorerWeb.Router.Helpers + import BlockScoutWeb.FeatureCase + import BlockScoutWeb.Router.Helpers alias Explorer.Repo end diff --git a/apps/block_scout_web/test/test_helper.exs b/apps/block_scout_web/test/test_helper.exs index 7aa38e8fdd..0158d8f7c9 100644 --- a/apps/block_scout_web/test/test_helper.exs +++ b/apps/block_scout_web/test/test_helper.exs @@ -7,7 +7,7 @@ File.mkdir_p!(junit_folder) {:ok, _} = Application.ensure_all_started(:block_scout_web) {:ok, _} = Application.ensure_all_started(:wallaby) -Application.put_env(:wallaby, :base_url, ExplorerWeb.Endpoint.url()) +Application.put_env(:wallaby, :base_url, BlockScoutWeb.Endpoint.url()) {:ok, _} = Application.ensure_all_started(:ex_machina)