POL Price: $0.382218 (+1.19%)
 

Overview

Max Total Supply

100,000,000 GPO

Holders

3,275

Total Transfers

-

Market

Price

$0.00 @ 0.000000 POL

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
GPOMatic

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 20 : GPO.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "./GPOETH.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";

/**
____________________________
Description:
GoldPesa Option Contract (GPO) - 1 GPO represents the option to purchase 1 GPX at spot gold price + 1 %.
__________________________________
 */
contract GPOMatic is GPOEth {

    /**
     * @dev Initializes the GPO Matic contract
     */
    constructor(ISwapRouter _swapRouter) GPOEth(_swapRouter) {
    }

}

File 2 of 20 : GPOStructs.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

contract GPOStructs {
    /// @notice GPO tokens swapped
    event TokensSwaped(
        address indexed purchaser,
        uint256 amountIn,
        uint256 amountOut,
        bool direction // false: GPO-X, true: X-GPO
    );

    /// @notice GPO tokens transferred from GPO Reserves
    event ReserveTokenTransfer(
        address indexed to,
        uint256 amount
    );

    /// @notice Whitelist wallet changes
    event WalletWhitelistChanged(
        address indexed wallet,
        bool whitelist
    );

    /// @notice Liquidity Pool parameters changes
    event PoolParametersChanged(
        address token,
        uint24 poolFee
    );

    /// @notice FreeTrade enabled/disabled
    event FreeTradeChanged(
        bool freeTrade
    );

    /// @notice Swap enabled/disabled
    event SwapPermChanged(
        bool swapPerm
    );

    /// @notice FeeOnSwap changes
    event FeeOnSwapChanged(
        uint24 feeOnSwap
    );

    /// @notice Fee Splits changes
    event FeeSplitsChanged(
        uint256 length,
        FeeSplit[] feeSplitsArray
    );

    /// @notice CapOnWallet changes
    event CapOnWalletChanged(
        uint256 capOnWallet
    );

    /// @notice FeeSplit stores the "recipient" wallet address and the respective percentage of the feeOnSwap which are to be sent 
    struct FeeSplit {
        address recipient;
        uint16 fee;
    }
}

File 3 of 20 : GPOETH.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "./BaseGPO.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";

/**
____________________________
Description:
GoldPesa Option Contract (GPO) - 1 GPO represents the option to purchase 1 GPX at spot gold price + 1 %.
__________________________________
 */
contract GPOEth is BaseGPO {

    /// @notice Uniswap Router Address
    ISwapRouter public immutable swapRouter;

    /**
     * @dev Initializes the contract and sets the Uniswap SwapRouter.
     */
    constructor(ISwapRouter _swapRouter) BaseGPO() {
        swapRouter = _swapRouter;
    }

    /**
     * @dev Additional requirements before transferring tokens.
     */
    function _beforeTokenTransferAdditional(address from, address to, uint256 amount) internal virtual override {
        // Ensures that GPO token holders cannot execute a swap directly with the GPO/USDC liquidity pool on Uniswap V3. 
        // All swaps must be executed on the GoldPesa DEX unless "freeTrade" has be enabled.
        if (authorizedPool != address(0x0) && (from == authorizedPool || to == authorizedPool)) 
            require(freeTrade || (whitelistedWallets[to] && whitelistedWallets[from]), "GPO_ERR: UniswapV3 functionality is only allowed through GPO's protocol"); 
    }
    
    /**
     * @notice Swap GPO for an exact amount of USDC.
     * 
     * @param amountInMaximum: Maxmimum amount of GPO available for swap 
     * @param amountOut: Exact amount of USDC needed
     * @param deadline: deadline in unix time for the transaction
     *
     * @return amountIn : Exact amount of GPO used for swap 
     *
     * NOTE: Any extra GPO tokens not used in the Swap are returned back to the user.
     */
    function swapToExactOutput(uint256 amountInMaximum, uint256 amountOut, uint256 deadline) external returns (uint256 amountIn) {
        require(amountInMaximum > 0 && amountOut > 0);
        require(swapEnabled || whitelistedWallets[_msgSender()]);
        
        _transfer(_msgSender(), address(this), amountInMaximum);
        _approve(address(this), address(swapRouter), amountInMaximum);

        if (deadline == 0)
            deadline = block.timestamp + 30*60;
        
        ISwapRouter.ExactOutputSingleParams memory params =
            ISwapRouter.ExactOutputSingleParams({
                tokenIn: address(this),
                tokenOut: addrUSDC,
                fee: BaseGPO.swapPoolFee,
                recipient: address(this),
                deadline: deadline,
                amountOut: amountOut,
                amountInMaximum: amountInMaximum,
                sqrtPriceLimitX96: 0
            });
        amountIn = swapRouter.exactOutputSingle(params);
        uint256 fee = calculateFeeOnSwap(amountOut);
        uint256 amountSwap = amountOut - fee;
        
        TransferHelper.safeTransfer(addrUSDC, _msgSender(), amountSwap);
        distributeFee(fee); 

        if (amountIn < amountInMaximum) {
            _transfer(address(this), _msgSender(), amountInMaximum - amountIn);
        } 
        emit TokensSwaped(_msgSender(), amountIn, amountOut, false);
    }

    /**
     * @notice Swap exact amount of GPO for USDC.
     * 
     * @param amountIn: Exact amount of GPO for swap 
     * @param amountOutMinimum: Minimum acceptable USDC amount received
     * @param deadline: deadline in unix time for the transaction
     *
     * @return amountOut : Exact amount of USDC received 
     */
    function swapToExactInput(uint256 amountIn, uint256 amountOutMinimum, uint256 deadline) external returns (uint256 amountOut) {
        require(amountIn > 0);
        require(swapEnabled || whitelistedWallets[_msgSender()]);

        _transfer(_msgSender(), address(this), amountIn);
        _approve(address(this), address(swapRouter), amountIn);

        if (deadline == 0)
            deadline = block.timestamp + 30*60;

        ISwapRouter.ExactInputSingleParams memory params = ISwapRouter
            .ExactInputSingleParams({
                tokenIn: address(this),
                tokenOut: addrUSDC,
                fee: BaseGPO.swapPoolFee,
                recipient: address(this),
                deadline: deadline,
                amountIn: amountIn,
                amountOutMinimum: amountOutMinimum,
                sqrtPriceLimitX96: 0
            });

        amountOut = swapRouter.exactInputSingle(params);

        uint256 fee = calculateFeeOnSwap(amountOut);
        uint256 amountSwap = amountOut - fee;

        TransferHelper.safeTransfer(addrUSDC, _msgSender(), amountSwap);
        distributeFee(fee);

        emit TokensSwaped(_msgSender(), amountIn, amountOut, false);

        return amountSwap;
    }

    /**
     * @notice Swap USDC for an exact amount of GPO.
     * 
     * @param amountInMaximum: Maxmimum amount of USDC/USD available for swap 
     * @param amountOut: Exact amount of GPO needed
     * @param deadline: deadline in unix time for the transaction
     *
     * @return amountIn : Exact amount of USDC used for swap 
     *
     * NOTE: Any extra USDC tokens not used in the Swap are returned back to the user.
     */
    function swapFromExactOutput(uint256 amountInMaximum, uint256 amountOut, uint256 deadline) external returns (uint256 amountIn) {
        require(swapEnabled || whitelistedWallets[_msgSender()]);
        require(amountInMaximum > 0 && amountOut > 0);

        TransferHelper.safeTransferFrom(addrUSDC, _msgSender(), address(this), amountInMaximum);
        uint256 fee = calculateFeeOnSwap(amountInMaximum);
        uint256 amountSwap = amountInMaximum - fee;
        distributeFee(fee);

        
        if (deadline == 0)
            deadline = block.timestamp + 30*60;
        
        TransferHelper.safeApprove(addrUSDC, address(swapRouter), amountSwap);
        ISwapRouter.ExactOutputSingleParams memory params = ISwapRouter.ExactOutputSingleParams({
                tokenIn: addrUSDC,
                tokenOut: address(this),
                fee: BaseGPO.swapPoolFee,
                recipient: address(this),
                deadline: deadline,
                amountOut: amountOut,
                amountInMaximum: amountSwap,
                sqrtPriceLimitX96: 0
        });
        amountIn = swapRouter.exactOutputSingle(params);
        
        _transfer(address(this), _msgSender(), amountOut);

        if (amountIn < amountSwap) {
            TransferHelper.safeTransfer(addrUSDC, _msgSender(), amountSwap - amountIn);
        } 

        emit TokensSwaped(_msgSender(), amountIn, amountOut, true);
    }
    
    /**
     * @notice Swap exact amount of USDC for GPO.
     * 
     * @param amountIn: Exact amount of USDC for swap 
     * @param amountOutMinimum: Minimum accceptable GPO amount received
     * @param deadline: deadline in unix time for the transaction
     *
     * @return amountOut : Exact amount of GPO received 
     */
    function swapFromExactInput(uint256 amountIn, uint256 amountOutMinimum, uint256 deadline) external returns (uint256 amountOut) {
        require(amountIn > 0 && amountOutMinimum > 0);
        require(swapEnabled || whitelistedWallets[_msgSender()]);

        uint256 fee = calculateFeeOnSwap(amountIn);
        TransferHelper.safeTransferFrom(addrUSDC, _msgSender(), address(this), amountIn);
        uint256 amountSwap = amountIn - fee;
        distributeFee(fee);
        TransferHelper.safeApprove(addrUSDC, address(swapRouter), amountSwap);

        if (deadline == 0)
            deadline = block.timestamp + 30*60;

        ISwapRouter.ExactInputSingleParams memory params = ISwapRouter
            .ExactInputSingleParams({
                tokenIn: addrUSDC,
                tokenOut: address(this),
                fee: BaseGPO.swapPoolFee,
                recipient: address(this),
                deadline: deadline,
                amountIn: amountSwap,
                amountOutMinimum: amountOutMinimum,
                sqrtPriceLimitX96: 0
            });
        amountOut = swapRouter.exactInputSingle(params);
        _transfer(address(this), _msgSender(), amountOut);

        emit TokensSwaped(_msgSender(), amountIn, amountOut, true);
    }

    /**
     * @dev GPO Owner sets the USDC contract address, the Uniswap pool fee and accordingly includes the derived Uniswap liquidity pool address to the whitelistedWallets mapping.
     * 
     * @param USDC USDC contract address
     * @param poolFee Uniswap V3 pool fee * 10000
     */
    function setPoolParameters(address USDC, uint24 poolFee) external onlyOwner {
        require(USDC != address(0x0));

        addrUSDC = USDC;
        BaseGPO.swapPoolFee = poolFee;
        whitelistedWallets[authorizedPool] = false;

        // taken from @uniswap/v3-periphery/contracts/libraries/PoolAddress.sol
        address token0 = address(this);
        address token1 = USDC;
        if (token0 > token1) (token0, token1) = (token1, token0);

        authorizedPool = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex'ff',
                            0x1F98431c8aD98523631AE4a59f267346ea31F984,
                            keccak256(abi.encode(token0, token1, poolFee)),
                            bytes32(0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54)
                        )
                    )
                )
            )
        );
        whitelistedWallets[authorizedPool] = true;
        emit PoolParametersChanged(USDC, poolFee);
    }
}

