Skip to main content

Connect to PressChain

A PressChain integration begins with two different connections: a read connection to JSON-RPC and a user authorization connection through PressKey. Keeping them separate makes the application easier to secure and easier to operate. For reads, use the canonical V3 RPC endpoint:
The current testnet Chain ID is 77117002, or 0x498B64A in hexadecimal.

Web application setup

A browser application can read through JSON-RPC directly and use PressKey only when the user needs to authorize an action.
Run this check during application startup or before enabling network-sensitive features. Do not wait until the user signs a transaction to discover the app is pointed at a different chain.

Detect PressKey

PressKey currently exposes an EIP-style provider. It also assigns itself to window.ethereum when another provider has not already claimed that name, but PressChain-native applications should prefer window.presschain explicitly.

Backend setup

Backends that only read network state do not need a wallet at all.
This is the correct place for block reads, log indexing, balance checks and read-only eth_call operations. It is not the correct place for storing user signing keys.

Configuration you should keep together

Treat network and deployment values as a coherent environment package:
Load the contract map from an approved deployment manifest. This prevents a common failure mode where one page points at the new evidence registry while another still calls an older contributor contract.

First health checks

Before building product features, verify these conditions:
  1. eth_chainId returns the expected testnet ID.
  2. eth_blockNumber advances over time.
  3. Your application can perform eth_call against a known deployed contract.
  4. PressKey can be detected on an allowed PressChain domain.
  5. Account and network change events update application state.
Once those are true, continue to Read Chain State. That guide establishes a reliable read path before any user write is introduced.