/

SMART CONTRACT on

c
0x4501e37a79cf953116331a105B3644d07b74C0F8

Safe Moon Avax: SAFEMOONA Token Contract

Last Transaction

0x82a4d547a9f861b80b11d27d5a40d649f69c90d24a611783a3a6af96a9fb1d00
From
0x7dB7e7c07633064594ff2c273F0269F95b885a73
To
Safe Moon Avax: SAFEMOONA Token
13 minutes
Mon, 29 Nov 2021 23:39:17 GMT
0.00AVAX

AVAX balance

320.146082137

1 Token

Total estimated value

798.84USD
Amount Estimated value
SAFEMOONA Token 479,497,888,316.91235 SafeMoonA 798.84USD

Contract Properties

Language
Solidity
Compiler Version
v0.8.7+commit.e28d00a7
Source Code
Available and Matching

Compiler settings

{
  "evmVersion": "london",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "SafeMoonAvax_.sol": {
      "SafeMoonAvax_": [
        "*"
      ]
    }
  }
}

ABI

[
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_snipeBlockAmt",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable",
    "type": "constructor"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "spender",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "Approval",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "minTokensBeforeSwap",
        "type": "uint256"
      }
    ],
    "name": "MinTokensBeforeSwapUpdated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "previousOwner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "OwnershipTransferred",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "sniperAddress",
        "type": "address"
      }
    ],
    "name": "SniperCaught",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokensSwapped",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "ethReceived",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokensIntoLiqudity",
        "type": "uint256"
      }
    ],
    "name": "SwapAndLiquify",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "bool",
        "name": "enabled",
        "type": "bool"
      }
    ],
    "name": "SwapAndLiquifyEnabledUpdated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "from",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "Transfer",
    "type": "event"
  },
  {
    "inputs": [],
    "name": "_hasLiqBeenAdded",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "_liquidityFee",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "_marketingFee",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "_reflectFee",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "holder",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "spender",
        "type": "address"
      }
    ],
    "name": "allowance",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "spender",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "approve",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "balanceOf",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "burnAddress",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "decimals",
    "outputs": [
      {
        "internalType": "uint8",
        "name": "",
        "type": "uint8"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "spender",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "subtractedValue",
        "type": "uint256"
      }
    ],
    "name": "decreaseAllowance",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "tAmount",
        "type": "uint256"
      }
    ],
    "name": "deliver",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "dexRouter",
    "outputs": [
      {
        "internalType": "contract IJoeRouter02",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "excludeFromFee",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "excludeFromReward",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getOwner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "includeInFee",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "includeInReward",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "spender",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "addedValue",
        "type": "uint256"
      }
    ],
    "name": "increaseAllowance",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "isExcludedFromFee",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "isExcludedFromReward",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "isSniper",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "lpPair",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "maxTxAmountUI",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "maxWalletSizeUI",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "name",
    "outputs": [
      {
        "internalType": "string",
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "owner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "tAmount",
        "type": "uint256"
      },
      {
        "internalType": "bool",
        "name": "deductTransferFee",
        "type": "bool"
      }
    ],
    "name": "reflectionFromToken",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "removeSniper",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "renounceOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "pair",
        "type": "address"
      }
    ],
    "name": "setLPPair",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "liquidityFee",
        "type": "uint256"
      }
    ],
    "name": "setLiquidityFeePercent",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "marketingFee",
        "type": "uint256"
      }
    ],
    "name": "setMarketingFeePercent",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address payable",
        "name": "newWallet",
        "type": "address"
      }
    ],
    "name": "setMarketingWallet",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "percent",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "divisor",
        "type": "uint256"
      }
    ],
    "name": "setMaxTxPercent",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "percent",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "divisor",
        "type": "uint256"
      }
    ],
    "name": "setMaxWalletSize",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bool",
        "name": "enabled",
        "type": "bool"
      }
    ],
    "name": "setSniperProtectionEnabled",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bool",
        "name": "_enabled",
        "type": "bool"
      }
    ],
    "name": "setSwapAndLiquifyEnabled",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "reflectFee",
        "type": "uint256"
      }
    ],
    "name": "setTaxFeePercent",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "snipersCaught",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "swapAndLiquifyEnabled",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "symbol",
    "outputs": [
      {
        "internalType": "string",
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "rAmount",
        "type": "uint256"
      }
    ],
    "name": "tokenFromReflection",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "totalFees",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "totalSupply",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "recipient",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "transfer",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address[]",
        "name": "recipients",
        "type": "address[]"
      },
      {
        "internalType": "uint256[]",
        "name": "amounts",
        "type": "uint256[]"
      }
    ],
    "name": "transferBatch",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "sender",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "recipient",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "transferFrom",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "transferOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "stateMutability": "payable",
    "type": "receive"
  }
]

Contract Source Code

SafeMoonAvax_.sol

SafeMoonAvax_.sol

// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;

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

    function _msgData() internal view returns (bytes memory) {
        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 token decimals.
   */
  function decimals() external view returns (uint8);

  /**
   * @dev Returns the token symbol.
   */
  function symbol() external view returns (string memory);

  /**
  * @dev Returns the token name.
  */
  function name() external view returns (string memory);

  /**
   * @dev Returns the bep token owner.
   */
  function getOwner() external view returns (address);

  /**
   * @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);
}

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */

library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/x/sa/fe/ma/rs/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        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;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     * x_s_af_e/m_ar_s
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

library Address {
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }


    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

interface IJoeFactory {
    event PairCreated(
        address indexed token0,
        address indexed token1,
        address pair,
        uint256
    );

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function migrator() external view returns (address);

    function getPair(address tokenA, address tokenB)
        external
        view
        returns (address pair);

    function allPairs(uint256) external view returns (address pair);

    function allPairsLength() external view returns (uint256);

    function createPair(address tokenA, address tokenB)
        external
        returns (address pair);

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;

    function setMigrator(address) external;
}

interface IJoeRouter01 {
    function factory() external pure returns (address);

    function WAVAX() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityAVAX(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountAVAX,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityAVAX(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountAVAX);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityAVAXWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountAVAX);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactAVAXForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactAVAX(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForAVAX(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapAVAXForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}

interface IJoeRouter02 is IJoeRouter01 {
    function removeLiquidityAVAXSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountAVAX);

    function removeLiquidityAVAXWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountAVAX);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactAVAXForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForAVAXSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

abstract 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(), "Ownable: 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), "Ownable: new owner is the zero address");
        
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
    
}

contract SafeMoonAvax_ is Context, IERC20, Ownable {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _rOwned;
    mapping (address => uint256) private _tOwned;
    mapping (address => mapping (address => uint256)) private _allowances;

    mapping (address => bool) private _isExcludedFromFee;
    mapping (address => bool) private _isExcluded;
    address[] private _excluded;

    mapping (address => bool) private _isSniper;
    mapping (address => bool) private _liquidityHolders;
   
    uint256 private startingSupply = 1_000_000_000_000_000; //1 Quadrillion, underscores aid readability
   
    uint256 private constant MAX = ~uint256(0);
    uint8 private _decimals = 9;
    uint256 private _decimalsMul = _decimals;
    uint256 private _tTotal = startingSupply * 10**_decimalsMul;
    uint256 private _rTotal = (MAX - (MAX % _tTotal));
    uint256 private _tFeeTotal;

    string private _name = "SafeMoonAvax";
    string private _symbol = "SafeMoonA";
    
    uint256 public _reflectFee = 200; // All taxes are divided by 100 for more accuracy.
    uint256 private _previousReflectFee = _reflectFee;
    uint256 private maxReflectFee = 800;
    
    uint256 public _liquidityFee = 400; // All taxes are divided by 100 for more accuracy.
    uint256 private _previousLiquidityFee = _liquidityFee;
    uint256 private maxLiquidityFee = 800;

    uint256 public _marketingFee = 400; // All taxes are divided by 100 for more accuracy.
    uint256 private _previousMarketingFee = _marketingFee;
    uint256 private maxMarketingFee = 800;

    uint256 private masterTaxDivisor = 10000; // All tax calculations are divided by this number.

    IJoeRouter02 public dexRouter;
    address public lpPair;

    // JOE ROUTER
    address private _routerAddress = 0x60aE616a2155Ee3d9A68541Ba4544862310933d4;

    address public burnAddress = 0x000000000000000000000000000000000000dEaD;
    address payable private _marketingWallet = payable(0x3391bb5d9f8A2b05B9De0ecddeF361AB9D20fDb6);
    
    bool inSwapAndLiquify;
    bool public swapAndLiquifyEnabled = false;
    
    // Max TX amount is 1% of the total supply.
    uint256 private maxTxPercent = 100; // Less fields to edit
    uint256 private maxTxDivisor = 1000;
    uint256 private _maxTxAmount = (_tTotal * maxTxPercent) / maxTxDivisor;
    uint256 private _previousMaxTxAmount = _maxTxAmount;
    uint256 public maxTxAmountUI = (startingSupply * maxTxPercent) / maxTxDivisor; // Actual amount for UI's
    // Maximum wallet size is 2% of the total supply.
    uint256 private maxWalletPercent = 100; // Less fields to edit
    uint256 private maxWalletDivisor = 100;
    uint256 private _maxWalletSize = (_tTotal * maxWalletPercent) / maxWalletDivisor;
    uint256 private _previousMaxWalletSize = _maxWalletSize;
    uint256 public maxWalletSizeUI = (startingSupply * maxWalletPercent) / maxWalletDivisor; // Actual amount for UI's
    // 0.05% of Total Supply
    uint256 private numTokensSellToAddToLiquidity = (_tTotal * 5) / 10000;

    bool private sniperProtection = true;
    bool public _hasLiqBeenAdded = false;
    uint256 private _liqAddBlock = 0;
    uint256 private _liqAddStamp = 0;
    uint256 private immutable snipeBlockAmt;
    uint256 public snipersCaught = 0;
    
    event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
    event SwapAndLiquifyEnabledUpdated(bool enabled);
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived,
        uint256 tokensIntoLiqudity
    );
    event SniperCaught(address sniperAddress);
    
    modifier lockTheSwap {
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }
    
    constructor (uint256 _snipeBlockAmt) payable {
        _tOwned[_msgSender()] = _tTotal;
        _rOwned[_msgSender()] = _rTotal;

        // Set the amount of blocks to count a sniper.
        snipeBlockAmt = _snipeBlockAmt;

        IJoeRouter02 _dexRouter = IJoeRouter02(_routerAddress);
        lpPair = IJoeFactory(_dexRouter.factory())
            .createPair(address(this), _dexRouter.WAVAX());

        dexRouter = _dexRouter;
        
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;
        _liquidityHolders[owner()] = true;
        _isExcluded[address(this)] = true;
        _excluded.push(address(this));
        _isExcluded[owner()] = true;
        _excluded.push(owner());
        _isExcluded[burnAddress] = true;
        _excluded.push(burnAddress);
        _isExcluded[_marketingWallet] = true;
        _excluded.push(_marketingWallet);
        _isExcluded[lpPair] = true;
        _excluded.push(lpPair);

        // Approve the owner for PancakeSwap, timesaver.
        _approve(_msgSender(), _routerAddress, _tTotal);

        // Ever-growing sniper/tool blacklist
        _isSniper[0xE4882975f933A199C92b5A925C9A8fE65d599Aa8] = true;
        _isSniper[0x86C70C4a3BC775FB4030448c9fdb73Dc09dd8444] = true;
        _isSniper[0xa4A25AdcFCA938aa030191C297321323C57148Bd] = true;
        _isSniper[0x20C00AFf15Bb04cC631DB07ee9ce361ae91D12f8] = true;
        _isSniper[0x0538856b6d0383cde1709c6531B9a0437185462b] = true;

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

    function totalSupply() external view override returns (uint256) { return _tTotal; }
    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 getOwner() external view override returns (address) { return owner(); }
    function allowance(address holder, address spender) external view override returns (uint256) { return _allowances[holder][spender]; }

    function balanceOf(address account) public view override returns (uint256) {
        if (_isExcluded[account]) return _tOwned[account];
        return tokenFromReflection(_rOwned[account]);
    }

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

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

    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    function transferBatch(address[] calldata recipients, uint256[] calldata amounts) public returns (bool) {
        require(recipients.length == amounts.length, 
        "Must be matching argument lengths");
        
        uint256 length = recipients.length;
        
        for (uint i = 0; i < length; i++) {
            require(transfer(recipients[i], amounts[i]));
        }
        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    function setLPPair(address pair) external onlyOwner {
        lpPair = pair;
    }

    function isExcludedFromReward(address account) public view returns (bool) {
        return _isExcluded[account];
    }

    function isExcludedFromFee(address account) public view returns(bool) {
        return _isExcludedFromFee[account];
    }

    function isSniper(address account) public view returns (bool) {
        return _isSniper[account];
    }

    function removeSniper(address account) external onlyOwner() {
        require(_isSniper[account], "Account is not a recorded sniper.");
        _isSniper[account] = false;
    }

    function setSniperProtectionEnabled(bool enabled) external onlyOwner() {
        require(enabled != sniperProtection, "Already set.");
        sniperProtection = enabled;
    }
    
    function setTaxFeePercent(uint256 reflectFee) external onlyOwner() {
        require(reflectFee <= maxReflectFee); // Prevents owner from abusing fees.
        _reflectFee = reflectFee;
    }
    
    function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() {
        require(liquidityFee <= maxLiquidityFee); // Prevents owner from abusing fees.
        _liquidityFee = liquidityFee;
    }

    function setMarketingFeePercent(uint256 marketingFee) external onlyOwner() {
        require(marketingFee <= maxMarketingFee); // Prevents owner from abusing fees.
        _marketingFee = marketingFee;
    }

    function setMaxTxPercent(uint256 percent, uint256 divisor) external onlyOwner() {
        require(divisor <= 10000); // Cannot set lower than 0.01%
        _maxTxAmount = _tTotal.mul(percent).div(divisor);
        maxTxAmountUI = startingSupply.mul(percent).div(divisor);
    }

    function setMaxWalletSize(uint256 percent, uint256 divisor) external onlyOwner() {
        require(divisor <= 1000); // Cannot set lower than 0.1%
        _maxWalletSize = _tTotal.mul(percent).div(divisor);
        maxWalletSizeUI = startingSupply.mul(percent).div(divisor);
    }

    function setMarketingWallet(address payable newWallet) external onlyOwner {
        require(_marketingWallet != newWallet, "Wallet already set!");
        _marketingWallet = payable(newWallet);
    }

    function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
        swapAndLiquifyEnabled = _enabled;
        emit SwapAndLiquifyEnabledUpdated(_enabled);
    }

    function excludeFromFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = true;
    }
    
    function includeInFee(address account) external onlyOwner {
        _isExcludedFromFee[account] = false;
    }

    function totalFees() public view returns (uint256) {
        return _tFeeTotal;
    }

    function _hasLimits(address from, address to) private view returns (bool) {
        return from != owner()
            && to != owner()
            && !_liquidityHolders[to]
            && !_liquidityHolders[from]
            && to != burnAddress
            && to != address(0)
            && from != address(this);
    }

    function deliver(uint256 tAmount) public {
        address sender = _msgSender();
        require(!_isExcluded[sender], "Excluded addresses cannot call this function");
        (uint256 rAmount,,,,,) = _getValues(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rTotal = _rTotal.sub(rAmount);
        _tFeeTotal = _tFeeTotal.add(tAmount);
    }

    function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
        require(tAmount <= _tTotal, "Amount must be less than supply");
        if (!deductTransferFee) {
            (uint256 rAmount,,,,,) = _getValues(tAmount);
            return rAmount;
        } else {
            (,uint256 rTransferAmount,,,,) = _getValues(tAmount);
            return rTransferAmount;
        }
    }

    function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
        require(rAmount <= _rTotal, "Amount must be less than total reflections");
        uint256 currentRate =  _getRate();
        return rAmount.div(currentRate);
    }

    function excludeFromReward(address account) public onlyOwner() {
        // require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not exclude Uniswap router.');
        require(!_isExcluded[account], "Account is already excluded");
        if(_rOwned[account] > 0) {
            _tOwned[account] = tokenFromReflection(_rOwned[account]);
        }
        _isExcluded[account] = true;
        _excluded.push(account);
    }

    function includeInReward(address account) external onlyOwner() {
        require(_isExcluded[account], "Account is already excluded");
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_excluded[i] == account) {
                _excluded[i] = _excluded[_excluded.length - 1];
                _tOwned[account] = 0;
                _isExcluded[account] = false;
                _excluded.pop();
                break;
            }
        }
    }
    
     //to recieve ETH from dexRouter when swaping
    receive() external payable {}

    function _approve(address owner, address spender, uint256 amount) private {
        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);
    }

    function _transfer(
        address from
,        address to,
        uint256 amount
    ) private {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");
        require(amount > 0, "Transfer amount must be greater than zero");
        if(_hasLimits(from, to))
            require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
        if(_hasLimits(from, to)
            && to != _routerAddress 
            && to != lpPair
        ) {
            uint256 contractBalanceRecepient = balanceOf(to);
            require(contractBalanceRecepient + amount <= _maxWalletSize, "Transfer amount exceeds the maxWalletSize.");
        }

        uint256 contractTokenBalance = balanceOf(address(this));
        
        if(contractTokenBalance >= _maxTxAmount)
        {
            contractTokenBalance = _maxTxAmount;
        }
        
        bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
        if (!inSwapAndLiquify
            && to == lpPair
            && swapAndLiquifyEnabled
        ) {
            if (overMinTokenBalance) {
                contractTokenBalance = numTokensSellToAddToLiquidity;
                swapAndLiquify(contractTokenBalance);
            }
        }
        
        bool takeFee = true;
        
        if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
            takeFee = false;
        }
        
        _tokenTransfer(from,to,amount,takeFee);
    }

    function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
        if (_marketingFee + _liquidityFee == 0)
            return;
        uint256 toMarketing = contractTokenBalance.mul(_marketingFee).div(_marketingFee.add(_liquidityFee));
        uint256 toLiquify = contractTokenBalance.sub(toMarketing);

        // split the contract balance into halves
        uint256 half = toLiquify.div(2);
        uint256 otherHalf = toLiquify.sub(half);

        // capture the contract's current ETH balance.
        // this is so that we can capture exactly the amount of ETH that the
        // swap creates, and not make the liquidity event include any ETH that
        // has been manually sent to the contract
        uint256 initialBalance = address(this).balance;

        // swap tokens for ETH
        uint256 toSwapForEth = half.add(toMarketing);
        swapTokensForEth(toSwapForEth);

        // how much ETH did we just swap into?
        uint256 fromSwap = address(this).balance.sub(initialBalance);
        uint256 liquidityBalance = fromSwap.mul(half).div(toSwapForEth);

        addLiquidity(otherHalf, liquidityBalance);

        emit SwapAndLiquify(half, liquidityBalance, otherHalf);

        _marketingWallet.transfer(fromSwap.sub(liquidityBalance));
    }

    function swapTokensForEth(uint256 tokenAmount) private {
        // generate the uniswap lpPair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = dexRouter.WAVAX();

        _approve(address(this), address(dexRouter), tokenAmount);

        // make the swap
        dexRouter.swapExactTokensForAVAXSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );
    }

    function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(dexRouter), tokenAmount);

        // add the liquidity
        dexRouter.addLiquidityAVAX{value: ethAmount}(
            address(this),
            tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            burnAddress,
            block.timestamp
        );
    }

    function _tokenTransfer(address from, address to, uint256 amount,bool takeFee) private {
        // Failsafe, disable the whole system if needed.
        if (sniperProtection){
            // If sender is a sniper address, reject the transfer.
            if (isSniper(from) || isSniper(to)) {
                revert("Sniper rejected.");
            }

            // Check if this is the liquidity adding tx to startup.
            if (!_hasLiqBeenAdded) {
                _checkLiquidityAdd(from, to);
                    if (!_hasLiqBeenAdded && _hasLimits(from, to)) {
                        revert("Only owner can transfer at this time.");
                    }
            } else {
                if (_liqAddBlock > 0 
                    && from == lpPair 
                    && _hasLimits(from, to)
                ) {
                    if (block.number - _liqAddBlock < snipeBlockAmt) {
                        _isSniper[to] = true;
                        snipersCaught ++;
                        emit SniperCaught(to);
                    }
                }
            }
        }

        if(!takeFee)
            removeAllFee();
        
        _finalizeTransfer(from, to, amount);
        
        if(!takeFee)
            restoreAllFee();
    }

    function _finalizeTransfer(address sender, address recipient, uint256 tAmount) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount);

        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);

        if (_isExcluded[sender] && !_isExcluded[recipient]) {
            _tOwned[sender] = _tOwned[sender].sub(tAmount);
        } else if (!_isExcluded[sender] && _isExcluded[recipient]) {
            _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);  
        } else if (_isExcluded[sender] && _isExcluded[recipient]) {
            _tOwned[sender] = _tOwned[sender].sub(tAmount);
            _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
        }

        if (tLiquidity > 0)
            _takeLiquidity(sender, tLiquidity);
        if (rFee > 0 || tFee > 0)
            _takeReflect(rFee, tFee);

        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _checkLiquidityAdd(address from, address to) private {
        require(!_hasLiqBeenAdded, "Liquidity already added and marked.");
        if (!_hasLimits(from, to) && to == lpPair) {
            _liquidityHolders[from] = true;
            _hasLiqBeenAdded = true;
            _liqAddBlock = block.number;
            _liqAddStamp = block.timestamp;

            swapAndLiquifyEnabled = true;
            emit SwapAndLiquifyEnabledUpdated(true);
        }
    }

    function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
        (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount);
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate());
        return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity);
    }

    function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) {
        uint256 tFee = calculateTaxFee(tAmount);
        uint256 tLiquidity = calculateLiquidityFee(tAmount);
        uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity);
        return (tTransferAmount, tFee, tLiquidity);
    }

    function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
        uint256 rAmount = tAmount.mul(currentRate);
        uint256 rFee = tFee.mul(currentRate);
        uint256 rLiquidity = tLiquidity.mul(currentRate);
        uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity);
        return (rAmount, rTransferAmount, rFee);
    }


    function _getRate() private view returns(uint256) {
        (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
        return rSupply.div(tSupply);
    }

    function _getCurrentSupply() private view returns(uint256, uint256) {
        uint256 rSupply = _rTotal;
        uint256 tSupply = _tTotal;      
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
            rSupply = rSupply.sub(_rOwned[_excluded[i]]);
            tSupply = tSupply.sub(_tOwned[_excluded[i]]);
        }
        if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
        return (rSupply, tSupply);
    }

    function _takeReflect(uint256 rFee, uint256 tFee) private {
        _rTotal = _rTotal.sub(rFee);
        _tFeeTotal = _tFeeTotal.add(tFee);
    }
    
    function _takeLiquidity(address sender, uint256 tLiquidity) private {
        uint256 currentRate =  _getRate();
        uint256 rLiquidity = tLiquidity.mul(currentRate);
        _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);
        if(_isExcluded[address(this)])
            _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);
        emit Transfer(sender, address(this), tLiquidity); // Transparency is the key to success.
    }

    function calculateTaxFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_reflectFee).div(masterTaxDivisor);
    }

    function calculateLiquidityFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_liquidityFee.add(_marketingFee)).div(masterTaxDivisor);
    }

    function removeAllFee() private {
        if(_reflectFee == 0 && _liquidityFee == 0) return;
        
        _previousReflectFee = _reflectFee;
        _previousLiquidityFee = _liquidityFee;
        _previousMarketingFee = _marketingFee;

        _reflectFee = 0;
        _liquidityFee = 0;
        _marketingFee = 0;
    }
    
    function restoreAllFee() private {
        _reflectFee = _previousReflectFee;
        _liquidityFee = _previousLiquidityFee;
        _marketingFee = _previousMarketingFee;
    }
}