File 4 of 20 : BaseGPO.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./GPOStructs.sol";

/**
____________________________
Description:
GoldPesa Option Contract (GPO) - 1 GPO represents the option to purchase 1 GPX at spot gold price + 1 %.
__________________________________
*/

abstract contract BaseGPO is ERC20Permit, Pausable, Ownable, GPOStructs {
    
    /// @notice Token Name
    string public constant _name = "GPO";
    /// @notice Token Symbol
    string public constant _symbol = "GoldPesa Option";
    /// @notice GPO Hard Cap
    uint256 public constant fixedSupply = 100_000_000;
    /// @notice GPO Cap on Wallet
    uint256 public capOnWallet = 100_000;
    /// @notice GoldPesa fee on swap percentage
    uint256 public feeOnSwap = 10;
    /// @notice USDC ERC20 token Address
    address public addrUSDC;
    /// @dev Uniswap V3 pool fee * 10000 = 1 %
    uint24 internal swapPoolFee = 10000;
    /// @notice Uniswap V3 GPO/USDC liquidity pool address
    address public authorizedPool;
    /// @notice When freeTrade is true the token bypasses the hard cap on wallet and can be traded freely on any exchange.
    bool public freeTrade = false;
    /// @notice The feeOnSwap percentage is distributed to the addresses and their respective percentage which are held in the feeSplits array
    FeeSplit[] public feeSplits;
    /// @notice Keeps a record of the number of addresses in the feeSplits array 
    uint256 public feeSplitsLength;

    /**
     * @notice Mapping which holds details of the wallet addresses which can bypass the wallet hard cap and the custom GoldPesa SwapRouter.
     */
    mapping(address => bool) public whitelistedWallets;

    /// @notice Enables and disables the GoldPesa custom SwapRouter.
    bool public swapEnabled = false;

    /**
     * @dev Initializes the contract and mints the GPO Hard Cap which is also the total fixed supply.
     * 
     * @notice WhiteLists 0x0 address as well as the GPO contract address itself.
     */
    constructor() ERC20(_symbol, _name) ERC20Permit(_name) {
        whitelistedWallets[address(0x0)] = true;
        whitelistedWallets[address(this)] = true;

        _mint(address(this), hardCapOnToken());
    }

    /**
     * @dev GPO Owner can manually transfer GPO tokens from the GPO contract to another wallet address.
     *
     * @param _to: Destination address
     * @param amount: Total amount * 10**18 
     */ 
    function transferTokensTo(address _to, uint256 amount) external onlyOwner {
        _transfer(address(this), _to, amount);
        emit ReserveTokenTransfer(_to, amount);
    }
    
    /**
     * @dev GPO owner can manually add or remove wallet addresses from the whitelistedWallets mapping.
     *
     * @param _addr: wallet/contract address
     * @param yesOrNo: True = Whitelisted - False = Not Whitelisted
     */ 
    function changeWalletWhitelist(address _addr, bool yesOrNo) external onlyOwner {
        whitelistedWallets[_addr] = yesOrNo;
        emit WalletWhitelistChanged(_addr, yesOrNo);
    }

    /**
     * @dev GPO owner can set the state of the contract to "freeTrade".
     */ 
    function switchFreeTrade() external onlyOwner {
        freeTrade = !freeTrade;
        emit FreeTradeChanged(freeTrade);
    }

    /**
     * @dev GPO owner can enable/disable swap functions.
     */ 
    function switchSwapEnabled() external onlyOwner {
        swapEnabled = !swapEnabled;
        emit SwapPermChanged(swapEnabled);
    }

    /**
     * @dev GPO owner can set the feeOnSwap percentage.
     *
     * Note: feeOnSwap can never be greater than 10%
     */ 
    function setFeeOnSwap(uint24 _feeOnSwap) external onlyOwner {
        require(_feeOnSwap <= 10, "feeOnSwap cannot be greater than 10 percent");
        feeOnSwap = _feeOnSwap;
        emit FeeOnSwapChanged(_feeOnSwap);
    }

    /**
     * @dev GPO owner can set the "feeOnSwap" distribution details.
     *
     * Note: Total feeSplits must add upto 100%
     */ 
    function setFeeSplits(FeeSplit[] memory _feeSplits) external onlyOwner {
        uint256 grandTotal = 0;
        for (uint256 i = 0; i < _feeSplits.length; i++) {
            FeeSplit memory f = _feeSplits[i];
            grandTotal += f.fee;
        }
        require(grandTotal == 100);
        delete feeSplits;
        for (uint256 i = 0; i < _feeSplits.length; i++) {
            feeSplits.push(_feeSplits[i]);
        }
        feeSplitsLength = _feeSplits.length;
        emit FeeSplitsChanged(feeSplitsLength, feeSplits);
    }

    /**
     * @dev Distributes the feeOnSwap amount collected during any swap transaction to the addresses defined in the "feeSplits" array.
     *
     * Note: Total feeSplits must add upto 100%
     */ 
    function distributeFee(uint256 amount) internal {
        uint256 grandTotal = 0;
        for (uint256 i = 0; i < feeSplits.length; i++) {
            FeeSplit storage f = feeSplits[i];
            uint256 distributeAmount = amount * f.fee / 100;
            TransferHelper.safeTransfer(addrUSDC, f.recipient, distributeAmount);
            grandTotal += distributeAmount;
        }
        if (grandTotal != amount && feeSplits.length > 0) {
            FeeSplit storage f = feeSplits[0];
            TransferHelper.safeTransfer(addrUSDC, f.recipient, amount - grandTotal);
        }
    }

    /// @notice Additional requirements before transferring tokens.
    function _beforeTokenTransferAdditional(address from, address to, uint256 amount) internal virtual;

    /**
     * @dev Defines the rules that must be satisfied before GPO can be transferred.
     */ 
    function _beforeTokenTransfer(
        address from, 
        address to,
        uint256 amount
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);
        // Ensures that GPO token holders cannot burn their own tokens, unless they are whitelisted.
        require(to != address(0x0) || whitelistedWallets[from], "GPO_ERR: Cannot burn");
        // Unless "freeTrade" has been enabled this require statement rejects any transfers to wallets which will break the wallet hard cap unless the 
        // receiving wallet address is a "whitelistedWallet".
        require(
            freeTrade || 
            from == address(0x0) ||
            whitelistedWallets[to] || 
            balanceOf(to) + amount <= hardCapOnWallet(),
            "GPO_ERR: Hard cap on wallet reached" 
        );

        _beforeTokenTransferAdditional(from, to, amount);
        // Disables all GPO transfers if the token has been paused by GoldPesa.
        require(!paused(), "ERC20Pausable: token transfers paused");
    }

    /**
     * @return uint256 GPO token hard cap ("fixedSupply") in wei.
     */ 
    function hardCapOnToken() public virtual view returns (uint256) {
        return fixedSupply * (10**(uint256(decimals())));
    }

    /**
     * @return uint256 GPO token wallet hard cap ("capOnWallet") in wei.
     */ 
    function hardCapOnWallet() public view returns (uint256) {
        return capOnWallet * (10**(uint256(decimals())));
    }
    
    /**
     * @return uint256 GoldPesa feeOnSwap in USDC which is used in the swap functions.
     */ 
    function calculateFeeOnSwap(uint256 amount) internal view returns (uint256)
    {
        return amount * feeOnSwap / 100;
    }
    
    /**
     * @dev GPO Owner can pause GPO token transfers.
     */ 
    function pause() external onlyOwner {
        _pause();
    }

    /**
     * @dev GPO Owner can unpause GPO token transfers.
     */ 
    function unpause() external onlyOwner {
        _unpause();
    }

    /**
     * @dev Burn function utilized by GoldPesa DEX when users exercise their GPO and purchase GPX.
     *
     * @param amount GPO Amount * 10**18
     */ 
    function burn(uint256 amount) external {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's allowance.
     *
     * @param account Account to burn GPO tokens from
     * @param amount GPO Amount * 10**18
     *
     * NOTE: The caller must have allowance for `accounts`'s tokens of at least `amount`.
     */
    function burnFrom(address account, uint256 amount) external {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }

    /**
     * @dev GPO Owner can change the authorized pool address when required.
     *
     * @param pool New Uniswap pool address
     * @param fee New Uniswap V3 pool fee * 10000
     */ 
    function unsafeSetAuthorizedPool(address pool, uint24 fee) external onlyOwner {
        whitelistedWallets[authorizedPool] = false;
        authorizedPool = pool;
        whitelistedWallets[authorizedPool] = true;
        swapPoolFee = fee;
        emit PoolParametersChanged(authorizedPool, fee);
    }

    /**
     * @dev GPO Owner can set the capOnWallet amount.
     *
     * @param _capOnWallet Max GPO tokens allowed per wallet
     */ 
    function setCapOnWallet(uint256 _capOnWallet) external onlyOwner {
        capOnWallet = _capOnWallet;
        emit CapOnWalletChanged(_capOnWallet);
    }
}

