Skip to content

Latest commit

 

History

History
104 lines (81 loc) · 2.76 KB

README.md

File metadata and controls

104 lines (81 loc) · 2.76 KB

🚀 Hyperchain Portal Setup

Portal supports custom ZK Stack Hyperchain nodes.


⚙️ Configuration

There are a few different ways to configure the application:

🖊️ Configure automatically with form

Fill out a simple form to configure the application.
  1. Make sure to install the dependencies:
    npm install
  2. 🌟 Follow the instructions in the terminal:
    npm run hyperchain:create
    This will regenerate /hyperchains/config.json file. You can edit this file manually if needed.
  3. 🚀 Now you can start or build the application. See Development or Production section below for more details.

✏️ Configure manually

Manually configure the application by editing the config file.
  1. 🔗 Add your network information to /hyperchains/config.json config file. See example config file in /hyperchains/example.config.json
  2. 🚀 Now you can start or build the application. See Development or Production section below for more details.
Hyperchain config.json structure
Array<{
  network: {
    key: string;
    id: number; // L2 Network ID
    rpcUrl: string; // L2 RPC URL
    name: string;
    blockExplorerUrl?: string; // L2 Block Explorer URL
    blockExplorerApi?: string; // L2 Block Explorer API
    hidden?: boolean; // Hidden in the network selector
    publicL1NetworkId?: number; // If you wish to use Ethereum Mainnet or Ethereum Sepolia Testnet with default configuration. Can be provided instead of `l1Network`
    l1Network?: { // @wagmi `Chain` structure https://wagmi.sh/core/chains#build-your-own
      // minimal required fields shown
      id: number;
      name: string;
      network: string;
      nativeCurrency: { name: string; symbol: string; decimals: number };
      rpcUrls: {
        default: { http: [ string ] },
        public: { http: [ string ] }
      }
    };
  },
  tokens: Array<{ // Should at least contain the `ETH` token (see `/hyperchains/example.config.json` for example)
    address: string;
    l1Address?: string;
    name?: string;
    symbol: string;
    decimals: number;
    iconUrl?: string;
    price?: number;
  }>
}>

🛠 Development

Advanced configuration

Read more in the main README: Advanced configuration

🔧 Setup

Make sure to install the dependencies:

npm install

🌐 Development Server

Start the development server on http://localhost:3000

npm run dev:node:hyperchain

🏭 Production

Build the application for production:

npm run generate:node:hyperchain