For the complete documentation index, see llms.txt. This page is also available as Markdown.

Token Creation

Create a token and its bonding curve through the Pro Factory. Choose a direct Creator Fee Recipient or Revenue Distribution. Both routes use the same V7 creation request.

Preview, approve and create

  1. Choose token metadata, an enabled Quote asset and launch configuration. Set creatorBuyTaxBps and creatorSellTaxBps separately; 100 BPS is 1%.

  2. Set protectionDays: 0 turns protection off, and 1–365 selects whole days. Default to 0. Current rules are empty, so a nonzero choice does not restrict transfers.

  3. Preview the request for the wallet that will create the token. Review fees, first-buy funding, predicted addresses and any restrictions. The SDK pins the current economics and rules hash in preview.request.

  4. Approve the required assets to the Factory for direct creation, or to the Forwarder for revenue-distribution creation. Confirm approval receipts.

  5. Prepare with the reviewed request, submit through the same wallet-enabled client and confirm a successful receipt. Read the Factory record and graduation state.

expectedPoolProtectionHash is required even when protectionDays=0. It comes from the current ConfigRegistry. A rules or economics change requires a fresh preview and user confirmation.

SDK preview

Use the client from Quickstart. launch contains the form's metadata, Quote, configuration, fee recipient, tax rates, first-buy limits, deadline and salt. For the first discovery preview, its expectedEconomics may be zeroHash.

import { zeroHash, type Address } from "viem";
import {
  type LaunchpadV2Client,
  type LaunchpadV2CreateTokenRequest,
  previewLaunchpadV2Launch,
  getLaunchpadV2LaunchFunding,
} from "@masterpeach/launchpad-sdk/v2";

export async function previewCreation(
  client: LaunchpadV2Client,
  creator: Address,
  launch: LaunchpadV2CreateTokenRequest["launch"],
  acceptedMaxLaunchFee: bigint,
  protectionDays = 0,
) {
  const blockNumber = await client.snapshotBlock();
  const expectedDeploymentVersion = await client.contract("factory")
    .read("activeDeploymentVersion", [], { blockNumber });
  const request: LaunchpadV2CreateTokenRequest = {
    launch,
    maxLaunchFee: acceptedMaxLaunchFee,
    expectedDeploymentVersion,
    deploymentData: "0x",
    expectedPoolProtectionHash: zeroHash,
    protectionDays,
  };
  const preview = await previewLaunchpadV2Launch(
    client, request, creator, { blockNumber },
  );
  const funding = await getLaunchpadV2LaunchFunding(
    client, preview.request, { blockNumber },
  );
  return { preview, funding };
}

This function makes read-only calls. After review and approvals, use prepareLaunchpadV2CreateToken(client, preview.request), then client.send(prepared) and wait for a successful receipt. A zero discovery hash must not be submitted as a creation request.

Costs and first buy

Cost
What the user pays

Creation fee

The current configuration fee in launchFeeToken; maxLaunchFee is a ceiling. The configured fee is zero.

Optional first buy

Quote exchanged for tokens, including base fee and buy Creator Tax

Network gas

Each submitted approval and transaction has its own gas cost

The creation-fee asset and first-buy Quote may differ. An approval is permission to spend, not another fee. The initial-buy cap limits token output, not Quote input or total supply.

The original Creator, initial fee recipient and recipient of a nonzero first buy are Snipe Tax exempt. They still pay base fee and buy Creator Tax. A first buy may sell out the Curve and attempt its sweep; V4 pool creation remains a separate action. Use the confirmed lifecycle state to choose the next step.

Last updated

Was this helpful?