Skip to main content

Overview

Configure HyperPaxeer in your applications using wagmi, viem, ethers.js, or web3.js.

Network Details

ParameterValue
Chain ID125
Network NameHyperPaxeer
Native CurrencyHPX (HyperPaxeer)
Decimals18
RPC Endpointhttps://public-rpc.paxeer.app/rpc
Block Explorerhttps://paxscan.io
Explorer APIhttps://paxscan.io/api

Configuration by Library

wagmi Configuration

Setup HyperPaxeer with wagmi for React applications.
wagmi-config.ts
import { createConfig, http } from 'wagmi'
import { defineChain } from 'viem'

export const paxeer = defineChain({
  id: 125,
  name: 'HyperPaxeer',
  network: 'paxeer',
  nativeCurrency: {
    decimals: 18,
    name: 'HyperPaxeer',
    symbol: 'HPX',
  },
  rpcUrls: {
    default: {
      http: ['https://public-rpc.paxeer.app/rpc'],
    },
    public: {
      http: ['https://public-rpc.paxeer.app/rpc'],
    },
  },
  blockExplorers: {
    default: {
      name: 'PaxScan',
      url: 'https://paxscan.io',
      apiUrl: 'https://paxscan.io/api',
    },
  },
})

export const config = createConfig({
  chains: [paxeer],
  transports: {
    [paxeer.id]: http(),
  },
})

Usage in React

App.tsx
import { WagmiProvider } from 'wagmi'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { config } from './wagmi-config'

const queryClient = new QueryClient()

function App() {
  return (
    <WagmiProvider config={config}>
      <QueryClientProvider client={queryClient}>
        <YourApp />
      </QueryClientProvider>
    </WagmiProvider>
  )
}
Install required packages: npm install wagmi viem @tanstack/react-query

MetaMask Configuration

Add HyperPaxeer to MetaMask programmatically:
async function addPaxeerNetwork() {
  try {
    await window.ethereum.request({
      method: 'wallet_addEthereumChain',
      params: [
        {
          chainId: '0xe5', // 125 in hex
          chainName: 'HyperPaxeer',
          nativeCurrency: {
            name: 'HyperPaxeer',
            symbol: 'HPX',
            decimals: 18,
          },
          rpcUrls: ['https://public-rpc.paxeer.app/rpc'],
          blockExplorerUrls: ['https://paxscan.io'],
        },
      ],
    });
    console.log('HyperPaxeer added to MetaMask');
  } catch (error) {
    console.error('Error adding network:', error);
  }
}

Environment Variables

Store your configuration in environment variables:
.env
# HyperPaxeer Configuration
PAXEER_RPC_URL=https://public-rpc.paxeer.app/rpc
PAXEER_CHAIN_ID=125
PAXEER_EXPLORER=https://paxscan.io

# Your private key (NEVER commit this!)
PRIVATE_KEY=your_private_key_here
Never commit private keys or sensitive credentials to version control. Use environment variables and add .env to your .gitignore.

Hardhat Configuration

hardhat.config.js
require("@nomicfoundation/hardhat-toolbox");
require('dotenv').config();

module.exports = {
  solidity: "0.8.20",
  networks: {
    paxeer: {
      url: process.env.PAXEER_RPC_URL,
      chainId: parseInt(process.env.PAXEER_CHAIN_ID),
      accounts: [process.env.PRIVATE_KEY],
    },
  },
  etherscan: {
    apiKey: {
      paxeer: process.env.ETHERSCAN_API_KEY || "YOUR_API_KEY",
    },
    customChains: [
      {
        network: "paxeer",
        chainId: 125,
        urls: {
          apiURL: "https://paxscan.io/api",
          browserURL: "https://paxscan.io",
        },
      },
    ],
  },
};

Foundry Configuration

foundry.toml
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
solc_version = "0.8.20"

[rpc_endpoints]
paxeer = "https://public-rpc.paxeer.app/rpc"

[etherscan]
paxeer = { key = "${ETHERSCAN_API_KEY}", url = "https://paxscan.io/api" }

Testing Connection

Verify your configuration is working:
import { publicClient } from './viem-config'

async function testConnection() {
  try {
    const blockNumber = await publicClient.getBlockNumber()
    console.log('✅ Connected! Current block:', blockNumber)
    console.log('✅ Chain ID:', publicClient.chain.id)
  } catch (error) {
    console.error('❌ Connection failed:', error)
  }
}

testConnection()

Next Steps

Quick Start

Follow our getting started guide

Smart Contracts

Deploy and interact with contracts

Examples

View complete integration examples

API Reference

Explore all available RPC methods