CryptPe is a decentralized payment gateway that bridges the gap between traditional UPI payments and blockchain-based cryptocurrency transfers. It leverages Ethereum smart contracts to record transactions securely while providing a React Native + Expo-based frontend that mimics the user-friendly flow of UPI apps.
CryptPe/
├── app/
│ ├── (tabs)/
│ │ ├── _layout.tsx
│ │ ├── crypto.tsx
│ │ ├── index.tsx
│ │ ├── profile.tsx
│ │ └── upi.tsx
│ ├── _layout.tsx
│ └── globals.css
├── assets/
├── cache/
├── constants/
├── context/
│ └── TransactionContext.tsx
├── contracts/
│ └── TransactionHistory.sol
├── interfaces/
│ ├── interfaces.d.ts
│ └── Transaction.ts
├── node_modules/
├── scripts/
│ └── deploy.js
├── utils/
│ └── contract.ts
├── .env
├── app.json
- 💳 Dual-mode payments (UPI and Crypto)
- 🔗 Ethereum-based smart contract transaction logging
- 📱 React Native + Expo frontend
- 📊 Transaction history pulled from blockchain
- ⚙️ Easy deployment and integration
- Node.js & npm
- Hardhat (for smart contract deployment)
- Expo CLI (
npm install -g expo-cli) - Android emulator or Expo Go on mobile
- Metamask (for interacting with smart contracts)
- Ganache (or Hardhat node) for local blockchain
git clone https://github.com/gitgyana/CryptPe.git
cd CryptPenpm install⚙️ Blockchain Setup (Hardhat)
npx hardhat nodenpx hardhat compilenpx hardhat run scripts/deploy.js --network localhost- Note: Copy the deployed contract address to .env file like this:
- NEXT_PUBLIC_CONTRACT_ADDRESS=0xYourDeployedContractAddress
📲 Running the App (Mobile)
npx expo start- Scan the QR Code using Expo Go app on your Android device.
- Make sure your development machine and phone are on the same network.
upi.tsxandcrypto.tsxsend transaction metadata (amount, type, method) toTransactionContext.tsx- The
TransactionContext.tsxhandles in-app state and can push to the blockchain via smart contracts. profile.tsxretrieves the transaction history directly from the smart contract (contract.ts) and displays it.
-
Located in:
contracts/TransactionHistory.sol
-
Handles:
- Storing transaction metadata
- Retrieving transaction count
- Returning transaction data to the frontend
- Use Ganache or Hardhat node for local blockchain testing.
- Use Metamask with localhost chain ID 1337.
- Real wallet integration (MetaMask/WalletConnect)
- NFT-based transaction receipts
- Push notifications for successful payments
- AR-based location tagging for real-world payments