swapper-org / NodeChain

Nodechain is a service that allows you to create nodes on a blockchain and connect to them natively through APIs. The goal is to allow the user to build their own nodes natively without having to rely on external services.
MIT License
7 stars 5 forks source link

Sometimes method `getAddressesHistory` doesn't work with Infura #170

Closed hippocampusSwapper closed 2 years ago

hippocampusSwapper commented 2 years ago

Issue

Sometimes method getAddressesHistory doesn't work with Infura.

Steps to reproduce:

  1. Send request:
curl 'https://server.nodechain.net/eth/infura-mainnet/rpc' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: es,en-GB;q=0.9,en-US;q=0.8,en;q=0.7' \
  -H 'Access-Control-Allow-Origin: *' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:1212' \
  -H 'Referer: http://localhost:1212/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'Sec-GPC: 1' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36' \
  --data-raw '{"params":{"addresses":["0xfd78f9e39c32212afb44ff0a7242e7298e8a5d27"]},"method":"getAddressesHistory","id":1,"jsonrpc":"2.0"}' \
  --compressed

You will receive this response:

{"message": "list indices must be integers or slices, not str", "code": 500}

Useful data to search in logs:

image