ETH Price: $3,338.77 (-1.07%)
Gas: 8 Gwei

Contract

0x3ce1848F4ace979D31f7eD1921Ee0B2689Fce5A5
 

Overview

ETH Balance

1 wei

Eth Value

Less Than $0.01 (@ $3,338.77/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Approve202784322024-07-10 20:16:5919 days ago1720642619IN
0x3ce1848F...689Fce5A5
0 ETH0.000267615.77907231
Approve195319412024-03-28 10:12:47124 days ago1711620767IN
0x3ce1848F...689Fce5A5
0 ETH0.0015093232.61856487
Approve194843402024-03-21 16:52:47130 days ago1711039967IN
0x3ce1848F...689Fce5A5
0 ETH0.0016461535.3646435
Transfer194833772024-03-21 13:37:11130 days ago1711028231IN
0x3ce1848F...689Fce5A5
0 ETH0.0022765134.1680735
Approve194383652024-03-15 5:48:23137 days ago1710481703IN
0x3ce1848F...689Fce5A5
0 ETH0.0016343335.32008136
Approve193468902024-03-02 10:28:59150 days ago1709375339IN
0x3ce1848F...689Fce5A5
0 ETH0.0011335638.8901349
Approve193209702024-02-27 19:27:23153 days ago1709062043IN
0x3ce1848F...689Fce5A5
0 ETH0.0030402265.22962453
Approve193209702024-02-27 19:27:23153 days ago1709062043IN
0x3ce1848F...689Fce5A5
0 ETH0.0030402265.22962453
Approve192934912024-02-23 23:13:23157 days ago1708730003IN
0x3ce1848F...689Fce5A5
0 ETH0.0012855427.61755004
Approve192550512024-02-18 13:41:47162 days ago1708263707IN
0x3ce1848F...689Fce5A5
0 ETH0.0010008321.50117421
Transfer191360422024-02-01 20:44:23179 days ago1706820263IN
0x3ce1848F...689Fce5A5
0 ETH0.003237248.58696529
Approve190681942024-01-23 8:30:35189 days ago1705998635IN
0x3ce1848F...689Fce5A5
0 ETH0.0005201511.23833305
Approve190665112024-01-23 2:49:23189 days ago1705978163IN
0x3ce1848F...689Fce5A5
0 ETH0.0005495611.80645464
Approve190533172024-01-21 6:02:11191 days ago1705816931IN
0x3ce1848F...689Fce5A5
0 ETH0.0005020510.78581897
Approve189665882024-01-09 2:57:23203 days ago1704769043IN
0x3ce1848F...689Fce5A5
0 ETH0.0007147315.44636309
Approve189384322024-01-05 3:33:11207 days ago1704425591IN
0x3ce1848F...689Fce5A5
0 ETH0.0006739714.47909333
Approve189165932024-01-02 1:59:59210 days ago1704160799IN
0x3ce1848F...689Fce5A5
0 ETH0.0005222111.21875873
Approve189118452024-01-01 9:57:47211 days ago1704103067IN
0x3ce1848F...689Fce5A5
0 ETH0.0004633710.01160194
Approve189094922024-01-01 2:01:35211 days ago1704074495IN
0x3ce1848F...689Fce5A5
0 ETH0.000464959.98865705
Approve188782782023-12-27 16:47:35215 days ago1703695655IN
0x3ce1848F...689Fce5A5
0 ETH0.0022786848.95335113
Approve188762682023-12-27 10:01:23216 days ago1703671283IN
0x3ce1848F...689Fce5A5
0 ETH0.0011449324.74352174
Transfer188760872023-12-27 9:24:23216 days ago1703669063IN
0x3ce1848F...689Fce5A5
0 ETH0.0014547821.83087733
Approve188657272023-12-25 22:32:35217 days ago1703543555IN
0x3ce1848F...689Fce5A5
0 ETH0.0006545414.04372018
Approve188608152023-12-25 5:56:23218 days ago1703483783IN
0x3ce1848F...689Fce5A5
0 ETH0.0005278311.40714621
Approve188525002023-12-24 1:54:59219 days ago1703382899IN
0x3ce1848F...689Fce5A5
0 ETH0.0008514818.26908631
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
196595132024-04-15 7:45:59106 days ago1713167159
0x3ce1848F...689Fce5A5
3 wei
196595132024-04-15 7:45:59106 days ago1713167159
0x3ce1848F...689Fce5A5
3 wei
193209712024-02-27 19:27:35153 days ago1709062055
0x3ce1848F...689Fce5A5
0.00291239 ETH
193209712024-02-27 19:27:35153 days ago1709062055
0x3ce1848F...689Fce5A5
0.01164958 ETH
193209712024-02-27 19:27:35153 days ago1709062055
0x3ce1848F...689Fce5A5
0.01456197 ETH
190681962024-01-23 8:30:59189 days ago1705998659
0x3ce1848F...689Fce5A5
0.00394662 ETH
190681962024-01-23 8:30:59189 days ago1705998659
0x3ce1848F...689Fce5A5
0.01578649 ETH
190681962024-01-23 8:30:59189 days ago1705998659
0x3ce1848F...689Fce5A5
0.01973312 ETH
190581292024-01-21 22:25:47190 days ago1705875947
0x3ce1848F...689Fce5A5
0.0033266 ETH
190581292024-01-21 22:25:47190 days ago1705875947
0x3ce1848F...689Fce5A5
0.01330642 ETH
190581292024-01-21 22:25:47190 days ago1705875947
0x3ce1848F...689Fce5A5
0.01663303 ETH
189385182024-01-05 3:50:35207 days ago1704426635
0x3ce1848F...689Fce5A5
0.00540247 ETH
189385182024-01-05 3:50:35207 days ago1704426635
0x3ce1848F...689Fce5A5
0.0216099 ETH
189385182024-01-05 3:50:35207 days ago1704426635
0x3ce1848F...689Fce5A5
0.02701238 ETH
188571032023-12-24 17:26:59218 days ago1703438819
0x3ce1848F...689Fce5A5
0.00582322 ETH
188571032023-12-24 17:26:59218 days ago1703438819
0x3ce1848F...689Fce5A5
0.02329288 ETH
188571032023-12-24 17:26:59218 days ago1703438819
0x3ce1848F...689Fce5A5
0.0291161 ETH
188472862023-12-23 8:20:47220 days ago1703319647
0x3ce1848F...689Fce5A5
0.00410789 ETH
188472862023-12-23 8:20:47220 days ago1703319647
0x3ce1848F...689Fce5A5
0.01643158 ETH
188472862023-12-23 8:20:47220 days ago1703319647
0x3ce1848F...689Fce5A5
0.02053948 ETH
188202822023-12-19 13:26:35223 days ago1702992395
0x3ce1848F...689Fce5A5
0.009019 ETH
188202822023-12-19 13:26:35223 days ago1702992395
0x3ce1848F...689Fce5A5
0.03607602 ETH
188202822023-12-19 13:26:35223 days ago1702992395
0x3ce1848F...689Fce5A5
0.04509503 ETH
188018852023-12-16 23:27:35226 days ago1702769255
0x3ce1848F...689Fce5A5
0.00743368 ETH
188018852023-12-16 23:27:35226 days ago1702769255
0x3ce1848F...689Fce5A5
0.02973475 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OMNI

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : OMNI.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "./MultiRewards.sol";

interface IWETH is IERC20 {
    function deposit() external payable;
    function withdraw(uint256 amount) external;
}

contract OMNI is ERC20, Ownable {
    modifier lockSwap() {
        _inSwap = true;
        _;
        _inSwap = false;
    }

    modifier liquidityAdd() {
        _inLiquidityAdd = true;
        _;
        _inLiquidityAdd = false;
    }

    uint256 public constant MAX_SUPPLY = 1_000_000 ether;
    uint256 public constant BPS_DENOMINATOR = 10_000;
    uint256 public constant SNIPE_BLOCKS = 2;

    IUniswapV2Router02 internal immutable _router;
    address internal immutable _pair;

    /// @notice Buy taxes in BPS
    uint256[2] public buyTaxes = [8000, 0];
    /// @notice Sell taxes in BPS
    uint256[2] public sellTaxes = [9900, 0];
    /// @notice Maximum that can be bought in a single transaction
    uint256 public maxBuy = 1000 ether;
    /// @notice tokens that are allocated for each tax
    uint256[2] public totalTaxes;
    /// @notice addresses that each tax is sent to
    address payable[2] public taxWallets;
    /// @notice MultiRewards address
    MultiRewards public multiRewards;
    /// @notice Maps each recipient to their tax exlcusion status
    mapping(address => bool) public taxExcluded;
    /// @notice Maps each recipient to their blacklist status
    mapping(address => bool) public blacklist;

    /// @notice Contract OMNI balance threshold before `_swap` is invoked
    uint256 public minTokenBalance = 1000 ether;
    /// @notice Flag for auto-calling `_swap`
    bool public autoSwap = true;
    /// @notice Flag indicating whether buys/sells are permitted
    bool public tradingActive = false;
    /// @notice Block when trading is first enabled
    uint256 public tradingBlock;

    uint256 internal _totalSupply = 0;
    mapping(address => uint256) private _balances;

    bool internal _inSwap = false;
    bool internal _inLiquidityAdd = false;

    event TaxWalletsChanged(
        address payable[2] previousWallets,
        address payable[2] nextWallets
    );
    event BuyTaxesChanged(uint256[2] previousTaxes, uint256[2] nextTaxes);
    event SellTaxesChanged(uint256[2] previousTaxes, uint256[2] nextTaxes);
    event MinTokenBalanceChanged(uint256 previousMin, uint256 nextMin);
    event MaxBuyChanged(uint256 previousMax, uint256 nextMax);
    event TaxesRescued(uint256 index, uint256 amount);
    event TradingActiveChanged(bool enabled);
    event TaxExclusionChanged(address user, bool taxExcluded);
    event BlacklistUpdated(address user, bool previousStatus, bool nextStatus);
    event AutoSwapChanged(bool enabled);

    constructor(IUniswapV2Router02 _uniswapRouter, address payable[2] memory _taxWallets, uint256 _goupAmount)
        ERC20("omniBOT", "OMNI")
        Ownable()
    {
        taxExcluded[owner()] = true;
        taxExcluded[address(this)] = true;
        taxWallets = _taxWallets;

        _router = _uniswapRouter;
        _pair = IUniswapV2Factory(_uniswapRouter.factory()).createPair(
            address(this),
            _uniswapRouter.WETH()
        );
        _goup(owner(), _goupAmount);
    }

    /// @notice Change the address of the tax wallets
    /// @param _taxWallets The new address of the tax wallets
    function setTaxWallets(address payable[2] memory _taxWallets)
        external
        onlyOwner
    {
        emit TaxWalletsChanged(taxWallets, _taxWallets);
        taxWallets = _taxWallets;
    }

    /// @notice Change the buy tax rates
    /// @param _buyTaxes The new buy tax rates
    function setBuyTaxes(uint256[2] memory _buyTaxes) external onlyOwner {
        require(
            _buyTaxes[0] + _buyTaxes[1] <= BPS_DENOMINATOR,
            "sum(_buyTaxes) cannot exceed BPS_DENOMINATOR"
        );
        emit BuyTaxesChanged(buyTaxes, _buyTaxes);
        buyTaxes = _buyTaxes;
    }

    /// @notice Change the sell tax rates
    /// @param _sellTaxes The new sell tax rates
    function setSellTaxes(uint256[2] memory _sellTaxes) external onlyOwner {
        require(
            _sellTaxes[0] + _sellTaxes[1] <= BPS_DENOMINATOR,
            "sum(_sellTaxes) cannot exceed BPS_DENOMINATOR"
        );
        emit SellTaxesChanged(sellTaxes, _sellTaxes);
        sellTaxes = _sellTaxes;
    }

    /// @notice Change the minimum contract OMNI balance before `_swap` gets invoked
    /// @param _minTokenBalance The new minimum balance
    function setMinTokenBalance(uint256 _minTokenBalance) external onlyOwner {
        emit MinTokenBalanceChanged(minTokenBalance, _minTokenBalance);
        minTokenBalance = _minTokenBalance;
    }

    /// @notice Change the max buy amount
    /// @param _maxBuy The new max buy amount
    function setMaxBuy(uint256 _maxBuy) external onlyOwner {
        emit MaxBuyChanged(maxBuy, _maxBuy);
        maxBuy = _maxBuy;
    }

    /// @notice Rescue OMNI from the taxes
    /// @dev Should only be used in an emergency
    /// @param _index The tax allocation to rescue from
    /// @param _amount The amount of OMNI to rescue
    /// @param _recipient The recipient of the rescued OMNI
    function rescueTaxTokens(
        uint256 _index,
        uint256 _amount,
        address _recipient
    ) external onlyOwner {
        require(0 <= _index && _index < totalTaxes.length, "_index OOB");
        require(
            _amount <= totalTaxes[_index],
            "Amount cannot be greater than totalTax"
        );
        _rawTransfer(address(this), _recipient, _amount);
        emit TaxesRescued(_index, _amount);
        totalTaxes[_index] -= _amount;
    }

    function addLiquidity(uint256 tokens)
        external
        payable
        onlyOwner
        liquidityAdd
    {
        _goup(address(this), tokens);
        _approve(address(this), address(_router), tokens);

        _router.addLiquidityETH{value: msg.value}(
            address(this),
            tokens,
            0,
            0,
            owner(),
            // solhint-disable-next-line not-rely-on-time
            block.timestamp
        );
    }

    /// @notice Admin function to update a recipient's blacklist status
    /// @param user the recipient
    /// @param status the new status
    function updateBlacklist(address user, bool status)
        external
        virtual
        onlyOwner
    {
        _updateBlacklist(user, status);
    }

    function _updateBlacklist(address user, bool status) internal {
        emit BlacklistUpdated(user, blacklist[user], status);
        blacklist[user] = status;
    }

    /// @notice Sets the multirewards contract address
    function setMultiRewards(MultiRewards _multiRewards) external onlyOwner {
        multiRewards = _multiRewards;
    }

    /// @notice Enables or disables trading on Uniswap
    function setTradingActive(bool _tradingActive) external onlyOwner {
        tradingActive = _tradingActive;
        tradingBlock = block.number;
        emit TradingActiveChanged(_tradingActive);
    }

    /// @notice Updates tax exclusion status
    /// @param _account Account to update the tax exclusion status of
    /// @param _taxExcluded If true, exclude taxes for this user
    function setTaxExcluded(address _account, bool _taxExcluded)
        external
        onlyOwner
    {
        taxExcluded[_account] = _taxExcluded;
        emit TaxExclusionChanged(_account, _taxExcluded);
    }

    /// @notice Enable or disable whether swap occurs during `_transfer`
    /// @param _autoSwap If true, enables swap during `_transfer`
    function setAutoSwap(bool _autoSwap) external onlyOwner {
        autoSwap = _autoSwap;
        emit AutoSwapChanged(_autoSwap);
    }

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

    function _addBalance(address account, uint256 amount) internal {
        _balances[account] = _balances[account] + amount;
    }

    function _subtractBalance(address account, uint256 amount) internal {
        _balances[account] = _balances[account] - amount;
    }

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal override {
        require(!blacklist[recipient], "Recipient is blacklisted");

        if (taxExcluded[sender] || taxExcluded[recipient]) {
            _rawTransfer(sender, recipient, amount);
            return;
        }

        if (
            totalTaxes[0] + totalTaxes[1] >= minTokenBalance &&
            !_inSwap &&
            sender != _pair &&
            autoSwap
        ) {
            _swap();
        }

        uint256 send = amount;
        uint256[2] memory taxes;
        if (sender == _pair) {
            require(tradingActive, "Trading is not yet active");
            if (block.number <= tradingBlock + SNIPE_BLOCKS) {
                _updateBlacklist(recipient, true);
            }
            (send, taxes) = _getTaxAmounts(amount, true);
            require(amount <= maxBuy, "Buy amount exceeds maxBuy");
        } else if (recipient == _pair) {
            require(tradingActive, "Trading is not yet active");
            (send, taxes) = _getTaxAmounts(amount, false);
        }
        _rawTransfer(sender, recipient, send);
        _takeTaxes(sender, taxes);
    }

    /// @notice Perform a Uniswap v2 swap from OMNI to ETH and handle tax distribution
    function _swap() internal lockSwap {
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = _router.WETH();

        uint256 walletTaxes = totalTaxes[0] + totalTaxes[1];

        _approve(address(this), address(_router), walletTaxes);
        _router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            walletTaxes,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );
        uint256 contractEthBalance = address(this).balance;

        uint256 tax0Eth = (contractEthBalance * totalTaxes[0]) / walletTaxes;
        uint256 tax1Eth = (contractEthBalance * totalTaxes[1]) / walletTaxes;
        totalTaxes = [0, 0];

        if (tax0Eth > 0) {
            taxWallets[0].transfer(tax0Eth);
        }
        if (tax1Eth > 0) {
            if (taxWallets[1] == address(multiRewards)) {
              IWETH weth = IWETH(_router.WETH());
              weth.deposit{value: tax1Eth}();
              weth.approve(address(multiRewards), tax1Eth);
              multiRewards.notifyRewardAmount(address(weth), tax1Eth);
            } else {
              taxWallets[1].transfer(tax1Eth);
            }
        }
    }

    function swapAll() external {
        if (!_inSwap) {
            _swap();
        }
    }

    function withdrawAll() external onlyOwner {
        payable(owner()).transfer(address(this).balance);
    }

    /// @notice Transfers OMNI from an account to this contract for taxes
    /// @param _account The account to transfer OMNI from
    /// @param _taxAmounts The amount for each tax
    function _takeTaxes(address _account, uint256[2] memory _taxAmounts)
        internal
    {
        require(_account != address(0), "taxation from the zero address");

        uint256 totalAmount = _taxAmounts[0] + _taxAmounts[1];
        _rawTransfer(_account, address(this), totalAmount);
        totalTaxes[0] += _taxAmounts[0];
        totalTaxes[1] += _taxAmounts[1];
    }

    /// @notice Get a breakdown of send and tax amounts
    /// @param amount The amount to tax in wei
    /// @return send The raw amount to send
    /// @return taxes The raw tax amounts
    function _getTaxAmounts(uint256 amount, bool buying)
        internal
        view
        returns (uint256 send, uint256[2] memory taxes)
    {
        if (buying) {
            taxes = [
                (amount * buyTaxes[0]) / BPS_DENOMINATOR,
                (amount * buyTaxes[1]) / BPS_DENOMINATOR
            ];
        } else {
            taxes = [
                (amount * sellTaxes[0]) / BPS_DENOMINATOR,
                (amount * sellTaxes[1]) / BPS_DENOMINATOR
            ];
        }
        send = amount - taxes[0] - taxes[1];
    }

    // modified from OpenZeppelin ERC20
    function _rawTransfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal {
        require(sender != address(0), "transfer from the zero address");
        require(recipient != address(0), "transfer to the zero address");

        uint256 senderBalance = balanceOf(sender);
        require(senderBalance >= amount, "transfer amount exceeds balance");
        unchecked {
            _subtractBalance(sender, amount);
        }
        _addBalance(recipient, amount);

        emit Transfer(sender, recipient, amount);
    }

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

    function _goup(address account, uint256 amount) internal {
        require(_totalSupply + amount <= MAX_SUPPLY, "Max supply exceeded");
        _totalSupply += amount;
        _addBalance(account, amount);
        emit Transfer(address(0), account, amount);
    }

    receive() external payable {}
}

