Instead of making up symbolic names for the different types of URLs we need, have the configuration be a base `url` for a fallback and then entries under `method_to_url` which maps a JSONRPC method name to a the URL to use. This allows the devops running the JSONRPC nodes to say which nodes support which methods specifically, which is easier than knowing which symbolic name uses which methods. It also means we don't need separate variant specific symbolic names since the variants will be able to use their own method names in this new format for the config.pull/335/head
parent
88bb8a3b55
commit
72373f7770
@ -1,6 +1,5 @@ |
|||||||
use Mix.Config |
use Mix.Config |
||||||
|
|
||||||
config :ethereum_jsonrpc, |
config :ethereum_jsonrpc, |
||||||
trace_url: "https://mainnet.infura.io/mew", |
|
||||||
url: "https://mainnet.infura.io/mew", |
url: "https://mainnet.infura.io/mew", |
||||||
variant: EthereumJSONRPC.Geth |
variant: EthereumJSONRPC.Geth |
||||||
|
@ -1,6 +1,9 @@ |
|||||||
use Mix.Config |
use Mix.Config |
||||||
|
|
||||||
config :ethereum_jsonrpc, |
config :ethereum_jsonrpc, |
||||||
trace_url: "https://sokol-trace.poa.network", |
|
||||||
url: "https://sokol.poa.network", |
url: "https://sokol.poa.network", |
||||||
|
method_to_url: [ |
||||||
|
eth_getBalance: "https://sokol-trace.poa.network", |
||||||
|
trace_replayTransaction: "https://sokol-trace.poa.network" |
||||||
|
], |
||||||
variant: EthereumJSONRPC.Parity |
variant: EthereumJSONRPC.Parity |
||||||
|
Loading…
Reference in new issue