createToken
Creates a new token with bonding curve mechanics.Function Signature
Parameters
Token metadata struct containing:
name
: Token nameticker
: Token symbol (max 11 characters)description
: Token descriptionimageUrl
: URL to token logotelegram
: Telegram link (optional)twitter
: Twitter/X link (optional)website
: Website URL (optional)owner
: Set by contractcreatedAt
: Set by contract
Referral code for tracking
Must send exactly 0.001 ETH as creation fee
Returns
The deployed token contract address
Example
createAndBuyToken
Creates a token and makes an initial purchase in one transaction.Function Signature
Parameters
Same structure as createToken
Referral code for both creation and purchase
Total ETH to send (0.001 ETH creation fee + purchase amount)
Returns
The deployed token contract address
Key Behaviors
- More gas efficient than separate transactions
- Initial purchase has 24-hour lock period
- Excess ETH beyond funding goal is refunded
- Subject to anti-snipe fees if applicable
Example
Token Metadata Structure
Error Handling
Creation Errors
Creation Errors
InsufficientETH
: Less than 0.001 ETH providedInvalidMetadata
: Missing required fieldsETHTransferFailed
: Refund transfer failed
Validation Rules
Validation Rules
- Name, ticker, description, and imageUrl are required
- Ticker maximum 11 characters
- Creation fee exactly 0.001 ETH
- Owner and createdAt set by contract
Gas Optimization: Use
createAndBuyToken
when planning to buy immediately after creation to save ~30% on gas costs.