Paxeer XDocs
How do I connect to Paxeer and read a balance?

Connect and read a balance

Point any Ethereum JSON-RPC client at a node endpoint, confirm it reports chain ID 0x7d, then read the balance. Read-only queries work without a signer or a PAX balance.

Verify the chain before signing
SettingValue
EVM chain ID125 / 0x7d
Consensus identifierhyperpax_125-1
Native gas coinuhpx (bond denom); bank metadata displays PAX at exponent 6 over uhpx. EVM amounts use wei, tracked as a sub-uhpx remainder.
  1. Verify the endpoint

    Set PAXEER_RPC_URL to your EVM endpoint. The result must be 0x7d, which is decimal 125. You can send the same request from here.

    Ask the endpoint for its chain IDbashReady
    : "${PAXEER_RPC_URL:?Set your Paxeer EVM RPC URL}"curl --fail-with-body --silent --show-error "$PAXEER_RPC_URL"   -H 'Content-Type: application/json'   --data '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
    From Query the EVM › Verify the endpoint
    eth_chainId
    The documentation names this node method but carries no typed signature for it. The pages below describe how Paxeer serves it.
    Node JSON-RPC
  2. Read the native balance

    cast balance returns native base units by default. The last command in this block only encodes calldata; it does not submit a transaction.

    Inspect an account with CastbashReady
    1cast block-number --rpc-url "$PAXEER_RPC_URL"2cast balance "$ACCOUNT_ADDRESS" --rpc-url "$PAXEER_RPC_URL"3cast nonce "$ACCOUNT_ADDRESS" --rpc-url "$PAXEER_RPC_URL"4cast code "$CONTRACT_ADDRESS" --rpc-url "$PAXEER_RPC_URL"5cast call "$CONTRACT_ADDRESS" 'balanceOf(address)(uint256)' "$ACCOUNT_ADDRESS"   --rpc-url "$PAXEER_RPC_URL"6cast calldata 'transfer(address,uint256)' "$ACCOUNT_ADDRESS" 42
    From Query the EVM › Inspect accounts and contracts with Cast
    eth_getBalance
    The documentation names this node method but carries no typed signature for it. The pages below describe how Paxeer serves it.
    Node JSON-RPC
  3. Read a token balance at one block

    Install viem, save the example as read-token.mjs, set TOKEN_ADDRESS and ACCOUNT_ADDRESS, then run it. The reads run concurrently at the same block.

    read-token.mjsjavascriptReady
    1import { createPublicClient, formatUnits, getAddress, http, parseAbi } from "viem";23const rpcUrl = process.env.PAXEER_RPC_URL;4if (!rpcUrl) throw new Error("Set PAXEER_RPC_URL");5const token = getAddress(process.env.TOKEN_ADDRESS ?? "");6const account = getAddress(process.env.ACCOUNT_ADDRESS ?? "");7const client = createPublicClient({ transport: http(rpcUrl) });8if (await client.getChainId() !== 125) throw new Error("Unexpected chain ID");910const blockNumber = await client.getBlockNumber();11const abi = parseAbi([12  "function decimals() view returns (uint8)",13  "function symbol() view returns (string)",14  "function balanceOf(address owner) view returns (uint256)",15]);16const [decimals, symbol, balance] = await Promise.all([17  client.readContract({ address: token, abi, functionName: "decimals", blockNumber }),18  client.readContract({ address: token, abi, functionName: "symbol", blockNumber }),19  client.readContract({ address: token, abi, functionName: "balanceOf", args: [account], blockNumber }),20]);21console.log({ block: blockNumber.toString(), symbol, balance: formatUnits(balance, decimals) });
    From Query the EVM › Read token data at one block
Check the body, not only the status

HTTP 200 can still contain a JSON-RPC error. The consensus RPC server exposes routes such as /status; it is not interchangeable with the EVM JSON-RPC listener.

Ask next

6 blocks are shown verbatim from the documentation, and every identifier in the text was found there.

Reviewed answer
Connect and read a balance · Paxeer X Docs