Factory_v2
The entry point for deploying new token + bonding curve pairs. Uses CREATE2 with vanity salt enforcement to produce token addresses starting with 0x24.
Singleton — one instance per chain. Not upgradeable, no admin functions.
Write Functions
deploy_pair
payable
external
Deploy a new token + bonding curve pair with vanity address enforcement.
| Name | Type | Description |
|---|---|---|
name | String[64] | Token name (must be non-empty) |
symbol | String[32] | Token symbol (must be non-empty) |
salt | bytes32 | Vanity salt (see Vanity Addresses) |
packed_socials | bytes32 | Packed social links (optional, default empty) |
(address, address) — the deployed token address and bonding curve address.
msg.value must equal deployment_fee exactly: 0.0006 ETH (Base) or 0.0012 BNB (BSC).
"Incorrect fee"— msg.value ≠ deployment_fee"Invalid name/symbol"— empty name or symbol"Invalid salt"— anchor_block is 0"Anchor not mined"— block.number ≤ anchor_block"Too late"— block.number > anchor_block + INCLUSION_WINDOW"Blockhash unavailable"— anchor_block too old (>256 blocks)"Blockhash mismatch"— salt's blockhash prefix doesn't match"Vanity miss"— resulting address doesn't start with 0x24
PairDeployed(token, curve, deployer, name, symbol, packed_socials)
View Functions
get_config
view
Returns the master template addresses.
(address, address, address) — (token_master, bonding_curve_master, token_socials)
get_deployment_fee
view
Returns the deployment fee in wei.
uint256 — 600000000000000 (Base) or 1200000000000000 (BSC)
get_token_socials
view
Returns the TokenSocials registry address.
address
Events
event PairDeployed:
token: indexed(address)
curve: indexed(address)
deployer: indexed(address)
name: String[64]
symbol: String[32]
packed_socials: bytes32