I have access to a private chain Ethereum node that is accessible via http https://sustainability-chain.info (e.g. i can access it with metamask using special RPC and networkid 20030117

Based on https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_blocknumber I would like to change

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' sustainability-chain.info 

which actually works better using:

curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' sustainability-chain.info

into something like:


but that does not work

Any idea what I am doing wrong?

  • 1
    You need a server that accepts input in your desired syntax and make a translation to the RPC syntax accepted by geth, and to return the result. I don't know a product that does that automatically. – Ismael Apr 22 '19 at 17:37
  • thank you. I installed web3 and access the information with java-scripts now – Hans-Ueli M. Apr 22 '19 at 20:48

This worked for me:

curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"eth_blockNumber","id":1}' https://sustainability-chain.info
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.