Sentre Legacy
  • 🥳Welcome
  • Getting Started
  • DApp Manifest
  • Folder Structure
  • Available Scripts
  • Development
    • View
    • Model & Controllers
    • Providers
      • UI Provider
      • Wallet Provider
      • Account Provider
      • Mint Provider
    • Static
    • Global variables
    • Configs
  • Advanced Usage
    • ☀️Theme
    • 👘Customizing Styles
    • 🪝Hooks
  • 🤩Submitting DApps
  • References
  • Best Practices
  • Troubleshoots
  • 🎨Design Pricinples
    • Button
    • Card
    • Checkbox
    • Color
    • Corner radius
    • Drawer
    • Dropdown
    • Grid
    • Icons
    • Input
    • List
    • Menu
    • Modal
    • Radio
    • Select
    • Shadow
    • Spacing
    • Switch
    • Tabs
    • Tooltip
    • Table
    • Typography
  • 📄Litepaper
    • Introduction
    • Industry Problems
    • Sentre: An All-in-one Solution
      • The Open Protocol
      • Liquidity Efficiency
    • SEN as the Heart of the Ecosystem
      • Asymmetric Deposit
      • Adaptive Fee Model
      • The Triad Pool
      • Simulated Mesh Trading
      • Token Use Cases
    • Conclusion
Powered by GitBook
On this page
  • Runtime Environment
  • Solana Network
  1. Development

Configs

Config for multiple runtime environments and multiple Solana networks.

PreviousGlobal variablesNextAdvanced Usage

Last updated 2 years ago

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 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
Github Pages