Avalanche
Avalanche
Avalanche
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
https://avalanche.therpc.io/YOUR_API_KEY and send it in the Authorization header.eth_subscribe instead of polling.The Avalanche C-Chain API uses the standard JSON-RPC error codes, summarized in the table below: -32700 for a parse error, -32600 for an invalid request, -32601 for a method that was not found, -32602 for invalid params, -32603 for an internal error, and the -32000 to -32099 range for server errors. Four habits make error handling robust: always check the error field before using a result, retry transient failures with exponential backoff, log the full error details for debugging, and set sensible timeouts so a slow call never hangs your application.
| 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 with the transaction hash until a receipt appears, or subscribe to updates in real time with eth_subscribe over WebSocket. On the C-Chain's fast finality, receipts typically arrive within a couple of seconds.eth_getTransactionCount, increment it per transaction, and use an application-level queue so you never send two transactions with the same nonce.eth_blockNumber advance, listen to newHeads via eth_subscribe to react to new blocks, and verify finality by re-reading the block with eth_getBlockByNumber. Avalanche's Snowman consensus reaches finality quickly, but waiting for confirmations is still good practice for high-value operations.net_version.0xa86a in hex), which you can verify at runtime with eth_chainId before signing transactions.eth_blockNumber call, and monitor latency and quota as you scale up.