File 5 of 20 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'STE');
    }
}

File 6 of 20 : ISwapRouter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol';

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
interface ISwapRouter is IUniswapV3SwapCallback {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}

File 7 of 20 : IUniswapV3SwapCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Callback for IUniswapV3PoolActions#swap
/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface
interface IUniswapV3SwapCallback {
    /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
    /// @dev In the implementation you must pay the pool tokens owed for the swap.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
    /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
    /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external;
}

File 8 of 20 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 9 of 20 : EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

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

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 11 of 20 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 12 of 20 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 13 of 20 : 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 14 of 20 : 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 15 of 20 : draft-ERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)

pragma solidity ^0.8.0;

import "./draft-IERC20Permit.sol";
import "../ERC20.sol";
import "../../../utils/cryptography/ECDSA.sol";
import "../../../utils/cryptography/EIP712.sol";
import "../../../utils/Counters.sol";

/**
 * @dev Implementation 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.
 *
 * _Available since v3.4._
 */
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {
    using Counters for Counters.Counter;

    mapping(address => Counters.Counter) private _nonces;

    // solhint-disable-next-line var-name-mixedcase
    bytes32 private constant _PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    /**
     * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.
     * However, to ensure consistency with the upgradeable transpiler, we will continue
     * to reserve a slot.
     * @custom:oz-renamed-from _PERMIT_TYPEHASH
     */
    // solhint-disable-next-line var-name-mixedcase
    bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;

    /**
     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
     *
     * It's a good idea to use the same `name` that is defined as the ERC20 token name.
     */
    constructor(string memory name) EIP712(name, "1") {}

    /**
     * @dev See {IERC20Permit-permit}.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override {
        require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        require(signer == owner, "ERC20Permit: invalid signature");

        _approve(owner, spender, value);
    }

    /**
     * @dev See {IERC20Permit-nonces}.
     */
    function nonces(address owner) public view virtual override returns (uint256) {
        return _nonces[owner].current();
    }

    /**
     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view override returns (bytes32) {
        return _domainSeparatorV4();
    }

    /**
     * @dev "Consume a nonce": return the current value and increment.
     *
     * _Available since v4.1._
     */
    function _useNonce(address owner) internal virtual returns (uint256 current) {
        Counters.Counter storage nonce = _nonces[owner];
        current = nonce.current();
        nonce.increment();
    }
}

File 16 of 20 : 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 17 of 20 : 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 18 of 20 : 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 19 of 20 : 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 20 of 20 : 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);
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 500
  },
  "evmVersion": "paris",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ISwapRouter","name":"_swapRouter","type":"address"}],"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":"uint256","name":"capOnWallet","type":"uint256"}],"name":"CapOnWalletChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint24","name":"feeOnSwap","type":"uint24"}],"name":"FeeOnSwapChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"length","type":"uint256"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"fee","type":"uint16"}],"indexed":false,"internalType":"struct GPOStructs.FeeSplit[]","name":"feeSplitsArray","type":"tuple[]"}],"name":"FeeSplitsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"freeTrade","type":"bool"}],"name":"FreeTradeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint24","name":"poolFee","type":"uint24"}],"name":"PoolParametersChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReserveTokenTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"swapPerm","type":"bool"}],"name":"SwapPermChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":false,"internalType":"bool","name":"direction","type":"bool"}],"name":"TokensSwaped","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"bool","name":"whitelist","type":"bool"}],"name":"WalletWhitelistChanged","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addrUSDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"authorizedPool","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"capOnWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"yesOrNo","type":"bool"}],"name":"changeWalletWhitelist","outputs":[],"stateMutability":"nonpayable","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":[],"name":"feeOnSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"feeSplits","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"fee","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeSplitsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fixedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeTrade","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hardCapOnToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hardCapOnWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_capOnWallet","type":"uint256"}],"name":"setCapOnWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"_feeOnSwap","type":"uint24"}],"name":"setFeeOnSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"fee","type":"uint16"}],"internalType":"struct GPOStructs.FeeSplit[]","name":"_feeSplits","type":"tuple[]"}],"name":"setFeeSplits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"USDC","type":"address"},{"internalType":"uint24","name":"poolFee","type":"uint24"}],"name":"setPoolParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapFromExactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountInMaximum","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapFromExactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapRouter","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapToExactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountInMaximum","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapToExactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"switchFreeTrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"switchSwapEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":"_to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferTokensTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"}],"name":"unsafeSetAuthorizedPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedWallets","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

