HBAR decimal places
The Hiero JSON RPC Relaymsg.value uses 18 decimals when it returns HBAR. As a result, the gasPrice value returns 18 decimal places since it is only utilized from the JSON RPC Relay. Refer to the HBAR page for a list of Hiero APIs and the decimal places they return.
JSON RPC Relay Options for the Hedera Network
When interacting with smart contracts on Hedera, developers have several options for setting up a JSON RPC Relay. Each choice comes with unique advantages and trade-offs based on your project’s needs, scalability, and operational preferences.- Hiero Local Node: It provides a built-in JSON RPC Relay and simulates the Hedera network environment locally. This option is ideal for quick prototyping, debugging, and isolated testing without external dependencies. It’s ideal if you want to run extensive and repeated tests without having to worry about running out of testnet HBAR.
- Self-hosted JSON RPC Relay: Running your own JSON RPC Relay offers complete control over configurations and network selection (testnet, previewnet, mainnet). It is best suited for projects requiring flexibility, high reliability, and scalability, especially in production environments.
- Third-party JSON RPC Relay Services: Several third-party providers offer managed JSON RPC Relay services with different levels of reliability, service-level agreements (SLAs), and fee structures. These services remove infrastructure maintenance overhead, allowing teams to focus more on development (you can find the list of supported services below).
| Feature | Hiero Local Node | Self-hosted RPC Relay | Third-party RPC Relay |
|---|---|---|---|
| Infrastructure Management | Minimal | Required | None |
| Reliability and Stability | High (local) | High | Variable by SLA |
| Scalability | / (local) | Flexible | Variable by provider |
| Setup Complexity | Low to Medium | Medium to High | Low |
| Ideal Use Case | Testing & Development | Testing & Production | Builders who prefer convenience & Production |
Read the JSON RPC Relay Comparison blog post to learn more about the different options!
Community Hosted JSON-RPC Relays
Anyone in the community can set up their own JSON RPC relay that applications can use to deploy, query, and execute smart contracts. The list of community-hosted Hiero JSON RPC relays and endpoints for previewnet, testnet, and mainnet can be found in the table below, as well as their associated docs or websites.JSON-RPC Relay Endpoints
| Network | Chain ID | Hashio RPC URL | thirdweb RPC URL |
|---|---|---|---|
| Mainnet | 295 | https://mainnet.hashio.io/api | https://295.rpc.thirdweb.com |
| Testnet | 296 | https://testnet.hashio.io/api | https://296.rpc.thirdweb.com |
| Previewnet | 297 | https://previewnet.hashio.io/api** | https://297.rpc.thirdweb.com |
🚨 PLEASE NOTE
Hashio is for development and testing purposes only. Production use cases are strongly encouraged to use commercial-grade JSON-RPC relays or host their own instance of the Hiero JSON-RPC Relay.Note
If you want to add your hosted JSON-RPC relay to this list, please open an issue in the Hedera docs GitHub repository. Please visit the community-hosted websites to review any limitations specific to their instance.How to Connect to the Hedera Network over RPC
FAQ
Are there Community hosted relays?
Are there Community hosted relays?
How do I connect to the Hedera Network over RPC?
How do I connect to the Hedera Network over RPC?
The configuration guide to connect to the Hedera Network over RPC can be found here.
Where can I find the Hiero JSON-RPC relay endpoints?
Where can I find the Hiero JSON-RPC relay endpoints?
The endpoints for previewnet, testnet, and mainnet can be found on Hashio, accessible through the Hashgraph website. Feel free to join the discussion on Stack Overflow for more questions.
How does Hedera handle decimals in HBAR and gas prices?
How does Hedera handle decimals in HBAR and gas prices?
The JSON-RPC Relay
msg.value uses 18 decimals when it returns HBAR. The gasPrice value also returns 18 decimal places. Check out the HBAR page for the full list of Hedera APIs and their decimal representation.How can I contribute or log errors?
How can I contribute or log errors?
To contribute or log errors, please refer to the Contributing Guide and submit them as issues in the GitHub repository.







