| title | Config System | ||||
|---|---|---|---|---|---|
| category | libs | ||||
| tags |
|
||||
| confidence | high | ||||
| source | internal/config/config.go, internal/config/validators.go, .github/assets.config.yaml | ||||
| updated | 2026-07-22 |
The config system is loaded once at startup via config.SetConfig(configPath) (using Viper) and accessed globally as config.Default.
Config
├── App.LogLevel — log level for sirupsen/logrus
├── ClientURLs
│ ├── Binance.{Dex,Explorer} — Binance chain API URLs
│ └── AssetsManagerAPI — https://assets.trustwallet.com/api
├── URLs
│ ├── AssetsApp — CDN base URL
│ └── Logo — Trust Wallet logo URL
├── TimeFormat — Go time parse format string
└── ValidatorsSettings — per-folder-type rules (see below)
Each field configures what files are allowed (or required) in each folder type:
| Field | Type | Purpose |
|---|---|---|
RootFolder |
{AllowedFiles, SkipFiles, SkipDirs} |
Top-level repo root rules |
ChainFolder |
{AllowedFiles} |
Per-blockchain folder |
AssetFolder |
{AllowedFiles} |
Per-token asset folder |
ChainInfoFolder |
{HasFiles} |
Chain info sub-folder |
ChainValidatorsAssetFolder |
{HasFiles} |
Staking validator assets |
DappsFolder |
{Ext} |
Required file extension in dapps |
CoinInfoFile.Tags |
[]Tag{ID,Name,Description} |
Allowed coin tags |
.github/assets.config.yaml (can be overridden via --config flag). The config file is part of the repo and version-controlled.