mint.fast docs

MintFastLaunchpad

Full public and external function reference for the launchpad.

Factory, Uniswap v4 router for mint.fast pools, harvest splitter, and admin surface. Inherits Ownable2Step, ReentrancyGuard, IUnlockCallback.

Types

struct TokenInfo {
    address creator;
    uint40 createdAt;
    uint16 socialSplitBps;
    uint16 lpSplitBps;
    bool beneficiariesLocked;
}

struct Beneficiary {
    bytes32 key;
    uint16 bps;
}

struct BeneficiaryInput {
    uint8 kind;      // 1 X, 2 GitHub, 3 Wallet
    string handle;
    address wallet;
    uint16 bps;
}

Create and trade

createToken

function createToken(
    string calldata name,
    string calldata symbol,
    string calldata metadataURI,
    BeneficiaryInput[] calldata beneficiaries,
    uint256 initialBuyMinTokensOut,
    bytes32 salt
) external payable nonReentrant returns (address token);

Anyone, unless createPaused. Requires msg.value >= creationFee. Deploys token, registers Fletchers, launches pool, optional atomic buy. Emits TokenCreated, BeneficiaryRegistered, Launched.

setBeneficiaries

function setBeneficiaries(address token, BeneficiaryInput[] calldata inputs) external nonReentrant;

Creator once while unlocked, or any fee manager anytime. inputs must be non-empty. Auto-harvests to the old set, then replaces and locks. Emits BeneficiariesCleared, BeneficiaryRegistered, BeneficiariesUpdated.

buy

function buy(address token, uint256 minTokensOut, uint256 deadline)
    external payable nonReentrant returns (uint256 tokensOut);

Exact-in ETH → token. Refunds unused ETH on partial fill.

sell

function sell(address token, uint256 tokenAmount, uint256 minEthOut, uint256 deadline)
    external nonReentrant returns (uint256 ethOut);

Exact-in token → ETH. Needs allowance. Returns unsold tokens.

harvest

function harvest(address token) external nonReentrant returns (uint256 devEth);

Pulls hook fees, splits Fletcher / LP / protocol, reinvests placeable LP ETH, escrows Fletcher cut. Emits Harvested, FeesDistributed.

sweepProtocolFees

function sweepProtocolFees() external nonReentrant;

Pays protocolFeesAccrued to treasury. Emits ProtocolFeesSwept.

unlockCallback

function unlockCallback(bytes calldata data) external returns (bytes memory);

PoolManager only. Dispatches LAUNCH / BUY / SELL / REINVEST.

receive

Payable. Accepts ETH only from poolManager, else DirectEthRejected.

Views

poolIdOf

function poolIdOf(address token) public view returns (bytes32);

Canonical PoolId, or zero if unknown.

state

function state(address token)
    external view
    returns (TokenInfo info, bytes32 poolId, uint256 spotPriceWad);

spotPriceWad is ETH per token (1e18). Mcap ≈ spotPriceWad * 1e9 / 1e18.

lpPosition

function lpPosition(address token)
    external view
    returns (bytes32 poolId, int24 tickLower, int24 tickUpper, uint128 liquidity);

Primary supply lock only (not harvest sub-ranges).

beneficiaries / beneficiaryCount / beneficiariesLocked

function beneficiaries(address token) external view returns (Beneficiary[] memory);
function beneficiaryCount(address token) external view returns (uint256);
function beneficiariesLocked(address token) external view returns (bool);

Public getters

Also exposed: tokens(token), pendingEth(token), isFeeManager(account), treasury, creationFee, defaultSocialSplitBps, defaultLpSplitBps, createPaused, protocolFeesAccrued, tokenNonce, totalPendingEth, immutables poolManager, feeVault, hook, boundaryTick, boundarySqrtPriceX96, and constants such as TOTAL_SUPPLY, POOL_FEE, TICK_SPACING, MIN_TICK, BPS, MAX_CREATION_FEE, MAX_BENEFICIARIES, KIND_*, DEAD.

Admin (onlyOwner)

setFeeManager

function setFeeManager(address account, bool allowed) external onlyOwner;

Non-zero account. Emits FeeManagerSet.

setTreasury

function setTreasury(address treasury_) external onlyOwner;

Non-zero. Emits TreasurySet.

setCreationFee

function setCreationFee(uint256 fee) external onlyOwner;

fee <= MAX_CREATION_FEE (0.005 ETH). Emits CreationFeeSet.

setDefaultFees

function setDefaultFees(uint16 socialSplitBps, uint16 lpSplitBps) external onlyOwner;

social + lp <= 10000. Future creates only. Emits DefaultFeesSet.

setCreatePaused

function setCreatePaused(bool paused) external onlyOwner;

Never freezes trading. Emits CreatePausedSet.

renounceOwnership

Always reverts OwnershipRenounced.

Ownable2Step

Inherited transferOwnership / acceptOwnership for the 2/4 multisig rotation path.