Reference
Smart contracts
The launchpad is a single Launchpad contract plus a per-token MemeToken (ERC-20) and the pure NameLib canonicalizer. Everything you need to integrate directly is here.
Write functions
| Function | Notes |
|---|---|
create(string name, string symbol, string tokenURI) → address | payable — Registers the name/symbol, mints the token, opens the curve. Any ETH sent is a dev buy in the same tx. |
buy(address token, uint256 minTokensOut, uint256 deadline) → tokensOut | payable — Spends msg.value ETH on the curve. Reverts on slippage or expiry. |
sell(address token, uint256 tokenAmount, uint256 minEthOut, uint256 deadline) → ethOut | Requires a prior ERC-20 approve of the launchpad. |
claimCreatorFees() → amount | Withdraw your accrued creator fees (70% of trade fees on your tokens). Reverts ZeroAmount if nothing to claim. |
setFee(uint256 bps, address recipient) | owner — Reverts with FeeTooHigh above 100 bps (1%). |
Read functions
| Function | Returns |
|---|---|
canonicalName(string) | pure — the canonical fingerprint string. |
isNameAvailable(string) / isSymbolAvailable(string) | bool |
quoteBuy(address token, uint256 ethIn) | tokensOut against the live curve. |
quoteSell(address token, uint256 tokenAmount) | ethOut against the live curve. |
currentPrice(address token) | Spot price, ETH per token (wei). |
graduationProgress(address token) | Basis points toward 8 ETH (0–10000). |
curves(address) | (creator, createdAt, realTokenReserve, realEthReserve, graduated) |
tokenCount() / allTokens(uint256) | Enumerate every launched token. |
nameOwnerOf(bytes32) / symbolOwnerOf(bytes32) | Registry owner of a fingerprint. |
tradeFeeBps() / feeRecipient() | Current fee and the platform share destination. |
creatorEarnings(address) | Unclaimed creator fees for a wallet (wei). |
Constants
| Constant | Value |
|---|---|
TOTAL_SUPPLY | 1,000,000,000e18 |
CURVE_SUPPLY | 800,000,000e18 |
LP_SUPPLY | 200,000,000e18 |
VIRT_TOKEN | 200,000,000e18 |
VIRT_ETH | 2e18 |
GRADUATION_ETH | 8e18 |
MAX_FEE_BPS | 100 (1%) |
CREATOR_FEE_SHARE_BPS | 7000 (70% of the fee) |
BPS | 10000 |
Events
These are exactly what the indexer consumes:
solidity
event TokenLaunched(
address indexed token, address indexed creator,
string name, string symbol,
bytes32 nameFingerprint, bytes32 symbolFingerprint);
event Bought(address indexed token, address indexed buyer,
uint256 ethIn, uint256 tokensOut, uint256 fee);
event Sold(address indexed token, address indexed seller,
uint256 tokensIn, uint256 ethOut, uint256 fee);
event Graduated(address indexed token, address indexed pair,
uint256 ethLiquidity, uint256 tokenLiquidity);
event CreatorFeeAccrued(address indexed token, address indexed creator, uint256 amount);
event CreatorFeesClaimed(address indexed creator, uint256 amount);Note.Full details on the revert reasons these functions throw are on the Errors & limits page. Deployed addresses are on Networks & addresses.