ERC20 Faucet
Overview
This project implements a simple ERC20 token and a faucet smart contract that allows users to claim tokens periodically with a cooldown and a maximum number of claims. Built using Foundry and OpenZeppelin as part of a Solidity learning and development workflow. An ERC20 token implementation built on top of OpenZeppelin.
Deployment script: script/DeployTHXToken.s.sol
Deployed Contracts — Arbitrum Sepolia Testnet
| Contract | Address |
|---|---|
| TokenFaucet | 0x88E6277b1CfA68D47EB09d08F232d42A98A30942 |
claim() Execution Flow

- Check
block.timestamp - _lastClaim ≥ cooldown - Check
balanceOf(this) ≥ _dripAmount - Check
_timesClaimed[sender] < 20 _token.transfer(msg.sender, _dripAmount)- Update
_lastClaim+_timesClaimed++ - Emit
tokensClaimedevent
