Merge pull request #9112 from blockscout/ap-add-eth-call-specific-url

Add specific url for eth_call
pull/9116/head
Victor Baranov 11 months ago committed by GitHub
commit 4ec276e593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 3
      apps/explorer/config/dev/arbitrum.exs
  3. 2
      apps/explorer/config/dev/besu.exs
  4. 2
      apps/explorer/config/dev/erigon.exs
  5. 3
      apps/explorer/config/dev/ganache.exs
  6. 1
      apps/explorer/config/dev/geth.exs
  7. 2
      apps/explorer/config/dev/nethermind.exs
  8. 2
      apps/explorer/config/dev/rsk.exs
  9. 3
      apps/explorer/config/prod/arbitrum.exs
  10. 2
      apps/explorer/config/prod/besu.exs
  11. 2
      apps/explorer/config/prod/erigon.exs
  12. 3
      apps/explorer/config/prod/ganache.exs
  13. 1
      apps/explorer/config/prod/geth.exs
  14. 2
      apps/explorer/config/prod/nethermind.exs
  15. 2
      apps/explorer/config/prod/rsk.exs
  16. 3
      apps/indexer/config/dev/arbitrum.exs
  17. 1
      apps/indexer/config/dev/besu.exs
  18. 1
      apps/indexer/config/dev/erigon.exs
  19. 3
      apps/indexer/config/dev/ganache.exs
  20. 1
      apps/indexer/config/dev/geth.exs
  21. 1
      apps/indexer/config/dev/nethermind.exs
  22. 1
      apps/indexer/config/dev/rsk.exs
  23. 3
      apps/indexer/config/prod/arbitrum.exs
  24. 1
      apps/indexer/config/prod/besu.exs
  25. 1
      apps/indexer/config/prod/erigon.exs
  26. 3
      apps/indexer/config/prod/ganache.exs
  27. 1
      apps/indexer/config/prod/geth.exs
  28. 1
      apps/indexer/config/prod/nethermind.exs
  29. 1
      apps/indexer/config/prod/rsk.exs
  30. 5
      config/config_helper.exs
  31. 1
      docker-compose/envs/common-blockscout.env

@ -4,6 +4,7 @@
### Features ### Features
- [#9112](https://github.com/blockscout/blockscout/pull/9112) - Add specific url for eth_call
- [#9044](https://github.com/blockscout/blockscout/pull/9044) - Expand gas price oracle functionality - [#9044](https://github.com/blockscout/blockscout/pull/9044) - Expand gas price oracle functionality
### Fixes ### Fixes

@ -14,6 +14,9 @@ config :explorer,
http: EthereumJSONRPC.HTTP.HTTPoison, http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:8545", url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:8545",
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:8545")
],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]
], ],
variant: EthereumJSONRPC.Arbitrum variant: EthereumJSONRPC.Arbitrum

@ -16,7 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545" trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545"
], ],

@ -16,7 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545" trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545"
], ],

@ -14,6 +14,9 @@ config :explorer,
http: EthereumJSONRPC.HTTP.HTTPoison, http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545", url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545",
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:7545")
],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]
], ],
variant: EthereumJSONRPC.Ganache variant: EthereumJSONRPC.Ganache

@ -16,6 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
debug_traceTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545" debug_traceTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545"
], ],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]

@ -16,7 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545" trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545"
], ],

@ -16,7 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545" trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545"
], ],

@ -14,6 +14,9 @@ config :explorer,
http: EthereumJSONRPC.HTTP.HTTPoison, http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"),
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
method_to_url: [
eth_call: ConfigHelper.eth_call_url()
],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]
], ],
variant: EthereumJSONRPC.Arbitrum variant: EthereumJSONRPC.Arbitrum

@ -16,7 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_call: ConfigHelper.eth_call_url(),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL")
], ],

@ -16,7 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_call: ConfigHelper.eth_call_url(),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL")
], ],

