Ethereum
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Ethereum
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_getBalance, eth_call, eth_sendRawTransaction. Use the WebSocket endpoint when you need the node to push data to you: new blocks each 12-second slot, live logs, or pending transactions via eth_subscribe, which only works over WebSocket.The Ethereum endpoint returns the standard JSON-RPC error codes, summarized in the table below: -32700 for unparseable JSON, -32600 for a malformed request object, -32601 for an unknown method name, which is usually a misspelling or a namespace your tier has not unlocked, -32602 for bad params like a malformed address or block tag, -32603 for an internal node error, and the -32000 to -32099 range for server-side conditions. Four habits keep error handling sane: always check whether the error field is present before reading result; retry transient failures and rate limits with exponential backoff rather than tight loops; log the code and message so you can tell a bad address from a node hiccup; and set request timeouts so a slow call fails cleanly instead of hanging.
| Code | Meaning |
|---|---|
-32700 | Parse error |
-32600 | Invalid request |
-32601 | Method not found |
-32602 | Invalid params |
-32603 | Internal error |
-32000 to -32099 | Server error |
eth_getTransactionReceipt by hash — a null result means it is still pending, a receipt means it landed. For a push-based approach, subscribe to newHeads over WebSocket and check for your hash as each block arrives.eth_getTransactionCount, then assign each outgoing transaction the next integer and submit them through an application-level queue so a gap never leaves later ones stuck in the queued pool.latest block as settled. For anything involving money, read at the finalized tag via eth_getBlockByNumber — once Casper FFG finalizes a checkpoint (about 12.8 minutes, two epochs), it cannot be reverted without a third of all staked ETH being slashed. Wait for confirmations by watching eth_blockNumber climb, or use safe when you want a softer guarantee than finalized but firmer than latest.net_version, which returns 1 for mainnet.eth_chainId; it returns 0x1, the hex for chain ID 1. Because the code is portable across networks, this check is the cheapest guard against accidentally sending a real transaction against a testnet or vice versa.eth_blockNumber call before anything heavier. Watch latency and CU usage in the Dashboard as you ramp up, then point the same code at chain 1 by swapping the endpoint.