Portal supports custom ZK Stack Hyperchain nodes.
There are a few different ways to configure the application:
Fill out a simple form to configure the application.
- Make sure to install the dependencies:
npm install
- 🌟 Follow the instructions in the terminal:
This will regenerate
npm run hyperchain:create
/hyperchains/config.json
file. You can edit this file manually if needed. - 🚀 Now you can start or build the application. See Development or Production section below for more details.
Manually configure the application by editing the config file.
- 🔗 Add your network information to
/hyperchains/config.json
config file. See example config file in/hyperchains/example.config.json
- 🚀 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;
}>
}>
Read more in the main README: Advanced configuration
Make sure to install the dependencies:
npm install
Start the development server on http://localhost:3000
npm run dev:node:hyperchain
Build the application for production:
npm run generate:node:hyperchain