https://github.com/harshgupta20/sol-airdrop
Solana devnet airdrop dApp that lets users connect their wallet and request free test SOL with a single click. Ideal for developers testing Solana programs.
https://github.com/harshgupta20/sol-airdrop
airdrop blockchain dapp devnet solana solanaairdrop solanaexplorer
Last synced: 5 months ago
JSON representation
Solana devnet airdrop dApp that lets users connect their wallet and request free test SOL with a single click. Ideal for developers testing Solana programs.
- Host: GitHub
- URL: https://github.com/harshgupta20/sol-airdrop
- Owner: harshgupta20
- Created: 2025-07-20T12:32:55.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-07-20T17:15:39.000Z (6 months ago)
- Last Synced: 2025-07-20T19:10:57.900Z (6 months ago)
- Topics: airdrop, blockchain, dapp, devnet, solana, solanaairdrop, solanaexplorer
- Language: JavaScript
- Homepage: https://sol-airdrop-amber.vercel.app
- Size: 157 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Solana Airdrop DApp
This is a simple Solana-based airdrop dApp built using React + Vite, and integrated with the `@solana/wallet-adapter` to request test SOL tokens on the **Devnet**.
---
## ๐ง Features
- Connect Phantom or any Solana-compatible wallet
- Automatically fetch wallet address
- Airdrop SOL tokens (Devnet)
- Clean UI using Tailwind CSS
- Shows success/error status after airdrop
---
## ๐ฅ๏ธ Demo

---
## ๐ฆ Tech Stack
- React + Vite
- Tailwind CSS
- @solana/web3.js
- @solana/wallet-adapter
---
## ๐ Getting Started
### 1. Clone the repo
```bash
git clone https://github.com/yourusername/solana-airdrop.git
cd solana-airdrop
```
### 2. Install dependencies
```bash
npm install
```
### 3. Run the development server
```bash
npm run dev
```
---
## ๐ง Configuration
Make sure you have the following packages installed:
```bash
npm install @solana/web3.js @solana/wallet-adapter-react @solana/wallet-adapter-react-ui @solana/wallet-adapter-wallets
```
Also install Tailwind CSS:
```bash
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
```
Then configure your `tailwind.config.js` like this:
```js
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
};
```
And include this in `src/index.css`:
```css
@tailwind base;
@tailwind components;
@tailwind utilities;
```
---
## ๐ Wallet Setup
Wrap your app with WalletProvider in `main.jsx` and configure supported wallets and network (Devnet):
```jsx
import {
WalletAdapterNetwork,
ConnectionProvider,
WalletProvider
} from '@solana/wallet-adapter-react';
import { WalletModalProvider } from '@solana/wallet-adapter-react-ui';
import {
PhantomWalletAdapter
} from '@solana/wallet-adapter-wallets';
const network = WalletAdapterNetwork.Devnet;
const wallets = [new PhantomWalletAdapter()];
```
---
## ๐ Folder Structure
```
.
โโโ src
โ โโโ Airdrop.jsx # The main airdrop component
โ โโโ main.jsx # Entry point, WalletProvider configured here
โ โโโ App.jsx # Renders Airdrop
โ โโโ index.css # Tailwind base styles
```
---
## ๐งช Test it
- Use: https://explorer.solana.com/?cluster=devnet to verify transactions
---
## ๐ Credits
Built with โค๏ธ by [Harsh Gupta](https://www.linkedin.com/in/harshgupta2001)
---
## ๐ License
This project is licensed under the MIT License.