File 2 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 17 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 17 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 17 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 6 of 17 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 7 of 17 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 8 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 9 of 17 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 11 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 12 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
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) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            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) {
        unchecked {
            // 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) {
        unchecked {
            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) {
        unchecked {
            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) {
        return a + b;
    }

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

    /**
     * @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.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        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) {
        unchecked {
            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.
     *
     * 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) {
        unchecked {
            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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 13 of 17 : IUniswapV2Factory.sol
pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

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

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

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 14 of 17 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 15 of 17 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 16 of 17 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 17 of 17 : MultiRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract MultiRewards is Ownable, ReentrancyGuard, Pausable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    /* ========== STATE VARIABLES ========== */

    /// @notice State for a reward token distribution
    struct Reward {
        uint256 rewardsDuration;
        uint256 periodFinish;
        uint256 rewardRate;
        uint256 lastUpdateTime;
        uint256 rewardPerTokenStored;
    }

    bytes32 public immutable vty = keccak256("2048");

    /// @notice The token that is staked.
    IERC20 public immutable stakingToken;

    /// @notice The address allowed to notify and update rewards.
    address public rewardsDistributor;

    /// @notice Mapping from reward token address to Reward struct.
    mapping(address => Reward) public rewardData;
    /// @notice List of reward tokens.
    address[] public rewardTokens;

    // user -> reward token -> amount
    mapping(address => mapping(address => uint256))
        public userRewardPerTokenPaid;
    mapping(address => mapping(address => uint256)) public rewards;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

    /* ========== CONSTRUCTOR ========== */

    constructor(address _stakingToken) {
        stakingToken = IERC20(_stakingToken);
    }

    /* ========== VIEWS ========== */

    function totalSupply() external view returns (uint256) {
        return _totalSupply;
    }

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

    function lastTimeRewardApplicable(address _rewardsToken)
        public
        view
        returns (uint256)
    {
        uint256 periodFinish = rewardData[_rewardsToken].periodFinish;
        if (block.timestamp < periodFinish) {
            return block.timestamp;
        }
        return periodFinish;
    }

    function rewardPerToken(address _rewardsToken)
        public
        view
        returns (uint256)
    {
        if (_totalSupply == 0) {
            return rewardData[_rewardsToken].rewardPerTokenStored;
        }
        return
            rewardData[_rewardsToken].rewardPerTokenStored.add(
                lastTimeRewardApplicable(_rewardsToken)
                    .sub(rewardData[_rewardsToken].lastUpdateTime)
                    .mul(rewardData[_rewardsToken].rewardRate)
                    .mul(1e18)
                    .div(_totalSupply)
            );
    }

    function earned(address account, address _rewardsToken)
        public
        view
        returns (uint256)
    {
        return
            _balances[account]
                .mul(
                    rewardPerToken(_rewardsToken).sub(
                        userRewardPerTokenPaid[account][_rewardsToken]
                    )
                )
                .div(1e18)
                .add(rewards[account][_rewardsToken]);
    }

    function getRewardForDuration(address _rewardsToken)
        external
        view
        returns (uint256)
    {
        return
            rewardData[_rewardsToken].rewardRate.mul(
                rewardData[_rewardsToken].rewardsDuration
            );
    }

    function rewardTokensCount() external view returns (uint256) {
        return rewardTokens.length;
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function stake(uint256 amount)
        external
        nonReentrant
        whenNotPaused
        updateReward(msg.sender)
    {
        require(amount > 0, "Cannot stake 0");

        // Update staking accounting
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        stakingToken.safeTransferFrom(msg.sender, address(this), amount);

        emit Staked(msg.sender, amount);
    }

    function withdraw(uint256 amount)
        public
        nonReentrant
        updateReward(msg.sender)
    {
        require(amount > 0, "Cannot withdraw 0");

        // Update staking accounting
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        stakingToken.safeTransfer(msg.sender, amount);

        emit Withdrawn(msg.sender, amount);
    }

    function getReward() public nonReentrant updateReward(msg.sender) {
        for (uint i; i < rewardTokens.length; i++) {
            address _rewardsToken = rewardTokens[i];
            uint256 reward = rewards[msg.sender][_rewardsToken];
            if (reward > 0) {
                rewards[msg.sender][_rewardsToken] = 0;
                IERC20(_rewardsToken).safeTransfer(msg.sender, reward);
                emit RewardPaid(msg.sender, _rewardsToken, reward);
            }
        }
    }

    function exit() external {
        withdraw(_balances[msg.sender]);
        getReward();
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function addReward(address _rewardsToken, uint256 _rewardsDuration)
        external
        onlyOwner
    {
        require(_rewardsToken != address(0), "Invalid reward token");
        require(_rewardsDuration > 0, "Reward duration must be non-zero");
        rewardTokens.push(_rewardsToken);
        rewardData[_rewardsToken].rewardsDuration = _rewardsDuration;
    }

    /// @dev Deletes the reward token at the given index by moving the last
    /// reward token to _index and popping the last element.
    function removeReward(uint256 _index) external onlyOwner {
        require(_index < rewardTokens.length, "Index out of bounds");
        rewardTokens[_index] = rewardTokens[rewardTokens.length - 1];
        rewardTokens.pop();
    }

    function setRewardsDistributor(address _rewardsDistributor)
        external
        onlyOwner
    {
        emit RewardsDistributorUpdated(rewardsDistributor, _rewardsDistributor);
        rewardsDistributor = _rewardsDistributor;
    }

    function notifyRewardAmount(address _rewardsToken, uint256 reward)
        public
        updateReward(address(0))
    {
        // handle the transfer of reward tokens via `transferFrom` to reduce the number
        // of transactions required and ensure correctness of the reward amount
        IERC20(_rewardsToken).safeTransferFrom(
            msg.sender,
            address(this),
            reward
        );

        if (block.timestamp >= rewardData[_rewardsToken].periodFinish) {
            rewardData[_rewardsToken].rewardRate = reward.div(
                rewardData[_rewardsToken].rewardsDuration
            );
        } else {
            uint256 remaining = rewardData[_rewardsToken].periodFinish.sub(
                block.timestamp
            );
            uint256 leftover = remaining.mul(
                rewardData[_rewardsToken].rewardRate
            );
            rewardData[_rewardsToken].rewardRate = reward.add(leftover).div(
                rewardData[_rewardsToken].rewardsDuration
            );
        }

        rewardData[_rewardsToken].lastUpdateTime = block.timestamp;
        rewardData[_rewardsToken].periodFinish = block.timestamp.add(
            rewardData[_rewardsToken].rewardsDuration
        );
        emit RewardAdded(reward);
    }

    /// @dev Allows the owner to recover ERC20 sent to this contract except for
    /// the staking token. This should be seldom used, especially on reward
    /// tokens as it could cause insufficient rewards for withdrawal.
    function recoverERC20(address tokenAddress, uint256 tokenAmount)
        external
        onlyOwner
    {
        IERC20(tokenAddress).safeTransfer(owner(), tokenAmount);
        emit Recovered(tokenAddress, tokenAmount);
    }

    function setRewardsDuration(address _rewardsToken, uint256 _rewardsDuration)
        external
        onlyRewardsDistributor
    {
        require(
            block.timestamp > rewardData[_rewardsToken].periodFinish,
            "Reward period still active"
        );
        require(_rewardsDuration > 0, "Reward duration must be non-zero");
        rewardData[_rewardsToken].rewardsDuration = _rewardsDuration;
        emit RewardsDurationUpdated(
            _rewardsToken,
            rewardData[_rewardsToken].rewardsDuration
        );
    }

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }

    /* ========== MODIFIERS ========== */

    modifier onlyRewardsDistributor() {
        require(
            msg.sender == rewardsDistributor,
            "Caller is not rewardsDistributor"
        );
        _;
    }

    modifier updateReward(address account) {
        for (uint i; i < rewardTokens.length; i++) {
            address token = rewardTokens[i];
            rewardData[token].rewardPerTokenStored = rewardPerToken(token);
            rewardData[token].lastUpdateTime = lastTimeRewardApplicable(token);
            if (account != address(0)) {
                rewards[account][token] = earned(account, token);
                userRewardPerTokenPaid[account][token] = rewardData[token]
                    .rewardPerTokenStored;
            }
        }
        _;
    }


    /* ========== EVENTS ========== */

    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(
        address indexed user,
        address indexed rewardsToken,
        uint256 reward
    );
    event RewardsDistributorUpdated(
        address distributor,
        address newDistributor
    );
    event RewardsDurationUpdated(address token, uint256 newDuration);
    event Recovered(address token, uint256 amount);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IUniswapV2Router02","name":"_uniswapRouter","type":"address"},{"internalType":"address payable[2]","name":"_taxWallets","type":"address[2]"},{"internalType":"uint256","name":"_goupAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"AutoSwapChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"previousStatus","type":"bool"},{"indexed":false,"internalType":"bool","name":"nextStatus","type":"bool"}],"name":"BlacklistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[2]","name":"previousTaxes","type":"uint256[2]"},{"indexed":false,"internalType":"uint256[2]","name":"nextTaxes","type":"uint256[2]"}],"name":"BuyTaxesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousMax","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nextMax","type":"uint256"}],"name":"MaxBuyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nextMin","type":"uint256"}],"name":"MinTokenBalanceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[2]","name":"previousTaxes","type":"uint256[2]"},{"indexed":false,"internalType":"uint256[2]","name":"nextTaxes","type":"uint256[2]"}],"name":"SellTaxesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"taxExcluded","type":"bool"}],"name":"TaxExclusionChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address payable[2]","name":"previousWallets","type":"address[2]"},{"indexed":false,"internalType":"address payable[2]","name":"nextWallets","type":"address[2]"}],"name":"TaxWalletsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TaxesRescued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"TradingActiveChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BPS_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SNIPE_BLOCKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"addLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blacklist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"buyTaxes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiRewards","outputs":[{"internalType":"contract MultiRewards","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"rescueTaxTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sellTaxes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_autoSwap","type":"bool"}],"name":"setAutoSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"_buyTaxes","type":"uint256[2]"}],"name":"setBuyTaxes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxBuy","type":"uint256"}],"name":"setMaxBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minTokenBalance","type":"uint256"}],"name":"setMinTokenBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract MultiRewards","name":"_multiRewards","type":"address"}],"name":"setMultiRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"_sellTaxes","type":"uint256[2]"}],"name":"setSellTaxes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_taxExcluded","type":"bool"}],"name":"setTaxExcluded","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[2]","name":"_taxWallets","type":"address[2]"}],"name":"setTaxWallets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_tradingActive","type":"bool"}],"name":"setTradingActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"taxExcluded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"taxWallets","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalTaxes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"updateBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

