Sentre
Search…
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 app id, app url, senhub url based on the runtime environment. For example, the app url is localhost in development environment, however, it will be you Github Pages in production environment.
There are 2 methods to classify you configs. One is based on the runtime environment namely development, staging, and production. The other is based on the Solana network namely devnet, testnet, and mainnet.

Runtime Environment

1
import { env } from 'shared/runtime'
2
3
// development -> npm start
4
// staging -> npm run serve
5
// production -> npm run build
Copied!

Solana Network

1
import { net, chainId } from 'shared/runtime'
2
3
// devnet | testnet | mainnet
4
// 103 | 102 | 101
Copied!