Portal supports custom ZK Stack Hyperchain nodes.
There are a few different ways to configure the application:
If you're using ZK Stack, just link your zksync-era repo directory to configure Portal.
- If you haven't already setup your hyperchain yet, follow the instructions
- Make sure to install the dependencies:
npm install
- 🔄 Pull your hyperchain config files by running:
This will regenerate
npm run hyperchain:configure
/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.
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;
shortName: string;
blockExplorerUrl?: string; // L2 Block Explorer URL
hidden?: boolean; // Hidden in the network selector
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
If your Hyperchain is connected to L1, you can also access Bridge on /bridge
page.