non inflated pepe (nfpepe)

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title Non-Inflated Pepe (NFPepe)
/// @notice ERC20-like token with 0.01% burn, anti-whale, whitelist, blacklist, and mint-back only burned tokens with 2-week cooldown.
/// @dev Ownership is renounced at deploy, dev wallet retains operational control.
contract NFPepe {
    // Metadata
    string public constant name = "non inflated pepe";
    string public constant symbol = "nfpepe";
    uint8 public constant decimals = 18;

    // Supply & accounting
    uint256 public totalSupply;
    uint256 public burnedSupply; // Tracks total burned tokens
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;

    // Dev wallet (admin & mint)
    address public immutable devWallet = 0x585B872E8e90D1AC0952a69Cc24D2a7A7794e42f;

    // Cooldown for mintBack
    uint256 public lastMintTime;
    uint256 public constant MINT_COOLDOWN = 2 weeks;

    // Anti-whale & whitelist & blacklist
    mapping(address => bool) public whitelist;
    mapping(address => bool) public blacklist;
    uint256 public constant MAX_WALLET_PERCENT = 1; // 1%

    // Supply cap
    uint256 public constant MAX_SUPPLY = 69_000_000 * 1e18;

    // Events
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Whitelisted(address indexed account, bool status);
    event Blacklisted(address indexed account, bool status);
    event Minted(address indexed to, uint256 amount);

    // Modifiers
    modifier onlyDev() {
        require(msg.sender == devWallet, "Only dev wallet");
        _;
    }

    modifier notBlacklisted(address addr) {
        require(!blacklist[addr], "Address blacklisted");
        _;
    }

    // Constructor
    constructor() {
        totalSupply = MAX_SUPPLY;
        balanceOf[msg.sender] = MAX_SUPPLY;
        emit Transfer(address(0), msg.sender, MAX_SUPPLY);

        // Whitelist deployer
        whitelist[msg.sender] = true;
        emit Whitelisted(msg.sender, true);

        // Whitelist canonical Uniswap routers
        whitelist[0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D] = true; // V2
        emit Whitelisted(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, true);

        whitelist[0xE592427A0AEce92De3Edee1F18E0157C05861564] = true; // V3
        emit Whitelisted(0xE592427A0AEce92De3Edee1F18E0157C05861564, true);
    }

    // ERC20 functions
    function transfer(address to, uint256 amount) external notBlacklisted(msg.sender) notBlacklisted(to) returns (bool) {
        _transfer(msg.sender, to, amount);
        return true;
    }

    function approve(address spender, uint256 amount) external notBlacklisted(msg.sender) notBlacklisted(spender) returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    function transferFrom(address from, address to, uint256 amount) external notBlacklisted(msg.sender) notBlacklisted(from) notBlacklisted(to) returns (bool) {
        uint256 allowed = allowance[from][msg.sender];
        require(allowed >= amount, "Allowance exceeded");
        unchecked { allowance[from][msg.sender] = allowed - amount; }
        emit Approval(from, msg.sender, allowance[from][msg.sender]);
        _transfer(from, to, amount);
        return true;
    }

    // Internal transfer with burn and anti-whale
    function _transfer(address from, address to, uint256 amount) internal {
        require(to != address(0), "Transfer to zero");
        uint256 senderBalance = balanceOf[from];
        require(senderBalance >= amount, "Insufficient balance");

        // Burn 0.01%
        uint256 burnAmount = amount / 10000;
        uint256 sendAmount = amount - burnAmount;

        // Anti-whale enforcement
        if (!whitelist[to]) {
            uint256 maxWallet = (totalSupply * MAX_WALLET_PERCENT) / 100;
            require(balanceOf[to] + sendAmount <= maxWallet, "Exceeds max wallet limit");
        }

        // Update balances
        unchecked {
            balanceOf[from] = senderBalance - amount;
            balanceOf[to] += sendAmount;
            totalSupply -= burnAmount;
            burnedSupply += burnAmount; // track burned tokens
        }

        emit Transfer(from, to, sendAmount);
        if (burnAmount > 0) emit Transfer(from, address(0), burnAmount);
    }

    // Mint-back only burned tokens with 2-week cooldown
    function mintBack(address to, uint256 amount) external onlyDev notBlacklisted(to) {
        require(to != address(0), "Mint to zero");
        require(amount <= burnedSupply, "Cannot mint more than burned");
        require(block.timestamp >= lastMintTime + MINT_COOLDOWN, "Mint cooldown not reached");

        unchecked {
            balanceOf[to] += amount;
            totalSupply += amount;
            burnedSupply -= amount;
        }

        lastMintTime = block.timestamp;

        emit Minted(to, amount);
        emit Transfer(address(0), to, amount);
    }

    // Admin functions (dev wallet only)
    function setWhitelist(address account, bool status) external onlyDev {
        whitelist[account] = status;
        emit Whitelisted(account, status);
    }

    function setBlacklist(address account, bool status) external onlyDev {
        blacklist[account] = status;
        emit Blacklisted(account, status);
    }
}

Tags:
Factory|addr:0x4fe6128d2999c0a688e148da53a8c610f7d05dda|verified:true|block:23457163|tx:0x171b8b1b0e87e012d7325714838d543f2940959b1c935a4f5988cc58bb555692|first_check:1759047778

Submitted on: 2025-09-28 10:22:58

Comments

Log in to comment.

No comments yet.