A decentralized auction platform built with Next.js, TypeScript, and Wagmi that enables sealed-bid auctions using Blocklock encryption technology.
- Encrypted Bidding: Bids are encrypted using Blocklock technology until the auction ends
- Transparent Results: All bids are revealed and processed fairly after the bidding period
- Secure Process: No bid information is visible during the active bidding phase
- Base Sepolia Network: Deployed on Base Sepolia testnet
- Ethereum Integration: Full Web3 wallet connectivity via Wagmi
- Real-time Updates: Live block tracking for accurate auction timing
- Responsive Design: Works seamlessly on desktop and mobile devices
- Tabbed Interface: Organized view of Active, Bidding Closed, Ended, and My Auctions
- Real-time Status: Live auction status updates based on blockchain state
- Loading States: Smooth user experience with proper loading indicators
- Frontend: Next.js 15, React, TypeScript
- Styling: Tailwind CSS
- Web3: Wagmi, ethers.js
- Encryption: Blocklock.js
- Network: Base Sepolia
- Node.js 18+
- npm or yarn
- MetaMask or compatible Web3 wallet
- Base Sepolia testnet ETH
-
Clone the repository
git clone <repository-url> cd sealed-bid-auction
-
Install dependencies
npm install
-
Environment Setup Create a
.env.localfile with:NEXT_PUBLIC_ALCHEMY_KEY=your_alchemy_api_key
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Connect your Web3 wallet
- Navigate to the "Active Auctions" tab
- Click "Launch New Auction"
- Set the bidding end time
- Confirm the transaction
- Browse available auctions in the "Active Auctions" tab
- Click on an auction to view details
- Enter your bid amount in ETH
- Place your sealed bid (encrypted until auction ends)
- My Auctions: View all auctions you've created
- Bidding Closed: Auctions where bidding has ended but not yet finalized
- Ended: Fully completed auctions
The application interacts with a deployed smart contract on Base Sepolia:
- Contract Address:
0x605aEbc596552cc69ebb3164e0a7a1800d373b61 - Network: Base Sepolia
- Features: Sealed bidding, auction management, refund system
├── app/
│ ├── auction/
│ │ ├── [id]/ # Individual auction pages
│ │ └── page.tsx # Auction listing page
│ ├── launch/ # Auction creation
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # Reusable components
├── lib/
│ └── contract.ts # Contract ABI and configuration
└── public/ # Static assets
- Bids are encrypted using Blocklock.js before being sent to the blockchain
- Decryption keys are revealed only after the bidding period ends
- Ensures complete bid privacy during active bidding
- Active: Bidding is open, users can place sealed bids
- Bidding Closed: Bidding period ended, awaiting finalization
- Ended: Auction completed, winner determined
- Auction Creator: Can create auctions and finalize them
- Bidder: Can place bids and withdraw refunds
- Winner: Can fulfill winning bid payment
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- TypeScript for type safety
- ESLint for code quality
- Tailwind CSS for styling
- Component-based architecture
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
This project is licensed under the MIT License.
For support and questions, please open an issue in the repository.