eth_chainId

The eth_chainId method returns the chain ID of the current Tron network. The chain ID is a unique identifier for different Tron networks (728126428 for mainnet, 3448148188 for Nile testnet, etc.) and is crucial for preventing replay attacks across different networks.

This method is essential for wallet applications and transaction signing to ensure transactions are executed on the intended network. By including the chain ID in the transaction signature (as defined in EIP-155), transactions signed for one network cannot be replayed on another network, protecting users from cross-chain replay attacks. Applications should verify the chain ID matches their expected network before signing or broadcasting transactions.


Parameters

This method does not require any parameters.

Return Object
field
type
description
result
string
The chain ID encoded as a hexadecimal string. Common values include: 0x2b6653dc (728126428) for Tron mainnet, 0xcd8690dc (3448148188) for Nile testnet. The chain ID ensures transactions cannot be replayed across different Tron networks.
Request Example
Request
Response Example
Response

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?