Contract Bytecode

Bytecode

60a060405266038d7ea4c680006009908155600a805460ff191682178155600b8290556200002e919062000a90565b6009546200003d919062000b4e565b600c819055620000509060001962000bc7565b6200005e9060001962000b70565b600d5560408051808201909152600c8082526b0a6c2ccca9adededc82ecc2f60a31b60209092019182526200009691600f916200093e565b5060408051808201909152600980825268536166654d6f6f6e4160b81b6020909201918252620000c9916010916200093e565b5060c8601181905560125561032060138190556101906014819055601581905560168290556017819055601855601955612710601a55601d80546001600160a01b03199081167360ae616a2155ee3d9a68541ba4544862310933d417909155601e805490911661dead179055601f8054600161ff0160a01b031916733391bb5d9f8a2b05b9de0ecddef361ab9d20fdb6179055606460208190556103e86021819055600c5490916200017b9162000b4e565b62000187919062000a30565b602255602254602355602154602054600954620001a5919062000b4e565b620001b1919062000a30565b60245560646025556064602655602654602554600c54620001d3919062000b4e565b620001df919062000a30565b602755602754602855602654602554600954620001fd919062000b4e565b62000209919062000a30565b602955612710600c54600562000220919062000b4e565b6200022c919062000a30565b602a55602b805461ffff191660011790556000602c819055602d819055602e5560405162003cbd388190039081908339810160408190526200026e9162000a16565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600c5433600090815260026020908152604080832093909355600d546001825291839020919091556080839052601d54825163c45a015560e01b815292516001600160a01b0390911692839263c45a015592600480840193829003018186803b1580156200031c57600080fd5b505afa15801562000331573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003579190620009e4565b6001600160a01b031663c9c6539630836001600160a01b03166373b295c26040518163ffffffff1660e01b815260040160206040518083038186803b158015620003a057600080fd5b505afa158015620003b5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003db9190620009e4565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156200042457600080fd5b505af115801562000439573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200045f9190620009e4565b601c80546001600160a01b03199081166001600160a01b0393841617909155601b8054909116918316919091179055600160046000620004a76000546001600160a01b031690565b6001600160a01b0316815260208082019290925260409081016000908120805494151560ff199586161790553081526004909252812080549092166001908117909255600890620005006000546001600160a01b031690565b6001600160a01b0316815260208082019290925260409081016000908120805494151560ff19958616179055308082526005938490529181208054909416600190811790945560068054808601825590825260008051602062003c9d8339815191520180546001600160a01b031916909217909155620005886000546001600160a01b031690565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790556006620005c56000546001600160a01b031690565b8154600181810184556000938452602080852090920180546001600160a01b039485166001600160a01b031991821617909155601e80548516865260059093526040808620805460ff199081168517909155935460068054808601825560008051602062003c9d8339815191529081018054861693891693909317909255601f80548816895283892080548816871790555481548087018355830180548616918916919091179055601c8054881689529288208054909616851790955590548454938401855593909552930180549093169116179055620006bf620006a73390565b601d54600c546001600160a01b039091169062000812565b60076020527f3974655cf386dd0281d59943512b6e165571102f9cb45bb0979553e0772b39858054600160ff1991821681179092557fb877ca8b0c5fe75c56db8213368dfb62c6fb4034344b04d1504b7d5f77951d2380548216831790557fbb0a2d119ce52bb7d38f8b215dbe54a42d514050121aa352f30dcef48f9d6a1480548216831790557f102656755fc8c0116fbfdf77f8422922a98f38f25570077fe627b486ced4fa3d8054821683179055730538856b6d0383cde1709c6531b9a0437185462b6000527fc6499e842fb36db155a11e95063f7ea8c317f53f6fea0380357c187943bf739680549091169091179055620007ba3390565b6001600160a01b031660006001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600c546040516200080291815260200190565b60405180910390a3505062000c0a565b6001600160a01b0383166200087a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b6001600160a01b038216620008dd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840162000871565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b8280546200094c9062000b8a565b90600052602060002090601f016020900481019282620009705760008555620009bb565b82601f106200098b57805160ff1916838001178555620009bb565b82800160010185558215620009bb579182015b82811115620009bb5782518255916020019190600101906200099e565b50620009c9929150620009cd565b5090565b5b80821115620009c95760008155600101620009ce565b600060208284031215620009f757600080fd5b81516001600160a01b038116811462000a0f57600080fd5b9392505050565b60006020828403121562000a2957600080fd5b5051919050565b60008262000a425762000a4262000bf4565b500490565b600181815b8085111562000a8857816000190482111562000a6c5762000a6c62000bde565b8085161562000a7a57918102915b93841c939080029062000a4c565b509250929050565b600062000a0f838360008262000aa95750600162000b48565b8162000ab85750600062000b48565b816001811462000ad1576002811462000adc5762000afc565b600191505062000b48565b60ff84111562000af05762000af062000bde565b50506001821b62000b48565b5060208310610133831016604e8410600b841016171562000b21575081810a62000b48565b62000b2d838362000a47565b806000190482111562000b445762000b4462000bde565b0290505b92915050565b600081600019048311821515161562000b6b5762000b6b62000bde565b500290565b60008282101562000b855762000b8562000bde565b500390565b600181811c9082168062000b9f57607f821691505b6020821081141562000bc157634e487b7160e01b600052602260045260246000fd5b50919050565b60008262000bd95762000bd962000bf4565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60805161307762000c2660003960006120e001526130776000f3fe6080604052600436106102975760003560e01c806350a8e0161161015a5780638ee88c53116100c1578063dd62ed3e1161007a578063dd62ed3e146107f9578063de1c24d01461083f578063e79d41601461085f578063ea2f0b3714610875578063f2fde38b14610895578063f6540ec7146108b557600080fd5b80638ee88c531461074457806395d89b4114610764578063a457c2d714610779578063a9059cbb14610799578063c49b9a80146107b9578063d7124d9f146107d957600080fd5b806370a082311161011357806370a082311461069857806370d5ae05146106b8578063715018a6146106d857806388f82020146106ed578063893d20e8146107265780638da5cb5b1461072657600080fd5b806350a8e016146105d457806352390c02146105f35780635342acb4146106135780635d098b381461064c578063640384091461066c5780636bc87c3a1461068257600080fd5b8063313ce567116101fe5780633f3cf56c116101b75780633f3cf56c14610513578063437823ec14610533578063452ed4f1146105535780634549b03914610573578063457c194c146105935780634a74bb02146105b357600080fd5b8063313ce5671461045157806333251a0b146104735780633685d4191461049357806339509351146104b35780633b3e672f146104d35780633bd5d173146104f357600080fd5b806315639c1b1161025057806315639c1b146103b057806318160ddd146103c657806322976e0d146103db57806323b872dd146103f157806326003957146104115780632d8381191461043157600080fd5b8063061c82d0146102a357806306fdde03146102c55780630758d924146102f0578063095ea7b3146103285780630f3a325f1461035857806313114a9d1461039157600080fd5b3661029e57005b600080fd5b3480156102af57600080fd5b506102c36102be366004612d44565b6108cb565b005b3480156102d157600080fd5b506102da610912565b6040516102e79190612dd9565b60405180910390f35b3480156102fc57600080fd5b50601b54610310906001600160a01b031681565b6040516001600160a01b0390911681526020016102e7565b34801561033457600080fd5b50610348610343366004612c91565b6109a4565b60405190151581526020016102e7565b34801561036457600080fd5b50610348610373366004612bdd565b6001600160a01b031660009081526007602052604090205460ff1690565b34801561039d57600080fd5b50600e545b6040519081526020016102e7565b3480156103bc57600080fd5b506103a260115481565b3480156103d257600080fd5b50600c546103a2565b3480156103e757600080fd5b506103a260175481565b3480156103fd57600080fd5b5061034861040c366004612c50565b6109bb565b34801561041d57600080fd5b506102c361042c366004612d89565b610a24565b34801561043d57600080fd5b506103a261044c366004612d44565b610a99565b34801561045d57600080fd5b50600a5460405160ff90911681526020016102e7565b34801561047f57600080fd5b506102c361048e366004612bdd565b610b1d565b34801561049f57600080fd5b506102c36104ae366004612bdd565b610bda565b3480156104bf57600080fd5b506103486104ce366004612c91565b610d91565b3480156104df57600080fd5b506103486104ee366004612cbd565b610dc7565b3480156104ff57600080fd5b506102c361050e366004612d44565b610e9e565b34801561051f57600080fd5b506102c361052e366004612d89565b610f88565b34801561053f57600080fd5b506102c361054e366004612bdd565b610ff7565b34801561055f57600080fd5b50601c54610310906001600160a01b031681565b34801561057f57600080fd5b506103a261058e366004612d5d565b611045565b34801561059f57600080fd5b506102c36105ae366004612d44565b6110d2565b3480156105bf57600080fd5b50601f5461034890600160a81b900460ff1681565b3480156105e057600080fd5b50602b5461034890610100900460ff1681565b3480156105ff57600080fd5b506102c361060e366004612bdd565b611110565b34801561061f57600080fd5b5061034861062e366004612bdd565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561065857600080fd5b506102c3610667366004612bdd565b611263565b34801561067857600080fd5b506103a260245481565b34801561068e57600080fd5b506103a260145481565b3480156106a457600080fd5b506103a26106b3366004612bdd565b611303565b3480156106c457600080fd5b50601e54610310906001600160a01b031681565b3480156106e457600080fd5b506102c3611362565b3480156106f957600080fd5b50610348610708366004612bdd565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561073257600080fd5b506000546001600160a01b0316610310565b34801561075057600080fd5b506102c361075f366004612d44565b6113d6565b34801561077057600080fd5b506102da611414565b34801561078557600080fd5b50610348610794366004612c91565b611423565b3480156107a557600080fd5b506103486107b4366004612c91565b611472565b3480156107c557600080fd5b506102c36107d4366004612d29565b61147f565b3480156107e557600080fd5b506102c36107f4366004612d29565b611501565b34801561080557600080fd5b506103a2610814366004612c17565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561084b57600080fd5b506102c361085a366004612bdd565b611586565b34801561086b57600080fd5b506103a2602e5481565b34801561088157600080fd5b506102c3610890366004612bdd565b6115d2565b3480156108a157600080fd5b506102c36108b0366004612bdd565b61161d565b3480156108c157600080fd5b506103a260295481565b6000546001600160a01b031633146108fe5760405162461bcd60e51b81526004016108f590612e2e565b60405180910390fd5b60135481111561090d57600080fd5b601155565b6060600f805461092190612f44565b80601f016020809104026020016040519081016040528092919081815260200182805461094d90612f44565b801561099a5780601f1061096f5761010080835404028352916020019161099a565b820191906000526020600020905b81548152906001019060200180831161097d57829003601f168201915b5050505050905090565b60006109b1338484611707565b5060015b92915050565b60006109c884848461182b565b610a1a8433610a1585604051806060016040528060288152602001612ff5602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190611b5d565b611707565b5060019392505050565b6000546001600160a01b03163314610a4e5760405162461bcd60e51b81526004016108f590612e2e565b6103e8811115610a5d57600080fd5b610a7c81610a7684600c54611b9790919063ffffffff16565b90611c16565b602755600954610a92908290610a769085611b97565b6029555050565b6000600d54821115610b005760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016108f5565b6000610b0a611c58565b9050610b168382611c16565b9392505050565b6000546001600160a01b03163314610b475760405162461bcd60e51b81526004016108f590612e2e565b6001600160a01b03811660009081526007602052604090205460ff16610bb95760405162461bcd60e51b815260206004820152602160248201527f4163636f756e74206973206e6f742061207265636f7264656420736e697065726044820152601760f91b60648201526084016108f5565b6001600160a01b03166000908152600760205260409020805460ff19169055565b6000546001600160a01b03163314610c045760405162461bcd60e51b81526004016108f590612e2e565b6001600160a01b03811660009081526005602052604090205460ff16610c6c5760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c75646564000000000060448201526064016108f5565b60005b600654811015610d8d57816001600160a01b031660068281548110610c9657610c96612fc6565b6000918252602090912001546001600160a01b03161415610d7b5760068054610cc190600190612f2d565b81548110610cd157610cd1612fc6565b600091825260209091200154600680546001600160a01b039092169183908110610cfd57610cfd612fc6565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600590925220805460ff191690556006805480610d5557610d55612fb0565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b80610d8581612f7f565b915050610c6f565b5050565b3360008181526003602090815260408083206001600160a01b038716845290915281205490916109b1918590610a159086611c7b565b6000838214610e225760405162461bcd60e51b815260206004820152602160248201527f4d757374206265206d61746368696e6720617267756d656e74206c656e6774686044820152607360f81b60648201526084016108f5565b8360005b81811015610e9157610e76878783818110610e4357610e43612fc6565b9050602002016020810190610e589190612bdd565b868684818110610e6a57610e6a612fc6565b90506020020135611472565b610e7f57600080fd5b80610e8981612f7f565b915050610e26565b5060019695505050505050565b3360008181526005602052604090205460ff1615610f135760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b60648201526084016108f5565b6000610f1e83611cda565b505050506001600160a01b038416600090815260016020526040902054919250610f4a91905082611d29565b6001600160a01b038316600090815260016020526040902055600d54610f709082611d29565b600d55600e54610f809084611c7b565b600e55505050565b6000546001600160a01b03163314610fb25760405162461bcd60e51b81526004016108f590612e2e565b612710811115610fc157600080fd5b610fda81610a7684600c54611b9790919063ffffffff16565b602255600954610ff0908290610a769085611b97565b6024555050565b6000546001600160a01b031633146110215760405162461bcd60e51b81526004016108f590612e2e565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000600c548311156110995760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c790060448201526064016108f5565b816110b85760006110a984611cda565b509395506109b5945050505050565b60006110c384611cda565b509295506109b5945050505050565b6000546001600160a01b031633146110fc5760405162461bcd60e51b81526004016108f590612e2e565b60195481111561110b57600080fd5b601755565b6000546001600160a01b0316331461113a5760405162461bcd60e51b81526004016108f590612e2e565b6001600160a01b03811660009081526005602052604090205460ff16156111a35760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c75646564000000000060448201526064016108f5565b6001600160a01b038116600090815260016020526040902054156111fd576001600160a01b0381166000908152600160205260409020546111e390610a99565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600560205260408120805460ff191660019081179091556006805491820181559091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319169091179055565b6000546001600160a01b0316331461128d5760405162461bcd60e51b81526004016108f590612e2e565b601f546001600160a01b03828116911614156112e15760405162461bcd60e51b815260206004820152601360248201527257616c6c657420616c7265616479207365742160681b60448201526064016108f5565b601f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526005602052604081205460ff161561134057506001600160a01b031660009081526002602052604090205490565b6001600160a01b0382166000908152600160205260409020546109b590610a99565b6000546001600160a01b0316331461138c5760405162461bcd60e51b81526004016108f590612e2e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146114005760405162461bcd60e51b81526004016108f590612e2e565b60165481111561140f57600080fd5b601455565b60606010805461092190612f44565b60006109b13384610a158560405180606001604052806025815260200161301d602591393360009081526003602090815260408083206001600160a01b038d1684529091529020549190611b5d565b60006109b133848461182b565b6000546001600160a01b031633146114a95760405162461bcd60e51b81526004016108f590612e2e565b601f8054821515600160a81b0260ff60a81b199091161790556040517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc159906114f690831515815260200190565b60405180910390a150565b6000546001600160a01b0316331461152b5760405162461bcd60e51b81526004016108f590612e2e565b602b5460ff16151581151514156115735760405162461bcd60e51b815260206004820152600c60248201526b20b63932b0b23c9039b2ba1760a11b60448201526064016108f5565b602b805460ff1916911515919091179055565b6000546001600160a01b031633146115b05760405162461bcd60e51b81526004016108f590612e2e565b601c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146115fc5760405162461bcd60e51b81526004016108f590612e2e565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146116475760405162461bcd60e51b81526004016108f590612e2e565b6001600160a01b0381166116ac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108f5565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166117695760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108f5565b6001600160a01b0382166117ca5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108f5565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661188f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108f5565b6001600160a01b0382166118f15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108f5565b600081116119535760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016108f5565b61195d8383611d6b565b156119c5576022548111156119c55760405162461bcd60e51b815260206004820152602860248201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546044820152673c20b6b7bab73a1760c11b60648201526084016108f5565b6119cf8383611d6b565b80156119e95750601d546001600160a01b03838116911614155b8015611a035750601c546001600160a01b03838116911614155b15611a86576000611a1383611303565b602754909150611a238383612ed4565b1115611a845760405162461bcd60e51b815260206004820152602a60248201527f5472616e7366657220616d6f756e74206578636565647320746865206d61785760448201526930b63632ba29b4bd329760b11b60648201526084016108f5565b505b6000611a9130611303565b90506022548110611aa157506022545b602a54601f549082101590600160a01b900460ff16158015611ad05750601c546001600160a01b038581169116145b8015611ae55750601f54600160a81b900460ff165b15611afe578015611afe57602a549150611afe82611e28565b6001600160a01b03851660009081526004602052604090205460019060ff1680611b4057506001600160a01b03851660009081526004602052604090205460ff165b15611b49575060005b611b5586868684611f89565b505050505050565b60008184841115611b815760405162461bcd60e51b81526004016108f59190612dd9565b506000611b8e8486612f2d565b95945050505050565b600082611ba6575060006109b5565b6000611bb28385612f0e565b905082611bbf8583612eec565b14610b165760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016108f5565b6000610b1683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506121c0565b6000806000611c656121ee565b9092509050611c748282611c16565b9250505090565b600080611c888385612ed4565b905083811015610b165760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016108f5565b6000806000806000806000806000611cf18a612370565b9250925092506000806000611d0f8d8686611d0a611c58565b6123b2565b919f909e50909c50959a5093985091965092945050505050565b6000610b1683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b5d565b600080546001600160a01b03848116911614801590611d9857506000546001600160a01b03838116911614155b8015611dbd57506001600160a01b03821660009081526008602052604090205460ff16155b8015611de257506001600160a01b03831660009081526008602052604090205460ff16155b8015611dfc5750601e546001600160a01b03838116911614155b8015611e1057506001600160a01b03821615155b8015610b16575050506001600160a01b031630141590565b601f805460ff60a01b1916600160a01b179055601454601754611e4b9190612ed4565b611e5457611f79565b6000611e7e611e70601454601754611c7b90919063ffffffff16565b601754610a76908590611b97565b90506000611e8c8383611d29565b90506000611e9b826002611c16565b90506000611ea98383611d29565b9050476000611eb88487611c7b565b9050611ec381612402565b6000611ecf4784611d29565b90506000611ee183610a768489611b97565b9050611eed8582612563565b60408051878152602081018390529081018690527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a1601f546001600160a01b03166108fc611f478484611d29565b6040518115909202916000818181858888f19350505050158015611f6f573d6000803e3d6000fd5b5050505050505050505b50601f805460ff60a01b19169055565b602b5460ff1615612186576001600160a01b03841660009081526007602052604090205460ff1680611fd357506001600160a01b03831660009081526007602052604090205460ff165b156120135760405162461bcd60e51b815260206004820152601060248201526f29b734b832b9103932b532b1ba32b21760811b60448201526064016108f5565b602b54610100900460ff166120a95761202c8484612626565b602b54610100900460ff1615801561204957506120498484611d6b565b156120a45760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79206f776e65722063616e207472616e736665722061742074686973206044820152643a34b6b29760d91b60648201526084016108f5565b612186565b6000602c541180156120c85750601c546001600160a01b038581169116145b80156120d957506120d98484611d6b565b15612186577f0000000000000000000000000000000000000000000000000000000000000000602c544361210d9190612f2d565b1015612186576001600160a01b0383166000908152600760205260408120805460ff19166001179055602e80549161214483612f7f565b90915550506040516001600160a01b03841681527f18e6e5ce5c121466e41a954e72765d1ea02b8e6919043b61f0dab08b4c6572e59060200160405180910390a15b8061219357612193612744565b61219e84848461277d565b806121ba576121ba601254601155601554601455601854601755565b50505050565b600081836121e15760405162461bcd60e51b81526004016108f59190612dd9565b506000611b8e8486612eec565b600d54600c546000918291825b6006548110156123405782600160006006848154811061221d5761221d612fc6565b60009182526020808320909101546001600160a01b031683528201929092526040019020541180612288575081600260006006848154811061226157612261612fc6565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b1561229e57600d54600c54945094505050509091565b6122e460016000600684815481106122b8576122b8612fc6565b60009182526020808320909101546001600160a01b031683528201929092526040019020548490611d29565b925061232c600260006006848154811061230057612300612fc6565b60009182526020808320909101546001600160a01b031683528201929092526040019020548390611d29565b91508061233881612f7f565b9150506121fb565b50600c54600d5461235091611c16565b82101561236757600d54600c549350935050509091565b90939092509050565b60008060008061237f85612a48565b9050600061238c86612a65565b905060006123a48261239e8986611d29565b90611d29565b979296509094509092505050565b60008080806123c18886611b97565b905060006123cf8887611b97565b905060006123dd8888611b97565b905060006123ef8261239e8686611d29565b939b939a50919850919650505050505050565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061243757612437612fc6565b6001600160a01b03928316602091820292909201810191909152601b54604080516339d94ae160e11b8152905191909316926373b295c2926004808301939192829003018186803b15801561248b57600080fd5b505afa15801561249f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c39190612bfa565b816001815181106124d6576124d6612fc6565b6001600160a01b039283166020918202929092010152601b546124fc9130911684611707565b601b54604051633b158ab160e11b81526001600160a01b039091169063762b156290612535908590600090869030904290600401612e63565b600060405180830381600087803b15801561254f57600080fd5b505af1158015611b55573d6000803e3d6000fd5b601b5461257b9030906001600160a01b031684611707565b601b54601e54604051637c8d9fb960e11b81523060048201526024810185905260006044820181905260648201526001600160a01b0391821660848201524260a482015291169063f91b3f7290839060c4016060604051808303818588803b1580156125e657600080fd5b505af11580156125fa573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061261f9190612dab565b5050505050565b602b54610100900460ff161561268a5760405162461bcd60e51b815260206004820152602360248201527f4c697175696469747920616c726561647920616464656420616e64206d61726b60448201526232b21760e91b60648201526084016108f5565b6126948282611d6b565b1580156126ae5750601c546001600160a01b038281169116145b15610d8d576001600160a01b03821660009081526008602052604090819020805460ff19166001908117909155602b805461ff00191661010017905543602c5542602d55601f805460ff60a81b1916600160a81b17905590517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc1599161273891901515815260200190565b60405180910390a15050565b6011541580156127545750601454155b1561275b57565b6011805460125560148054601555601780546018556000928390559082905555565b60008060008060008061278f87611cda565b6001600160a01b038f16600090815260016020526040902054959b509399509197509550935091506127c19087611d29565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546127f09086611c7b565b6001600160a01b03808a16600090815260016020908152604080832094909455918c1681526005909152205460ff16801561284457506001600160a01b03881660009081526005602052604090205460ff16155b1561288a576001600160a01b03891660009081526002602052604090205461286c9088611d29565b6001600160a01b038a166000908152600260205260409020556129c2565b6001600160a01b03891660009081526005602052604090205460ff161580156128cb57506001600160a01b03881660009081526005602052604090205460ff165b15612911576001600160a01b0388166000908152600260205260409020546128f39084611c7b565b6001600160a01b0389166000908152600260205260409020556129c2565b6001600160a01b03891660009081526005602052604090205460ff16801561295157506001600160a01b03881660009081526005602052604090205460ff165b156129c2576001600160a01b0389166000908152600260205260409020546129799088611d29565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546129a89084611c7b565b6001600160a01b0389166000908152600260205260409020555b80156129d2576129d28982612a8e565b60008411806129e15750600082115b156129f0576129f08483612b58565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612a3591815260200190565b60405180910390a3505050505050505050565b60006109b5601a54610a7660115485611b9790919063ffffffff16565b60006109b5601a54610a76612a87601754601454611c7b90919063ffffffff16565b8590611b97565b6000612a98611c58565b90506000612aa68383611b97565b30600090815260016020526040902054909150612ac39082611c7b565b3060009081526001602090815260408083209390935560059052205460ff1615612b125730600090815260026020526040902054612b019084611c7b565b306000908152600260205260409020555b60405183815230906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a350505050565b600d54612b659083611d29565b600d55600e54612b759082611c7b565b600e555050565b60008083601f840112612b8e57600080fd5b50813567ffffffffffffffff811115612ba657600080fd5b6020830191508360208260051b8501011115612bc157600080fd5b9250929050565b80358015158114612bd857600080fd5b919050565b600060208284031215612bef57600080fd5b8135610b1681612fdc565b600060208284031215612c0c57600080fd5b8151610b1681612fdc565b60008060408385031215612c2a57600080fd5b8235612c3581612fdc565b91506020830135612c4581612fdc565b809150509250929050565b600080600060608486031215612c6557600080fd5b8335612c7081612fdc565b92506020840135612c8081612fdc565b929592945050506040919091013590565b60008060408385031215612ca457600080fd5b8235612caf81612fdc565b946020939093013593505050565b60008060008060408587031215612cd357600080fd5b843567ffffffffffffffff80821115612ceb57600080fd5b612cf788838901612b7c565b90965094506020870135915080821115612d1057600080fd5b50612d1d87828801612b7c565b95989497509550505050565b600060208284031215612d3b57600080fd5b610b1682612bc8565b600060208284031215612d5657600080fd5b5035919050565b60008060408385031215612d7057600080fd5b82359150612d8060208401612bc8565b90509250929050565b60008060408385031215612d9c57600080fd5b50508035926020909101359150565b600080600060608486031215612dc057600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015612e0657858101830151858201604001528201612dea565b81811115612e18576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015612eb35784516001600160a01b031683529383019391830191600101612e8e565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115612ee757612ee7612f9a565b500190565b600082612f0957634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612f2857612f28612f9a565b500290565b600082821015612f3f57612f3f612f9a565b500390565b600181811c90821680612f5857607f821691505b60208210811415612f7957634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612f9357612f93612f9a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0381168114612ff157600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f