Merge pull request #1006 from konstantinzolotarev/unify_config

Unified config variables for all JSON RPC variants
pull/999/head
Luke Imhoff 6 years ago committed by GitHub
commit ca1713dff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/explorer/config/dev/ganache.exs
  2. 2
      apps/explorer/config/dev/geth.exs
  3. 10
      apps/explorer/config/dev/parity.exs
  4. 20
      apps/explorer/config/prod/ganache.exs
  5. 2
      apps/explorer/config/prod/geth.exs
  6. 10
      apps/explorer/config/prod/parity.exs
  7. 13
      apps/explorer/config/test/ganache.exs
  8. 2
      apps/indexer/config/dev/ganache.exs
  9. 2
      apps/indexer/config/dev/geth.exs
  10. 10
      apps/indexer/config/dev/parity.exs
  11. 20
      apps/indexer/config/prod/ganache.exs
  12. 2
      apps/indexer/config/prod/geth.exs
  13. 10
      apps/indexer/config/prod/parity.exs

@ -14,7 +14,7 @@ config :explorer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WEB_SOCKET_URL") || "ws://localhost:7545"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:7545"
],
variant: EthereumJSONRPC.Geth
]

@ -14,7 +14,7 @@ config :explorer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WEB_SOCKET_URL") || "wss://mainnet.infura.io/8lTvJTKmHPCHazkneJsY/ws"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/8lTvJTKmHPCHazkneJsY/ws"
],
variant: EthereumJSONRPC.Geth
]

@ -5,11 +5,11 @@ config :explorer,
transport: EthereumJSONRPC.HTTP,
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: "https://sokol.poa.network",
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "https://sokol.poa.network",
method_to_url: [
eth_call: "https://sokol-trace.poa.network",
eth_getBalance: "https://sokol-trace.poa.network",
trace_replayTransaction: "https://sokol-trace.poa.network"
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network",
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network",
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network"
],
http_options: [recv_timeout: 60_000, timeout: 60_000, hackney: [pool: :ethereum_jsonrpc]]
],
@ -19,7 +19,7 @@ config :explorer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: "wss://sokol-ws.poa.network/ws"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://sokol-ws.poa.network/ws"
],
variant: EthereumJSONRPC.Parity
]

@ -0,0 +1,20 @@
use Mix.Config
config :explorer,
json_rpc_named_arguments: [
transport: EthereumJSONRPC.HTTP,
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545",
http_options: [recv_timeout: 60_000, timeout: 60_000, hackney: [pool: :ethereum_jsonrpc]]
],
variant: EthereumJSONRPC.Geth
],
subscribe_named_arguments: [
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:7545"
],
variant: EthereumJSONRPC.Geth
]

@ -14,7 +14,7 @@ config :explorer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "wss://mainnet.infura.io/8lTvJTKmHPCHazkneJsY/ws"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/8lTvJTKmHPCHazkneJsY/ws"
],
variant: EthereumJSONRPC.Geth
]

@ -5,11 +5,11 @@ config :explorer,
transport: EthereumJSONRPC.HTTP,
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_URL") || "https://sokol.poa.network",
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "https://sokol.poa.network",
method_to_url: [
eth_call: System.get_env("TRACE_URL") || "https://sokol-trace.poa.network",
eth_getBalance: System.get_env("TRACE_URL") || "https://sokol-trace.poa.network",
trace_replayTransaction: System.get_env("TRACE_URL") || "https://sokol-trace.poa.network"
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network",
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network",
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network"
],
http_options: [recv_timeout: 60_000, timeout: 60_000, hackney: [pool: :ethereum_jsonrpc]]
],
@ -19,7 +19,7 @@ config :explorer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("WS_URL") || "wss://sokol-ws.poa.network/ws"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://sokol-ws.poa.network/ws"
],
variant: EthereumJSONRPC.Parity
]

@ -0,0 +1,13 @@
use Mix.Config
config :explorer,
json_rpc_named_arguments: [
transport: EthereumJSONRPC.Mox,
transport_options: [],
variant: EthereumJSONRPC.Geth
],
subscribe_named_arguments: [
transport: EthereumJSONRPC.Mox,
transport_options: [],
variant: EthereumJSONRPC.Geth
]

@ -15,6 +15,6 @@ config :indexer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WEB_SOCKET_URL") || "ws://localhost:7545"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:7545"
]
]

@ -15,6 +15,6 @@ config :indexer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WEB_SOCKET_URL") || "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY"
]
]

@ -6,11 +6,11 @@ config :indexer,
transport: EthereumJSONRPC.HTTP,
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: "https://sokol.poa.network",
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "https://sokol.poa.network",
method_to_url: [
eth_getBalance: "https://sokol-trace.poa.network",
trace_block: "https://sokol-trace.poa.network",
trace_replayTransaction: "https://sokol-trace.poa.network"
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network",
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network",
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network"
],
http_options: [recv_timeout: 60_000, timeout: 60_000, hackney: [pool: :ethereum_jsonrpc]]
],
@ -20,6 +20,6 @@ config :indexer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: "wss://sokol-ws.poa.network/ws"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://sokol-ws.poa.network/ws"
]
]

@ -0,0 +1,20 @@
use Mix.Config
config :indexer,
block_interval: 5_000,
json_rpc_named_arguments: [
transport: EthereumJSONRPC.HTTP,
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545",
http_options: [recv_timeout: 60_000, timeout: 60_000, hackney: [pool: :ethereum_jsonrpc]]
],
variant: EthereumJSONRPC.Geth
],
subscribe_named_arguments: [
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:7545"
]
]

@ -15,6 +15,6 @@ config :indexer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY"
]
]

@ -6,11 +6,11 @@ config :indexer,
transport: EthereumJSONRPC.HTTP,
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_URL") || "https://sokol.poa.network",
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "https://sokol.poa.network",
method_to_url: [
eth_getBalance: System.get_env("TRACE_URL") || "https://sokol-trace.poa.network",
trace_block: System.get_env("TRACE_URL") || "https://sokol-trace.poa.network",
trace_replayTransaction: System.get_env("TRACE_URL") || "https://sokol-trace.poa.network"
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network",
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network",
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "https://sokol-trace.poa.network"
],
http_options: [recv_timeout: 60_000, timeout: 60_000, hackney: [pool: :ethereum_jsonrpc]]
],
@ -20,6 +20,6 @@ config :indexer,
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("WS_URL") || "wss://sokol-ws.poa.network/ws"
url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://sokol-ws.poa.network/ws"
]
]

Loading…
Cancel
Save