Token Factories
Token Metadata
All token launches require metadata:
type TokenMetadata = {
name: string; // Token name (e.g., "My Token")
symbol: string; // Token symbol (e.g., "MTK")
decimals?: number; // Number of decimals (default: 9)
uri?: string; // Optional URI to JSON metadata
};Creating Token Metadata Helper
The SDK provides a createTokenMetadata() helper function that validates and formats your token metadata:
import { createTokenMetadata } from "@vertigo-amm/vertigo-sdk";
// Create and validate token metadata
const metadata = createTokenMetadata(
"My Amazing Token", // name (max 32 characters)
"MAT", // symbol (max 10 characters)
"https://example.com/token-metadata.json" // URI to off-chain metadata
);The helper automatically:
✅ Validates name length (1-32 characters)
✅ Validates symbol length (1-10 characters)
✅ Trims whitespace from all fields
✅ Uppercases the symbol
✅ Ensures URI is provided
✅ Throws clear error messages if validation fails
Example with factory:
Example: Launch a simple token
Create a token without a pool:
Example: Launch a Token-2022 token
The same API works for Token-2022:
Example: Launch token with liquidity pool
Create a token and pool in one operation:
Example: Launch with custom timing
Schedule a launch for a specific time:
Parameters Reference
LaunchTokenParams
metadata - Token metadata object
name - Token display name
symbol - Token symbol/ticker
decimals - Number of decimals (default: 9)
uri - Optional metadata URI
supply - Total token supply in whole units
useToken2022 - Use Token-2022 instead of SPL (default: false)
LaunchTokenWithPoolParams
All of LaunchTokenParams, plus:
initialMarketCap - Starting market cap in lamports
royaltiesBps - Trading fee in basis points (e.g., 250 = 2.5%)
launchTime - Optional Unix timestamp for scheduled launch
Migration from v1
v1 (Old) - SPL Token Factory
v2 (New) - Unified Factory
Key Improvements in v2
No initialization required - Just launch directly
Simplified parameters - No need to specify token programs, authorities, etc.
Unified interface - Same API for SPL and Token-2022
Automatic handling - Token accounts, minting, etc. handled automatically
Better error messages - Clear, actionable error messages
Type safety - Full TypeScript support with IntelliSense
Advanced: Pool Authority Client
For advanced pool management and custom configurations, use the Pool Authority Client:
The Pool Authority Client is for advanced users who need fine-grained control over pool creation. Most users should use the standard Factory Client's launchTokenWithPool() method.
Custom Token Factories
While Vertigo provides default factories, you can build custom factories for your specific launchpad needs:
Use the Factory Client as a starting point
Extend functionality with custom validation
Add custom metadata or launch mechanics
Integrate with your own smart contracts
For guidance on building custom factories, see Designing Token Factories.
Error Handling
Tips
The initial supply is minted to your wallet's associated token account
Market cap is the initial virtual SOL backing the pool
Royalties are trading fees that accrue to the pool owner
Always test on devnet before launching on mainnet
Consider using
launchTimefor coordinated launchesToken-2022 offers advanced features but requires compatible wallets
Use the
createTokenMetadata()helper to ensure metadata is properly validated
Last updated

