Skip to content

FranciscoCosta/Faucet-Protocoin

Repository files navigation

ProtoCoin Faucet Frontend

Introduction

This project is a frontend application for a faucet that allows users to claim ProtoCoins (PRT) using their Ethereum wallets via MetaMask. It is built using Next.js and integrates with Web3.js for Ethereum blockchain interactions.

Technology Used

  • Next.js: A React framework for server-side rendering and static site generation.
  • React: A JavaScript library for building user interfaces.
  • Web3.js: A library that allows interaction with the Ethereum blockchain.
  • MetaMask: A cryptocurrency wallet browser extension that connects users to Ethereum dApps.
  • React Toastify: A popular library for notifications in React applications.
  • React Google ReCAPTCHA: A component for implementing Google reCAPTCHA in React applications for security.

Installation

To run this project locally, follow these steps:

  1. Clone the repository: git clone https://github.com/your-frontend-repo.git
  2. Navigate to the project directory: cd your-frontend-repo
  3. Install dependencies: npm install
  4. Create a .env.local file and add the necessary environment variables:

NEXT_PUBLIC_RECAPCHA_SITE_KEY=your-recaptcha-site-key

Usage

To start the development server:

npm run dev

The application will be running on http://localhost:3000.

Features

  • Mint ProtoCoins: Users can connect their MetaMask wallets and mint ProtoCoins.
  • Transaction Viewing: View transaction details on Binance Smart Chain testnet.
  • Rate Limiting: Implements daily rate limits using ReCAPTCHA for security.

Code Overview

The main functionality revolves around:

  • Connecting to MetaMask: Users authenticate and interact with their MetaMask wallets to mint ProtoCoins.
  • Handling Minting: Calls the backend API to mint ProtoCoins based on user requests.
  • Transaction Monitoring: Displays transaction status and links to Binance Smart Chain testnet explorer.

References

Backend project: https://github.com/FranciscoCosta/Backend-ProtoCoin

Token project: https://github.com/FranciscoCosta/Faucet-Protocoin

License

This project is licensed under the MIT License.

About

A faucet to generate token for protocoin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published