hackquest logo

FaucetOne

Simple Token Faucet - Mints fixed tokens for users, limited to once per address.

描述

FaucetOne - A Secure and Simple Token Faucet

Overview

FaucetOne is a decentralized token faucet that allows users to claim a fixed amount of tokens only once per address. Designed to ensure fair distribution, it prevents users from claiming multiple times while maintaining a simple and effective token disbursement process.

Features

  • One-Time Claim Per Address: Ensures that each wallet can claim tokens only once.

  • Fixed Token Distribution: Users receive a predefined amount of tokens per claim.

  • Owner-Controlled Deposits: The contract owner can deposit funds into the faucet.

  • Trustless and Secure: Operates in a decentralized manner with on-chain verification.

  • Event Logging: Claims are logged on-chain for transparency.

How It Works

  1. User Interaction: A user interacts with the contract and calls the claimTokens() function.

  2. Claim Verification: The contract checks whether the user has already claimed tokens.

  3. Token Transfer: If eligible, the contract transfers the predefined token amount to the user's wallet.

  4. Claim Restriction: The user's address is marked as claimed, preventing further claims.

Smart Contract Details

  • Programming Language: Solidity

  • Network: Edu Chain

  • Deployment Address: 0x08C643d713B69e63eeC4Bffd1A6736b8A8c799bE

Functions

claimTokens()

  • Allows users to claim tokens once.

  • Transfers a fixed amount of tokens.

  • Emits a TokensClaimed event.

deposit()

  • Allows the contract owner to add funds.

Usage Guide

  1. Connect your wallet to the Edu Chain.

  2. Call the claimTokens() function from the deployed contract.

  3. If eligible, receive your allocated tokens.

  4. The contract prevents duplicate claims for fairness.

Security Measures

  • Restricted Claims: Uses a mapping to track claimed addresses.

  • Owner Permissions: Only the owner can deposit funds.

  • On-Chain Logging: Events are emitted for transparency.

License

FaucetOne is open-source and available under the MIT License.


This project provides a fair and efficient way for users to receive tokens, ensuring decentralization and trustless operations. Contributions and suggestions for improvement are welcome!

本次黑客松进展

70

技术栈

Solidity

融资状态

0

更多项目