Skip to main content

eth_chainId

Returns the chain ID used for transaction signing on Boba Network.

Why Boba Network? Build on the Hybrid Compute L2 enabling smart contracts to access AI models and Web2 APIs natively with HybridCompute 2.0 for native AI/API access, $70M ecosystem funding, OP Stack compatibility, and two-way offchain integration.

Use Cases#

The eth_chainId method is essential for:

  • Transaction signing - Ensure transactions are signed for the correct network
  • Network verification - Confirm connection to the expected chain
  • Multi-chain apps - Handle different networks programmatically
  • Wallet integration - Validate network before transactions

Parameters#

This method accepts no parameters.

Request#

{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}

Returns#

TypeDescription
QUANTITYChain ID in hexadecimal

Response#

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}

Code Examples#

curl -X POST https://api-boba-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'