Contract Address Details

0x26085054F7F6C113362a848F4ec7eD84E421DD53

Token
UNIDOGE EXCHANGE (UNIDOGE)
Creator
0x1509dc–1735df at 0x4c1db1–f6f533
Balance
0 Doge
Tokens
Fetching tokens...
Transactions
176 Transactions
Transfers
0 Transfers
Gas Used
12,469,374
Last Balance Update
25376172
Contract name:
UNIDOGE




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
200
Verified at
2022-08-19T09:51:27.630015Z

Constructor Arguments

00000000000000000000000072d85ab47fbfc5e7e04a8bcfca1601d8f8ce1a50

Arg [0] (address) : 0x72d85ab47fbfc5e7e04a8bcfca1601d8f8ce1a50

              

contracts/token/UNIDOGE.sol

// SPDX-License-Identifier: Unlicensed

pragma solidity ^0.6.12;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";

interface IUniswapV2Factory {
  function getPair(address tokenA, address tokenB) external returns (address);

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

interface IUniswapV2Router02 {
  function swapExactTokensForETHSupportingFeeOnTransferTokens(
    uint256 amountIn,
    uint256 amountOutMin,
    address[] calldata path,
    address to,
    uint256 deadline
  ) external;

  function addLiquidityETH(
    address token,
    uint256 amountTokenDesired,
    uint256 amountTokenMin,
    uint256 amountETHMin,
    address to,
    uint256 deadline
  )
    external
    payable
    returns (
      uint256 amountToken,
      uint256 amountETH,
      uint256 liquidity
    );

  function factory() external pure returns (address);

  function WETH() external pure returns (address);
}

interface IBP {
  function protect(
    address from,
    address to,
    uint256 amount
  ) external;
}

contract UNIDOGE is IERC20, Context, 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;

  uint256 private constant MAX = ~uint256(0);
  uint256 private _tTotal = 10 * 10**9 * 10**9;
  uint256 private _rTotal = (MAX - (MAX % _tTotal));

  string private _name = "UNIDOGE EXCHANGE";
  string private _symbol = "UNIDOGE";
  uint8 private _decimals = 9;

  uint256 public constant _holderFee = 2;
  uint256 public constant _devFee = 4;
  uint256 public _taxFee = _holderFee.add(_devFee);
  uint256 private _previousTaxFee = _taxFee;

  uint256 public _liquidityFee = 2;
  uint256 private _previousLiquidityFee = _liquidityFee;

  address public immutable _devAddress;

  IUniswapV2Router02 public uniswapV2Router;
  address public uniswapV2Pair;

  bool inSwapAndLiquify;
  bool public swapAndLiquifyEnabled = true;

  event SwapAndLiquifyEnabledUpdated(bool enabled);
  event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);

  modifier lockTheSwap() {
    inSwapAndLiquify = true;
    _;
    inSwapAndLiquify = false;
  }

  constructor(IUniswapV2Router02 _router) public {
    _rOwned[_msgSender()] = _rTotal;

    uniswapV2Router = _router;
    // Create a uniswap pair for this new token
    uniswapV2Pair = IUniswapV2Factory(_router.factory()).createPair(address(this), _router.WETH());

    _devAddress = _msgSender();

    //exclude owner and this contract from fee
    _isExcludedFromFee[owner()] = true;
    _isExcludedFromFee[address(this)] = true;

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

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

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

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

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

  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 allowance(address owner, address spender) public view override returns (uint256) {
    return _allowances[owner][spender];
  }

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

  function 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 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 isExcludedFromReward(address account) public view returns (bool) {
    return _isExcluded[account];
  }

  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(!_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;
      }
    }
  }

  function _transferBothExcluded(
    address sender,
    address recipient,
    uint256 tAmount
  ) private {
    (
      uint256 rAmount,
      uint256 rTransferAmount,
      uint256 rFee,
      uint256 tTransferAmount,
      uint256 tFee,
      uint256 tLiquidity
    ) = _getValues(tAmount);
    _tOwned[sender] = _tOwned[sender].sub(tAmount);
    _rOwned[sender] = _rOwned[sender].sub(rAmount);
    _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
    _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
    _takeLiquidity(tLiquidity);
    _reflectFee(rFee, tFee);
    emit Transfer(sender, recipient, tTransferAmount);
  }

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

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

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

  //to recieve ETH from uniswapV2Router when swaping
  receive() external payable {}

  function _reflectFee(uint256 rFee, uint256 tFee) private {
    uint256 currentRate = _getRate();
    uint256 tDev = tFee.mul(_devFee).div(_devFee.add(_holderFee));
    uint256 rDev = tDev.mul(currentRate);
    _rOwned[_devAddress] = _rOwned[_devAddress].add(rDev);
    if (_isExcluded[_devAddress]) _tOwned[_devAddress] = _tOwned[_devAddress].add(tDev);
    _rTotal = _rTotal.sub(rFee.sub(rDev));
  }

  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 _takeLiquidity(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);
  }

  function calculateTaxFee(uint256 _amount) private view returns (uint256) {
    return _amount.mul(_taxFee).div(10**2);
  }

  function calculateLiquidityFee(uint256 _amount) private view returns (uint256) {
    return _amount.mul(_liquidityFee).div(10**2);
  }

  function removeAllFee() private {
    if (_taxFee == 0 && _liquidityFee == 0) return;

    _previousTaxFee = _taxFee;
    _previousLiquidityFee = _liquidityFee;

    _taxFee = 0;
    _liquidityFee = 0;
  }

  function restoreAllFee() private {
    _taxFee = _previousTaxFee;
    _liquidityFee = _previousLiquidityFee;
  }

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

  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");
    _beforeTokenTransfer(from, to, amount);

    uint256 contractTokenBalance = balanceOf(address(this));

    if (!inSwapAndLiquify && from != uniswapV2Pair && swapAndLiquifyEnabled) {
      //add liquidity
      swapAndLiquify(contractTokenBalance);
    }

    //indicates if fee should be deducted from transfer
    bool takeFee = true;

    //if any account belongs to _isExcludedFromFee account then remove the fee
    if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
      takeFee = false;
    }

    //transfer amount, it will take tax, burn, liquidity fee
    _tokenTransfer(from, to, amount, takeFee);
  }

  function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
    // split the contract balance into halves
    uint256 half = contractTokenBalance.div(2);
    uint256 otherHalf = contractTokenBalance.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
    swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered

    // how much ETH did we just swap into?
    uint256 newBalance = address(this).balance.sub(initialBalance);

    // add liquidity to uniswap
    addLiquidity(otherHalf, newBalance);

    emit SwapAndLiquify(half, newBalance, otherHalf);
  }

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

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

    // make the swap
    uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
      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(uniswapV2Router), tokenAmount);

    // add the liquidity
    uniswapV2Router.addLiquidityETH{ value: ethAmount }(
      address(this),
      tokenAmount,
      0, // slippage is unavoidable
      0, // slippage is unavoidable
      owner(),
      block.timestamp
    );
  }

  //this method is responsible for taking all fee, if takeFee is true
  function _tokenTransfer(
    address sender,
    address recipient,
    uint256 amount,
    bool takeFee
  ) private {
    if (!takeFee) removeAllFee();

    if (_isExcluded[sender] && !_isExcluded[recipient]) {
      _transferFromExcluded(sender, recipient, amount);
    } else if (!_isExcluded[sender] && _isExcluded[recipient]) {
      _transferToExcluded(sender, recipient, amount);
    } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
      _transferStandard(sender, recipient, amount);
    } else if (_isExcluded[sender] && _isExcluded[recipient]) {
      _transferBothExcluded(sender, recipient, amount);
    } else {
      _transferStandard(sender, recipient, amount);
    }

    if (!takeFee) restoreAllFee();
  }

  function _transferStandard(
    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);
    _takeLiquidity(tLiquidity);
    _reflectFee(rFee, tFee);
    emit Transfer(sender, recipient, tTransferAmount);
  }

  function _transferToExcluded(
    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);
    _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
    _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
    _takeLiquidity(tLiquidity);
    _reflectFee(rFee, tFee);
    emit Transfer(sender, recipient, tTransferAmount);
  }

  function _transferFromExcluded(
    address sender,
    address recipient,
    uint256 tAmount
  ) private {
    (
      uint256 rAmount,
      uint256 rTransferAmount,
      uint256 rFee,
      uint256 tTransferAmount,
      uint256 tFee,
      uint256 tLiquidity
    ) = _getValues(tAmount);
    _tOwned[sender] = _tOwned[sender].sub(tAmount);
    _rOwned[sender] = _rOwned[sender].sub(rAmount);
    _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
    _takeLiquidity(tLiquidity);
    _reflectFee(rFee, tFee);
    emit Transfer(sender, recipient, tTransferAmount);
  }

  function setUniswapV2Pair(IUniswapV2Router02 _router) external onlyOwner {
    uniswapV2Router = _router;
    IUniswapV2Factory uniswapV2Factory = IUniswapV2Factory(_router.factory());
    uniswapV2Pair = uniswapV2Factory.getPair(address(this), _router.WETH());
    if (uniswapV2Pair == address(0)) {
      uniswapV2Pair = uniswapV2Factory.createPair(address(this), _router.WETH());
    }
  }

  IBP public bp;
  bool public bpEnabled;
  bool public bpDisabledForever = false;

  function setBPAddress(address _bp) external onlyOwner {
    bp = IBP(_bp);
  }

  function setBPEnabled(bool _enabled) external onlyOwner {
    bpEnabled = _enabled;
  }

  function setBPDisableForever() external onlyOwner {
    require(bpDisabledForever == false);
    bpDisabledForever = true;
  }

  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 amount
  ) internal virtual {
    if (bpEnabled && !bpDisabledForever) {
      bp.protect(from, to, amount);
    }
  }
}
        