@ -14,6 +14,9 @@ config :explorer,
http: EthereumJSONRPC.HTTP.HTTPoison, http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"),
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
method_to_url: [
eth_call: ConfigHelper.eth_call_url()
],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]
], ],
variant: EthereumJSONRPC.Ganache variant: EthereumJSONRPC.Ganache

@ -16,6 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url(),
debug_traceTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") debug_traceTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL")
], ],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]

@ -16,7 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_call: ConfigHelper.eth_call_url(),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL")
], ],

@ -16,7 +16,7 @@ config :explorer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_call: ConfigHelper.eth_call_url(),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") trace_replayTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL")
], ],

@ -19,6 +19,9 @@ config :indexer,
http: EthereumJSONRPC.HTTP.HTTPoison, http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:8545", url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:8545",
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:8545")
],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]
], ],
variant: EthereumJSONRPC.Arbitrum variant: EthereumJSONRPC.Arbitrum

@ -22,6 +22,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",

@ -22,6 +22,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",

@ -19,6 +19,9 @@ config :indexer,
http: EthereumJSONRPC.HTTP.HTTPoison, http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545", url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545",
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:7545")
],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]
], ],
variant: EthereumJSONRPC.Ganache variant: EthereumJSONRPC.Ganache

@ -21,6 +21,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
debug_traceTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545" debug_traceTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545"
], ],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]

@ -22,6 +22,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",

@ -23,6 +23,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:8545"),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",
trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545", trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:8545",

@ -19,6 +19,9 @@ config :indexer,
http: EthereumJSONRPC.HTTP.HTTPoison, http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:8545", url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:8545",
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:8545")
],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]
], ],
variant: EthereumJSONRPC.Arbitrum variant: EthereumJSONRPC.Arbitrum

@ -21,6 +21,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url(),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),

@ -21,6 +21,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url(),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),

@ -19,6 +19,9 @@ config :indexer,
http: EthereumJSONRPC.HTTP.HTTPoison, http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545", url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545",
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
method_to_url: [
eth_call: ConfigHelper.eth_call_url("http://localhost:7545")
],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]
], ],
variant: EthereumJSONRPC.Ganache variant: EthereumJSONRPC.Ganache

@ -21,6 +21,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url(),
debug_traceTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") debug_traceTransaction: System.get_env("ETHEREUM_JSONRPC_TRACE_URL")
], ],
http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts]

@ -21,6 +21,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url(),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),

@ -23,6 +23,7 @@ config :indexer,
fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"),
fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"),
method_to_url: [ method_to_url: [
eth_call: ConfigHelper.eth_call_url(),
eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), eth_getBalance: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),
trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"), trace_replayBlockTransactions: System.get_env("ETHEREUM_JSONRPC_TRACE_URL"),

@ -182,4 +182,9 @@ defmodule ConfigHelper do
@spec chain_type() :: String.t() @spec chain_type() :: String.t()
def chain_type, do: System.get_env("CHAIN_TYPE") || "ethereum" def chain_type, do: System.get_env("CHAIN_TYPE") || "ethereum"
@spec eth_call_url(String.t() | nil) :: String.t() | nil
def eth_call_url(default \\ nil) do
System.get_env("ETHEREUM_JSONRPC_ETH_CALL_URL") || System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || default
end
end end

@ -6,6 +6,7 @@ DATABASE_URL=postgresql://blockscout:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout
# DATABASE_QUEUE_TARGET # DATABASE_QUEUE_TARGET
ETHEREUM_JSONRPC_TRACE_URL=http://host.docker.internal:8545/ ETHEREUM_JSONRPC_TRACE_URL=http://host.docker.internal:8545/
# ETHEREUM_JSONRPC_FALLBACK_TRACE_URL= # ETHEREUM_JSONRPC_FALLBACK_TRACE_URL=
# ETHEREUM_JSONRPC_ETH_CALL_URL=
# ETHEREUM_JSONRPC_HTTP_TIMEOUT= # ETHEREUM_JSONRPC_HTTP_TIMEOUT=
# CHAIN_TYPE= # CHAIN_TYPE=
NETWORK= NETWORK=

Loading…
Cancel
Save