A test USDT (Tether) implementation for the Sepolia testnet, designed for testing and development purposes. This contract provides a simplified version of USDT with built-in faucet functionality.
- Network: Sepolia Testnet
- Contract Address:
0x99c05dF1a35F4C5656Ea042d1caEfcD4F97aEDb4 - Verify Status: Verified on Etherscan
- Etherscan Link: View on Etherscan
- ERC20 Compliant: Implements the standard ERC20 interface
- Burnable: Includes token burning functionality through ERC20Burnable
- Ownable: Implements ownership controls for administrative functions
- 6 Decimals: Matches real USDT's decimal places (6 instead of standard 18)
- Built-in Faucet: Allows users to request test tokens
- Minting Capability: Owner can mint additional tokens
- Name: Test USDT
- Symbol: TUSDT
- Decimals: 6
- Initial Supply: 1,000,000 TUSDT
- Public function that allows anyone to request test tokens
- Mints 1,000 TUSDT to the caller's address
- No cooldown period (for simplicity)
- Usage:
contract.requestTokens()
- Admin function to mint new tokens
- Only callable by contract owner
- Parameters:
to: Recipient addressamount: Amount to mint (in base units)
- Usage:
contract.mint(recipientAddress, amount)
- Inherited from ERC20Burnable
- Allows token holders to burn their tokens
burnFromrequires prior approval
- Clone the repository
git clone <repository-url>
cd <repository-name>- Install dependencies
# Install base dependencies
npm install
# Install required Hardhat plugins and dependencies
npm install --save-dev "@nomicfoundation/hardhat-chai-matchers@^2.0.0" "@nomicfoundation/hardhat-ethers@^3.0.0" "@nomicfoundation/hardhat-ignition-ethers@^0.15.0" "@nomicfoundation/hardhat-network-helpers@^1.0.0" "@nomicfoundation/hardhat-verify@^2.0.0" "@typechain/ethers-v6@^0.5.0" "@typechain/hardhat@^9.0.0" "@types/chai@^4.2.0" "@types/mocha@>=9.1.0" "chai@^4.2.0" "ethers@^6.4.0" "hardhat-gas-reporter@^1.0.8" "solidity-coverage@^0.8.1" "ts-node@>=8.0.0" "typechain@^8.3.0" "typescript@>=4.5.0"- Create .env file with required variables
SEPOLIA_RPC_URL=your_sepolia_endpoint # Get from Alchemy
PRIVATE_KEY=your_wallet_private_key # Your wallet private key (without 0x)
ETHERSCAN_API_KEY=your_etherscan_api_key # Get from Etherscan- Compile the contract
# Clean and recompile
npx hardhat clean
npx hardhat compile- Deploy to Sepolia
npx hardhat run scripts/deploy.js --network sepolia- Verify on Etherscan
npx hardhat verify --network sepolia <DEPLOYED_CONTRACT_ADDRESS>├── contracts/
│ └── TestUSDT.sol # Main contract file
├── scripts/
│ └── deploy.js # Deployment script
├── .env # Environment variables (git-ignored)
├── hardhat.config.js # Hardhat configuration
└── README.md # This file
- Visit the contract on Sepolia Etherscan
- Connect your wallet
- Use the "Write Contract" tab to interact with functions
- Use the "Read Contract" tab to view contract state
const contractAddress = "0x99c05dF1a35F4C5656Ea042d1caEfcD4F97aEDb4";
const TestUSDT = await ethers.getContractAt("TestUSDT", contractAddress);
// Request tokens from faucet
await TestUSDT.requestTokens();
// Check balance
const balance = await TestUSDT.balanceOf(userAddress);The contract is designed to be deployed on the Sepolia testnet. After deployment:
- The deploying address becomes the contract owner
- 1,000,000 TUSDT is minted to the owner's address
- The faucet functionality is immediately available to all users
After deployment, verify the contract on Etherscan:
npx hardhat verify --network sepolia <DEPLOYED_CONTRACT_ADDRESS>This is a TEST token contract intended for development purposes only. It includes features that would not be suitable for a production environment:
- Unlimited faucet with no cooldown
- Simple minting permissions
- No pause functionality
- No blacklist functionality
- No transfer restrictions
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenZeppelin Contracts v5.0.0
- @openzeppelin/contracts/token/ERC20/ERC20.sol
- @openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol
- @openzeppelin/contracts/access/Ownable.sol