problem: doesn't work for private ethereum networks

solution: allow configuring methods with static responses
rel: #96
This commit is contained in:
Rafael Matias
2021-11-12 18:55:41 +01:00
committed by GitHub
parent b6a05d67df
commit ee5b14b300
6 changed files with 74 additions and 6 deletions

View File

@@ -218,6 +218,27 @@ NOTE: It's especially useful when used together with upstream labels.If an archi
possible to specify that the client wants to execute method `trace_transaction` only on an archive node(s), which has
complete historical data for tracing.
=== Static Methods
You can overwrite existing methods or add new ones using a static response:
[source, yaml]
----
upstreams:
- id: my-node
chain: ethereum
methods:
enabled:
- name: net_version
static: "\"100000\""
- name: eth_chainId
static: "0x186a0"
- name: eth_custom_array
static: '["custom_array_response"]'
- name: eth_custom_bool
static: "false"
----
=== Authentication
==== TLS
@@ -234,4 +255,4 @@ NOTE: Please note that `key` must be encoded with _PKCS 8_
For JSON RPC and Websockets a Basic Authentication can be used:
- `username` - username
- `password` - password
- `password` - password