Configs

Config for multiple runtime environments and multiple Solana networks.

In the template, the app has already had a manifest config which is to determine the DApp's id, DApp's url based on the runtime environment. For example, the DApp's url is localhost in the development environment, however, it will be your Github Pages in the production environment.

There are 2 methods to classify you configs. One is based on the runtime environment namely development and production. The other is based on the Solana network namely devnet, testnet, and mainnet.

Runtime Environment

import { env } from '@sentre/senhub'

// development -> npm start
// production -> npm run build

Solana Network

import { net, chainId } from '@sentre/senhub'

// devnet | testnet | mainnet
// 103 | 102 | 101

Last updated