610160604052620186a0600855600a6009819055805462ffffff60a01b191661027160a41b179055600b805460ff60a01b19169055600f805460ff191690553480156200004b57600080fd5b5060405162003d1838038062003d188339810160408190526200006e9162000688565b60408051808201825260038082526247504f60e81b60208084018290528451808601865260018152603160f81b8183015285518087018752600f81526e23b7b6322832b9b09027b83a34b7b760891b8184015286518088019097528487529186019290925285948493620000e383826200075e565b506004620000f282826200075e565b5050825160209384012082519284019290922060e08390526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810194909452608080850193909352308483018190528151808603909301835260c0948501909152815191909601209052929092526101205250506007805460ff191690556200019a336200020c565b600e6020527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c8054600160ff1991821681179092553060008181526040902080549092169092179055620001f890620001f262000266565b6200028b565b6001600160a01b031661014052506200097d565b600780546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000620002766012600a6200093f565b62000286906305f5e1006200094d565b905090565b6001600160a01b038216620002e75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064015b60405180910390fd5b620002f56000838362000360565b806002600082825462000309919062000967565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b620003788383836200054560201b62001a531760201c565b6001600160a01b038216151580620003a857506001600160a01b0383166000908152600e602052604090205460ff165b620003f65760405162461bcd60e51b815260206004820152601460248201527f47504f5f4552523a2043616e6e6f74206275726e0000000000000000000000006044820152606401620002de565b600b54600160a01b900460ff16806200041657506001600160a01b038316155b806200043a57506001600160a01b0382166000908152600e602052604090205460ff165b806200047b57506200044b6200054a565b816200046c846001600160a01b031660009081526020819052604090205490565b62000478919062000967565b11155b620004d55760405162461bcd60e51b815260206004820152602360248201527f47504f5f4552523a204861726420636170206f6e2077616c6c657420726561636044820152621a195960ea1b6064820152608401620002de565b620004e283838362000569565b60075460ff1615620005455760405162461bcd60e51b815260206004820152602560248201527f45524332305061757361626c653a20746f6b656e207472616e73666572732070604482015264185d5cd95960da1b6064820152608401620002de565b505050565b60006200055a6012600a6200093f565b6008546200028691906200094d565b600b546001600160a01b031615801590620005a95750600b546001600160a01b0384811691161480620005a95750600b546001600160a01b038381169116145b156200054557600b54600160a01b900460ff16806200060457506001600160a01b0382166000908152600e602052604090205460ff1680156200060457506001600160a01b0383166000908152600e602052604090205460ff165b620005455760405162461bcd60e51b815260206004820152604760248201527f47504f5f4552523a20556e697377617056332066756e6374696f6e616c69747960448201527f206973206f6e6c7920616c6c6f776564207468726f7567682047504f277320706064820152661c9bdd1bd8dbdb60ca1b608482015260a401620002de565b6000602082840312156200069b57600080fd5b81516001600160a01b0381168114620006b357600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620006e557607f821691505b6020821081036200070657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200054557600081815260208120601f850160051c81016020861015620007355750805b601f850160051c820191505b81811015620007565782815560010162000741565b505050505050565b81516001600160401b038111156200077a576200077a620006ba565b62000792816200078b8454620006d0565b846200070c565b602080601f831160018114620007ca5760008415620007b15750858301515b600019600386901b1c1916600185901b17855562000756565b600085815260208120601f198616915b82811015620007fb57888601518255948401946001909101908401620007da565b50858210156200081a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620008815781600019048211156200086557620008656200082a565b808516156200087357918102915b93841c939080029062000845565b509250929050565b6000826200089a5750600162000939565b81620008a95750600062000939565b8160018114620008c25760028114620008cd57620008ed565b600191505062000939565b60ff841115620008e157620008e16200082a565b50506001821b62000939565b5060208310610133831016604e8410600b841016171562000912575081810a62000939565b6200091e838362000840565b80600019048211156200093557620009356200082a565b0290505b92915050565b6000620006b3838362000889565b80820281158282048414176200093957620009396200082a565b808201808211156200093957620009396200082a565b60805160a05160c05160e05161010051610120516101405161330862000a106000396000818161065001528181610e4201528181610ee50152818161113b015281816111df015281816112ed015281816113900152818161184401526118d101526000611ea701526000611ef601526000611ed101526000611e2a01526000611e5401526000611e7e01526133086000f3fe608060405234801561001057600080fd5b50600436106103365760003560e01c8063715018a6116101b2578063b0b399f8116100f9578063d73452fa116100a2578063deed12971161007c578063deed12971461070f578063e44fafb114610722578063f2fde38b1461072a578063ff99574b1461073d57600080fd5b8063d73452fa146106ba578063dd62ed3e146106c3578063de73a314146106fc57600080fd5b8063c61b1be7116100d3578063c61b1be714610672578063d28d885214610685578063d505accf146106a757600080fd5b8063b0b399f814610625578063b200059d14610638578063c31c9c071461064b57600080fd5b806395d89b411161015b578063a80dcfee11610135578063a80dcfee146105b3578063a9059cbb146105d6578063b09f1266146105e957600080fd5b806395d89b41146105855780639bf8e4ff1461058d578063a457c2d7146105a057600080fd5b80638456cb591161018c5780638456cb59146105325780638c4a11161461053a5780638da5cb5b1461056f57600080fd5b8063715018a61461050457806379cc67901461050c5780637ecebe001461051f57600080fd5b80633950935111610281578063514b1bec1161022a57806364d86dc31161020457806364d86dc3146104b35780636b10b820146104bb5780636ddd1713146104ce57806370a08231146104db57600080fd5b8063514b1bec146104825780635498db23146104955780635c975abb146104a857600080fd5b80633f4ba83a1161025b5780633f4ba83a1461045e578063420286441461046657806342966c681461046f57600080fd5b8063395093511461043b57806339eb5e8f1461044e5780633b8a75061461045657600080fd5b80632a337c26116102e3578063313ce567116102bd578063313ce5671461041157806334c05dd6146104205780633644e5151461043357600080fd5b80632a337c26146103be5780632be8c2a5146103e95780632d6069ee146103fe57600080fd5b80630ae36eb7116103145780630ae36eb71461038f57806318160ddd146103a357806323b872dd146103ab57600080fd5b8063014300e51461033b57806306fdde0314610357578063095ea7b31461036c575b600080fd5b61034460095481565b6040519081526020015b60405180910390f35b61035f610748565b60405161034e9190612c16565b61037f61037a366004612c65565b6107da565b604051901515815260200161034e565b600b5461037f90600160a01b900460ff1681565b600254610344565b61037f6103b9366004612c8f565b6107f4565b600b546103d1906001600160a01b031681565b6040516001600160a01b03909116815260200161034e565b6103fc6103f7366004612c65565b610818565b005b6103fc61040c366004612ccb565b610872565b6040516012815260200161034e565b600a546103d1906001600160a01b031681565b6103446108b6565b61037f610449366004612c65565b6108c5565b6103fc610904565b610344610972565b6103fc61098d565b610344600d5481565b6103fc61047d366004612ccb565b61099f565b6103fc610490366004612cf7565b6109ac565b6103fc6104a3366004612cf7565b610b88565b60075460ff1661037f565b6103fc610c4d565b6103fc6104c9366004612d2a565b610c9d565b600f5461037f9060ff1681565b6103446104e9366004612d4c565b6001600160a01b031660009081526020819052604090205490565b6103fc610d4f565b6103fc61051a366004612c65565b610d61565b61034461052d366004612d4c565b610d7a565b6103fc610d98565b61054d610548366004612ccb565b610da8565b604080516001600160a01b03909316835261ffff90911660208301520161034e565b60075461010090046001600160a01b03166103d1565b61035f610dde565b61034461059b366004612d67565b610ded565b61037f6105ae366004612c65565b611009565b61037f6105c1366004612d4c565b600e6020526000908152604090205460ff1681565b61037f6105e4366004612c65565b61109b565b61035f6040518060400160405280600f81526020017f476f6c6450657361204f7074696f6e000000000000000000000000000000000081525081565b610344610633366004612d67565b6110a9565b610344610646366004612d67565b6112a7565b6103d17f000000000000000000000000000000000000000000000000000000000000000081565b6103fc610680366004612da1565b611492565b61035f6040518060400160405280600381526020016247504f60e81b81525081565b6103fc6106b5366004612dd8565b6114f2565b61034460085481565b6103446106d1366004612e4b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6103fc61070a366004612ee5565b611656565b61034461071d366004612d67565b61179a565b6103446119c1565b6103fc610738366004612d4c565b6119dd565b6103446305f5e10081565b60606003805461075790612fcb565b80601f016020809104026020016040519081016040528092919081815260200182805461078390612fcb565b80156107d05780601f106107a5576101008083540402835291602001916107d0565b820191906000526020600020905b8154815290600101906020018083116107b357829003601f168201915b5050505050905090565b6000336107e8818585611a58565b60019150505b92915050565b600033610802858285611b7c565b61080d858585611c0e565b506001949350505050565b610820611dbd565b61082b308383611c0e565b816001600160a01b03167fc6acaf7d9df5e72a97950b5b4788a76e5b71366f1e9a6821a94a589855d8a66e8260405161086691815260200190565b60405180910390a25050565b61087a611dbd565b60088190556040518181527fd67163fb7e3c6c7a57960417d30dfe076189fde94d37d4fa32d8ec3592e63637906020015b60405180910390a150565b60006108c0611e1d565b905090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906107e890829086906108ff908790613015565b611a58565b61090c611dbd565b600b805460ff600160a01b808304821615810260ff60a01b1990931692909217928390556040517f95caa54a44ea67ea40d180c54e6f99fbfdb0dad30310fc3b476d2868e75a514a936109689390049091161515815260200190565b60405180910390a1565b60006109806012600a61310c565b6008546108c09190613118565b610995611dbd565b61099d611f44565b565b6109a93382611f91565b50565b6109b4611dbd565b6001600160a01b0382166109c757600080fd5b600a80546001600160a01b0384811676ffffffffffffffffffffffffffffffffffffffffffffff199092168217600160a01b62ffffff86160217909255600b549091166000908152600e60205260409020805460ff1916905530908390821115610a2d57905b604080516001600160a01b038481166020808401919091529084168284015262ffffff8616606080840191909152835180840390910181526080830190935282519201919091207fff0000000000000000000000000000000000000000000000000000000000000060a08301527f1f98431c8ad98523631ae4a59f267346ea31f98400000000000000000000000060a183015260b58201527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d582015260f50160408051808303601f190181528282528051602091820120600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039283169081179091556000908152600e8352839020805460ff191660011790558716835262ffffff8616908301527f0e18ab8ae9773fa77e9669164e8a2e25a30a8dab199bc81ec30aca9850ae0092910160405180910390a150505050565b610b90611dbd565b600b80546001600160a01b039081166000908152600e60209081526040808320805460ff19908116909155855473ffffffffffffffffffffffffffffffffffffffff191688861690811787558452928190208054909316600117909255600a805462ffffff60a01b1916600160a01b62ffffff88169081029190911790915593548251931683528201929092527f0e18ab8ae9773fa77e9669164e8a2e25a30a8dab199bc81ec30aca9850ae009291015b60405180910390a15050565b610c55611dbd565b600f805460ff8082161560ff1990921682179092556040519116151581527f87284543529c5b40d8c7b0c3e1a34962c4dca65dc6177a7f7f0659989d690e3e90602001610968565b610ca5611dbd565b600a8162ffffff161115610d145760405162461bcd60e51b815260206004820152602b60248201527f6665654f6e537761702063616e6e6f742062652067726561746572207468616e60448201526a080c4c081c195c98d95b9d60aa1b60648201526084015b60405180910390fd5b62ffffff811660098190556040519081527f8cb09ff4bc12037beed6c9e13da219a4d85384c15a8db87e5df414f49764040c906020016108ab565b610d57611dbd565b61099d60006120cf565b610d6c823383611b7c565b610d768282611f91565b5050565b6001600160a01b0381166000908152600560205260408120546107ee565b610da0611dbd565b61099d612136565b600c8181548110610db857600080fd5b6000918252602090912001546001600160a01b0381169150600160a01b900461ffff1682565b60606004805461075790612fcb565b60008084118015610dfe5750600083115b610e0757600080fd5b600f5460ff1680610e275750336000908152600e602052604090205460ff165b610e3057600080fd5b610e3c335b3086611c0e565b610e67307f000000000000000000000000000000000000000000000000000000000000000086611a58565b81600003610e7e57610e7b42610708613015565b91505b604080516101008101825230808252600a546001600160a01b038082166020850152600160a01b90910462ffffff168385015260608301919091526080820185905260a0820186905260c08201879052600060e08301529151631b67c43360e31b815290917f0000000000000000000000000000000000000000000000000000000000000000169063db3e219890610f1a90849060040161312f565b6020604051808303816000875af1158015610f39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5d919061319d565b91506000610f6a85612173565b90506000610f7882876131b6565b600a54909150610f93906001600160a01b0316335b8361218f565b610f9c8261228f565b86841015610fb857610fb83033610fb3878b6131b6565b611c0e565b604080518581526020810188905260009181019190915233907f7dd0592774a9eb2849e25dc3a08e0494dbca59a475564d0fed6733040065a4af906060015b60405180910390a25050509392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091908381101561108e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610d0b565b61080d8286868403611a58565b6000336107e8818585611c0e565b600080841180156110ba5750600083115b6110c357600080fd5b600f5460ff16806110e35750336000908152600e602052604090205460ff165b6110ec57600080fd5b60006110f785612173565b600a54909150611112906001600160a01b031633308861237f565b600061111e82876131b6565b90506111298261228f565b600a54611160906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000083612489565b836000036111775761117442610708613015565b93505b6040805161010081018252600a546001600160a01b0380821683523060208401819052600160a01b90920462ffffff168385015260608301919091526080820187905260a0820184905260c08201889052600060e0830152915163414bf38960e01b815290917f0000000000000000000000000000000000000000000000000000000000000000169063414bf3899061121490849060040161312f565b6020604051808303816000875af1158015611233573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611257919061319d565b9350611264303386611c0e565b604080518881526020810186905260019181019190915233907f7dd0592774a9eb2849e25dc3a08e0494dbca59a475564d0fed6733040065a4af90606001610ff7565b60008084116112b557600080fd5b600f5460ff16806112d55750336000908152600e602052604090205460ff165b6112de57600080fd5b6112e733610e35565b611312307f000000000000000000000000000000000000000000000000000000000000000086611a58565b816000036113295761132642610708613015565b91505b604080516101008101825230808252600a546001600160a01b038082166020850152600160a01b90910462ffffff168385015260608301919091526080820185905260a0820187905260c08201869052600060e0830152915163414bf38960e01b815290917f0000000000000000000000000000000000000000000000000000000000000000169063414bf389906113c590849060040161312f565b6020604051808303816000875af11580156113e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611408919061319d565b9150600061141583612173565b9050600061142382856131b6565b600a5490915061143c906001600160a01b031633610f8d565b6114458261228f565b6040805188815260208101869052600081830152905133917f7dd0592774a9eb2849e25dc3a08e0494dbca59a475564d0fed6733040065a4af919081900360600190a29695505050505050565b61149a611dbd565b6001600160a01b0382166000818152600e6020908152604091829020805460ff191685151590811790915591519182527f6df38671ed1597560cb7d68d1ed32244b07b3e66ed3d0658e031f3a803952b9d9101610866565b834211156115425760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610d0b565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886115718c612582565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006115cc826125aa565b905060006115dc828787876125f8565b9050896001600160a01b0316816001600160a01b03161461163f5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610d0b565b61164a8a8a8a611a58565b50505050505050505050565b61165e611dbd565b6000805b82518110156116b357600083828151811061167f5761167f6131c9565b60200260200101519050806020015161ffff168361169d9190613015565b92505080806116ab906131df565b915050611662565b50806064146116c157600080fd5b6116cd600c6000612ba7565b60005b825181101561176157600c8382815181106116ed576116ed6131c9565b6020908102919091018101518254600181018455600093845292829020815193018054919092015161ffff16600160a01b0275ffffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b039093169290921791909117905580611759816131df565b9150506116d0565b508151600d8190556040517f645ec602e72c8fd0d98cc8c06a38eb0f5f9ef864f7252930aec65806654471c591610c4191600c906131f8565b600f5460009060ff16806117bd5750336000908152600e602052604090205460ff165b6117c657600080fd5b6000841180156117d65750600083115b6117df57600080fd5b600a546117f7906001600160a01b031633308761237f565b600061180285612173565b9050600061181082876131b6565b905061181b8261228f565b836000036118325761182f42610708613015565b93505b600a54611869906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000083612489565b6040805161010081018252600a546001600160a01b0380821683523060208401819052600160a01b90920462ffffff168385015260608301919091526080820187905260a0820188905260c08201849052600060e08301529151631b67c43360e31b815290917f0000000000000000000000000000000000000000000000000000000000000000169063db3e21989061190690849060040161312f565b6020604051808303816000875af1158015611925573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611949919061319d565b9350611956303388611c0e565b8184101561197e57600a5461197e906001600160a01b03163361197987866131b6565b61218f565b604080518581526020810188905260019181019190915233907f7dd0592774a9eb2849e25dc3a08e0494dbca59a475564d0fed6733040065a4af90606001610ff7565b60006119cf6012600a61310c565b6108c0906305f5e100613118565b6119e5611dbd565b6001600160a01b038116611a4a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d0b565b6109a9816120cf565b505050565b6001600160a01b038316611aba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610d0b565b6001600160a01b038216611b1b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610d0b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114611c085781811015611bfb5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610d0b565b611c088484848403611a58565b50505050565b6001600160a01b038316611c725760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610d0b565b6001600160a01b038216611cd45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610d0b565b611cdf838383612620565b6001600160a01b03831660009081526020819052604090205481811015611d575760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610d0b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611c08565b6007546001600160a01b0361010090910416331461099d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d0b565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611e7657507f000000000000000000000000000000000000000000000000000000000000000046145b15611ea057507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b611f4c6127dc565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001610968565b6001600160a01b038216611ff15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610d0b565b611ffd82600083612620565b6001600160a01b038216600090815260208190526040902054818110156120715760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610d0b565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600780546001600160a01b0383811661010081810274ffffffffffffffffffffffffffffffffffffffff001985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61213e61282e565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f793390565b60006064600954836121859190613118565b6107ee9190613261565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916121eb9190613283565b6000604051808303816000865af19150503d8060008114612228576040519150601f19603f3d011682016040523d82523d6000602084013e61222d565b606091505b5091509150818015612257575080511580612257575080806020019051810190612257919061329f565b6122885760405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606401610d0b565b5050505050565b6000805b600c54811015612323576000600c82815481106122b2576122b26131c9565b6000918252602082200180549092506064906122d990600160a01b900461ffff1687613118565b6122e39190613261565b600a548354919250612302916001600160a01b0391821691168361218f565b61230c8185613015565b93505050808061231b906131df565b915050612293565b508181141580156123355750600c5415155b15610d76576000600c600081548110612350576123506131c9565b60009182526020909120600a5491018054909250611a53916001600160a01b03908116911661197985876131b6565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916123e39190613283565b6000604051808303816000865af19150503d8060008114612420576040519150601f19603f3d011682016040523d82523d6000602084013e612425565b606091505b509150915081801561244f57508051158061244f57508080602001905181019061244f919061329f565b6124815760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b6044820152606401610d0b565b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916124e59190613283565b6000604051808303816000865af19150503d8060008114612522576040519150601f19603f3d011682016040523d82523d6000602084013e612527565b606091505b5091509150818015612551575080511580612551575080806020019051810190612551919061329f565b6122885760405162461bcd60e51b8152602060048201526002602482015261534160f01b6044820152606401610d0b565b6001600160a01b03811660009081526005602052604090208054600181018255905b50919050565b60006107ee6125b7611e1d565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061260987878787612881565b9150915061261681612945565b5095945050505050565b6001600160a01b03821615158061264f57506001600160a01b0383166000908152600e602052604090205460ff165b61269b5760405162461bcd60e51b815260206004820152601460248201527f47504f5f4552523a2043616e6e6f74206275726e0000000000000000000000006044820152606401610d0b565b600b54600160a01b900460ff16806126ba57506001600160a01b038316155b806126dd57506001600160a01b0382166000908152600e602052604090205460ff165b8061271857506126eb610972565b8161270b846001600160a01b031660009081526020819052604090205490565b6127159190613015565b11155b6127705760405162461bcd60e51b815260206004820152602360248201527f47504f5f4552523a204861726420636170206f6e2077616c6c657420726561636044820152621a195960ea1b6064820152608401610d0b565b61277b838383612a8f565b60075460ff1615611a535760405162461bcd60e51b815260206004820152602560248201527f45524332305061757361626c653a20746f6b656e207472616e73666572732070604482015264185d5cd95960da1b6064820152608401610d0b565b60075460ff1661099d5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610d0b565b60075460ff161561099d5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610d0b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156128b8575060009050600361293c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561290c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129355760006001925092505061293c565b9150600090505b94509492505050565b6000816004811115612959576129596132bc565b036129615750565b6001816004811115612975576129756132bc565b036129c25760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610d0b565b60028160048111156129d6576129d66132bc565b03612a235760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d0b565b6003816004811115612a3757612a376132bc565b036109a95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d0b565b600b546001600160a01b031615801590612acd5750600b546001600160a01b0384811691161480612acd5750600b546001600160a01b038381169116145b15611a5357600b54600160a01b900460ff1680612b2557506001600160a01b0382166000908152600e602052604090205460ff168015612b2557506001600160a01b0383166000908152600e602052604090205460ff165b611a535760405162461bcd60e51b815260206004820152604760248201527f47504f5f4552523a20556e697377617056332066756e6374696f6e616c69747960448201527f206973206f6e6c7920616c6c6f776564207468726f7567682047504f277320706064820152661c9bdd1bd8dbdb60ca1b608482015260a401610d0b565b50805460008255906000526020600020908101906109a991905b80821115612bee57805475ffffffffffffffffffffffffffffffffffffffffffff19168155600101612bc1565b5090565b60005b83811015612c0d578181015183820152602001612bf5565b50506000910152565b6020815260008251806020840152612c35816040850160208701612bf2565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114612c6057600080fd5b919050565b60008060408385031215612c7857600080fd5b612c8183612c49565b946020939093013593505050565b600080600060608486031215612ca457600080fd5b612cad84612c49565b9250612cbb60208501612c49565b9150604084013590509250925092565b600060208284031215612cdd57600080fd5b5035919050565b803562ffffff81168114612c6057600080fd5b60008060408385031215612d0a57600080fd5b612d1383612c49565b9150612d2160208401612ce4565b90509250929050565b600060208284031215612d3c57600080fd5b612d4582612ce4565b9392505050565b600060208284031215612d5e57600080fd5b612d4582612c49565b600080600060608486031215612d7c57600080fd5b505081359360208301359350604090920135919050565b80151581146109a957600080fd5b60008060408385031215612db457600080fd5b612dbd83612c49565b91506020830135612dcd81612d93565b809150509250929050565b600080600080600080600060e0888a031215612df357600080fd5b612dfc88612c49565b9650612e0a60208901612c49565b95506040880135945060608801359350608088013560ff81168114612e2e57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612e5e57600080fd5b612e6783612c49565b9150612d2160208401612c49565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715612eae57612eae612e75565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612edd57612edd612e75565b604052919050565b60006020808385031215612ef857600080fd5b823567ffffffffffffffff80821115612f1057600080fd5b818501915085601f830112612f2457600080fd5b813581811115612f3657612f36612e75565b612f44848260051b01612eb4565b818152848101925060069190911b830184019087821115612f6457600080fd5b928401925b81841015612fc05760408489031215612f825760008081fd5b612f8a612e8b565b612f9385612c49565b81528585013561ffff81168114612faa5760008081fd5b8187015283526040939093019291840191612f69565b979650505050505050565b600181811c90821680612fdf57607f821691505b6020821081036125a457634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156107ee576107ee612fff565b600181815b8085111561306357816000190482111561304957613049612fff565b8085161561305657918102915b93841c939080029061302d565b509250929050565b60008261307a575060016107ee565b81613087575060006107ee565b816001811461309d57600281146130a7576130c3565b60019150506107ee565b60ff8411156130b8576130b8612fff565b50506001821b6107ee565b5060208310610133831016604e8410600b84101617156130e6575081810a6107ee565b6130f08383613028565b806000190482111561310457613104612fff565b029392505050565b6000612d45838361306b565b80820281158282048414176107ee576107ee612fff565b61010081016107ee82846001600160a01b0380825116835280602083015116602084015262ffffff60408301511660408401528060608301511660608401526080820151608084015260a082015160a084015260c082015160c08401528060e08301511660e0840152505050565b6000602082840312156131af57600080fd5b5051919050565b818103818111156107ee576107ee612fff565b634e487b7160e01b600052603260045260246000fd5b6000600182016131f1576131f1612fff565b5060010190565b60006040808301858452602082818601528186548084526060870191508760005282600020935060005b818110156132535784546001600160a01b038116845260a01c61ffff16848401526001948501949286019201613222565b509098975050505050505050565b60008261327e57634e487b7160e01b600052601260045260246000fd5b500490565b60008251613295818460208701612bf2565b9190910192915050565b6000602082840312156132b157600080fd5b8151612d4581612d93565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207332d457c0b8cc1e0f196efe500cfe58b3e95ef1a87dceabf76a33920521b21d64736f6c63430008120033000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103365760003560e01c8063715018a6116101b2578063b0b399f8116100f9578063d73452fa116100a2578063deed12971161007c578063deed12971461070f578063e44fafb114610722578063f2fde38b1461072a578063ff99574b1461073d57600080fd5b8063d73452fa146106ba578063dd62ed3e146106c3578063de73a314146106fc57600080fd5b8063c61b1be7116100d3578063c61b1be714610672578063d28d885214610685578063d505accf146106a757600080fd5b8063b0b399f814610625578063b200059d14610638578063c31c9c071461064b57600080fd5b806395d89b411161015b578063a80dcfee11610135578063a80dcfee146105b3578063a9059cbb146105d6578063b09f1266146105e957600080fd5b806395d89b41146105855780639bf8e4ff1461058d578063a457c2d7146105a057600080fd5b80638456cb591161018c5780638456cb59146105325780638c4a11161461053a5780638da5cb5b1461056f57600080fd5b8063715018a61461050457806379cc67901461050c5780637ecebe001461051f57600080fd5b80633950935111610281578063514b1bec1161022a57806364d86dc31161020457806364d86dc3146104b35780636b10b820146104bb5780636ddd1713146104ce57806370a08231146104db57600080fd5b8063514b1bec146104825780635498db23146104955780635c975abb146104a857600080fd5b80633f4ba83a1161025b5780633f4ba83a1461045e578063420286441461046657806342966c681461046f57600080fd5b8063395093511461043b57806339eb5e8f1461044e5780633b8a75061461045657600080fd5b80632a337c26116102e3578063313ce567116102bd578063313ce5671461041157806334c05dd6146104205780633644e5151461043357600080fd5b80632a337c26146103be5780632be8c2a5146103e95780632d6069ee146103fe57600080fd5b80630ae36eb7116103145780630ae36eb71461038f57806318160ddd146103a357806323b872dd146103ab57600080fd5b8063014300e51461033b57806306fdde0314610357578063095ea7b31461036c575b600080fd5b61034460095481565b6040519081526020015b60405180910390f35b61035f610748565b60405161034e9190612c16565b61037f61037a366004612c65565b6107da565b604051901515815260200161034e565b600b5461037f90600160a01b900460ff1681565b600254610344565b61037f6103b9366004612c8f565b6107f4565b600b546103d1906001600160a01b031681565b6040516001600160a01b03909116815260200161034e565b6103fc6103f7366004612c65565b610818565b005b6103fc61040c366004612ccb565b610872565b6040516012815260200161034e565b600a546103d1906001600160a01b031681565b6103446108b6565b61037f610449366004612c65565b6108c5565b6103fc610904565b610344610972565b6103fc61098d565b610344600d5481565b6103fc61047d366004612ccb565b61099f565b6103fc610490366004612cf7565b6109ac565b6103fc6104a3366004612cf7565b610b88565b60075460ff1661037f565b6103fc610c4d565b6103fc6104c9366004612d2a565b610c9d565b600f5461037f9060ff1681565b6103446104e9366004612d4c565b6001600160a01b031660009081526020819052604090205490565b6103fc610d4f565b6103fc61051a366004612c65565b610d61565b61034461052d366004612d4c565b610d7a565b6103fc610d98565b61054d610548366004612ccb565b610da8565b604080516001600160a01b03909316835261ffff90911660208301520161034e565b60075461010090046001600160a01b03166103d1565b61035f610dde565b61034461059b366004612d67565b610ded565b61037f6105ae366004612c65565b611009565b61037f6105c1366004612d4c565b600e6020526000908152604090205460ff1681565b61037f6105e4366004612c65565b61109b565b61035f6040518060400160405280600f81526020017f476f6c6450657361204f7074696f6e000000000000000000000000000000000081525081565b610344610633366004612d67565b6110a9565b610344610646366004612d67565b6112a7565b6103d17f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156481565b6103fc610680366004612da1565b611492565b61035f6040518060400160405280600381526020016247504f60e81b81525081565b6103fc6106b5366004612dd8565b6114f2565b61034460085481565b6103446106d1366004612e4b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6103fc61070a366004612ee5565b611656565b61034461071d366004612d67565b61179a565b6103446119c1565b6103fc610738366004612d4c565b6119dd565b6103446305f5e10081565b60606003805461075790612fcb565b80601f016020809104026020016040519081016040528092919081815260200182805461078390612fcb565b80156107d05780601f106107a5576101008083540402835291602001916107d0565b820191906000526020600020905b8154815290600101906020018083116107b357829003601f168201915b5050505050905090565b6000336107e8818585611a58565b60019150505b92915050565b600033610802858285611b7c565b61080d858585611c0e565b506001949350505050565b610820611dbd565b61082b308383611c0e565b816001600160a01b03167fc6acaf7d9df5e72a97950b5b4788a76e5b71366f1e9a6821a94a589855d8a66e8260405161086691815260200190565b60405180910390a25050565b61087a611dbd565b60088190556040518181527fd67163fb7e3c6c7a57960417d30dfe076189fde94d37d4fa32d8ec3592e63637906020015b60405180910390a150565b60006108c0611e1d565b905090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906107e890829086906108ff908790613015565b611a58565b61090c611dbd565b600b805460ff600160a01b808304821615810260ff60a01b1990931692909217928390556040517f95caa54a44ea67ea40d180c54e6f99fbfdb0dad30310fc3b476d2868e75a514a936109689390049091161515815260200190565b60405180910390a1565b60006109806012600a61310c565b6008546108c09190613118565b610995611dbd565b61099d611f44565b565b6109a93382611f91565b50565b6109b4611dbd565b6001600160a01b0382166109c757600080fd5b600a80546001600160a01b0384811676ffffffffffffffffffffffffffffffffffffffffffffff199092168217600160a01b62ffffff86160217909255600b549091166000908152600e60205260409020805460ff1916905530908390821115610a2d57905b604080516001600160a01b038481166020808401919091529084168284015262ffffff8616606080840191909152835180840390910181526080830190935282519201919091207fff0000000000000000000000000000000000000000000000000000000000000060a08301527f1f98431c8ad98523631ae4a59f267346ea31f98400000000000000000000000060a183015260b58201527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d582015260f50160408051808303601f190181528282528051602091820120600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039283169081179091556000908152600e8352839020805460ff191660011790558716835262ffffff8616908301527f0e18ab8ae9773fa77e9669164e8a2e25a30a8dab199bc81ec30aca9850ae0092910160405180910390a150505050565b610b90611dbd565b600b80546001600160a01b039081166000908152600e60209081526040808320805460ff19908116909155855473ffffffffffffffffffffffffffffffffffffffff191688861690811787558452928190208054909316600117909255600a805462ffffff60a01b1916600160a01b62ffffff88169081029190911790915593548251931683528201929092527f0e18ab8ae9773fa77e9669164e8a2e25a30a8dab199bc81ec30aca9850ae009291015b60405180910390a15050565b610c55611dbd565b600f805460ff8082161560ff1990921682179092556040519116151581527f87284543529c5b40d8c7b0c3e1a34962c4dca65dc6177a7f7f0659989d690e3e90602001610968565b610ca5611dbd565b600a8162ffffff161115610d145760405162461bcd60e51b815260206004820152602b60248201527f6665654f6e537761702063616e6e6f742062652067726561746572207468616e60448201526a080c4c081c195c98d95b9d60aa1b60648201526084015b60405180910390fd5b62ffffff811660098190556040519081527f8cb09ff4bc12037beed6c9e13da219a4d85384c15a8db87e5df414f49764040c906020016108ab565b610d57611dbd565b61099d60006120cf565b610d6c823383611b7c565b610d768282611f91565b5050565b6001600160a01b0381166000908152600560205260408120546107ee565b610da0611dbd565b61099d612136565b600c8181548110610db857600080fd5b6000918252602090912001546001600160a01b0381169150600160a01b900461ffff1682565b60606004805461075790612fcb565b60008084118015610dfe5750600083115b610e0757600080fd5b600f5460ff1680610e275750336000908152600e602052604090205460ff165b610e3057600080fd5b610e3c335b3086611c0e565b610e67307f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156486611a58565b81600003610e7e57610e7b42610708613015565b91505b604080516101008101825230808252600a546001600160a01b038082166020850152600160a01b90910462ffffff168385015260608301919091526080820185905260a0820186905260c08201879052600060e08301529151631b67c43360e31b815290917f000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564169063db3e219890610f1a90849060040161312f565b6020604051808303816000875af1158015610f39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5d919061319d565b91506000610f6a85612173565b90506000610f7882876131b6565b600a54909150610f93906001600160a01b0316335b8361218f565b610f9c8261228f565b86841015610fb857610fb83033610fb3878b6131b6565b611c0e565b604080518581526020810188905260009181019190915233907f7dd0592774a9eb2849e25dc3a08e0494dbca59a475564d0fed6733040065a4af906060015b60405180910390a25050509392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091908381101561108e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610d0b565b61080d8286868403611a58565b6000336107e8818585611c0e565b600080841180156110ba5750600083115b6110c357600080fd5b600f5460ff16806110e35750336000908152600e602052604090205460ff165b6110ec57600080fd5b60006110f785612173565b600a54909150611112906001600160a01b031633308861237f565b600061111e82876131b6565b90506111298261228f565b600a54611160906001600160a01b03167f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156483612489565b836000036111775761117442610708613015565b93505b6040805161010081018252600a546001600160a01b0380821683523060208401819052600160a01b90920462ffffff168385015260608301919091526080820187905260a0820184905260c08201889052600060e0830152915163414bf38960e01b815290917f000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564169063414bf3899061121490849060040161312f565b6020604051808303816000875af1158015611233573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611257919061319d565b9350611264303386611c0e565b604080518881526020810186905260019181019190915233907f7dd0592774a9eb2849e25dc3a08e0494dbca59a475564d0fed6733040065a4af90606001610ff7565b60008084116112b557600080fd5b600f5460ff16806112d55750336000908152600e602052604090205460ff165b6112de57600080fd5b6112e733610e35565b611312307f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156486611a58565b816000036113295761132642610708613015565b91505b604080516101008101825230808252600a546001600160a01b038082166020850152600160a01b90910462ffffff168385015260608301919091526080820185905260a0820187905260c08201869052600060e0830152915163414bf38960e01b815290917f000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564169063414bf389906113c590849060040161312f565b6020604051808303816000875af11580156113e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611408919061319d565b9150600061141583612173565b9050600061142382856131b6565b600a5490915061143c906001600160a01b031633610f8d565b6114458261228f565b6040805188815260208101869052600081830152905133917f7dd0592774a9eb2849e25dc3a08e0494dbca59a475564d0fed6733040065a4af919081900360600190a29695505050505050565b61149a611dbd565b6001600160a01b0382166000818152600e6020908152604091829020805460ff191685151590811790915591519182527f6df38671ed1597560cb7d68d1ed32244b07b3e66ed3d0658e031f3a803952b9d9101610866565b834211156115425760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610d0b565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886115718c612582565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006115cc826125aa565b905060006115dc828787876125f8565b9050896001600160a01b0316816001600160a01b03161461163f5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610d0b565b61164a8a8a8a611a58565b50505050505050505050565b61165e611dbd565b6000805b82518110156116b357600083828151811061167f5761167f6131c9565b60200260200101519050806020015161ffff168361169d9190613015565b92505080806116ab906131df565b915050611662565b50806064146116c157600080fd5b6116cd600c6000612ba7565b60005b825181101561176157600c8382815181106116ed576116ed6131c9565b6020908102919091018101518254600181018455600093845292829020815193018054919092015161ffff16600160a01b0275ffffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b039093169290921791909117905580611759816131df565b9150506116d0565b508151600d8190556040517f645ec602e72c8fd0d98cc8c06a38eb0f5f9ef864f7252930aec65806654471c591610c4191600c906131f8565b600f5460009060ff16806117bd5750336000908152600e602052604090205460ff165b6117c657600080fd5b6000841180156117d65750600083115b6117df57600080fd5b600a546117f7906001600160a01b031633308761237f565b600061180285612173565b9050600061181082876131b6565b905061181b8261228f565b836000036118325761182f42610708613015565b93505b600a54611869906001600160a01b03167f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156483612489565b6040805161010081018252600a546001600160a01b0380821683523060208401819052600160a01b90920462ffffff168385015260608301919091526080820187905260a0820188905260c08201849052600060e08301529151631b67c43360e31b815290917f000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564169063db3e21989061190690849060040161312f565b6020604051808303816000875af1158015611925573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611949919061319d565b9350611956303388611c0e565b8184101561197e57600a5461197e906001600160a01b03163361197987866131b6565b61218f565b604080518581526020810188905260019181019190915233907f7dd0592774a9eb2849e25dc3a08e0494dbca59a475564d0fed6733040065a4af90606001610ff7565b60006119cf6012600a61310c565b6108c0906305f5e100613118565b6119e5611dbd565b6001600160a01b038116611a4a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d0b565b6109a9816120cf565b505050565b6001600160a01b038316611aba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610d0b565b6001600160a01b038216611b1b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610d0b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114611c085781811015611bfb5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610d0b565b611c088484848403611a58565b50505050565b6001600160a01b038316611c725760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610d0b565b6001600160a01b038216611cd45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610d0b565b611cdf838383612620565b6001600160a01b03831660009081526020819052604090205481811015611d575760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610d0b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611c08565b6007546001600160a01b0361010090910416331461099d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d0b565b6000306001600160a01b037f0000000000000000000000000308a3a9c433256ad7ef24dbef9c49c8cb01300a16148015611e7657507f000000000000000000000000000000000000000000000000000000000000008946145b15611ea057507f818a9062463401e9d444881753374d3a4f04816796011a343600a947b960353e90565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f3ccb26c4ade7d33c8ff148b7f33da928f605e4db9219a5a9ac6e1dcd6afa366f828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b611f4c6127dc565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001610968565b6001600160a01b038216611ff15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610d0b565b611ffd82600083612620565b6001600160a01b038216600090815260208190526040902054818110156120715760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610d0b565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600780546001600160a01b0383811661010081810274ffffffffffffffffffffffffffffffffffffffff001985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61213e61282e565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f793390565b60006064600954836121859190613118565b6107ee9190613261565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916121eb9190613283565b6000604051808303816000865af19150503d8060008114612228576040519150601f19603f3d011682016040523d82523d6000602084013e61222d565b606091505b5091509150818015612257575080511580612257575080806020019051810190612257919061329f565b6122885760405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606401610d0b565b5050505050565b6000805b600c54811015612323576000600c82815481106122b2576122b26131c9565b6000918252602082200180549092506064906122d990600160a01b900461ffff1687613118565b6122e39190613261565b600a548354919250612302916001600160a01b0391821691168361218f565b61230c8185613015565b93505050808061231b906131df565b915050612293565b508181141580156123355750600c5415155b15610d76576000600c600081548110612350576123506131c9565b60009182526020909120600a5491018054909250611a53916001600160a01b03908116911661197985876131b6565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916123e39190613283565b6000604051808303816000865af19150503d8060008114612420576040519150601f19603f3d011682016040523d82523d6000602084013e612425565b606091505b509150915081801561244f57508051158061244f57508080602001905181019061244f919061329f565b6124815760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b6044820152606401610d0b565b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916124e59190613283565b6000604051808303816000865af19150503d8060008114612522576040519150601f19603f3d011682016040523d82523d6000602084013e612527565b606091505b5091509150818015612551575080511580612551575080806020019051810190612551919061329f565b6122885760405162461bcd60e51b8152602060048201526002602482015261534160f01b6044820152606401610d0b565b6001600160a01b03811660009081526005602052604090208054600181018255905b50919050565b60006107ee6125b7611e1d565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061260987878787612881565b9150915061261681612945565b5095945050505050565b6001600160a01b03821615158061264f57506001600160a01b0383166000908152600e602052604090205460ff165b61269b5760405162461bcd60e51b815260206004820152601460248201527f47504f5f4552523a2043616e6e6f74206275726e0000000000000000000000006044820152606401610d0b565b600b54600160a01b900460ff16806126ba57506001600160a01b038316155b806126dd57506001600160a01b0382166000908152600e602052604090205460ff165b8061271857506126eb610972565b8161270b846001600160a01b031660009081526020819052604090205490565b6127159190613015565b11155b6127705760405162461bcd60e51b815260206004820152602360248201527f47504f5f4552523a204861726420636170206f6e2077616c6c657420726561636044820152621a195960ea1b6064820152608401610d0b565b61277b838383612a8f565b60075460ff1615611a535760405162461bcd60e51b815260206004820152602560248201527f45524332305061757361626c653a20746f6b656e207472616e73666572732070604482015264185d5cd95960da1b6064820152608401610d0b565b60075460ff1661099d5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610d0b565b60075460ff161561099d5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610d0b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156128b8575060009050600361293c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561290c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129355760006001925092505061293c565b9150600090505b94509492505050565b6000816004811115612959576129596132bc565b036129615750565b6001816004811115612975576129756132bc565b036129c25760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610d0b565b60028160048111156129d6576129d66132bc565b03612a235760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d0b565b6003816004811115612a3757612a376132bc565b036109a95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d0b565b600b546001600160a01b031615801590612acd5750600b546001600160a01b0384811691161480612acd5750600b546001600160a01b038381169116145b15611a5357600b54600160a01b900460ff1680612b2557506001600160a01b0382166000908152600e602052604090205460ff168015612b2557506001600160a01b0383166000908152600e602052604090205460ff165b611a535760405162461bcd60e51b815260206004820152604760248201527f47504f5f4552523a20556e697377617056332066756e6374696f6e616c69747960448201527f206973206f6e6c7920616c6c6f776564207468726f7567682047504f277320706064820152661c9bdd1bd8dbdb60ca1b608482015260a401610d0b565b50805460008255906000526020600020908101906109a991905b80821115612bee57805475ffffffffffffffffffffffffffffffffffffffffffff19168155600101612bc1565b5090565b60005b83811015612c0d578181015183820152602001612bf5565b50506000910152565b6020815260008251806020840152612c35816040850160208701612bf2565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114612c6057600080fd5b919050565b60008060408385031215612c7857600080fd5b612c8183612c49565b946020939093013593505050565b600080600060608486031215612ca457600080fd5b612cad84612c49565b9250612cbb60208501612c49565b9150604084013590509250925092565b600060208284031215612cdd57600080fd5b5035919050565b803562ffffff81168114612c6057600080fd5b60008060408385031215612d0a57600080fd5b612d1383612c49565b9150612d2160208401612ce4565b90509250929050565b600060208284031215612d3c57600080fd5b612d4582612ce4565b9392505050565b600060208284031215612d5e57600080fd5b612d4582612c49565b600080600060608486031215612d7c57600080fd5b505081359360208301359350604090920135919050565b80151581146109a957600080fd5b60008060408385031215612db457600080fd5b612dbd83612c49565b91506020830135612dcd81612d93565b809150509250929050565b600080600080600080600060e0888a031215612df357600080fd5b612dfc88612c49565b9650612e0a60208901612c49565b95506040880135945060608801359350608088013560ff81168114612e2e57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612e5e57600080fd5b612e6783612c49565b9150612d2160208401612c49565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715612eae57612eae612e75565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612edd57612edd612e75565b604052919050565b60006020808385031215612ef857600080fd5b823567ffffffffffffffff80821115612f1057600080fd5b818501915085601f830112612f2457600080fd5b813581811115612f3657612f36612e75565b612f44848260051b01612eb4565b818152848101925060069190911b830184019087821115612f6457600080fd5b928401925b81841015612fc05760408489031215612f825760008081fd5b612f8a612e8b565b612f9385612c49565b81528585013561ffff81168114612faa5760008081fd5b8187015283526040939093019291840191612f69565b979650505050505050565b600181811c90821680612fdf57607f821691505b6020821081036125a457634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156107ee576107ee612fff565b600181815b8085111561306357816000190482111561304957613049612fff565b8085161561305657918102915b93841c939080029061302d565b509250929050565b60008261307a575060016107ee565b81613087575060006107ee565b816001811461309d57600281146130a7576130c3565b60019150506107ee565b60ff8411156130b8576130b8612fff565b50506001821b6107ee565b5060208310610133831016604e8410600b84101617156130e6575081810a6107ee565b6130f08383613028565b806000190482111561310457613104612fff565b029392505050565b6000612d45838361306b565b80820281158282048414176107ee576107ee612fff565b61010081016107ee82846001600160a01b0380825116835280602083015116602084015262ffffff60408301511660408401528060608301511660608401526080820151608084015260a082015160a084015260c082015160c08401528060e08301511660e0840152505050565b6000602082840312156131af57600080fd5b5051919050565b818103818111156107ee576107ee612fff565b634e487b7160e01b600052603260045260246000fd5b6000600182016131f1576131f1612fff565b5060010190565b60006040808301858452602082818601528186548084526060870191508760005282600020935060005b818110156132535784546001600160a01b038116845260a01c61ffff16848401526001948501949286019201613222565b509098975050505050505050565b60008261327e57634e487b7160e01b600052601260045260246000fd5b500490565b60008251613295818460208701612bf2565b9190910192915050565b6000602082840312156132b157600080fd5b8151612d4581612d93565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207332d457c0b8cc1e0f196efe500cfe58b3e95ef1a87dceabf76a33920521b21d64736f6c63430008120033

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

000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564

-----Decoded View---------------
Arg [0] : _swapRouter (address): 0xE592427A0AEce92De3Edee1F18E0157C05861564

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564


Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.