A comprehensive, production-ready ERC-20 token smart contract built on Ethereum with advanced features including minting, burning, and pause functionality.
- Features
- Prerequisites
- Installation
- Configuration
- Deployment
- Testing
- Contract Details
- Security
- License
- ERC-20 Compliant: Full ERC-20 token standard implementation
- Minting: Owner can mint new tokens
- Burning: Tokens can be burned by owner or user
- Pausable: Owner can pause/unpause all transfers
- Ownership: Ownable pattern for access control
- Event Logging: Comprehensive event emissions for all operations
- Gas Optimized: Optimized smart contract for minimal gas consumption
- Well Tested: Complete test coverage with 20+ test cases
- Verified: Ready for Etherscan verification
- Node.js >= 16.x
- npm or yarn
- An Ethereum wallet with testnet ETH (for deployment)
- API keys for:
-
Clone the repository
git clone https://github.com/shooksphere/stimulant.git cd stimulant -
Install dependencies
npm install
-
Verify installation
npx hardhat --version
-
Create environment file
cp .env.example .env
-
Update .env with your credentials
PRIVATE_KEY=...
INFURA_API_KEY=... ETHERSCAN_API_KEY=... REPORT_GAS=true
⚠️ **IMPORTANT**: Never commit `.env` file or expose your private key!
## 🔨 Compilation
Compile the smart contract:
```bash
npm run compile
Run the comprehensive test suite:
npm run testGenerate coverage report:
npm run test:coveragenpx hardhat nodeThen in another terminal:
npm run deploynpm run deploy:sepolianpm run deploy:mainnetToken Information:
- Name: Stimulant
- Symbol: STIM
- Decimals: 18
- Initial Supply: 1,000,000 STIM
The contract uses audited OpenZeppelin contracts and follows Ethereum security best practices. See SECURITY.md for detailed security information.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for the Ethereum community
