https://github.com/btc415/mining-token-contract
A sophisticated ERC20 token implementation with mining rewards functionality built on the Ethereum blockchain. It provides a capped token supply, automatic mining rewards for block validation, and owner-specific functions for parameter management.
https://github.com/btc415/mining-token-contract
coinbase erc20 smart-contracts token
Last synced: about 1 year ago
JSON representation
A sophisticated ERC20 token implementation with mining rewards functionality built on the Ethereum blockchain. It provides a capped token supply, automatic mining rewards for block validation, and owner-specific functions for parameter management.
- Host: GitHub
- URL: https://github.com/btc415/mining-token-contract
- Owner: BTC415
- License: mit
- Created: 2024-11-05T07:05:22.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-06T09:08:20.000Z (over 1 year ago)
- Last Synced: 2025-04-05T17:34:45.869Z (about 1 year ago)
- Topics: coinbase, erc20, smart-contracts, token
- Language: TypeScript
- Homepage:
- Size: 162 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mining Token Contract (MNT)
A sophisticated ERC20 token implementation with mining rewards functionality built on the Ethereum blockchain.
## Features
- **Capped Supply**: Token has a maximum supply limit defined at deployment
- **Mining Rewards**: Miners receive automatic token rewards for block validation
- **Ownership Control**: Contract includes owner-specific functions for parameter management
- **Decimal Support**: Full decimal support (18 decimals) for token operations
- **Initial Supply**: 50,000,000 tokens minted to deployer at contract creation
- **Adjustable Block Rewards**: Owner can modify mining reward amounts
## Technical Details
### Token Specifications
- Name: MiningToken
- Symbol: MNT
- Decimals: 18
- Initial Supply: 50,000,000 MNT
- Supply Cap: Defined at deployment
### Smart Contract Architecture
The contract inherits from:
- `ERC20Capped`: Implements maximum supply cap functionality
- `Ownable`: Provides ownership control mechanisms
- `ERC20`: Base token implementation
### Key Functions
1. **Constructor**
- Sets token cap and initial mining reward
- Mints initial supply to contract deployer
2. **Mining Reward System**
- Automatic reward distribution to miners
- Anti-manipulation checks for miner rewards
- Configurable reward amounts
3. **Administrative Functions**
- `setBlockReward`: Allows owner to adjust mining rewards
- Protected minting with cap validation
## Usage
1. Deploy the contract with parameters:
- `cap_`: Maximum token supply
- `reward_`: Initial block mining reward
2. Miners automatically receive rewards when processing transactions
3. Contract owner can adjust mining rewards using `setBlockReward`
## Security Features
- Supply cap enforcement
- Protected minting mechanism
- Miner reward validation
- Owner-only administrative functions
## Dependencies
- OpenZeppelin Contracts v4.x
- ERC20
- ERC20Capped
- Ownable
## License
MIT License