610100604052611f4060c0908152600060e05262000022906006906002620004d8565b50604080518082019091526126ac81526000602082015262000049906008906002620004d8565b50683635c9adc5dea00000600a8190556012556013805461ffff1990811660011790915560006015556017805490911690553480156200008857600080fd5b5060405162002e0a38038062002e0a833981016040819052620000ab9162000638565b60408051808201825260078152661bdb5b9a5093d560ca1b6020808301918252835180850190945260048452634f4d4e4960e01b908401528151919291620000f69160039162000521565b5080516200010c90600490602084019062000521565b50505062000129620001236200036360201b60201c565b62000367565b600160106000620001426005546001600160a01b031690565b6001600160a01b0316815260208082019290925260409081016000908120805494151560ff19958616179055308152601090925290208054909116600117905562000191600d8360026200059e565b50826001600160a01b03166080816001600160a01b031660601b81525050826001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015620001e957600080fd5b505afa158015620001fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000224919062000612565b6001600160a01b031663c9c6539630856001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200026d57600080fd5b505afa15801562000282573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002a8919062000612565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015620002f157600080fd5b505af115801562000306573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200032c919062000612565b60601b6001600160601b03191660a0526200035a620003536005546001600160a01b031690565b82620003b9565b50505062000778565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b69d3c21bcecceda100000081601554620003d49190620006e7565b1115620004275760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c7920657863656564656400000000000000000000000000604482015260640160405180910390fd5b80601560008282546200043b9190620006e7565b909155506200044d9050828262000492565b6040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216600090815260166020526040902054620004b8908290620006e7565b6001600160a01b0390921660009081526016602052604090209190915550565b82600281019282156200050f579160200282015b828111156200050f578251829061ffff16905591602001919060010190620004ec565b506200051d929150620005e9565b5090565b8280546200052f906200070c565b90600052602060002090601f0160209004810192826200055357600085556200050f565b82601f106200056e57805160ff19168380011785556200050f565b828001600101855582156200050f579182015b828111156200050f57825182559160200191906001019062000581565b82600281019282156200050f579160200282015b828111156200050f57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620005b2565b5b808211156200051d5760008155600101620005ea565b80516200060d816200075f565b919050565b60006020828403121562000624578081fd5b815162000631816200075f565b9392505050565b6000806000608084860312156200064d578182fd5b83516200065a816200075f565b92506020603f850186136200066d578283fd5b604080519081016001600160401b038111828210171562000692576200069262000749565b604052808683016060880189811115620006aa578687fd5b865b6002811015620006d457620006c18362000600565b84529285019291850191600101620006ac565b5051969992985095965090945050505050565b600082198211156200070757634e487b7160e01b81526011600452602481fd5b500190565b600181811c908216806200072157607f821691505b602082108114156200074357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200077557600080fd5b50565b60805160601c60a05160601c612635620007d5600039600081816113d00152818161142b015261153f0152600081816109bb015281816109e2015281816116690152818161174c0152818161178801526118c801526126356000f3fe6080604052600436106102605760003560e01c8063821f658011610144578063b0ac1571116100b6578063e694b5d71161007a578063e694b5d7146106f6578063f016d83b14610716578063f2fde38b1461072b578063f50a243b1461074b578063f53bc8351461076b578063f9f92be41461078b57600080fd5b8063b0ac15711461066b578063bbc0c7421461068b578063cd51e6d4146106aa578063dd62ed3e146106c0578063e1a45218146106e057600080fd5b806393818cfa1161010857806393818cfa146105b6578063959bd6c2146105d657806395d89b41146105f6578063a457c2d71461060b578063a894185d1461062b578063a9059cbb1461064b57600080fd5b8063821f658014610523578063853828b6146105435780638da5cb5b14610558578063912c048c146105765780639155e0831461059657600080fd5b806339b622d3116101dd5780635b78f35f116101a15780635b78f35f1461047257806364071d9f1461048857806370a08231146104a857806370db69d6146104de578063715018a6146104f4578063770048511461050957600080fd5b806339b622d3146103c25780633e9ffbea146103f2578063433efbc61461040757806351c6590a1461043f57806352f892fa1461045257600080fd5b806323b872dd1161022457806323b872dd146103285780632c8dc14714610348578063313ce5671461036857806332cb6b0c1461038457806339509351146103a257600080fd5b806306fdde031461026c578063095ea7b31461029757806309d2c46a146102c757806318160ddd146102e957806319c2c40d1461030857600080fd5b3661026757005b600080fd5b34801561027857600080fd5b506102816107bb565b60405161028e9190612423565b60405180910390f35b3480156102a357600080fd5b506102b76102b23660046121bc565b61084d565b604051901515815260200161028e565b3480156102d357600080fd5b506102e76102e23660046121e7565b610865565b005b3480156102f557600080fd5b506015545b60405190815260200161028e565b34801561031457600080fd5b506102e761032336600461218f565b6108b8565b34801561033457600080fd5b506102b761034336600461214f565b610923565b34801561035457600080fd5b506102fa6103633660046122e6565b610947565b34801561037457600080fd5b506040516012815260200161028e565b34801561039057600080fd5b506102fa69d3c21bcecceda100000081565b3480156103ae57600080fd5b506102b76103bd3660046121bc565b61095e565b3480156103ce57600080fd5b506102b76103dd3660046120d8565b60106020526000908152604090205460ff1681565b3480156103fe57600080fd5b506102e7610980565b34801561041357600080fd5b50600f54610427906001600160a01b031681565b6040516001600160a01b03909116815260200161028e565b6102e761044d3660046122e6565b610994565b34801561045e57600080fd5b506102e761046d366004612255565b610ad4565b34801561047e57600080fd5b506102fa60125481565b34801561049457600080fd5b506102e76104a3366004612255565b610b9f565b3480156104b457600080fd5b506102fa6104c33660046120d8565b6001600160a01b031660009081526016602052604090205490565b3480156104ea57600080fd5b506102fa600a5481565b34801561050057600080fd5b506102e7610c66565b34801561051557600080fd5b506013546102b79060ff1681565b34801561052f57600080fd5b506102fa61053e3660046122e6565b610c78565b34801561054f57600080fd5b506102e7610c88565b34801561056457600080fd5b506005546001600160a01b0316610427565b34801561058257600080fd5b506104276105913660046122e6565b610ccc565b3480156105a257600080fd5b506102e76105b136600461218f565b610cec565b3480156105c257600080fd5b506102e76105d13660046122ae565b610cfe565b3480156105e257600080fd5b506102e76105f13660046122ae565b610d4e565b34801561060257600080fd5b50610281610da3565b34801561061757600080fd5b506102b76106263660046121bc565b610db2565b34801561063757600080fd5b506102e76106463660046122fe565b610e2d565b34801561065757600080fd5b506102b76106663660046121bc565b610f73565b34801561067757600080fd5b506102e76106863660046122e6565b610f81565b34801561069757600080fd5b506013546102b790610100900460ff1681565b3480156106b657600080fd5b506102fa60145481565b3480156106cc57600080fd5b506102fa6106db366004612117565b610fca565b3480156106ec57600080fd5b506102fa61271081565b34801561070257600080fd5b506102e76107113660046120d8565b610ff5565b34801561072257600080fd5b506102fa600281565b34801561073757600080fd5b506102e76107463660046120d8565b61101f565b34801561075757600080fd5b506102fa6107663660046122e6565b611095565b34801561077757600080fd5b506102e76107863660046122e6565b6110a5565b34801561079757600080fd5b506102b76107a63660046120d8565b60116020526000908152604090205460ff1681565b6060600380546107ca9061258b565b80601f01602080910402602001604051908101604052809291908181526020018280546107f69061258b565b80156108435780601f1061081857610100808354040283529160200191610843565b820191906000526020600020905b81548152906001019060200180831161082657829003601f168201915b5050505050905090565b60003361085b8185856110ee565b5060019392505050565b61086d611212565b7fbf0afdfa1cb21873aab858ebc02e5db135c9f8e64589cd0d1a668b4d66993ca9600d8260405161089f929190612363565b60405180910390a16108b4600d826002611fec565b5050565b6108c0611212565b6001600160a01b038216600081815260106020908152604091829020805460ff19168515159081179091558251938452908301527f9081172b1302ac3df81f8da318d2d60362a834f73c0a1b69d14cb14414fbb9fc910160405180910390a15050565b60003361093185828561126c565b61093c8585856112e6565b506001949350505050565b6008816002811061095757600080fd5b0154905081565b60003361085b8185856109718383610fca565b61097b919061251d565b6110ee565b60175460ff16610992576109926115f7565b565b61099c611212565b6017805461ff0019166101001790556109b53082611aee565b6109e0307f0000000000000000000000000000000000000000000000000000000000000000836110ee565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f305d719343084600080610a276005546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a8a57600080fd5b505af1158015610a9e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ac39190612336565b50506017805461ff00191690555050565b610adc611212565b6020810151815161271091610af09161251d565b1115610b585760405162461bcd60e51b815260206004820152602c60248201527f73756d285f6275795461786573292063616e6e6f74206578636565642042505360448201526b2fa222a727a6a4a720aa27a960a11b60648201526084015b60405180910390fd5b7ff030bb719ac1227860b29dae4e2aead664a7eb21b5d574d8eb10302e435a57cb600682604051610b8a9291906123d1565b60405180910390a16108b46006826002612044565b610ba7611212565b6020810151815161271091610bbb9161251d565b1115610c1f5760405162461bcd60e51b815260206004820152602d60248201527f73756d285f73656c6c5461786573292063616e6e6f742065786365656420425060448201526c29afa222a727a6a4a720aa27a960991b6064820152608401610b4f565b7f4e5aa6a1d8a2baf47d4c781f8fa278df4f48fb465fde488841b40aee0868d9f2600882604051610c519291906123d1565b60405180910390a16108b46008826002612044565b610c6e611212565b6109926000611bb2565b6006816002811061095757600080fd5b610c90611212565b6005546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610cc9573d6000803e3d6000fd5b50565b600d8160028110610cdc57600080fd5b01546001600160a01b0316905081565b610cf4611212565b6108b48282611c04565b610d06611212565b6013805460ff19168215159081179091556040519081527f927009a164f58be5665a2121b2564ae19a66046fb36a397d3fca78f72ba04c3d906020015b60405180910390a150565b610d56611212565b601380548215156101000261ff0019909116179055436014556040517fec78e36312d308764a43b9714c18f6444e2604b277d18be4ea329e0644dbe9b990610d4390831515815260200190565b6060600480546107ca9061258b565b60003381610dc08286610fca565b905083811015610e205760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610b4f565b61093c82868684036110ee565b610e35611212565b60028310610e725760405162461bcd60e51b815260206004820152600a6024820152692fb4b73232bc1027a7a160b11b6044820152606401610b4f565b600b8360028110610e9357634e487b7160e01b600052603260045260246000fd5b0154821115610ef35760405162461bcd60e51b815260206004820152602660248201527f416d6f756e742063616e6e6f742062652067726561746572207468616e20746f6044820152650e8c2d8a8c2f60d31b6064820152608401610b4f565b610efe308284611c8c565b60408051848152602081018490527f13ac772a78d03c80813b3c9c28d72a72d3b31e5ee74e277a88ac0c322a6bfc8f910160405180910390a181600b8460028110610f5957634e487b7160e01b600052603260045260246000fd5b016000828254610f699190612574565b9091555050505050565b60003361085b8185856112e6565b610f89611212565b60125460408051918252602082018390527f15426420a06dcf9391d9e4b7557f5cfaba5be0d7bf857b641e78ec375a343425910160405180910390a1601255565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610ffd611212565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b611027611212565b6001600160a01b03811661108c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b4f565b610cc981611bb2565b600b816002811061095757600080fd5b6110ad611212565b600a5460408051918252602082018390527f4dc2313a84b395e55972a3b89a37fcaf0de5664a014223f644ee10a5cda3d926910160405180910390a1600a55565b6001600160a01b0383166111505760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610b4f565b6001600160a01b0382166111b15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610b4f565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b031633146109925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b4f565b60006112788484610fca565b905060001981146112e057818110156112d35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610b4f565b6112e084848484036110ee565b50505050565b6001600160a01b03821660009081526011602052604090205460ff161561134f5760405162461bcd60e51b815260206004820152601860248201527f526563697069656e7420697320626c61636b6c697374656400000000000000006044820152606401610b4f565b6001600160a01b03831660009081526010602052604090205460ff168061138e57506001600160a01b03821660009081526010602052604090205460ff165b156113a35761139e838383611c8c565b505050565b601254600c54600b546113b6919061251d565b101580156113c7575060175460ff16155b801561140557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614155b8015611413575060135460ff165b15611420576114206115f7565b80611429612072565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b0316141561153d57601354610100900460ff166114b65760405162461bcd60e51b815260206004820152601960248201527854726164696e67206973206e6f74207965742061637469766560381b6044820152606401610b4f565b60026014546114c5919061251d565b43116114d6576114d6846001611c04565b6114e1836001611e08565b600a5491935091508311156115385760405162461bcd60e51b815260206004820152601960248201527f42757920616d6f756e742065786365656473206d6178427579000000000000006044820152606401610b4f565b6115db565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031614156115db57601354610100900460ff166115ca5760405162461bcd60e51b815260206004820152601960248201527854726164696e67206973206e6f74207965742061637469766560381b6044820152606401610b4f565b6115d5836000611e08565b90925090505b6115e6858584611c8c565b6115f08582611ede565b5050505050565b6017805460ff19166001179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061164757634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156116c057600080fd5b505afa1580156116d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f891906120fb565b8160018151811061171957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039290921660209283029190910190910152600c54600b546000916117449161251d565b9050611771307f0000000000000000000000000000000000000000000000000000000000000000836110ee565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063791ac947906117c6908490600090879030904290600401612476565b600060405180830381600087803b1580156117e057600080fd5b505af11580156117f4573d6000803e3d6000fd5b5050600b5447925060009150839061180c9084612555565b6118169190612535565b9050600083600b6001015461182b9085612555565b6118359190612535565b604080518082019091526000808252602082015290915061185a90600b906002612090565b50811561189d57600d546040516001600160a01b03909116906108fc8415029084906000818181858888f1935050505015801561189b573d6000803e3d6000fd5b505b8015611add57600f546001600160a01b0316600d600101546001600160a01b03161415611aa15760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561191f57600080fd5b505afa158015611933573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195791906120fb565b9050806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561199457600080fd5b505af11580156119a8573d6000803e3d6000fd5b5050600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260248101879052908516935063095ea7b392506044019050602060405180830381600087803b1580156119fc57600080fd5b505af1158015611a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3491906122ca565b50600f5460405163b66503cf60e01b81526001600160a01b038381166004830152602482018590529091169063b66503cf90604401600060405180830381600087803b158015611a8357600080fd5b505af1158015611a97573d6000803e3d6000fd5b5050505050611add565b600e546040516001600160a01b03909116906108fc8315029083906000818181858888f19350505050158015611adb573d6000803e3d6000fd5b505b50506017805460ff19169055505050565b69d3c21bcecceda100000081601554611b07919061251d565b1115611b4b5760405162461bcd60e51b815260206004820152601360248201527213585e081cdd5c1c1b1e48195e18d959591959606a1b6044820152606401610b4f565b8060156000828254611b5d919061251d565b90915550611b6d90508282611f84565b6040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03821660008181526011602090815260409182902054825193845260ff1615159083015282151582820152517f248358295a71c50a9351204f4da6e13409c2887fde3625358fbb80b9743e433b9181900360600190a16001600160a01b03919091166000908152601160205260409020805460ff1916911515919091179055565b6001600160a01b038316611ce25760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f206164647265737300006044820152606401610b4f565b6001600160a01b038216611d385760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f2061646472657373000000006044820152606401610b4f565b6001600160a01b03831660009081526016602052604090205481811015611da15760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e6365006044820152606401610b4f565b611dab8483611fc8565b611db58383611f84565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611dfa91815260200190565b60405180910390a350505050565b6000611e12612072565b8215611e6b576040805180820190915280612710600660000154611e369088612555565b611e409190612535565b8152602001612710600660010154611e589088612555565b611e629190612535565b90529050611eba565b6040805180820190915280612710600860000154611e899088612555565b611e939190612535565b8152602001612710600860010154611eab9088612555565b611eb59190612535565b905290505b60208101518151611ecb9086612574565b611ed59190612574565b91509250929050565b6001600160a01b038216611f345760405162461bcd60e51b815260206004820152601e60248201527f7461786174696f6e2066726f6d20746865207a65726f206164647265737300006044820152606401610b4f565b60208101518151600091611f479161251d565b9050611f54833083611c8c565b8151600b8054600090611f6890849061251d565b90915550506020820151600c8054600090610f6990849061251d565b6001600160a01b038216600090815260166020526040902054611fa890829061251d565b6001600160a01b0390921660009081526016602052604090209190915550565b6001600160a01b038216600090815260166020526040902054611fa8908290612574565b8260028101928215612034579160200282015b8281111561203457825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611fff565b506120409291506120c3565b5090565b8260028101928215612034579160200282015b82811115612034578251825591602001919060010190612057565b60405180604001604052806002906020820280368337509192915050565b8260028101928215612034579160200282015b82811115612034578251829060ff169055916020019190600101906120a3565b5b8082111561204057600081556001016120c4565b6000602082840312156120e9578081fd5b81356120f4816125dc565b9392505050565b60006020828403121561210c578081fd5b81516120f4816125dc565b60008060408385031215612129578081fd5b8235612134816125dc565b91506020830135612144816125dc565b809150509250929050565b600080600060608486031215612163578081fd5b833561216e816125dc565b9250602084013561217e816125dc565b929592945050506040919091013590565b600080604083850312156121a1578182fd5b82356121ac816125dc565b91506020830135612144816125f1565b600080604083850312156121ce578182fd5b82356121d9816125dc565b946020939093013593505050565b6000604082840312156121f8578081fd5b82601f830112612206578081fd5b61220e6124e6565b80838560408601111561221f578384fd5b835b600281101561224a578135612235816125dc565b84526020938401939190910190600101612221565b509095945050505050565b600060408284031215612266578081fd5b82601f830112612274578081fd5b61227c6124e6565b80838560408601111561228d578384fd5b835b600281101561224a57813584526020938401939091019060010161228f565b6000602082840312156122bf578081fd5b81356120f4816125f1565b6000602082840312156122db578081fd5b81516120f4816125f1565b6000602082840312156122f7578081fd5b5035919050565b600080600060608486031215612312578283fd5b8335925060208401359150604084013561232b816125dc565b809150509250925092565b60008060006060848603121561234a578081fd5b8351925060208401519150604084015190509250925092565b60808101818460005b60028110156123945781546001600160a01b031683526020909201916001918201910161236c565b505050604082018360005b60028110156123c75781516001600160a01b031683526020928301929091019060010161239f565b5050509392505050565b60808101818460005b60028110156123f95781548352602090920191600191820191016123da565b505050604082018360005b60028110156123c7578151835260209283019290910190600101612404565b6000602080835283518082850152825b8181101561244f57858101830151858201604001528201612433565b818111156124605783604083870101525b50601f01601f1916929092016040019392505050565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156124c55784516001600160a01b0316835293830193918301916001016124a0565b50506001600160a01b03969096166060850152505050608001529392505050565b6040805190810167ffffffffffffffff8111828210171561251757634e487b7160e01b600052604160045260246000fd5b60405290565b60008219821115612530576125306125c6565b500190565b60008261255057634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561256f5761256f6125c6565b500290565b600082821015612586576125866125c6565b500390565b600181811c9082168061259f57607f821691505b602082108114156125c057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610cc957600080fd5b8015158114610cc957600080fdfea26469706673582212207a0f9359acefe6031f7d38d27d184ec44073c8dbb33f2b72039e72c59634d84464736f6c634300080400330000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000cf80fadc72d0d2b5cd4c02704c77e00acf38b44e000000000000000000000000cf80fadc72d0d2b5cd4c02704c77e00acf38b44e000000000000000000000000000000000000000000002a5a058fc295ed000000

