Skip to content

SubhamKojha/fun.pump

Repository files navigation

fun.pump

A decentralized Memecoin Launchpad inspired by Pump.fun — built using Solidity, Hardhat, Ethers.js, and Next.js.
This project enables users to create, deploy, and interact with ERC-20 tokens directly through their MetaMask wallet on a local blockchain network.


🚀 Overview

fun.pump is a full-stack decentralized application (dApp) that recreates the core mechanics of a memecoin launchpad.
It allows users to deploy custom ERC-20 tokens using smart contracts, manage token trading logic, and interact with these contracts through an intuitive Next.js frontend.

The platform simulates how modern token launchpads operate — combining blockchain backend logic with seamless frontend integration and real wallet connectivity.

🧠 This project was built as part of a guided tutorial by Dapp University to deepen understanding of blockchain architecture, Solidity contract deployment, and web3 integration.


✨ Features

🧱 Dual Smart Contracts — Includes both Factory and Token contracts.
 - Factory: Deploys new ERC-20 token contracts dynamically.
 - Token: Implements the token logic (name, symbol, supply, transfer).
🔗 MetaMask Wallet Integration — Users can connect directly to their wallet for on-chain interactions.
⚙️ Hardhat Local Blockchain — Runs a private Ethereum network for safe, local development.
🧠 Ethers.js Integration — Handles contract calls, event listening, and wallet transactions.
🎨 Modern Frontend — Built using Next.js for responsive, dynamic user experience.
🧩 Modular Architecture — Clear structure separating contracts, components, and configuration.
📦 Configurable Deployment — Works seamlessly with Hardhat’s localhost network (chain ID: 31337).


🛠️ Tech Stack

Category Technology Used
Smart Contracts Solidity
Blockchain Framework Hardhat
Frontend Framework Next.js
Blockchain Interaction Ethers.js
Wallet Provider MetaMask
Styling CSS / Tailwind (optional)
Testing Hardhat Testing Environment

⚙️ Setup & Run

🧩 Step 1: Clone the Repository

git clone https://github.com/<your-username>/fun-pump.git
cd fun-pump

▶️ Step 2: Install Dependencies

npm install

⚡ Step 3: Start Local Hardhat Node

npx hardhat node

🧱 Step 4: Deploy Smart Contracts

In a new terminal window, run:

npx hardhat ignition deploy ignition/modules/Factory.js --network localhost

If you’ve deployed before and want to reset:

npx hardhat ignition deploy ignition/modules/Factory.js --network localhost --reset

💻 Step 5: Start the Frontend

npm run dev

Visit the app at 👉 http://localhost:3000


🧪 Project Structure

fun-pump/
│
├── app/
│   ├── abis/                 # Compiled contract ABIs (Factory, Token)
│   ├── components/           # React components (Header, List, Token, Trade)
│   ├── config.json           # Local contract addresses and chain info
│   ├── globals.css           # Global styles
│   ├── layout.js             # App layout
│   └── page.js               # Main entry page
│
├── contracts/
│   ├── Factory.sol           # Factory contract (deploys Token contracts)
│   └── Token.sol             # ERC-20 token contract
│
├── ignition/                 # Hardhat deployment scripts
├── test/                     # Contract test scripts
├── hardhat.config.js         # Hardhat configuration
├── next.config.mjs           # Next.js configuration
├── package.json              # Dependencies
└── README.md

🧠 How It Works

  1. Hardhat Node runs a local blockchain simulation (chain ID: 31337).
  2. The Factory Contract is deployed — it can mint and deploy multiple Token contracts.
  3. The Next.js Frontend interacts with these contracts using Ethers.js and MetaMask.
  4. Users connect their MetaMask wallet, deploy new tokens, and simulate on-chain interactions.
  5. Real blockchain logic is executed locally, with full transparency through console logs and contract events.

💡 Development Insights

  • Demonstrates the complete Web3 stack — Solidity, Hardhat, MetaMask, and Next.js.
  • Implements dynamic smart contract deployment and real wallet connectivity.
  • Utilizes config.json for flexible network configuration (safe for localhost).
  • Designed for learning full-stack blockchain development with real-world architecture.

⚠️ Disclaimer

This project is intended for educational and experimental purposes only.
Do not use it for real financial transactions or deploy it to mainnet.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors