The MarsWTF presale contract implements a token presale mechanism with specific features and security measures.
- Fixed presale rate
- Minimum and maximum contribution limits
- Hardcap implementation
- Whitelist functionality
- Time-based presale phases
- Ownership controls
- Emergency withdrawal functions
- Anti-bot mechanisms
- Contribution tracking
- Whitelist verification
participate()
: Allows users to participate in presaleclaimTokens()
: Enables token claiming after presalegetUserContribution()
: Checks user's contribution amount
setWhitelist()
: Manages whitelist entrieswithdrawFunds()
: Allows fund withdrawal by ownersetPresaleStatus()
: Controls presale stateemergencyWithdraw()
: Emergency fund recovery
- OpenZeppelin Contracts
- Chainlink Price Feeds
- BSC Mainnet
- BSC Testnet
- Get whitelisted
- Send BNB within contribution limits
- Claim tokens after presale ends
- Deploy contract
- Set presale parameters
- Manage whitelist
- Control presale phases
- Rate manipulation protection
- Overflow checks
- Access control implementation
- Reentrancy guards
Run tests using:
npx hardhat test
Deploy to BSC using:
npx hardhat run scripts/deploy.js --network bsc
This project is licensed under the MIT License.