This guide covers all configuration options available in SolForge's sf.config.json file.
{
"name": "string",
"description": "string (optional)",
"tokens": [
/* TokenConfig[] */
],
"programs": [
/* ProgramConfig[] */
],
"localnet": {
/* LocalnetConfig */
}
}- Type:
string - Default:
"solforge-localnet" - Description: Name identifier for your localnet configuration
- Type:
string - Description: Human-readable description of your setup
- Type:
TokenConfig[] - Default:
[] - Description: Array of tokens to clone from mainnet
- Type:
ProgramConfig[] - Default:
[] - Description: Array of programs to clone from mainnet
- Type:
LocalnetConfig - Description: Validator configuration options
- Type:
string - Description: Token symbol (e.g., "USDC", "SOL")
- Example:
"USDC"
- Type:
string - Description: Mainnet mint address to clone
- Example:
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
- Type:
string - Description: Path to keypair file for mint authority
- Example:
"./keypairs/mint-authority.json" - Note: If not provided, a new keypair will be generated
- Type:
number - Default:
1000000 - Description: Amount to mint to the mint authority
- Note: Amount is in token's base units (considering decimals)
- Type:
boolean - Default:
true - Description: Whether to clone token metadata from mainnet
- Type:
RecipientConfig[] - Default:
[] - Description: List of wallets to receive tokens after minting
{
"wallet": "string (required)",
"amount": "number (required)"
}wallet: Public key of recipient walletamount: Amount to transfer (in token's base units)
{
"symbol": "USDC",
"mainnetMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"mintAuthority": "./keypairs/usdc-mint.json",
"mintAmount": 10000000000,
"cloneMetadata": true,
"recipients": [
{
"wallet": "YourWalletPublicKeyHere",
"amount": 1000000000
},
{
"wallet": "AnotherWalletPublicKeyHere",
"amount": 500000000
}
]
}- Type:
string - Description: Friendly name for the program
- Example:
"Jupiter Aggregator"
- Type:
string - Description: Mainnet program ID to clone
- Example:
"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"
- Type:
string - Description: Path to local .so file to deploy instead of cloning
- Example:
"./target/deploy/my_program.so"
- Type:
boolean - Default:
false - Description: Whether the program should be deployed as upgradeable
- Type:
"mainnet-beta" | "devnet" | "testnet" - Default:
"mainnet-beta" - Description: Source cluster to clone the program from
- Type:
string[] - Default:
[] - Description: Array of program IDs this program depends on
- Note: Dependencies will be deployed before this program
{
"name": "Jupiter Aggregator",
"mainnetProgramId": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
"cluster": "mainnet-beta",
"upgradeable": false,
"dependencies": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"]
}- Type:
number - Default:
100 - Description: SOL amount for initial airdrops
- Unit: SOL
- Type:
string[] - Default:
[] - Description: Public keys to receive initial SOL airdrops
- Type:
number - Default:
8899 - Range:
1000-65535 - Description: RPC port for the validator
- Type:
number - Default:
9900 - Range:
1000-65535 - Description: Faucet port for the validator
- Type:
boolean - Default:
false - Description: Whether to reset the ledger on startup
- Type:
"trace" | "debug" | "info" | "warn" | "error" - Default:
"info" - Description: Validator log level
- Type:
boolean - Default:
false - Description: Suppress validator output
- Type:
string - Description: Custom path for ledger data
- Note: If not specified, uses default location
- Type:
string - Default:
"127.0.0.1" - Description: IP address to bind the validator to
- Type:
number - Default:
100000 - Description: Maximum ledger size in slots
- Type:
string(URL) - Default:
"https://api.mainnet-beta.solana.com" - Description: RPC URL for cloning data from mainnet
{
"airdropAmount": 1000,
"faucetAccounts": ["YourWalletPublicKeyHere", "AnotherWalletPublicKeyHere"],
"port": 8899,
"faucetPort": 9900,
"reset": false,
"logLevel": "debug",
"quiet": false,
"bindAddress": "0.0.0.0",
"limitLedgerSize": 50000,
"rpc": "https://mainnet.helius-rpc.com/?api-key=your-key"
}{
"name": "defi-development",
"description": "DeFi development environment with popular tokens and DEX programs",
"tokens": [
{
"symbol": "USDC",
"mainnetMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"mintAmount": 10000000000,
"cloneMetadata": true,
"recipients": [
{
"wallet": "YourWalletPublicKeyHere",
"amount": 1000000000
}
]
},
{
"symbol": "USDT",
"mainnetMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
"mintAmount": 10000000000,
"cloneMetadata": true,
"recipients": [
{
"wallet": "YourWalletPublicKeyHere",
"amount": 1000000000
}
]
}
],
"programs": [
{
"name": "Jupiter Aggregator",
"mainnetProgramId": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
"cluster": "mainnet-beta"
},
{
"name": "Orca",
"mainnetProgramId": "9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP",
"cluster": "mainnet-beta"
},
{
"name": "Token Metadata",
"mainnetProgramId": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
"cluster": "mainnet-beta"
}
],
"localnet": {
"airdropAmount": 1000,
"faucetAccounts": ["YourWalletPublicKeyHere"],
"port": 8899,
"faucetPort": 9900,
"reset": false,
"logLevel": "info",
"bindAddress": "127.0.0.1",
"limitLedgerSize": 100000,
"rpc": "https://api.mainnet-beta.solana.com"
}
}SolForge validates your configuration file using Zod schemas. Common validation errors:
β Token symbol is required
β Mainnet mint address is required
β Mint amount must be positive
β Wallet address is required for recipients
β Program ID is required
β Invalid cluster (must be mainnet-beta, devnet, or testnet)
β Port must be between 1000 and 65535
β RPC must be a valid URL
β Log level must be one of: trace, debug, info, warn, error
- Use descriptive names: Make your configuration name and description clear
- Start small: Begin with a few tokens/programs and add more as needed
- Use custom RPC: Consider using a dedicated RPC endpoint for better performance
- Manage keypairs: Store mint authority keypairs securely
- Port management: Use different ports for multiple environments
- Reset wisely: Use
reset: truefor clean starts,falsefor persistent data - Log levels: Use
debugfor development,infofor production
{
"name": "dev-environment",
"localnet": {
"reset": true,
"logLevel": "debug",
"airdropAmount": 1000
}
}{
"name": "test-environment",
"localnet": {
"reset": false,
"logLevel": "warn",
"quiet": true
}
}{
"name": "prod-like-environment",
"localnet": {
"reset": false,
"logLevel": "error",
"limitLedgerSize": 1000000,
"rpc": "https://your-premium-rpc-endpoint.com"
}
}