@openzeppelin/contracts/access/AccessControl.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/EnumerableSet.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context {
    using EnumerableSet for EnumerableSet.AddressSet;
    using Address for address;

    struct RoleData {
        EnumerableSet.AddressSet members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view returns (bool) {
        return _roles[role].members.contains(account);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view returns (uint256) {
        return _roles[role].members.length();
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
        return _roles[role].members.at(index);
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (_roles[role].members.add(account)) {
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (_roles[role].members.remove(account)) {
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}
          

@openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract 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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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() public 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) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}
          

@openzeppelin/contracts/math/SafeMath.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * 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);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}
          

@openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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);
}
          

@openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    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");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    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");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    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");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        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);
            }
        }
    }
}
          

@openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

@openzeppelin/contracts/utils/EnumerableSet.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}
          

contracts/BotPrevention.sol

// SPDX-License-Identifier: Unlicensed

pragma solidity 0.6.12;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";

contract BotPrevention is Ownable, AccessControl {
  bytes32 public constant PROTECTED_ROLE = keccak256("PROTECTED_ROLE");

  // Flag BP
  bool public whitelistEnabled = true;

  uint256 private listingBlock;
  uint256 private startTime;

  uint256 private txCount;
  uint256 private txMax = 3;

  uint256 public duration = 3 minutes; // 3 minutes

  mapping(address => AddressReputation) public addressReputationMap;

  event AddWhiteListEvent(address[] _whitelistAddress);

  event RemoveWhitelistEvent(address[] _whitelistAddress);

  event AddBlackListEvent(address[] _blacklistAddress);

  event RemoveBlacklistEvent(address[] _blacklistAddress);

  event AddPairsEvent(address[] _pairAddresses);

  event RemovePairsEvent(address[] _pairAddresses);

  event LockPurchaseEvent(address buyer, uint256 amount);

  struct AddressReputation {
    bool isPair;
    bool isWhitelist;
    bool isBlacklist;
  }

  constructor() public {
    _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
  }

  function addWhitelist(address[] calldata _whitelistAddress) external onlyOwner {
    require(_whitelistAddress.length > 0, "_whitelistAddress must have length > 0");

    for (uint256 i = 0; i < _whitelistAddress.length; i++) {
      address targetAddress = _whitelistAddress[i];
      AddressReputation storage addressReputation = addressReputationMap[targetAddress];

      require(!addressReputation.isPair, "Cannot set whitelist for a pair");

      addressReputation.isWhitelist = true;
    }

    emit AddWhiteListEvent(_whitelistAddress);
  }

  function removeWhitelist(address[] calldata _whitelistAddress) external onlyOwner {
    require(_whitelistAddress.length > 0, "_whitelistAddress must have length > 0");

    for (uint256 i = 0; i < _whitelistAddress.length; i++) {
      address targetAddress = _whitelistAddress[i];

      AddressReputation storage addressReputation = addressReputationMap[targetAddress];

      addressReputation.isWhitelist = false;
    }

    emit RemoveWhitelistEvent(_whitelistAddress);
  }

  function addBlacklist(address[] calldata _blacklistAddress) external onlyOwner {
    require(_blacklistAddress.length > 0, "_blacklistAddress must have length > 0");

    for (uint256 i = 0; i < _blacklistAddress.length; i++) {
      address targetAddress = _blacklistAddress[i];
      AddressReputation storage addressReputation = addressReputationMap[targetAddress];

      require(!addressReputation.isPair, "Cannot set blacklist for a pair");

      addressReputation.isBlacklist = true;
    }

    emit AddBlackListEvent(_blacklistAddress);
  }

  function removeBlacklist(address[] calldata _blacklistAddress) external onlyOwner {
    require(_blacklistAddress.length > 0, "_blacklistAddress must have length > 0");

    for (uint256 i = 0; i < _blacklistAddress.length; i++) {
      address targetAddress = _blacklistAddress[i];

      AddressReputation storage addressReputation = addressReputationMap[targetAddress];

      addressReputation.isBlacklist = false;
    }

    emit RemoveBlacklistEvent(_blacklistAddress);
  }

  function addPairs(address[] calldata _pairAddresses) external onlyOwner {
    require(_pairAddresses.length > 0, "_pairAddresses must have length > 0");

    for (uint256 i = 0; i < _pairAddresses.length; i++) {
      address targetAddress = _pairAddresses[i];
      AddressReputation storage addressReputation = addressReputationMap[targetAddress];
      require(!addressReputation.isWhitelist, "Cannot set pair for a whitelist");
      addressReputation.isPair = true;
    }

    emit AddPairsEvent(_pairAddresses);
  }

  function removePairs(address[] calldata _pairAddresses) external onlyOwner {
    require(_pairAddresses.length > 0, "_pairAddresses must have length > 0");

    for (uint256 i = 0; i < _pairAddresses.length; i++) {
      address targetAddress = _pairAddresses[i];
      AddressReputation storage addressReputation = addressReputationMap[targetAddress];

      addressReputation.isPair = false;
    }

    emit RemovePairsEvent(_pairAddresses);
  }

  function protect(
    address sender,
    address receiver,
    uint256 amount
  ) external {
    require(hasRole(PROTECTED_ROLE, msg.sender), "Sender must has protected role");
    AddressReputation memory senderReputation = addressReputationMap[sender];
    AddressReputation memory receiverReputation = addressReputationMap[receiver];

    if (listingBlock == 0 && receiverReputation.isPair) {
      listingBlock = block.number;
      startTime = block.timestamp;
      return;
    }

    bool isInProtectTime = block.timestamp < (startTime + duration);
    bool isBuyTx = senderReputation.isPair;
    bool isSellTx = receiverReputation.isPair;
    if ((isBuyTx || isSellTx) && txCount < txMax && isInProtectTime) {
      require(!receiverReputation.isBlacklist, "BL");
      if (whitelistEnabled) {
        require(senderReputation.isWhitelist || receiverReputation.isWhitelist, "Only WL");
      }
      txCount++;
      emit LockPurchaseEvent(receiver, amount);
      return;
    }
  }
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_router","internalType":"contract IUniswapV2Router02"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SwapAndLiquify","inputs":[{"type":"uint256","name":"tokensSwapped","internalType":"uint256","indexed":false},{"type":"uint256","name":"ethReceived","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokensIntoLiqudity","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SwapAndLiquifyEnabledUpdated","inputs":[{"type":"bool","name":"enabled","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"_devAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_devFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_holderFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_liquidityFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_taxFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IBP"}],"name":"bp","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"bpDisabledForever","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"bpEnabled","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"excludeFromFee","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"excludeFromReward","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"includeInFee","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"includeInReward","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExcludedFromFee","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExcludedFromReward","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reflectionFromToken","inputs":[{"type":"uint256","name":"tAmount","internalType":"uint256"},{"type":"bool","name":"deductTransferFee","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBPAddress","inputs":[{"type":"address","name":"_bp","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBPDisableForever","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBPEnabled","inputs":[{"type":"bool","name":"_enabled","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSwapAndLiquifyEnabled","inputs":[{"type":"bool","name":"_enabled","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setUniswapV2Pair","inputs":[{"type":"address","name":"_router","internalType":"contract IUniswapV2Router02"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"swapAndLiquifyEnabled","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenFromReflection","inputs":[{"type":"uint256","name":"rAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"uniswapV2Pair","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniswapV2Router02"}],"name":"uniswapV2Router","inputs":[]},{"type":"receive","stateMutability":"payable"}]
            

Contract Creation Code

0x678ac7230489e8000060075567693fcf03e3d7ffff1960085560e0604052601060a08190526f554e49444f47452045584348414e474560801b60c09081526200004c916009919062000464565b5060408051808201909152600780825266554e49444f474560c81b60209092019182526200007d91600a9162000464565b50600b8054600960ff19909116179055620000a760026004620003ef602090811b620018d717901c565b600c819055600d556002600e819055600f556011805460ff60a81b19908116600160a81b17909155601280549091169055348015620000e557600080fd5b50604051620030f3380380620030f3833981810160405260208110156200010b57600080fd5b505160006200011962000451565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600854600160006200017462000451565b6001600160a01b039081168252602080830193909352604091820160002093909355601080546001600160a01b0319169385169384179055805163c45a015560e01b8152905163c45a015592600480840193919291829003018186803b158015620001de57600080fd5b505afa158015620001f3573d6000803e3d6000fd5b505050506040513d60208110156200020a57600080fd5b5051604080516315ab88c960e31b815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b1580156200025b57600080fd5b505afa15801562000270573d6000803e3d6000fd5b505050506040513d60208110156200028757600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015620002da57600080fd5b505af1158015620002ef573d6000803e3d6000fd5b505050506040513d60208110156200030657600080fd5b5051601180546001600160a01b0319166001600160a01b039092169190911790556200033162000451565b60601b6001600160601b0319166080526001600460006200035162000455565b6001600160a01b0316815260208082019290925260409081016000908120805494151560ff1995861617905530815260049092529020805490911660011790556200039b62000451565b6001600160a01b031660006001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6007546040518082815260200191505060405180910390a35062000500565b6000828201838110156200044a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6000546001600160a01b031690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004a757805160ff1916838001178555620004d7565b82800160010185558215620004d7579182015b82811115620004d7578251825591602001919060010190620004ba565b50620004e5929150620004e9565b5090565b5b80821115620004e55760008155600101620004ea565b60805160601c612bc16200053260003980610f7852806128d05280612916528061296352806129a65250612bc16000f3fe6080604052600436106102295760003560e01c80636af6592911610123578063a457c2d7116100ab578063c49b9a801161006f578063c49b9a8014610792578063d39b7e4f146107be578063dd62ed3e146107f1578063ea2f0b371461082c578063f2fde38b1461085f57610230565b8063a457c2d7146106ca578063a9059cbb14610703578063aa45026b1461073c578063af20025214610751578063c17d2a061461077d57610230565b806388f82020116100f257806388f82020146106255780638da5cb5b1461065857806395d89b411461066d5780639f947a5e14610682578063a29a60891461069757610230565b80636af65929146105b35780636bc87c3a146105c857806370a08231146105dd578063715018a61461061057610230565b806339509351116101b157806349bd5a5e1161017557806349bd5a5e1461050e5780634a74bb02146105235780634aaee1121461053857806352390c021461054d5780635342acb41461058057610230565b806339509351146104465780633b124fe71461047f578063403a80c414610494578063437823ec146104a95780634549b039146104dc57610230565b806323b872dd116101f857806323b872dd1461036457806326898da9146103a75780632d838119146103bc578063313ce567146103e65780633685d4191461041157610230565b806306fdde0314610235578063095ea7b3146102bf5780631694505e1461030c57806318160ddd1461033d57610230565b3661023057005b600080fd5b34801561024157600080fd5b5061024a610892565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561028457818101518382015260200161026c565b50505050905090810190601f1680156102b15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102cb57600080fd5b506102f8600480360360408110156102e257600080fd5b506001600160a01b038135169060200135610928565b604080519115158252519081900360200190f35b34801561031857600080fd5b50610321610946565b604080516001600160a01b039092168252519081900360200190f35b34801561034957600080fd5b50610352610955565b60408051918252519081900360200190f35b34801561037057600080fd5b506102f86004803603606081101561038757600080fd5b506001600160a01b0381358116916020810135909116906040013561095b565b3480156103b357600080fd5b506102f86109e2565b3480156103c857600080fd5b50610352600480360360208110156103df57600080fd5b50356109f2565b3480156103f257600080fd5b506103fb610a54565b6040805160ff9092168252519081900360200190f35b34801561041d57600080fd5b506104446004803603602081101561043457600080fd5b50356001600160a01b0316610a5d565b005b34801561045257600080fd5b506102f86004803603604081101561046957600080fd5b506001600160a01b038135169060200135610c28565b34801561048b57600080fd5b50610352610c76565b3480156104a057600080fd5b50610352610c7c565b3480156104b557600080fd5b50610444600480360360208110156104cc57600080fd5b50356001600160a01b0316610c81565b3480156104e857600080fd5b50610352600480360360408110156104ff57600080fd5b50803590602001351515610d07565b34801561051a57600080fd5b50610321610d99565b34801561052f57600080fd5b506102f8610da8565b34801561054457600080fd5b506102f8610db8565b34801561055957600080fd5b506104446004803603602081101561057057600080fd5b50356001600160a01b0316610dc8565b34801561058c57600080fd5b506102f8600480360360208110156105a357600080fd5b50356001600160a01b0316610f58565b3480156105bf57600080fd5b50610321610f76565b3480156105d457600080fd5b50610352610f9a565b3480156105e957600080fd5b506103526004803603602081101561060057600080fd5b50356001600160a01b0316610fa0565b34801561061c57600080fd5b50610444611002565b34801561063157600080fd5b506102f86004803603602081101561064857600080fd5b50356001600160a01b03166110ae565b34801561066457600080fd5b506103216110cc565b34801561067957600080fd5b5061024a6110db565b34801561068e57600080fd5b5061032161113c565b3480156106a357600080fd5b50610444600480360360208110156106ba57600080fd5b50356001600160a01b031661114b565b3480156106d657600080fd5b506102f8600480360360408110156106ed57600080fd5b506001600160a01b03813516906020013561145f565b34801561070f57600080fd5b506102f86004803603604081101561072657600080fd5b506001600160a01b0381351690602001356114c7565b34801561074857600080fd5b506103526114db565b34801561075d57600080fd5b506104446004803603602081101561077457600080fd5b503515156114e0565b34801561078957600080fd5b50610444611560565b34801561079e57600080fd5b50610444600480360360208110156107b557600080fd5b503515156115ee565b3480156107ca57600080fd5b50610444600480360360208110156107e157600080fd5b50356001600160a01b03166116a3565b3480156107fd57600080fd5b506103526004803603604081101561081457600080fd5b506001600160a01b0381358116916020013516611727565b34801561083857600080fd5b506104446004803603602081101561084f57600080fd5b50356001600160a01b0316611752565b34801561086b57600080fd5b506104446004803603602081101561088257600080fd5b50356001600160a01b03166117d5565b60098054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561091e5780601f106108f35761010080835404028352916020019161091e565b820191906000526020600020905b81548152906001019060200180831161090157829003601f168201915b5050505050905090565b600061093c610935611938565b848461193c565b5060015b92915050565b6010546001600160a01b031681565b60075490565b6000610968848484611a28565b6109d884610974611938565b6109d385604051806060016040528060288152602001612aad602891396001600160a01b038a166000908152600360205260408120906109b2611938565b6001600160a01b031681526020810191909152604001600020549190611bb3565b61193c565b5060019392505050565b601254600160a01b900460ff1681565b6000600854821115610a355760405162461bcd60e51b815260040180806020018281038252602a815260200180612a1a602a913960400191505060405180910390fd5b6000610a3f611c4a565b9050610a4b8382611c6d565b9150505b919050565b600b5460ff1690565b610a65611938565b6001600160a01b0316610a766110cc565b6001600160a01b031614610abf576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526005602052604090205460ff16610b2c576040805162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015290519081900360640190fd5b60005b600654811015610c2457816001600160a01b031660068281548110610b5057fe5b6000918252602090912001546001600160a01b03161415610c1c57600680546000198101908110610b7d57fe5b600091825260209091200154600680546001600160a01b039092169183908110610ba357fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600590925220805460ff191690556006805480610bf557fe5b600082815260209020810160001990810180546001600160a01b0319169055019055610c24565b600101610b2f565b5050565b600061093c610c35611938565b846109d38560036000610c46611938565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906118d7565b600c5481565b600281565b610c89611938565b6001600160a01b0316610c9a6110cc565b6001600160a01b031614610ce3576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000600754831115610d60576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604482015290519081900360640190fd5b81610d7f576000610d7084611cd4565b50939550610940945050505050565b6000610d8a84611cd4565b50929550610940945050505050565b6011546001600160a01b031681565b601154600160a81b900460ff1681565b601254600160a81b900460ff1681565b610dd0611938565b6001600160a01b0316610de16110cc565b6001600160a01b031614610e2a576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526005602052604090205460ff1615610e98576040805162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015290519081900360640190fd5b6001600160a01b03811660009081526001602052604090205415610ef2576001600160a01b038116600090815260016020526040902054610ed8906109f2565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600560205260408120805460ff191660019081179091556006805491820181559091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319169091179055565b6001600160a01b031660009081526004602052604090205460ff1690565b7f000000000000000000000000000000000000000000000000000000000000000081565b600e5481565b6001600160a01b03811660009081526005602052604081205460ff1615610fe057506001600160a01b038116600090815260026020526040902054610a4f565b6001600160a01b038216600090815260016020526040902054610940906109f2565b61100a611938565b6001600160a01b031661101b6110cc565b6001600160a01b031614611064576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001600160a01b031660009081526005602052604090205460ff1690565b6000546001600160a01b031690565b600a8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561091e5780601f106108f35761010080835404028352916020019161091e565b6012546001600160a01b031681565b611153611938565b6001600160a01b03166111646110cc565b6001600160a01b0316146111ad576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b601080546001600160a01b0319166001600160a01b0383169081179091556040805163c45a015560e01b815290516000929163c45a0155916004808301926020929190829003018186803b15801561120457600080fd5b505afa158015611218573d6000803e3d6000fd5b505050506040513d602081101561122e57600080fd5b5051604080516315ab88c960e31b815290519192506001600160a01b038084169263e6a4390592309287169163ad5c464891600480820192602092909190829003018186803b15801561128057600080fd5b505afa158015611294573d6000803e3d6000fd5b505050506040513d60208110156112aa57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b1580156112fc57600080fd5b505af1158015611310573d6000803e3d6000fd5b505050506040513d602081101561132657600080fd5b5051601180546001600160a01b0319166001600160a01b03928316179081905516610c2457806001600160a01b031663c9c6539630846001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561139457600080fd5b505afa1580156113a8573d6000803e3d6000fd5b505050506040513d60208110156113be57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b15801561141057600080fd5b505af1158015611424573d6000803e3d6000fd5b505050506040513d602081101561143a57600080fd5b5051601180546001600160a01b0319166001600160a01b039092169190911790555050565b600061093c61146c611938565b846109d385604051806060016040528060258152602001612b676025913960036000611496611938565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611bb3565b600061093c6114d4611938565b8484611a28565b600481565b6114e8611938565b6001600160a01b03166114f96110cc565b6001600160a01b031614611542576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b60128054911515600160a01b0260ff60a01b19909216919091179055565b611568611938565b6001600160a01b03166115796110cc565b6001600160a01b0316146115c2576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b601254600160a81b900460ff16156115d957600080fd5b6012805460ff60a81b1916600160a81b179055565b6115f6611938565b6001600160a01b03166116076110cc565b6001600160a01b031614611650576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b60118054821515600160a81b810260ff60a81b199092169190911790915560408051918252517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc1599181900360200190a150565b6116ab611938565b6001600160a01b03166116bc6110cc565b6001600160a01b031614611705576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b61175a611938565b6001600160a01b031661176b6110cc565b6001600160a01b0316146117b4576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600460205260409020805460ff19169055565b6117dd611938565b6001600160a01b03166117ee6110cc565b6001600160a01b031614611837576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03811661187c5760405162461bcd60e51b8152600401808060200182810382526026815260200180612a446026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082820183811015611931576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b0383166119815760405162461bcd60e51b8152600401808060200182810382526024815260200180612b436024913960400191505060405180910390fd5b6001600160a01b0382166119c65760405162461bcd60e51b8152600401808060200182810382526022815260200180612a6a6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260036020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316611a6d5760405162461bcd60e51b8152600401808060200182810382526025815260200180612b1e6025913960400191505060405180910390fd5b6001600160a01b038216611ab25760405162461bcd60e51b81526004018080602001828103825260238152602001806129f76023913960400191505060405180910390fd5b60008111611af15760405162461bcd60e51b8152600401808060200182810382526029815260200180612af56029913960400191505060405180910390fd5b611afc838383611d23565b6000611b0730610fa0565b601154909150600160a01b900460ff16158015611b3257506011546001600160a01b03858116911614155b8015611b475750601154600160a81b900460ff165b15611b5557611b5581611dc6565b6001600160a01b03841660009081526004602052604090205460019060ff1680611b9757506001600160a01b03841660009081526004602052604090205460ff165b15611ba0575060005b611bac85858584611e6c565b5050505050565b60008184841115611c425760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c07578181015183820152602001611bef565b50505050905090810190601f168015611c345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000806000611c57611fe0565b9092509050611c668282611c6d565b9250505090565b6000808211611cc3576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611ccc57fe5b049392505050565b6000806000806000806000806000611ceb8a612143565b9250925092506000806000611d098d8686611d04611c4a565b612185565b919f909e50909c50959a5093985091965092945050505050565b601254600160a01b900460ff168015611d465750601254600160a81b900460ff16155b15611dc15760125460408051637e2f3afd60e01b81526001600160a01b03868116600483015285811660248301526044820185905291519190921691637e2f3afd91606480830192600092919082900301818387803b158015611da857600080fd5b505af1158015611dbc573d6000803e3d6000fd5b505050505b505050565b6011805460ff60a01b1916600160a01b1790556000611de6826002611c6d565b90506000611df483836121d5565b905047611e0083612232565b6000611e0c47836121d5565b9050611e1883826123e0565b604080518581526020810183905280820185905290517f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619181900360600190a150506011805460ff60a01b19169055505050565b80611e7957611e796124ad565b6001600160a01b03841660009081526005602052604090205460ff168015611eba57506001600160a01b03831660009081526005602052604090205460ff16155b15611ecf57611eca8484846124df565b611fcd565b6001600160a01b03841660009081526005602052604090205460ff16158015611f1057506001600160a01b03831660009081526005602052604090205460ff165b15611f2057611eca848484612603565b6001600160a01b03841660009081526005602052604090205460ff16158015611f6257506001600160a01b03831660009081526005602052604090205460ff16155b15611f7257611eca8484846126ac565b6001600160a01b03841660009081526005602052604090205460ff168015611fb257506001600160a01b03831660009081526005602052604090205460ff165b15611fc257611eca8484846126f0565b611fcd8484846126ac565b80611fda57611fda612763565b50505050565b6008546007546000918291825b6006548110156121115782600160006006848154811061200957fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054118061206e575081600260006006848154811061204757fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15612085576008546007549450945050505061213f565b6120c5600160006006848154811061209957fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205484906121d5565b925061210760026000600684815481106120db57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205483906121d5565b9150600101611fed565b5060075460085461212191611c6d565b8210156121395760085460075493509350505061213f565b90925090505b9091565b60008060008061215285612771565b9050600061215f86612793565b905060006121778261217189866121d5565b906121d5565b979296509094509092505050565b600080808061219488866127af565b905060006121a288876127af565b905060006121b088886127af565b905060006121c28261217186866121d5565b939b939a50919850919650505050505050565b60008282111561222c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6040805160028082526060808301845292602083019080368337019050509050308160008151811061226057fe5b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156122b457600080fd5b505afa1580156122c8573d6000803e3d6000fd5b505050506040513d60208110156122de57600080fd5b50518151829060019081106122ef57fe5b6001600160a01b039283166020918202929092010152601054612315913091168461193c565b60105460405163791ac94760e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b8381101561239b578181015183820152602001612383565b505050509050019650505050505050600060405180830381600087803b1580156123c457600080fd5b505af11580156123d8573d6000803e3d6000fd5b505050505050565b6010546123f89030906001600160a01b03168461193c565b6010546001600160a01b031663f305d7198230856000806124176110cc565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b15801561248257600080fd5b505af1158015612496573d6000803e3d6000fd5b50505050506040513d6060811015611fda57600080fd5b600c541580156124bd5750600e54155b156124c7576124dd565b600c8054600d55600e8054600f55600091829055555b565b6000806000806000806124f187611cd4565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061252390886121d5565b6001600160a01b038a1660009081526002602090815260408083209390935560019052205461255290876121d5565b6001600160a01b03808b1660009081526001602052604080822093909355908a168152205461258190866118d7565b6001600160a01b0389166000908152600160205260409020556125a381612808565b6125ad8483612890565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b60008060008060008061261587611cd4565b6001600160a01b038f16600090815260016020526040902054959b5093995091975095509350915061264790876121d5565b6001600160a01b03808b16600090815260016020908152604080832094909455918b1681526002909152205461267d90846118d7565b6001600160a01b03891660009081526002602090815260408083209390935560019052205461258190866118d7565b6000806000806000806126be87611cd4565b6001600160a01b038f16600090815260016020526040902054959b5093995091975095509350915061255290876121d5565b60008060008060008061270287611cd4565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061273490886121d5565b6001600160a01b038a1660009081526002602090815260408083209390935560019052205461264790876121d5565b600d54600c55600f54600e55565b6000610940606461278d600c54856127af90919063ffffffff16565b90611c6d565b6000610940606461278d600e54856127af90919063ffffffff16565b6000826127be57506000610940565b828202828482816127cb57fe5b04146119315760405162461bcd60e51b8152600401808060200182810382526021815260200180612a8c6021913960400191505060405180910390fd5b6000612812611c4a565b9050600061282083836127af565b3060009081526001602052604090205490915061283d90826118d7565b3060009081526001602090815260408083209390935560059052205460ff1615611dc1573060009081526002602052604090205461287b90846118d7565b30600090815260026020526040902055505050565b600061289a611c4a565b905060006128b86128ad600460026118d7565b61278d8560046127af565b905060006128c682846127af565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660009081526001602052604090205490915061290c90826118d7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660009081526001602090815260408083209390935560059052205460ff16156129d6576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660009081526002602052604090205461299c90836118d7565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152600260205260409020555b6129ec6129e386836121d5565b600854906121d5565b600855505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220d86bc6d7287417f86863a9be53302a238eeb51104abd4ec41a017bbecca9774564736f6c634300060c003300000000000000000000000072d85ab47fbfc5e7e04a8bcfca1601d8f8ce1a50

Deployed ByteCode

0x6080604052600436106102295760003560e01c80636af6592911610123578063a457c2d7116100ab578063c49b9a801161006f578063c49b9a8014610792578063d39b7e4f146107be578063dd62ed3e146107f1578063ea2f0b371461082c578063f2fde38b1461085f57610230565b8063a457c2d7146106ca578063a9059cbb14610703578063aa45026b1461073c578063af20025214610751578063c17d2a061461077d57610230565b806388f82020116100f257806388f82020146106255780638da5cb5b1461065857806395d89b411461066d5780639f947a5e14610682578063a29a60891461069757610230565b80636af65929146105b35780636bc87c3a146105c857806370a08231146105dd578063715018a61461061057610230565b806339509351116101b157806349bd5a5e1161017557806349bd5a5e1461050e5780634a74bb02146105235780634aaee1121461053857806352390c021461054d5780635342acb41461058057610230565b806339509351146104465780633b124fe71461047f578063403a80c414610494578063437823ec146104a95780634549b039146104dc57610230565b806323b872dd116101f857806323b872dd1461036457806326898da9146103a75780632d838119146103bc578063313ce567146103e65780633685d4191461041157610230565b806306fdde0314610235578063095ea7b3146102bf5780631694505e1461030c57806318160ddd1461033d57610230565b3661023057005b600080fd5b34801561024157600080fd5b5061024a610892565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561028457818101518382015260200161026c565b50505050905090810190601f1680156102b15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102cb57600080fd5b506102f8600480360360408110156102e257600080fd5b506001600160a01b038135169060200135610928565b604080519115158252519081900360200190f35b34801561031857600080fd5b50610321610946565b604080516001600160a01b039092168252519081900360200190f35b34801561034957600080fd5b50610352610955565b60408051918252519081900360200190f35b34801561037057600080fd5b506102f86004803603606081101561038757600080fd5b506001600160a01b0381358116916020810135909116906040013561095b565b3480156103b357600080fd5b506102f86109e2565b3480156103c857600080fd5b50610352600480360360208110156103df57600080fd5b50356109f2565b3480156103f257600080fd5b506103fb610a54565b6040805160ff9092168252519081900360200190f35b34801561041d57600080fd5b506104446004803603602081101561043457600080fd5b50356001600160a01b0316610a5d565b005b34801561045257600080fd5b506102f86004803603604081101561046957600080fd5b506001600160a01b038135169060200135610c28565b34801561048b57600080fd5b50610352610c76565b3480156104a057600080fd5b50610352610c7c565b3480156104b557600080fd5b50610444600480360360208110156104cc57600080fd5b50356001600160a01b0316610c81565b3480156104e857600080fd5b50610352600480360360408110156104ff57600080fd5b50803590602001351515610d07565b34801561051a57600080fd5b50610321610d99565b34801561052f57600080fd5b506102f8610da8565b34801561054457600080fd5b506102f8610db8565b34801561055957600080fd5b506104446004803603602081101561057057600080fd5b50356001600160a01b0316610dc8565b34801561058c57600080fd5b506102f8600480360360208110156105a357600080fd5b50356001600160a01b0316610f58565b3480156105bf57600080fd5b50610321610f76565b3480156105d457600080fd5b50610352610f9a565b3480156105e957600080fd5b506103526004803603602081101561060057600080fd5b50356001600160a01b0316610fa0565b34801561061c57600080fd5b50610444611002565b34801561063157600080fd5b506102f86004803603602081101561064857600080fd5b50356001600160a01b03166110ae565b34801561066457600080fd5b506103216110cc565b34801561067957600080fd5b5061024a6110db565b34801561068e57600080fd5b5061032161113c565b3480156106a357600080fd5b50610444600480360360208110156106ba57600080fd5b50356001600160a01b031661114b565b3480156106d657600080fd5b506102f8600480360360408110156106ed57600080fd5b506001600160a01b03813516906020013561145f565b34801561070f57600080fd5b506102f86004803603604081101561072657600080fd5b506001600160a01b0381351690602001356114c7565b34801561074857600080fd5b506103526114db565b34801561075d57600080fd5b506104446004803603602081101561077457600080fd5b503515156114e0565b34801561078957600080fd5b50610444611560565b34801561079e57600080fd5b50610444600480360360208110156107b557600080fd5b503515156115ee565b3480156107ca57600080fd5b50610444600480360360208110156107e157600080fd5b50356001600160a01b03166116a3565b3480156107fd57600080fd5b506103526004803603604081101561081457600080fd5b506001600160a01b0381358116916020013516611727565b34801561083857600080fd5b506104446004803603602081101561084f57600080fd5b50356001600160a01b0316611752565b34801561086b57600080fd5b506104446004803603602081101561088257600080fd5b50356001600160a01b03166117d5565b60098054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561091e5780601f106108f35761010080835404028352916020019161091e565b820191906000526020600020905b81548152906001019060200180831161090157829003601f168201915b5050505050905090565b600061093c610935611938565b848461193c565b5060015b92915050565b6010546001600160a01b031681565b60075490565b6000610968848484611a28565b6109d884610974611938565b6109d385604051806060016040528060288152602001612aad602891396001600160a01b038a166000908152600360205260408120906109b2611938565b6001600160a01b031681526020810191909152604001600020549190611bb3565b61193c565b5060019392505050565b601254600160a01b900460ff1681565b6000600854821115610a355760405162461bcd60e51b815260040180806020018281038252602a815260200180612a1a602a913960400191505060405180910390fd5b6000610a3f611c4a565b9050610a4b8382611c6d565b9150505b919050565b600b5460ff1690565b610a65611938565b6001600160a01b0316610a766110cc565b6001600160a01b031614610abf576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526005602052604090205460ff16610b2c576040805162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015290519081900360640190fd5b60005b600654811015610c2457816001600160a01b031660068281548110610b5057fe5b6000918252602090912001546001600160a01b03161415610c1c57600680546000198101908110610b7d57fe5b600091825260209091200154600680546001600160a01b039092169183908110610ba357fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600590925220805460ff191690556006805480610bf557fe5b600082815260209020810160001990810180546001600160a01b0319169055019055610c24565b600101610b2f565b5050565b600061093c610c35611938565b846109d38560036000610c46611938565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906118d7565b600c5481565b600281565b610c89611938565b6001600160a01b0316610c9a6110cc565b6001600160a01b031614610ce3576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000600754831115610d60576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604482015290519081900360640190fd5b81610d7f576000610d7084611cd4565b50939550610940945050505050565b6000610d8a84611cd4565b50929550610940945050505050565b6011546001600160a01b031681565b601154600160a81b900460ff1681565b601254600160a81b900460ff1681565b610dd0611938565b6001600160a01b0316610de16110cc565b6001600160a01b031614610e2a576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526005602052604090205460ff1615610e98576040805162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015290519081900360640190fd5b6001600160a01b03811660009081526001602052604090205415610ef2576001600160a01b038116600090815260016020526040902054610ed8906109f2565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600560205260408120805460ff191660019081179091556006805491820181559091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319169091179055565b6001600160a01b031660009081526004602052604090205460ff1690565b7f0000000000000000000000001509dc4da704eebab4f162124efd2201661735df81565b600e5481565b6001600160a01b03811660009081526005602052604081205460ff1615610fe057506001600160a01b038116600090815260026020526040902054610a4f565b6001600160a01b038216600090815260016020526040902054610940906109f2565b61100a611938565b6001600160a01b031661101b6110cc565b6001600160a01b031614611064576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001600160a01b031660009081526005602052604090205460ff1690565b6000546001600160a01b031690565b600a8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561091e5780601f106108f35761010080835404028352916020019161091e565b6012546001600160a01b031681565b611153611938565b6001600160a01b03166111646110cc565b6001600160a01b0316146111ad576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b601080546001600160a01b0319166001600160a01b0383169081179091556040805163c45a015560e01b815290516000929163c45a0155916004808301926020929190829003018186803b15801561120457600080fd5b505afa158015611218573d6000803e3d6000fd5b505050506040513d602081101561122e57600080fd5b5051604080516315ab88c960e31b815290519192506001600160a01b038084169263e6a4390592309287169163ad5c464891600480820192602092909190829003018186803b15801561128057600080fd5b505afa158015611294573d6000803e3d6000fd5b505050506040513d60208110156112aa57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b1580156112fc57600080fd5b505af1158015611310573d6000803e3d6000fd5b505050506040513d602081101561132657600080fd5b5051601180546001600160a01b0319166001600160a01b03928316179081905516610c2457806001600160a01b031663c9c6539630846001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561139457600080fd5b505afa1580156113a8573d6000803e3d6000fd5b505050506040513d60208110156113be57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b15801561141057600080fd5b505af1158015611424573d6000803e3d6000fd5b505050506040513d602081101561143a57600080fd5b5051601180546001600160a01b0319166001600160a01b039092169190911790555050565b600061093c61146c611938565b846109d385604051806060016040528060258152602001612b676025913960036000611496611938565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611bb3565b600061093c6114d4611938565b8484611a28565b600481565b6114e8611938565b6001600160a01b03166114f96110cc565b6001600160a01b031614611542576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b60128054911515600160a01b0260ff60a01b19909216919091179055565b611568611938565b6001600160a01b03166115796110cc565b6001600160a01b0316146115c2576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b601254600160a81b900460ff16156115d957600080fd5b6012805460ff60a81b1916600160a81b179055565b6115f6611938565b6001600160a01b03166116076110cc565b6001600160a01b031614611650576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b60118054821515600160a81b810260ff60a81b199092169190911790915560408051918252517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc1599181900360200190a150565b6116ab611938565b6001600160a01b03166116bc6110cc565b6001600160a01b031614611705576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b61175a611938565b6001600160a01b031661176b6110cc565b6001600160a01b0316146117b4576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600460205260409020805460ff19169055565b6117dd611938565b6001600160a01b03166117ee6110cc565b6001600160a01b031614611837576040805162461bcd60e51b81526020600482018190526024820152600080516020612ad5833981519152604482015290519081900360640190fd5b6001600160a01b03811661187c5760405162461bcd60e51b8152600401808060200182810382526026815260200180612a446026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082820183811015611931576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b0383166119815760405162461bcd60e51b8152600401808060200182810382526024815260200180612b436024913960400191505060405180910390fd5b6001600160a01b0382166119c65760405162461bcd60e51b8152600401808060200182810382526022815260200180612a6a6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260036020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316611a6d5760405162461bcd60e51b8152600401808060200182810382526025815260200180612b1e6025913960400191505060405180910390fd5b6001600160a01b038216611ab25760405162461bcd60e51b81526004018080602001828103825260238152602001806129f76023913960400191505060405180910390fd5b60008111611af15760405162461bcd60e51b8152600401808060200182810382526029815260200180612af56029913960400191505060405180910390fd5b611afc838383611d23565b6000611b0730610fa0565b601154909150600160a01b900460ff16158015611b3257506011546001600160a01b03858116911614155b8015611b475750601154600160a81b900460ff165b15611b5557611b5581611dc6565b6001600160a01b03841660009081526004602052604090205460019060ff1680611b9757506001600160a01b03841660009081526004602052604090205460ff165b15611ba0575060005b611bac85858584611e6c565b5050505050565b60008184841115611c425760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c07578181015183820152602001611bef565b50505050905090810190601f168015611c345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000806000611c57611fe0565b9092509050611c668282611c6d565b9250505090565b6000808211611cc3576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611ccc57fe5b049392505050565b6000806000806000806000806000611ceb8a612143565b9250925092506000806000611d098d8686611d04611c4a565b612185565b919f909e50909c50959a5093985091965092945050505050565b601254600160a01b900460ff168015611d465750601254600160a81b900460ff16155b15611dc15760125460408051637e2f3afd60e01b81526001600160a01b03868116600483015285811660248301526044820185905291519190921691637e2f3afd91606480830192600092919082900301818387803b158015611da857600080fd5b505af1158015611dbc573d6000803e3d6000fd5b505050505b505050565b6011805460ff60a01b1916600160a01b1790556000611de6826002611c6d565b90506000611df483836121d5565b905047611e0083612232565b6000611e0c47836121d5565b9050611e1883826123e0565b604080518581526020810183905280820185905290517f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619181900360600190a150506011805460ff60a01b19169055505050565b80611e7957611e796124ad565b6001600160a01b03841660009081526005602052604090205460ff168015611eba57506001600160a01b03831660009081526005602052604090205460ff16155b15611ecf57611eca8484846124df565b611fcd565b6001600160a01b03841660009081526005602052604090205460ff16158015611f1057506001600160a01b03831660009081526005602052604090205460ff165b15611f2057611eca848484612603565b6001600160a01b03841660009081526005602052604090205460ff16158015611f6257506001600160a01b03831660009081526005602052604090205460ff16155b15611f7257611eca8484846126ac565b6001600160a01b03841660009081526005602052604090205460ff168015611fb257506001600160a01b03831660009081526005602052604090205460ff165b15611fc257611eca8484846126f0565b611fcd8484846126ac565b80611fda57611fda612763565b50505050565b6008546007546000918291825b6006548110156121115782600160006006848154811061200957fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054118061206e575081600260006006848154811061204757fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15612085576008546007549450945050505061213f565b6120c5600160006006848154811061209957fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205484906121d5565b925061210760026000600684815481106120db57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205483906121d5565b9150600101611fed565b5060075460085461212191611c6d565b8210156121395760085460075493509350505061213f565b90925090505b9091565b60008060008061215285612771565b9050600061215f86612793565b905060006121778261217189866121d5565b906121d5565b979296509094509092505050565b600080808061219488866127af565b905060006121a288876127af565b905060006121b088886127af565b905060006121c28261217186866121d5565b939b939a50919850919650505050505050565b60008282111561222c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6040805160028082526060808301845292602083019080368337019050509050308160008151811061226057fe5b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156122b457600080fd5b505afa1580156122c8573d6000803e3d6000fd5b505050506040513d60208110156122de57600080fd5b50518151829060019081106122ef57fe5b6001600160a01b039283166020918202929092010152601054612315913091168461193c565b60105460405163791ac94760e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b8381101561239b578181015183820152602001612383565b505050509050019650505050505050600060405180830381600087803b1580156123c457600080fd5b505af11580156123d8573d6000803e3d6000fd5b505050505050565b6010546123f89030906001600160a01b03168461193c565b6010546001600160a01b031663f305d7198230856000806124176110cc565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b15801561248257600080fd5b505af1158015612496573d6000803e3d6000fd5b50505050506040513d6060811015611fda57600080fd5b600c541580156124bd5750600e54155b156124c7576124dd565b600c8054600d55600e8054600f55600091829055555b565b6000806000806000806124f187611cd4565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061252390886121d5565b6001600160a01b038a1660009081526002602090815260408083209390935560019052205461255290876121d5565b6001600160a01b03808b1660009081526001602052604080822093909355908a168152205461258190866118d7565b6001600160a01b0389166000908152600160205260409020556125a381612808565b6125ad8483612890565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b60008060008060008061261587611cd4565b6001600160a01b038f16600090815260016020526040902054959b5093995091975095509350915061264790876121d5565b6001600160a01b03808b16600090815260016020908152604080832094909455918b1681526002909152205461267d90846118d7565b6001600160a01b03891660009081526002602090815260408083209390935560019052205461258190866118d7565b6000806000806000806126be87611cd4565b6001600160a01b038f16600090815260016020526040902054959b5093995091975095509350915061255290876121d5565b60008060008060008061270287611cd4565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061273490886121d5565b6001600160a01b038a1660009081526002602090815260408083209390935560019052205461264790876121d5565b600d54600c55600f54600e55565b6000610940606461278d600c54856127af90919063ffffffff16565b90611c6d565b6000610940606461278d600e54856127af90919063ffffffff16565b6000826127be57506000610940565b828202828482816127cb57fe5b04146119315760405162461bcd60e51b8152600401808060200182810382526021815260200180612a8c6021913960400191505060405180910390fd5b6000612812611c4a565b9050600061282083836127af565b3060009081526001602052604090205490915061283d90826118d7565b3060009081526001602090815260408083209390935560059052205460ff1615611dc1573060009081526002602052604090205461287b90846118d7565b30600090815260026020526040902055505050565b600061289a611c4a565b905060006128b86128ad600460026118d7565b61278d8560046127af565b905060006128c682846127af565b6001600160a01b037f0000000000000000000000001509dc4da704eebab4f162124efd2201661735df1660009081526001602052604090205490915061290c90826118d7565b6001600160a01b037f0000000000000000000000001509dc4da704eebab4f162124efd2201661735df1660009081526001602090815260408083209390935560059052205460ff16156129d6576001600160a01b037f0000000000000000000000001509dc4da704eebab4f162124efd2201661735df1660009081526002602052604090205461299c90836118d7565b6001600160a01b037f0000000000000000000000001509dc4da704eebab4f162124efd2201661735df166000908152600260205260409020555b6129ec6129e386836121d5565b600854906121d5565b600855505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220d86bc6d7287417f86863a9be53302a238eeb51104abd4ec41a017bbecca9774564736f6c634300060c0033