Deployed Bytecode

0x6080604052600436106102605760003560e01c8063821f658011610144578063b0ac1571116100b6578063e694b5d71161007a578063e694b5d7146106f6578063f016d83b14610716578063f2fde38b1461072b578063f50a243b1461074b578063f53bc8351461076b578063f9f92be41461078b57600080fd5b8063b0ac15711461066b578063bbc0c7421461068b578063cd51e6d4146106aa578063dd62ed3e146106c0578063e1a45218146106e057600080fd5b806393818cfa1161010857806393818cfa146105b6578063959bd6c2146105d657806395d89b41146105f6578063a457c2d71461060b578063a894185d1461062b578063a9059cbb1461064b57600080fd5b8063821f658014610523578063853828b6146105435780638da5cb5b14610558578063912c048c146105765780639155e0831461059657600080fd5b806339b622d3116101dd5780635b78f35f116101a15780635b78f35f1461047257806364071d9f1461048857806370a08231146104a857806370db69d6146104de578063715018a6146104f4578063770048511461050957600080fd5b806339b622d3146103c25780633e9ffbea146103f2578063433efbc61461040757806351c6590a1461043f57806352f892fa1461045257600080fd5b806323b872dd1161022457806323b872dd146103285780632c8dc14714610348578063313ce5671461036857806332cb6b0c1461038457806339509351146103a257600080fd5b806306fdde031461026c578063095ea7b31461029757806309d2c46a146102c757806318160ddd146102e957806319c2c40d1461030857600080fd5b3661026757005b600080fd5b34801561027857600080fd5b506102816107bb565b60405161028e9190612423565b60405180910390f35b3480156102a357600080fd5b506102b76102b23660046121bc565b61084d565b604051901515815260200161028e565b3480156102d357600080fd5b506102e76102e23660046121e7565b610865565b005b3480156102f557600080fd5b506015545b60405190815260200161028e565b34801561031457600080fd5b506102e761032336600461218f565b6108b8565b34801561033457600080fd5b506102b761034336600461214f565b610923565b34801561035457600080fd5b506102fa6103633660046122e6565b610947565b34801561037457600080fd5b506040516012815260200161028e565b34801561039057600080fd5b506102fa69d3c21bcecceda100000081565b3480156103ae57600080fd5b506102b76103bd3660046121bc565b61095e565b3480156103ce57600080fd5b506102b76103dd3660046120d8565b60106020526000908152604090205460ff1681565b3480156103fe57600080fd5b506102e7610980565b34801561041357600080fd5b50600f54610427906001600160a01b031681565b6040516001600160a01b03909116815260200161028e565b6102e761044d3660046122e6565b610994565b34801561045e57600080fd5b506102e761046d366004612255565b610ad4565b34801561047e57600080fd5b506102fa60125481565b34801561049457600080fd5b506102e76104a3366004612255565b610b9f565b3480156104b457600080fd5b506102fa6104c33660046120d8565b6001600160a01b031660009081526016602052604090205490565b3480156104ea57600080fd5b506102fa600a5481565b34801561050057600080fd5b506102e7610c66565b34801561051557600080fd5b506013546102b79060ff1681565b34801561052f57600080fd5b506102fa61053e3660046122e6565b610c78565b34801561054f57600080fd5b506102e7610c88565b34801561056457600080fd5b506005546001600160a01b0316610427565b34801561058257600080fd5b506104276105913660046122e6565b610ccc565b3480156105a257600080fd5b506102e76105b136600461218f565b610cec565b3480156105c257600080fd5b506102e76105d13660046122ae565b610cfe565b3480156105e257600080fd5b506102e76105f13660046122ae565b610d4e565b34801561060257600080fd5b50610281610da3565b34801561061757600080fd5b506102b76106263660046121bc565b610db2565b34801561063757600080fd5b506102e76106463660046122fe565b610e2d565b34801561065757600080fd5b506102b76106663660046121bc565b610f73565b34801561067757600080fd5b506102e76106863660046122e6565b610f81565b34801561069757600080fd5b506013546102b790610100900460ff1681565b3480156106b657600080fd5b506102fa60145481565b3480156106cc57600080fd5b506102fa6106db366004612117565b610fca565b3480156106ec57600080fd5b506102fa61271081565b34801561070257600080fd5b506102e76107113660046120d8565b610ff5565b34801561072257600080fd5b506102fa600281565b34801561073757600080fd5b506102e76107463660046120d8565b61101f565b34801561075757600080fd5b506102fa6107663660046122e6565b611095565b34801561077757600080fd5b506102e76107863660046122e6565b6110a5565b34801561079757600080fd5b506102b76107a63660046120d8565b60116020526000908152604090205460ff1681565b6060600380546107ca9061258b565b80601f01602080910402602001604051908101604052809291908181526020018280546107f69061258b565b80156108435780601f1061081857610100808354040283529160200191610843565b820191906000526020600020905b81548152906001019060200180831161082657829003601f168201915b5050505050905090565b60003361085b8185856110ee565b5060019392505050565b61086d611212565b7fbf0afdfa1cb21873aab858ebc02e5db135c9f8e64589cd0d1a668b4d66993ca9600d8260405161089f929190612363565b60405180910390a16108b4600d826002611fec565b5050565b6108c0611212565b6001600160a01b038216600081815260106020908152604091829020805460ff19168515159081179091558251938452908301527f9081172b1302ac3df81f8da318d2d60362a834f73c0a1b69d14cb14414fbb9fc910160405180910390a15050565b60003361093185828561126c565b61093c8585856112e6565b506001949350505050565b6008816002811061095757600080fd5b0154905081565b60003361085b8185856109718383610fca565b61097b919061251d565b6110ee565b60175460ff16610992576109926115f7565b565b61099c611212565b6017805461ff0019166101001790556109b53082611aee565b6109e0307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d836110ee565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663f305d719343084600080610a276005546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a8a57600080fd5b505af1158015610a9e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ac39190612336565b50506017805461ff00191690555050565b610adc611212565b6020810151815161271091610af09161251d565b1115610b585760405162461bcd60e51b815260206004820152602c60248201527f73756d285f6275795461786573292063616e6e6f74206578636565642042505360448201526b2fa222a727a6a4a720aa27a960a11b60648201526084015b60405180910390fd5b7ff030bb719ac1227860b29dae4e2aead664a7eb21b5d574d8eb10302e435a57cb600682604051610b8a9291906123d1565b60405180910390a16108b46006826002612044565b610ba7611212565b6020810151815161271091610bbb9161251d565b1115610c1f5760405162461bcd60e51b815260206004820152602d60248201527f73756d285f73656c6c5461786573292063616e6e6f742065786365656420425060448201526c29afa222a727a6a4a720aa27a960991b6064820152608401610b4f565b7f4e5aa6a1d8a2baf47d4c781f8fa278df4f48fb465fde488841b40aee0868d9f2600882604051610c519291906123d1565b60405180910390a16108b46008826002612044565b610c6e611212565b6109926000611bb2565b6006816002811061095757600080fd5b610c90611212565b6005546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610cc9573d6000803e3d6000fd5b50565b600d8160028110610cdc57600080fd5b01546001600160a01b0316905081565b610cf4611212565b6108b48282611c04565b610d06611212565b6013805460ff19168215159081179091556040519081527f927009a164f58be5665a2121b2564ae19a66046fb36a397d3fca78f72ba04c3d906020015b60405180910390a150565b610d56611212565b601380548215156101000261ff0019909116179055436014556040517fec78e36312d308764a43b9714c18f6444e2604b277d18be4ea329e0644dbe9b990610d4390831515815260200190565b6060600480546107ca9061258b565b60003381610dc08286610fca565b905083811015610e205760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610b4f565b61093c82868684036110ee565b610e35611212565b60028310610e725760405162461bcd60e51b815260206004820152600a6024820152692fb4b73232bc1027a7a160b11b6044820152606401610b4f565b600b8360028110610e9357634e487b7160e01b600052603260045260246000fd5b0154821115610ef35760405162461bcd60e51b815260206004820152602660248201527f416d6f756e742063616e6e6f742062652067726561746572207468616e20746f6044820152650e8c2d8a8c2f60d31b6064820152608401610b4f565b610efe308284611c8c565b60408051848152602081018490527f13ac772a78d03c80813b3c9c28d72a72d3b31e5ee74e277a88ac0c322a6bfc8f910160405180910390a181600b8460028110610f5957634e487b7160e01b600052603260045260246000fd5b016000828254610f699190612574565b9091555050505050565b60003361085b8185856112e6565b610f89611212565b60125460408051918252602082018390527f15426420a06dcf9391d9e4b7557f5cfaba5be0d7bf857b641e78ec375a343425910160405180910390a1601255565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610ffd611212565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b611027611212565b6001600160a01b03811661108c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b4f565b610cc981611bb2565b600b816002811061095757600080fd5b6110ad611212565b600a5460408051918252602082018390527f4dc2313a84b395e55972a3b89a37fcaf0de5664a014223f644ee10a5cda3d926910160405180910390a1600a55565b6001600160a01b0383166111505760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610b4f565b6001600160a01b0382166111b15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610b4f565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b031633146109925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b4f565b60006112788484610fca565b905060001981146112e057818110156112d35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610b4f565b6112e084848484036110ee565b50505050565b6001600160a01b03821660009081526011602052604090205460ff161561134f5760405162461bcd60e51b815260206004820152601860248201527f526563697069656e7420697320626c61636b6c697374656400000000000000006044820152606401610b4f565b6001600160a01b03831660009081526010602052604090205460ff168061138e57506001600160a01b03821660009081526010602052604090205460ff165b156113a35761139e838383611c8c565b505050565b601254600c54600b546113b6919061251d565b101580156113c7575060175460ff16155b801561140557507f00000000000000000000000053c43e025320956e182cab519978dc323eb81bcc6001600160a01b0316836001600160a01b031614155b8015611413575060135460ff165b15611420576114206115f7565b80611429612072565b7f00000000000000000000000053c43e025320956e182cab519978dc323eb81bcc6001600160a01b0316856001600160a01b0316141561153d57601354610100900460ff166114b65760405162461bcd60e51b815260206004820152601960248201527854726164696e67206973206e6f74207965742061637469766560381b6044820152606401610b4f565b60026014546114c5919061251d565b43116114d6576114d6846001611c04565b6114e1836001611e08565b600a5491935091508311156115385760405162461bcd60e51b815260206004820152601960248201527f42757920616d6f756e742065786365656473206d6178427579000000000000006044820152606401610b4f565b6115db565b7f00000000000000000000000053c43e025320956e182cab519978dc323eb81bcc6001600160a01b0316846001600160a01b031614156115db57601354610100900460ff166115ca5760405162461bcd60e51b815260206004820152601960248201527854726164696e67206973206e6f74207965742061637469766560381b6044820152606401610b4f565b6115d5836000611e08565b90925090505b6115e6858584611c8c565b6115f08582611ede565b5050505050565b6017805460ff19166001179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061164757634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156116c057600080fd5b505afa1580156116d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f891906120fb565b8160018151811061171957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039290921660209283029190910190910152600c54600b546000916117449161251d565b9050611771307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d836110ee565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac947906117c6908490600090879030904290600401612476565b600060405180830381600087803b1580156117e057600080fd5b505af11580156117f4573d6000803e3d6000fd5b5050600b5447925060009150839061180c9084612555565b6118169190612535565b9050600083600b6001015461182b9085612555565b6118359190612535565b604080518082019091526000808252602082015290915061185a90600b906002612090565b50811561189d57600d546040516001600160a01b03909116906108fc8415029084906000818181858888f1935050505015801561189b573d6000803e3d6000fd5b505b8015611add57600f546001600160a01b0316600d600101546001600160a01b03161415611aa15760007f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561191f57600080fd5b505afa158015611933573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195791906120fb565b9050806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561199457600080fd5b505af11580156119a8573d6000803e3d6000fd5b5050600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260248101879052908516935063095ea7b392506044019050602060405180830381600087803b1580156119fc57600080fd5b505af1158015611a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3491906122ca565b50600f5460405163b66503cf60e01b81526001600160a01b038381166004830152602482018590529091169063b66503cf90604401600060405180830381600087803b158015611a8357600080fd5b505af1158015611a97573d6000803e3d6000fd5b5050505050611add565b600e546040516001600160a01b03909116906108fc8315029083906000818181858888f19350505050158015611adb573d6000803e3d6000fd5b505b50506017805460ff19169055505050565b69d3c21bcecceda100000081601554611b07919061251d565b1115611b4b5760405162461bcd60e51b815260206004820152601360248201527213585e081cdd5c1c1b1e48195e18d959591959606a1b6044820152606401610b4f565b8060156000828254611b5d919061251d565b90915550611b6d90508282611f84565b6040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03821660008181526011602090815260409182902054825193845260ff1615159083015282151582820152517f248358295a71c50a9351204f4da6e13409c2887fde3625358fbb80b9743e433b9181900360600190a16001600160a01b03919091166000908152601160205260409020805460ff1916911515919091179055565b6001600160a01b038316611ce25760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f206164647265737300006044820152606401610b4f565b6001600160a01b038216611d385760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f2061646472657373000000006044820152606401610b4f565b6001600160a01b03831660009081526016602052604090205481811015611da15760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e6365006044820152606401610b4f565b611dab8483611fc8565b611db58383611f84565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611dfa91815260200190565b60405180910390a350505050565b6000611e12612072565b8215611e6b576040805180820190915280612710600660000154611e369088612555565b611e409190612535565b8152602001612710600660010154611e589088612555565b611e629190612535565b90529050611eba565b6040805180820190915280612710600860000154611e899088612555565b611e939190612535565b8152602001612710600860010154611eab9088612555565b611eb59190612535565b905290505b60208101518151611ecb9086612574565b611ed59190612574565b91509250929050565b6001600160a01b038216611f345760405162461bcd60e51b815260206004820152601e60248201527f7461786174696f6e2066726f6d20746865207a65726f206164647265737300006044820152606401610b4f565b60208101518151600091611f479161251d565b9050611f54833083611c8c565b8151600b8054600090611f6890849061251d565b90915550506020820151600c8054600090610f6990849061251d565b6001600160a01b038216600090815260166020526040902054611fa890829061251d565b6001600160a01b0390921660009081526016602052604090209190915550565b6001600160a01b038216600090815260166020526040902054611fa8908290612574565b8260028101928215612034579160200282015b8281111561203457825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611fff565b506120409291506120c3565b5090565b8260028101928215612034579160200282015b82811115612034578251825591602001919060010190612057565b60405180604001604052806002906020820280368337509192915050565b8260028101928215612034579160200282015b82811115612034578251829060ff169055916020019190600101906120a3565b5b8082111561204057600081556001016120c4565b6000602082840312156120e9578081fd5b81356120f4816125dc565b9392505050565b60006020828403121561210c578081fd5b81516120f4816125dc565b60008060408385031215612129578081fd5b8235612134816125dc565b91506020830135612144816125dc565b809150509250929050565b600080600060608486031215612163578081fd5b833561216e816125dc565b9250602084013561217e816125dc565b929592945050506040919091013590565b600080604083850312156121a1578182fd5b82356121ac816125dc565b91506020830135612144816125f1565b600080604083850312156121ce578182fd5b82356121d9816125dc565b946020939093013593505050565b6000604082840312156121f8578081fd5b82601f830112612206578081fd5b61220e6124e6565b80838560408601111561221f578384fd5b835b600281101561224a578135612235816125dc565b84526020938401939190910190600101612221565b509095945050505050565b600060408284031215612266578081fd5b82601f830112612274578081fd5b61227c6124e6565b80838560408601111561228d578384fd5b835b600281101561224a57813584526020938401939091019060010161228f565b6000602082840312156122bf578081fd5b81356120f4816125f1565b6000602082840312156122db578081fd5b81516120f4816125f1565b6000602082840312156122f7578081fd5b5035919050565b600080600060608486031215612312578283fd5b8335925060208401359150604084013561232b816125dc565b809150509250925092565b60008060006060848603121561234a578081fd5b8351925060208401519150604084015190509250925092565b60808101818460005b60028110156123945781546001600160a01b031683526020909201916001918201910161236c565b505050604082018360005b60028110156123c75781516001600160a01b031683526020928301929091019060010161239f565b5050509392505050565b60808101818460005b60028110156123f95781548352602090920191600191820191016123da565b505050604082018360005b60028110156123c7578151835260209283019290910190600101612404565b6000602080835283518082850152825b8181101561244f57858101830151858201604001528201612433565b818111156124605783604083870101525b50601f01601f1916929092016040019392505050565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156124c55784516001600160a01b0316835293830193918301916001016124a0565b50506001600160a01b03969096166060850152505050608001529392505050565b6040805190810167ffffffffffffffff8111828210171561251757634e487b7160e01b600052604160045260246000fd5b60405290565b60008219821115612530576125306125c6565b500190565b60008261255057634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561256f5761256f6125c6565b500290565b600082821015612586576125866125c6565b500390565b600181811c9082168061259f57607f821691505b602082108114156125c057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610cc957600080fd5b8015158114610cc957600080fdfea26469706673582212207a0f9359acefe6031f7d38d27d184ec44073c8dbb33f2b72039e72c59634d84464736f6c63430008040033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000cf80fadc72d0d2b5cd4c02704c77e00acf38b44e000000000000000000000000cf80fadc72d0d2b5cd4c02704c77e00acf38b44e000000000000000000000000000000000000000000002a5a058fc295ed000000

-----Decoded View---------------
Arg [0] : _uniswapRouter (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [1] : _taxWallets (address[2]): 0xcf80FaDc72d0D2b5Cd4c02704c77E00acF38b44E,0xcf80FaDc72d0D2b5Cd4c02704c77E00acF38b44E
Arg [2] : _goupAmount (uint256): 200000000000000000000000

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [1] : 000000000000000000000000cf80fadc72d0d2b5cd4c02704c77e00acf38b44e
Arg [2] : 000000000000000000000000cf80fadc72d0d2b5cd4c02704c77e00acf38b44e
Arg [3] : 000000000000000000000000000000000000000000002a5a058fc295ed000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.