From f732a0cd27f3dfb8e2b2634117d56c1729667cff Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Mon, 21 May 2018 11:18:21 -0500 Subject: [PATCH] Geth and Parity variant configs for EthereumJSONRPC --- apps/ethereum_jsonrpc/config/config.exs | 10 +++++++--- apps/ethereum_jsonrpc/config/geth.exs | 5 +++++ apps/ethereum_jsonrpc/config/parity.exs | 5 +++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 apps/ethereum_jsonrpc/config/geth.exs create mode 100644 apps/ethereum_jsonrpc/config/parity.exs diff --git a/apps/ethereum_jsonrpc/config/config.exs b/apps/ethereum_jsonrpc/config/config.exs index a1c766314a..08a36ee4cd 100644 --- a/apps/ethereum_jsonrpc/config/config.exs +++ b/apps/ethereum_jsonrpc/config/config.exs @@ -3,6 +3,10 @@ use Mix.Config config :ethereum_jsonrpc, - http: [recv_timeout: 60_000, timeout: 60_000, hackney: [pool: :ethereum_jsonrpc]], - trace_url: "https://sokol-trace.poa.network", - url: "https://sokol.poa.network" + http: [recv_timeout: 60_000, timeout: 60_000, hackney: [pool: :ethereum_jsonrpc]] + +variant = System.get_env("ETHEREUM_JSONRPC_VARIANT") || "parity" + +# Import variant specific config. This must remain at the bottom +# of this file so it overrides the configuration defined above. +import_config "#{variant}.exs" diff --git a/apps/ethereum_jsonrpc/config/geth.exs b/apps/ethereum_jsonrpc/config/geth.exs new file mode 100644 index 0000000000..aecdfdecb0 --- /dev/null +++ b/apps/ethereum_jsonrpc/config/geth.exs @@ -0,0 +1,5 @@ +use Mix.Config + +config :ethereum_jsonrpc, + trace_url: "https://mainnet.infura.io/mew", + url: "https://mainnet.infura.io/mew" diff --git a/apps/ethereum_jsonrpc/config/parity.exs b/apps/ethereum_jsonrpc/config/parity.exs new file mode 100644 index 0000000000..4281f3801e --- /dev/null +++ b/apps/ethereum_jsonrpc/config/parity.exs @@ -0,0 +1,5 @@ +use Mix.Config + +config :ethereum_jsonrpc, + trace_url: "https://sokol-trace.poa.network", + url: "https://sokol.poa.network"