From da47588cb90c44dd4d81fe780892e617eac79a9e Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Thu, 18 Oct 2018 16:36:32 +0200 Subject: [PATCH 01/10] Fix ping/pong from ganache ws implementation --- .../lib/ethereum_jsonrpc/web_socket/web_socket_client.ex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex index 8878253793..293198ed9a 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex @@ -265,6 +265,11 @@ defmodule EthereumJSONRPC.WebSocket.WebSocketClient do respond_to_registration(registration, response, new_state) end + # Sending pong (Ganache requirement) + defp handle_response({:ping, ""}, %__MODULE__{} = state) do + {:ok, {:pong, ""}, state} + end + defp handle_response(response, %__MODULE__{} = state) do Logger.error(fn -> [ From 802cb2d838cd371c4123926b35c2509cff747631 Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Thu, 18 Oct 2018 16:43:52 +0200 Subject: [PATCH 02/10] Cleanup --- .../lib/ethereum_jsonrpc/web_socket/web_socket_client.ex | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex index 293198ed9a..8878253793 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex @@ -265,11 +265,6 @@ defmodule EthereumJSONRPC.WebSocket.WebSocketClient do respond_to_registration(registration, response, new_state) end - # Sending pong (Ganache requirement) - defp handle_response({:ping, ""}, %__MODULE__{} = state) do - {:ok, {:pong, ""}, state} - end - defp handle_response(response, %__MODULE__{} = state) do Logger.error(fn -> [ From c1d1385abb9b76d8621d79ca8a5eb8bf53d95403 Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Mon, 22 Oct 2018 19:25:59 +0300 Subject: [PATCH 03/10] Added docker files --- .dockerignore | 5 +++++ Dockerfile | 38 ++++++++++++++++++++++++++++++++++++ apps/explorer/config/dev.exs | 4 ++-- apps/indexer/config/dev.exs | 2 +- 4 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..f2c7590ef7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +_build +deps +apps/block_scout_web/assets/node_modules +apps/explorer/node_modules +test diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..e9483c9c76 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,38 @@ +FROM bitwalker/alpine-elixir-phoenix:latest + +RUN apk --no-cache --update add automake libtool inotify-tools autoconf + +EXPOSE 4000 + +ENV PORT=4000 \ + MIX_ENV="prod" \ + ETHEREUM_JSONRPC_VARIANT="ganache" \ + ETHEREUM_JSONRPC_HTTP_URL="http://host.docker.internal:7545" \ + ETHEREUM_JSONRPC_WEB_SOCKET_URL="ws://host.docker.internal:7545" \ + POSTGRES_URL="host.docker.internal" \ + DATABASE_URL="postgresql://postgres:@host.docker.internal:5432/explorer?ssl=false" \ + SECRET_KEY_BASE="RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5" + +# Cache elixir deps +ADD mix.exs mix.lock ./ +ADD apps/block_scout_web/mix.exs ./apps/block_scout_web/ +ADD apps/explorer/mix.exs ./apps/explorer/ +ADD apps/ethereum_jsonrpc/mix.exs ./apps/ethereum_jsonrpc/ +ADD apps/indexer/mix.exs ./apps/indexer/ + +RUN mix do deps.get, deps.compile + +ADD . . + +# Run forderground build and phoenix digest +RUN mix do compile, phx.digest + +# Add blockscout npm deps +RUN cd apps/block_scout_web/assets/ && npm install && npm run deploy && cd - +RUN cd apps/explorer/ && npm install && cd - + +RUN mix do ecto.drop --force, ecto.create, ecto.migrate + +# USER default + +CMD ["mix", "phx.server"] diff --git a/apps/explorer/config/dev.exs b/apps/explorer/config/dev.exs index d6363c383c..50b0f88f78 100644 --- a/apps/explorer/config/dev.exs +++ b/apps/explorer/config/dev.exs @@ -4,7 +4,7 @@ use Mix.Config config :explorer, Explorer.Repo, adapter: Ecto.Adapters.Postgres, database: "explorer_dev", - hostname: "localhost", + hostname: System.get_env("POSTGRES_URL") || "localhost", pool_size: 20, pool_timeout: 60_000, timeout: 80_000 @@ -17,7 +17,7 @@ import_config "dev.secret.exs" variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do - "parity" + "ganache" else System.get_env("ETHEREUM_JSONRPC_VARIANT") |> String.split(".") diff --git a/apps/indexer/config/dev.exs b/apps/indexer/config/dev.exs index 2f445c38dc..337e2f9b97 100644 --- a/apps/indexer/config/dev.exs +++ b/apps/indexer/config/dev.exs @@ -11,7 +11,7 @@ config :logger, :indexer_token_balances, variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do - "parity" + "ganache" else System.get_env("ETHEREUM_JSONRPC_VARIANT") |> String.split(".") From 5af2b83d829de26356ee45f56b25b7b57b4c6f06 Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Tue, 23 Oct 2018 10:47:06 +0300 Subject: [PATCH 04/10] Updated docker integration --- Dockerfile | 1 - docker-compose.yml | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index e9483c9c76..5886275757 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ ENV PORT=4000 \ ETHEREUM_JSONRPC_VARIANT="ganache" \ ETHEREUM_JSONRPC_HTTP_URL="http://host.docker.internal:7545" \ ETHEREUM_JSONRPC_WEB_SOCKET_URL="ws://host.docker.internal:7545" \ - POSTGRES_URL="host.docker.internal" \ DATABASE_URL="postgresql://postgres:@host.docker.internal:5432/explorer?ssl=false" \ SECRET_KEY_BASE="RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..9c115cb0f8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3' +services: + blockscout: + build: . + ports: + - "4000:4000" + environment: + ETHEREUM_JSONRPC_HTTP_URL: "http://host.docker.internal:2000" + ETHEREUM_JSONRPC_WEB_SOCKET_URL: "ws://host.docker.internal:2000" + From ae62c047f619a8aae4e59c777cf4b910d1acdd98 Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Wed, 24 Oct 2018 18:57:03 +0300 Subject: [PATCH 05/10] Updated dockerfile --- Dockerfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5886275757..8325ad9170 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,14 +24,20 @@ RUN mix do deps.get, deps.compile ADD . . # Run forderground build and phoenix digest -RUN mix do compile, phx.digest +RUN mix compile # Add blockscout npm deps -RUN cd apps/block_scout_web/assets/ && npm install && npm run deploy && cd - -RUN cd apps/explorer/ && npm install && cd - +RUN cd apps/block_scout_web/assets/ && \ + npm install && \ + npm run deploy && \ + cd - -RUN mix do ecto.drop --force, ecto.create, ecto.migrate +RUN cd apps/explorer/ && \ + npm install && \ + cd - + +# RUN mix do ecto.drop --force, ecto.create, ecto.migrate # USER default -CMD ["mix", "phx.server"] +# CMD ["mix", "phx.server"] From d1477f085984f225198eca48afbe62ca27aba98c Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Thu, 25 Oct 2018 15:58:05 +0300 Subject: [PATCH 06/10] Updated makefile --- Makefile | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..3de6a1460a --- /dev/null +++ b/Makefile @@ -0,0 +1,80 @@ +SYSTEM = $(shell uname -s) +HOST = host.docker.internal +DOCKER_IMAGE = blockscout_prod +PG_CONTAINER_NAME = postgres +PG_CONTAINER_IMAGE = postgres:10.4 +THIS_FILE = $(lastword $(MAKEFILE_LIST)) + +ifeq ($(SYSTEM), Linux) + HOST=localhost +endif + +DB_URL = postgresql://postgres:@$(HOST):5432/explorer?ssl=false +BLOCKSCOUT_CONTAINNER_PARAMS = -e 'MIX_ENV=prod' \ + -e 'DATABASE_URL=$(DB_URL)' +ifeq ($(SYSTEM), Linux) + BLOCKSCOUT_CONTAINNER_PARAMS += --network=host +endif +ifdef ETHEREUM_JSONRPC_VARIANT + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_VARIANT=$(ETHEREUM_JSONRPC_VARIANT)' +endif +ifdef ETHEREUM_JSONRPC_HTTP_URL + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_URL=$(ETHEREUM_JSONRPC_HTTP_URL)' +endif +ifdef ETHEREUM_JSONRPC_WEB_SOCKET_URL + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_WEB_SOCKET_URL=$(ETHEREUM_JSONRPC_WEB_SOCKET_URL)' +endif + +HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep ${DOCKER_IMAGE}) +build: + @echo "==> Checking for blockscout image $(DOCKER_IMAGE)" +ifdef HAS_BLOCKSCOUT_IMAGE + @echo "==> Image exist. Using $(DOCKER_IMAGE)" +else + @echo "==> No image found trying to build one..." + # @docker build -t $(DOCKER_IMAGE) . +endif + +migrate: build postgres + @echo "==> Running migrations" + @docker run --rm \ + $(BLOCKSCOUT_CONTAINNER_PARAMS) \ + $(DOCKER_IMAGE) /bin/sh -c "echo $$MIX_ENV && mix do ecto.drop --force, ecto.create, ecto.migrate" + + +PG_EXIST := $(shell docker ps -a | grep ${PG_CONTAINER_NAME}) +PG_STARTED := $(shell docker ps | grep ${PG_CONTAINER_NAME}) +postgres: +ifdef PG_EXIST + @echo "==> Checking PostrgeSQL container" +ifdef PG_STARTED + @echo "==> PostgreSQL Already started" +else + @echo "==> Starting PostgreSQL container" + @docker start $(PG_CONTAINER_NAME) +endif +else + @echo "==> Creating new PostgreSQL container" + @docker run -d --name $(PG_CONTAINER_NAME) \ + -e POSTGRES_PASSWORD="" \ + -e POSTGRES_USER="postgres" \ + -p 5432:5432 \ + $(PG_CONTAINER_IMAGE) + @sleep 1 + @$(MAKE) -f $(THIS_FILE) migrate +endif + +start: build postgres + @echo "==> Starting blockscout" + @docker run --rm \ + $(BLOCKSCOUT_CONTAINNER_PARAMS) \ + -p 4000:4000 \ + $(DOCKER_IMAGE) /bin/sh -c "mix phx.server" + +run: start + +.PHONY: build \ + migrate \ + start \ + postgres \ + run From 99b70a1b65ac654d152289afb082b8e89f399fbd Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Thu, 25 Oct 2018 16:24:16 +0300 Subject: [PATCH 07/10] Revert dev settings --- apps/explorer/config/dev.exs | 4 ++-- apps/indexer/config/dev.exs | 2 +- docker-compose.yml | 10 ---------- 3 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 docker-compose.yml diff --git a/apps/explorer/config/dev.exs b/apps/explorer/config/dev.exs index 50b0f88f78..d6363c383c 100644 --- a/apps/explorer/config/dev.exs +++ b/apps/explorer/config/dev.exs @@ -4,7 +4,7 @@ use Mix.Config config :explorer, Explorer.Repo, adapter: Ecto.Adapters.Postgres, database: "explorer_dev", - hostname: System.get_env("POSTGRES_URL") || "localhost", + hostname: "localhost", pool_size: 20, pool_timeout: 60_000, timeout: 80_000 @@ -17,7 +17,7 @@ import_config "dev.secret.exs" variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do - "ganache" + "parity" else System.get_env("ETHEREUM_JSONRPC_VARIANT") |> String.split(".") diff --git a/apps/indexer/config/dev.exs b/apps/indexer/config/dev.exs index 337e2f9b97..2f445c38dc 100644 --- a/apps/indexer/config/dev.exs +++ b/apps/indexer/config/dev.exs @@ -11,7 +11,7 @@ config :logger, :indexer_token_balances, variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do - "ganache" + "parity" else System.get_env("ETHEREUM_JSONRPC_VARIANT") |> String.split(".") diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 9c115cb0f8..0000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: '3' -services: - blockscout: - build: . - ports: - - "4000:4000" - environment: - ETHEREUM_JSONRPC_HTTP_URL: "http://host.docker.internal:2000" - ETHEREUM_JSONRPC_WEB_SOCKET_URL: "ws://host.docker.internal:2000" - From b63c22d6f9bf5fe527257c8b99f26e08d5c35cfa Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Fri, 26 Oct 2018 14:12:32 +0300 Subject: [PATCH 08/10] Reworked docker. minified image from 344 -> 15 Mb --- .dockerignore | 4 ++++ Dockerfile => docker/Dockerfile | 4 ---- Makefile => docker/Makefile | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename Dockerfile => docker/Dockerfile (76%) rename Makefile => docker/Makefile (97%) diff --git a/.dockerignore b/.dockerignore index f2c7590ef7..b52edd4f47 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,7 @@ deps apps/block_scout_web/assets/node_modules apps/explorer/node_modules test +.git +.circleci +logs +apps/*/test diff --git a/Dockerfile b/docker/Dockerfile similarity index 76% rename from Dockerfile rename to docker/Dockerfile index 8325ad9170..9c1a4809e2 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -6,10 +6,6 @@ EXPOSE 4000 ENV PORT=4000 \ MIX_ENV="prod" \ - ETHEREUM_JSONRPC_VARIANT="ganache" \ - ETHEREUM_JSONRPC_HTTP_URL="http://host.docker.internal:7545" \ - ETHEREUM_JSONRPC_WEB_SOCKET_URL="ws://host.docker.internal:7545" \ - DATABASE_URL="postgresql://postgres:@host.docker.internal:5432/explorer?ssl=false" \ SECRET_KEY_BASE="RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5" # Cache elixir deps diff --git a/Makefile b/docker/Makefile similarity index 97% rename from Makefile rename to docker/Makefile index 3de6a1460a..56906fcc37 100644 --- a/Makefile +++ b/docker/Makefile @@ -32,7 +32,7 @@ ifdef HAS_BLOCKSCOUT_IMAGE @echo "==> Image exist. Using $(DOCKER_IMAGE)" else @echo "==> No image found trying to build one..." - # @docker build -t $(DOCKER_IMAGE) . + @docker build -f ./Dockerfile -t $(DOCKER_IMAGE) ../ endif migrate: build postgres From 3b66962db694576b1442babe1be6c756ecb188d8 Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Sat, 27 Oct 2018 16:14:42 +0300 Subject: [PATCH 09/10] Added README.md template --- docker/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docker/README.md diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000000..949a926390 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,29 @@ +# BlockScout Docker integration + +For now this integration is not production ready. It made only for local usage only ! + +## How to use ? + +## Env variables + +BlockScout support 3 different JSON RPC Variants. +Vriant could be configured using `ETHEREUM_JSONRPC_VARIANT` environment variable. + +Example: +```bash +ETHEREUM_JSONRPC_VARIANT=ganache make start +``` + +Available options are: + + * `parity` - Parity JSON RPC (**Default one**) + * `geth` - Geth JSON RPC + * `ganache` - Ganache JSON RPC + + +| Variable | Description | Default value | +| -------- | ----------- | ------------- | +| `ETHEREUM_JSONRPC_VARIANT` | Variant of your JSON RPC service: `parity`, `geth` or `ganache` | `parity` | +| `ETHEREUM_JSONRPC_HTTP_URL` | HTTP JSON RPC URL Only for `geth` or `ganache` variant | `http://localhost:7545` | +| `ETHEREUM_JSONRPC_WEB_SOCKET_URL` | WS JSON RPC url **Only for `geth` or `ganache` variant** | `ws://localhost:7545` | + From c9cd84bca7ae61410268035306dac621d0c51d6e Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Mon, 29 Oct 2018 17:18:33 +0200 Subject: [PATCH 10/10] Updated docker integration --- docker/Makefile | 25 +++++++++++++++++++++-- docker/README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 73 insertions(+), 4 deletions(-) diff --git a/docker/Makefile b/docker/Makefile index 56906fcc37..9e37f5e821 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -21,8 +21,29 @@ endif ifdef ETHEREUM_JSONRPC_HTTP_URL BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_URL=$(ETHEREUM_JSONRPC_HTTP_URL)' endif -ifdef ETHEREUM_JSONRPC_WEB_SOCKET_URL - BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_WEB_SOCKET_URL=$(ETHEREUM_JSONRPC_WEB_SOCKET_URL)' +ifdef ETHEREUM_JSONRPC_WS_URL + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_WS_URL=$(ETHEREUM_JSONRPC_WS_URL)' +endif +ifdef ETHEREUM_JSONRPC_TRACE_URL + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_TRACE_URL=$(ETHEREUM_JSONRPC_TRACE_URL)' +endif +ifdef COIN + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'COIN=$(COIN)' +endif +ifdef LOGO + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'LOGO=$(LOGO)' +endif +ifdef NETWORK + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'NETWORK=$(NETWORK)' +endif +ifdef SUBNETWORK + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'SUBNETWORK=$(SUBNETWORK)' +endif +ifdef NETWORK_ICON + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'NETWORK_ICON=$(NETWORK_ICON)' +endif +ifdef NETWORK_PATH + BLOCKSCOUT_CONTAINNER_PARAMS += -e 'NETWORK_PATH=$(NETWORK_PATH)' endif HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep ${DOCKER_IMAGE}) diff --git a/docker/README.md b/docker/README.md index 949a926390..17e142c27f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -3,6 +3,34 @@ For now this integration is not production ready. It made only for local usage only ! ## How to use ? +First of all blockscout requires `PostgreSQL` server for working. +It will be provided by starting script (new docker image will be created named `postgres`) + +**Starting command** +`make start` - will set everything up and start blockscout in container. +To connect it to your local environment you will have to configure it using [env variables](#env-variables) + +Exmaple connecting to local `ganache` instance running on port `2000` on Mac/Windows: +```bash +COIN=DAI \ +ETHEREUM_JSONRPC_VARIANT=ganache \ +ETHEREUM_JSONRPC_HTTP_URL=http://host.docker.internal:2000 \ +ETHEREUM_JSONRPC_WEB_SOCKET_URL=ws://host.docker.internal:2000 \ +make start +``` + +Blockscout will be available on `localhost:4000` + +**Note** +On mac/Windows Docker provides with a special URL `host.docker.internal` that will be available into container and routed to your local machine. +On Linux docker is starting using `--network=host` and all services should be available on `localhost` + +### Migrations + +By default `Makefile` will do migrations for you on `PostgreSQL` creation. +But you could run migrations manualy using `make migrate` command. + +**WARNING** Migrations will clean up your local database ! ## Env variables @@ -24,6 +52,26 @@ Available options are: | Variable | Description | Default value | | -------- | ----------- | ------------- | | `ETHEREUM_JSONRPC_VARIANT` | Variant of your JSON RPC service: `parity`, `geth` or `ganache` | `parity` | -| `ETHEREUM_JSONRPC_HTTP_URL` | HTTP JSON RPC URL Only for `geth` or `ganache` variant | `http://localhost:7545` | -| `ETHEREUM_JSONRPC_WEB_SOCKET_URL` | WS JSON RPC url **Only for `geth` or `ganache` variant** | `ws://localhost:7545` | +| `ETHEREUM_JSONRPC_HTTP_URL` | HTTP JSON RPC URL Only for `geth` or `ganache` variant | Different per JSONRPC variant | +| `ETHEREUM_JSONRPC_WS_URL` | WS JSON RPC url | Different per JSONRPC variant | +| `ETHEREUM_JSONRPC_TRACE_URL` | Trace URL **Only for `parity` variant** | `https://sokol-trace.poa.network` | +| `COIN` | Default Coin | `POA` | +| `LOGO` | Coin logo | Empty | +| `NETWORK` | Network | Empty | +| `SUBNETWORK` | Subnetwork | Empty | +| `NETWORK_ICON` | Network icon | Empty | +| `NETWORK_PATH` | Network path | `/` | + + +`ETHEREUM_JSONRPC_HTTP_URL` default values: + + * For `parity` - `https://sokol.poa.network` + * For `geth` - `https://mainnet.infura.io/8lTvJTKmHPCHazkneJsY` + * For `ganache` - `http://localhost:7545` + +`ETHEREUM_JSONRPC_WS_URL` default values: + + * For `parity` - `wss://sokol-ws.poa.network/ws` + * For `geth` - `wss://mainnet.infura.io/8lTvJTKmHPCHazkneJsY/ws` + * For `ganache` - `ws://localhost:7545`