creation_sourcecode: // SPDX-License-Identifier: MIT
  pragma solidity ^0.8.18;
  
  abstract contract Context {
      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/ethereum/solidity/issues/2691
          return msg.data;
      }
  }
  
  interface IERC20 {
      /**
       * @dev Returns the amount of tokens in existence.
       */
      function totalSupply() external view returns (uint256);
  
      /**
       * @dev Returns the amount of tokens owned by `account`.
       */
      function balanceOf(address account) external view returns (uint256);
  
      /**
       * @dev Moves `amount` tokens from the caller's account to `recipient`.
       *
       * Returns a boolean value indicating whether the operation succeeded.
       * 
       * Emits a {Transfer} event.
       */
      function transfer(
          address recipient,
          uint256 amount
      ) external returns (bool);
  
      /**
       * @dev Returns the remaining number of tokens that `spender` will be
       * allowed to spend on behalf of `owner` through {transferFrom}. This is
       * zero by default.
       *
       * This value changes when {approve} or {transferFrom} are called.
       */
      function allowance(
          address owner,
          address spender
      ) external view returns (uint256);
  
      /**
       * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
       *
       * Returns a boolean value indicating whether the operation succeeded.
       *
       * IMPORTANT: Beware that changing an allowance with this method brings the risk
       * that someone may use both the old and the new allowance by unfortunate
       * transaction ordering. One possible solution to mitigate this race
       * condition is to first reduce the spender's allowance to 0 and set the
       * desired value afterwards:
       * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
       *
       * Emits an {Approval} event.
       */
      function approve(address spender, uint256 amount) external returns (bool);
  
      /**
       * @dev Moves `amount` tokens from `sender` to `recipient` using the
       * allowance mechanism. `amount` is then deducted from the caller's
       * allowance.
       *
       * Returns a boolean value indicating whether the operation succeeded.
       *
       * Emits a {Transfer} event.
       */
      function transferFrom(
          address sender,
          address recipient,
          uint256 amount
      ) external returns (bool);
  
      /**
       * @dev Emitted when `value` tokens are moved from one account (`from`) to
       * another (`to`).
       *
       * Note that `value` may be zero.
       */
      event Transfer(address indexed from, address indexed to, uint256 value);
  
      /**
       * @dev Emitted when the allowance of a `spender` for an `owner` is set by
       * a call to {approve}. `value` is the new allowance.
       */
      event Approval(
          address indexed owner,
          address indexed spender,
          uint256 value
      );
  }
  
  interface IERC20Metadata is IERC20 {
      /**
       * @dev Returns the name of the token.
       */
      function name() external view returns (string memory);
  
      /**
       * @dev Returns the symbol of the token.
       */
      function symbol() external view returns (string memory);
  
      /**
       * @dev Returns the decimals places of the token.
       */
      function decimals() external view returns (uint8);
  }
  
  contract ERC20 is Context, IERC20, IERC20Metadata {
      mapping(address => uint256) private _balances;
  
      mapping(address => mapping(address => uint256)) private _allowances;
  
      uint256 private _totalSupply;
  
      string internal _name;
      string internal _symbol;
  
      constructor(string memory name_, string memory symbol_) {
          _name = name_;
          _symbol = symbol_;
      }
  
      function name() public view virtual override returns (string memory) {
          return _name;
      }
  
      function symbol() public view virtual override returns (string memory) {
          return _symbol;
      }
  
      function decimals() public view virtual override returns (uint8) {
          return 18;
      }
  
      function totalSupply() public view virtual override returns (uint256) {
          return _totalSupply;
      }
  
      function balanceOf(
          address account
      ) public view virtual override returns (uint256) {
          return _balances[account];
      }
  
      function transfer(
          address recipient,
          uint256 amount
      ) public virtual override returns (bool) {
          _transfer(_msgSender(), recipient, amount);
          return true;
      }
  
      function allowance(
          address owner,
          address spender
      ) public view virtual override returns (uint256) {
          return _allowances[owner][spender];
      }
  
      function approve(
          address spender,
          uint256 amount
      ) public virtual override returns (bool) {
          _approve(_msgSender(), spender, amount);
          return true;
      }
  
      function transferFrom(
          address sender,
          address recipient,
          uint256 amount
      ) public virtual override returns (bool) {
          _transfer(sender, recipient, amount);
  
          uint256 currentAllowance = _allowances[sender][_msgSender()];
          require(
              currentAllowance >= amount,
              "ERC20: transfer amount exceeds allowance"
          );
          unchecked {
              _approve(sender, _msgSender(), currentAllowance - amount);
          }
  
          return true;
      }
  
      function increaseAllowance(
          address spender,
          uint256 addedValue
      ) public virtual returns (bool) {
          _approve(
              _msgSender(),
              spender,
              _allowances[_msgSender()][spender] + addedValue
          );
          return true;
      }
  
      function decreaseAllowance(
          address spender,
          uint256 subtractedValue
      ) public virtual returns (bool) {
          uint256 currentAllowance = _allowances[_msgSender()][spender];
          require(
              currentAllowance >= subtractedValue,
              "ERC20: decreased allowance below zero"
          );
          unchecked {
              _approve(_msgSender(), spender, currentAllowance - subtractedValue);
          }
  
          return true;
      }
  
      function _transfer(
          address sender,
          address recipient,
          uint256 amount
      ) internal virtual {
          require(sender != address(0), "ERC20: transfer from the zero address");
          require(recipient != address(0), "ERC20: transfer to the zero address");
  
          uint256 senderBalance = _balances[sender];
          require(
              senderBalance >= amount,
              "ERC20: transfer amount exceeds balance"
          );
          unchecked {
              _balances[sender] = senderBalance - amount;
          }
          _balances[recipient] += amount;
  
          emit Transfer(sender, recipient, amount);
      }
  
      function _createInitialSupply(
          address account,
          uint256 amount
      ) internal virtual {
          require(account != address(0), "ERC20: mint to the zero address");
  
          _totalSupply += amount;
          _balances[account] += amount;
          emit Transfer(address(0), account, amount);
      }
  
      function _approve(
          address owner,
          address spender,
          uint256 amount
      ) internal virtual {
          require(owner != address(0), "ERC20: approve from the zero address");
          require(spender != address(0), "ERC20: approve to the zero address");
  
          _allowances[owner][spender] = amount;
          emit Approval(owner, spender, amount);
      }
  }
  
  contract Ownable is Context {
      address private _owner;
  
      event OwnershipTransferred(
          address indexed previousOwner,
          address indexed newOwner
      );
  
      /**
       * @dev Initializes the contract setting the deployer as the initial owner.
       */
      constructor() {
          address msgSender = _msgSender();
          _owner = msgSender;
          emit OwnershipTransferred(address(0), msgSender);
      }
  
      /**
       * @dev Returns the address of the current owner.
       */
      function owner() public view returns (address) {
          return _owner;
      }
  
      /**
       * @dev Throws if called by any account other than the owner.
       */
      modifier onlyOwner() {
          require(_owner == _msgSender(), "Ownable: caller is not the owner");
          _;
      }
  
      /**
       * @dev Leaves the contract without owner. It will not be possible to call
       * `onlyOwner` functions anymore. Can only be called by the current owner.
       *
       * NOTE: Renouncing ownership will leave the contract without an owner,
       * thereby removing any functionality that is only available to the owner.
       */
      function renounceOwnership() external virtual onlyOwner {
          emit OwnershipTransferred(_owner, address(0));
          _owner = address(0);
      }
  
      /**
       * @dev Transfers ownership of the contract to a new account (`newOwner`).
       * Can only be called by the current owner.
       */
      function transferOwnership(address newOwner) external virtual onlyOwner {
          require(
              newOwner != address(0),
              "Ownable: new owner is the zero address"
          );
          emit OwnershipTransferred(_owner, newOwner);
          _owner = newOwner;
      }
  }
  
  contract MandelaEffectToken is ERC20, Ownable {
      address public constant deadAddress = address(0xdead);
  
      address public marketingWallet;
      address public devWallet;
  
      uint256 public buyTotalFees;
      uint256 public buyMarketingFee;
      uint256 public buyDevFee;
  
      uint256 public sellTotalFees;
      uint256 public sellMarketingFee;
      uint256 public sellDevFee;
  
      uint256 public transferTotalFees;
      uint256 public transferMarketingFee;
      uint256 public transferDevFee;
  
      /******************/
  
      // exlcude from fees and max transaction amount
      mapping(address => bool) private _isExcludedFromFees;
  
      // store addresses that a automatic market maker pairs. Any transfer *to* these addresses
      // could be subject to a maximum transfer amount
      mapping(address => bool) public automatedMarketMakerPairs;
  
      event ExcludeFromFees(address indexed account, bool isExcluded);
  
      event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
  
      event marketingWalletUpdated(
          address indexed newWallet,
          address indexed oldWallet
      );
  
      event DevWalletUpdated(
          address indexed newWallet,
          address indexed oldWallet
      );
  
      constructor(
          uint256 _buyMarketingFee,
          uint256 _buyDevFee,
  
          uint256 _sellMarketingFee,
          uint256 _sellDevFee,
  
          uint256 _transferMarketingFee,
          uint256 _transferDevFee,
  
          address _marketingWallet,
          address _devWallet
      ) payable ERC20("Mandela Effect", "Mandela") {
          
          buyMarketingFee = _buyMarketingFee;
          buyDevFee = _buyDevFee;
          buyTotalFees = buyMarketingFee + buyDevFee;
  
          sellMarketingFee = _sellMarketingFee;
          sellDevFee = _sellDevFee;
          sellTotalFees = sellMarketingFee + sellDevFee;
  
          transferMarketingFee = _transferMarketingFee;
          transferDevFee = _transferDevFee;
          transferTotalFees = transferMarketingFee + transferDevFee;
  
          marketingWallet = _marketingWallet; // set as Marketing wallet
          devWallet = _devWallet; //set as devolper wallet
  
          // exclude from paying fees or having max transaction amount
          excludeFromFees(owner(), true);
          excludeFromFees(address(this), true);
          excludeFromFees(marketingWallet, true);
          excludeFromFees(devWallet, true);
  
          uint256 totalSupply =  1000000 * 1e18;
  
          /*
              _createInitialSupply is an internal function that is only called here,
              and CANNOT be called ever again
          */
          _createInitialSupply(owner(), totalSupply);
      }
  
      receive() external payable {}
  
      function updateBuyFees(
          uint256 _MarketingFee,
          uint256 _devFee
      ) external onlyOwner {
          buyMarketingFee = _MarketingFee;
          buyDevFee = _devFee;
          buyTotalFees = buyMarketingFee + buyDevFee;
          require(buyTotalFees <= 100, "Must keep fees at 100% or less");
      }
  
      function updateSellFees(
          uint256 _MarketingFee,
          uint256 _devFee
      ) external onlyOwner {
          sellMarketingFee = _MarketingFee;
  
          sellDevFee = _devFee;
          sellTotalFees = sellMarketingFee + sellDevFee;
          require(sellTotalFees <= 100, "Must keep fees at 100% or less");
      }
  
      function updateTransferFees(
          uint256 _MarketingFee,
          uint256 _devFee
      ) external onlyOwner {
          transferMarketingFee = _MarketingFee;
  
          transferDevFee = _devFee;
          transferTotalFees = transferMarketingFee + transferDevFee;
          require(transferTotalFees <= 100, "Must keep fees at 100% or less");
      }
  
      function excludeFromFees(address account, bool excluded) public onlyOwner {
          _isExcludedFromFees[account] = excluded;
          emit ExcludeFromFees(account, excluded);
      }
  
      function setAutomatedMarketMakerPair(
          address pair,
          bool value
      ) public onlyOwner {
          _setAutomatedMarketMakerPair(pair, value);
      }
  
      function _setAutomatedMarketMakerPair(address pair, bool value) private {
          automatedMarketMakerPairs[pair] = value;
  
          emit SetAutomatedMarketMakerPair(pair, value);
      }
  
      function updatemarketingWallet(
          address newmarketingWallet
      ) external onlyOwner {
          emit marketingWalletUpdated(newmarketingWallet, marketingWallet);
          marketingWallet = newmarketingWallet;
      }
  
      function updateDevWallet(address newWallet) external onlyOwner {
          emit DevWalletUpdated(newWallet, devWallet);
          devWallet = newWallet;
      }
  
      function isExcludedFromFees(address account) public view returns (bool) {
          return _isExcludedFromFees[account];
      }
  
      function _transfer(
          address from,
          address to,
          uint256 amount
      ) internal override {
          require(from != address(0), "ERC20: transfer from the zero address");
          require(to != address(0), "ERC20: transfer to the zero address");
  
          if (amount == 0) {
              super._transfer(from, to, 0);
              return;
          }
  
          bool takeFee = true;
  
          // if any account belongs to _isExcludedFromFee account then remove the fee
          if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
              takeFee = false;
          }
  
          uint256 fees = 0;
          uint256 tokensForMarketing = 0;
          uint256 tokensForDev = 0;
          // only take fees on buys/sells, do not take on wallet transfers
          if (takeFee) {
              // on sell
              if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {
                  fees = (amount * sellTotalFees) / 100;
                  tokensForMarketing += (fees * sellMarketingFee) / sellTotalFees;
                  tokensForDev += (fees * sellDevFee) / sellTotalFees;
              }
              // on buy
              else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {
                  fees = (amount * buyTotalFees) / 100;
  
                  tokensForMarketing += (fees * buyMarketingFee) / buyTotalFees;
                  tokensForDev += (fees * buyDevFee) / buyTotalFees;
              } else {
                  fees = (amount * transferTotalFees) / 100;
  
                  tokensForMarketing +=
                      (fees * transferMarketingFee) /
                      transferTotalFees;
                  tokensForDev += (fees * transferDevFee) / transferTotalFees;
              }
  
              if (fees > 0) {
                  if(tokensForMarketing > 0){
                      super._transfer(from, marketingWallet, tokensForMarketing);
                  }
                  if(tokensForDev > 0){
                      super._transfer(from, devWallet, tokensForDev);
                  }
              }
              amount -= fees;
          }
  
          super._transfer(from, to, amount);
      }
  }