nav.brand
docs.title/Token Presale

Token Presale

Launch page + token + on-chain presale in one repo

docs.viewTemplate

docs.h.overview

A launch page wired to a presale contract that IS your ERC-20. Investors contribute ETH at a fixed, transparent rate; on success the supply is minted and tokens are distributed to investors — with automatic refunds if the soft cap isn't met.

Token Presale ships a polished, fully responsive launch page (countdown, live tokenomics, progress bar, FAQ) plus a single Solidity contract that is both the ERC-20 and the presale: caps, per-wallet limit, deadline, fixed-rate distribution and refunds.

When the project hasn't been configured yet, the app boots into a setup wizard that walks you through the token name, supply, presale %, caps and dates, deploys the contract straight from your browser wallet, auto-verifies it on Etherscan, and prints the exact .env file.

Nothing is minted until the sale succeeds: after the deadline, finalize() creates the token and distributes it; if the soft cap was missed, everyone refunds. Everything is env-driven, so the same codebase rebrands for any project in minutes.

docs.h.included

  • Next.js 16 app (App Router, TypeScript, Tailwind)
  • Presale.sol (ERC-20 + presale in one) + Hardhat project & deploy scripts
  • Dockerfile + docker-compose for one-command run
  • .env.example and generated-env workflow
  • README with deploy-to-Vercel & VPS instructions

docs.h.contracts

  • Presale.sol — ERC-20 token and its presale in one verifiable contract. Mints nothing at deploy; on a successful finalize() (deadline passed + soft cap met) it mints the supply, distributes the presale share to investors at a fixed rate (allocation ÷ hard cap), and sends the rest to your wallet. If the soft cap is missed, no token is created and everyone refunds (OpenZeppelin ERC20 + Ownable + ReentrancyGuard).

docs.h.stack

docs.stackLine

docs.chainsLine

docs.h.quickstart

docs.quickstartP

unzip token-presale.zip && cd token-presale
npm install
npm run dev

docs.quickstartUrl

docs.h.configure

docs.configureP

  1. docs.wizard.1
  2. docs.wizard.2
  3. docs.wizard.3
  4. docs.wizard.4
  5. docs.wizard.5
Tip · docs.configureTip

docs.configureP2

docs.h.customize

docs.h.branding

docs.brandingP

docs.brandingP2

docs.h.languages

docs.languagesP

docs.h.editing

docs.editingP

docs.h.configRef

docs.configRefP

  • docs.configRef.1
  • docs.configRef.2
Tip · docs.configRefTip

docs.h.deployContracts

docs.deployContractsP

# compile + copy artifacts the app/wizard use
npm run compile

# deploy to the network in your .env (RPC_URL + DEPLOYER_PRIVATE_KEY)
npm run deploy

docs.deployContractsP2

docs.h.deployApp

docs.h.vercel

  1. docs.vercel.1
  2. docs.vercel.2
  3. docs.vercel.3

docs.h.docker

docs.dockerP

# build + run; with no .env it opens the setup wizard
docker compose up --build

# once you have a .env, pass it in:
docker run --env-file .env -p 3001:3000 token-presale

docs.dockerP2

docs.h.vps

docs.vpsP

npm install
npm run build
npm run start   # serves the production build

docs.h.checklist

  • docs.checklist.1
  • docs.checklist.2
  • docs.checklist.3
  • docs.checklist.4
  • docs.checklist.5

docs.h.support

docs.supportP