1

When I want to query the ethereum blockchain I use infura server with a curl command like this:

curl https://mainnet.infura.io/v3/2a8c33bac50647a6be2638a92f9d4a4c
-X POST
-H "Content-Type: application/json"
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":[0xfe05a3e72235c9f92fd9f2282f41a8154d6d342b, "latest"],"id":1}'

This work well, but what if I want to use another chain like a testnet ?

1

See the Choose a Network section of the Infura docs.

All the main testnets have associated HTTPS and websocket endpoints. You'll need to register for a (free) API key though, if you haven't already.

If you want to use another chain, you'll have to refer to the associated docs to determine what endpoints are available. (e.g. The Binance Smart Chain endpoints are listed in their docs, here.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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