ETH Price: $2,064.75 (+0.43%)

Token

Pixel Mushrohm (PixelMushrohm)

Overview

Max Total Supply

801 PixelMushrohm

Holders

346

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
11 PixelMushrohm
0x77e09ab2cb69d1742a58770792e471450613fbbd
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
PixelMushrohmERC721

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 27 : PixelMushrohmERC721.sol
// SPDX-License-Identifier: GPLv2
pragma solidity ^0.8.1;

import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC165.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";

import "./interfaces/IPixelMushrohmAuthority.sol";
import "./interfaces/IPixelMushrohmERC721.sol";
import "./interfaces/IPixelMushrohmStaking.sol";
import "./types/PixelMushrohmAccessControlled.sol";

contract PixelMushrohmERC721 is IPixelMushrohmERC721, ERC721Enumerable, PixelMushrohmAccessControlled, ReentrancyGuard {
    /* ========== DEPENDENCIES ========== */

    using SafeERC20 for IERC20;
    using SafeMath for uint256;
    using Strings for uint256;
    using Counters for Counters.Counter;

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

    bool public revealed = false;

    uint256 constant BRIDGE_MAX_MINT = 1500;
    uint256 constant APELIEN_MAX_MINT = 50;
    uint256 constant DEV_MAX_MINT = 1;
    uint256 constant FIRST_GEN_LEVEL_MAX_MINT = 1500;
    uint256 constant WHITELIST_MAX_MINT = 2030;

    mapping(address => uint256) private _numUserTokensMinted;

    Counters.Counter private _standardTokenIdTracker;
    Counters.Counter private _apelienTokenIdTracker;
    Counters.Counter private _numStandardTokensMinted;
    string public baseURI;
    string public prerevealURI;

    address private _mintToken;
    uint256 private _mintTokenPrice;
    uint256 private _maxMintPerWallet = 1;
    bytes32 public merkleRoot;

    uint256 private _maxSporePowerLevel = 4;
    uint256 private _maxLevel = 10;
    /// @dev 18 decimals
    uint256 private _sporePowerCost = 50000000000000000000;
    uint256 private _levelCost = 50000000000000000000;
    /// @dev 18 decimals
    uint256 public totalSporePower;
    /// @dev 9 decimals
    uint256 private _baseLevelMultiplier = 20000000; // 2%
    uint256 public firstGenLevelMintLevel = 2;

    IPixelMushrohmStaking public staking;
    mapping(address => bool) public redeemers;
    mapping(address => bool) public multipliers;
    address public bridge;

    mapping(uint256 => TokenData) public tokenData;
    mapping(uint256 => bool) public firstGenLevelMintComplete;

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

    modifier onlyStaking() {
        require(msg.sender == address(staking), "PixelMushrohm: !staking");
        _;
    }

    modifier onlyRedeemer() {
        require(redeemers[msg.sender], "PixelMushrohm: !redeemer");
        _;
    }

    modifier onlyBridge() {
        require(msg.sender == bridge, "PixelMushrohm: !bridge");
        _;
    }

    modifier onlyMultiplier() {
        require(multipliers[msg.sender], "PixelMushrohm: !multiplier");
        _;
    }

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

    constructor(address _authority)
        ERC721("Pixel Mushrohm", "PixelMushrohm")
        PixelMushrohmAccessControlled(IPixelMushrohmAuthority(_authority))
    {}

    /* ======== ADMIN FUNCTIONS ======== */

    function setStaking(address _staking) external override onlyOwner {
        staking = IPixelMushrohmStaking(_staking);
        emit StakingSet(_staking);
    }

    function addRedeemer(address _redeemer) external override onlyOwner {
        redeemers[_redeemer] = true;
        emit RedeemerAdded(_redeemer);
    }

    function removeRedeemer(address _redeemer) external override onlyOwner {
        redeemers[_redeemer] = false;
        emit RedeemerRemoved(_redeemer);
    }

    function addMultiplier(address _multiplier) external override onlyOwner {
        multipliers[_multiplier] = true;
        emit MultiplierAdded(_multiplier);
    }

    function removeMultiplier(address _multiplier) external override onlyOwner {
        multipliers[_multiplier] = false;
        emit MultiplierRemoved(_multiplier);
    }

    function setBridge(address _bridge) external override onlyOwner {
        bridge = _bridge;
        emit BridgeSet(_bridge);
    }

    function setMaxSporePowerLevel(uint256 _max) external override onlyPolicy {
        _maxSporePowerLevel = _max;
        emit MaxSporePowerLevel(_max);
    }

    function setMaxLevel(uint256 _max) external override onlyPolicy {
        _maxLevel = _max;
        emit MaxLevel(_max);
    }

    function setBaseLevelMultiplier(uint256 _multiplier) external override onlyPolicy {
        _baseLevelMultiplier = _multiplier;
        emit BaseLevelMultiplier(_multiplier);
    }

    function setFirstGenLevelMintLevel(uint256 _level) external override onlyPolicy {
        firstGenLevelMintLevel = _level;
        emit FirstGenLevelMintLevel(_level);
    }

    function setSporePowerPerWeek(uint256 _sporePowerPerWeek, uint256[] calldata _tokenIds)
        external
        override
        onlyOwner
    {
        require(_sporePowerPerWeek > 0, "PixelMushrohm: Spore power per week must be greater than 0");
        for (uint256 i = 0; i < _tokenIds.length; i++) {
            tokenData[_tokenIds[i]].sporePowerPerWeek = _sporePowerPerWeek;
        }
    }

    function setBaseURI(string memory _baseURItoSet) external override onlyPolicy {
        baseURI = _baseURItoSet;
    }

    function setPrerevealURI(string memory _prerevealURI) external override onlyPolicy {
        prerevealURI = _prerevealURI;
    }

    function setMintToken(address _tokenAddr) external override onlyOwner {
        _mintToken = _tokenAddr;
    }

    function setMintTokenPrice(uint256 _price) external override onlyOwner {
        _mintTokenPrice = _price;
    }

    function setMaxMintPerWallet(uint256 _maxPerWallet) external override onlyOwner {
        _maxMintPerWallet = _maxPerWallet;
    }

    function setMerkleRoot(bytes32 _merkleRoot) external override onlyOwner {
        merkleRoot = _merkleRoot;
    }

    function toggleReveal() external override onlyOwner {
        revealed = !revealed;
    }

    function withdraw(address _tokenAddr) external override onlyVault {
        require(_tokenAddr != address(0), "PixelMushrohm: Invalid token address");
        uint256 tokenBalance = IERC20(_tokenAddr).balanceOf(address(this));
        require(tokenBalance > 0, "PixelMushrohm: No token balance");
        IERC20(_tokenAddr).transfer(msg.sender, tokenBalance);
    }

    function manualBridgeMint(address[] calldata _to, uint256[] calldata _tokenId) external override onlyPolicy {
        require(
            _to.length == _tokenId.length,
            "PixelMushrohm: List of addresses and list of token IDs must be the same size"
        );

        for (uint256 i = 0; i < _to.length; i++) {
            require(!_exists(_tokenId[i]), "PixelMushrohm: Token already exists");
            _mint(_to[i], _tokenId[i], MintType.BRIDGE);
        }
    }

    function airdrop(
        MintType _mintType,
        address[] calldata _to,
        uint256[] calldata _amount
    ) external override onlyOwner {
        require(
            (_mintType == MintType.APELIEN_AIRDROP ||
                _mintType == MintType.NOOSH_AIRDROP ||
                _mintType == MintType.PILOT_AIRDROP ||
                _mintType == MintType.R3L0C_AIRDROP ||
                _mintType == MintType.MEMETIC_AIRDROP ||
                _mintType == MintType.STANDARD),
            "PixelMushrohm: Must be an airdrop mint type"
        );
        require(
            _to.length == _amount.length,
            "PixelMushrohm: List of addresses and list of amounts must be the same size"
        );
        for (uint256 i = 0; i < _to.length; i++) {
            for (uint256 j = 0; j < _amount[i]; j++) {
                if (_mintType == MintType.STANDARD) {
                    _numStandardTokensMinted.increment();
                    _numUserTokensMinted[_to[i]] = _numUserTokensMinted[_to[i]].add(1);
                }
                _mint(_to[i], 0, _mintType);
            }
        }
    }

    /* ======== DEBUG FUNCTIONS ======== */

    // function adjustSporePower(uint256 _tokenId, uint256 _sporePower) external override onlyOwner {
    //     uint256 _maxSporePower = _sporePowerCost.mul(_maxSporePowerLevel);
    //     if (_sporePower > _maxSporePower) {
    //         _sporePower = _maxSporePower;
    //     }

    //     if (_sporePower > tokenData[_tokenId].sporePower) {
    //         uint256 _sporePowerDiff = _sporePower.sub(tokenData[_tokenId].sporePower);
    //         totalSporePower = totalSporePower.add(_sporePowerDiff);
    //     } else {
    //         uint256 _sporePowerDiff = tokenData[_tokenId].sporePower.sub(_sporePower);
    //         totalSporePower = totalSporePower.sub(_sporePowerDiff);
    //     }

    //     tokenData[_tokenId].sporePower = _sporePower;
    // }

    // function adjustLevelPower(uint256 _tokenId, uint256 _levelPower) external override onlyOwner {
    //     if (_levelPower > _levelCost) {
    //         _levelPower = _levelCost;
    //     }
    //     tokenData[_tokenId].levelPower = _levelPower;
    // }

    // function mintFirstGen(uint256 _tokenId) external override onlyOwner {
    //     require(!_exists(_tokenId), "PixelMushrohm: Token already exists");
    //     _mint(msg.sender, _tokenId, MintType.BRIDGE);
    // }

    /* ======== MUTABLE FUNCTIONS ======== */

    function whitelistMint(uint256 _amount, bytes32[] calldata _merkleProof)
        external
        override
        whenNotPaused
        nonReentrant
    {
        require(_amount > 0, "PixelMushrohm: Amount must be greater than 0");
        require(_numStandardTokensMinted.current() < WHITELIST_MAX_MINT, "PixelMushrohm: Mint complete");
        require(_mintToken != address(0), "PixelMushrohm: Payment token not set");
        require(_mintTokenPrice != 0, "PixelMushrohm: Payment price not set");
        require(
            _numUserTokensMinted[msg.sender].add(_amount) <= _maxMintPerWallet,
            "PixelMushrohm: Max mint limit reached"
        );
        require(_isWhitelisted(msg.sender, _merkleProof), "PixelMushrohm: Not in whitelist");

        IERC20(_mintToken).safeTransferFrom(msg.sender, address(this), _mintTokenPrice.mul(_amount));

        for (uint256 i = 0; i < _amount; i++) {
            _numStandardTokensMinted.increment();
            _numUserTokensMinted[msg.sender] = _numUserTokensMinted[msg.sender].add(1);
            _mint(msg.sender, 0, MintType.STANDARD);
        }
    }

    function bridgeMint(address _to, uint256 _tokenId) external override whenNotPaused onlyBridge {
        require(!_exists(_tokenId), "PixelMushrohm: Token already exists");
        _mint(_to, _tokenId, MintType.BRIDGE);
    }

    function firstGenLevelMint(uint256 _tokenId) external override whenNotPaused nonReentrant {
        require(ownerOf(_tokenId) == msg.sender, "PixelMushrohm: Sender is not the owner of the token ID");
        require(isEligibleForLevelMint(_tokenId), "PixelMushrohm: Not eligible for level mint");
        _mint(msg.sender, 0, MintType.STANDARD);
        firstGenLevelMintComplete[_tokenId] = true;
    }

    function updateSporePower(uint256 _tokenId, uint256 _sporePowerEarned) external override whenNotPaused onlyStaking {
        uint256 maxSporePower = _sporePowerCost.mul(_maxSporePowerLevel);
        if (tokenData[_tokenId].sporePower.add(_sporePowerEarned) <= maxSporePower) {
            totalSporePower = totalSporePower.add(_sporePowerEarned);
        } else {
            uint256 result;
            (, result) = maxSporePower.trySub(tokenData[_tokenId].sporePower);
            totalSporePower = totalSporePower.add(result);
        }
        tokenData[_tokenId].sporePower = Math.min(tokenData[_tokenId].sporePower.add(_sporePowerEarned), maxSporePower);
    }

    function updateLevelPower(uint256 _tokenId, uint256 _levelPowerEarned) external override whenNotPaused onlyStaking {
        tokenData[_tokenId].levelPower = Math.min(tokenData[_tokenId].levelPower.add(_levelPowerEarned), _levelCost);
    }

    function updateLevel(uint256 _tokenId) external override whenNotPaused onlyStaking {
        require(getLevel(_tokenId) < _maxLevel, "PixelMushrohm: Level already maxxed");
        tokenData[_tokenId].levelPower = 0;
        tokenData[_tokenId].level = tokenData[_tokenId].level.add(1);
    }

    function redeemSporePower(uint256 _tokenId, uint256 _amount)
        external
        override
        whenNotPaused
        nonReentrant
        onlyRedeemer
    {
        require(_amount > 0, "PixelMushrohm: Amount must be greater than 0");

        staking.inPlaceSporePowerUpdate(_tokenId);
        require(
            _amount <= tokenData[_tokenId].sporePower,
            "PixelMushrohm: Cannot redeem more spore power than is available"
        );

        totalSporePower = totalSporePower.sub(_amount);
        tokenData[_tokenId].sporePower = tokenData[_tokenId].sporePower.sub(_amount);
        emit RedeemSporePower(_tokenId, _amount);
    }

    function setAdditionalMultiplier(uint256 _tokenId, uint256 _multiplier)
        external
        override
        whenNotPaused
        nonReentrant
        onlyMultiplier
    {
        tokenData[_tokenId].additionalMultiplier = _multiplier;
        emit AdditionalMultiplier(_tokenId, _multiplier);
    }

    /* ======== INTERNAL FUNCTIONS ======== */

    function _calculateTokenIdStartEnd(MintType _mintType) internal view returns (uint256, uint256) {
        uint256 _prevStop;

        if (_mintType == MintType.BRIDGE) {
            return (1, BRIDGE_MAX_MINT);
        } else if (_mintType == MintType.APELIEN_AIRDROP) {
            (, _prevStop) = _calculateTokenIdStartEnd(MintType.BRIDGE);
            return (_prevStop.add(1), _prevStop.add(APELIEN_MAX_MINT));
        } else if (_mintType == MintType.NOOSH_AIRDROP) {
            (, _prevStop) = _calculateTokenIdStartEnd(MintType.APELIEN_AIRDROP);
            return (_prevStop.add(1), _prevStop.add(DEV_MAX_MINT));
        } else if (_mintType == MintType.PILOT_AIRDROP) {
            (, _prevStop) = _calculateTokenIdStartEnd(MintType.NOOSH_AIRDROP);
            return (_prevStop.add(1), _prevStop.add(DEV_MAX_MINT));
        } else if (_mintType == MintType.R3L0C_AIRDROP) {
            (, _prevStop) = _calculateTokenIdStartEnd(MintType.PILOT_AIRDROP);
            return (_prevStop.add(1), _prevStop.add(DEV_MAX_MINT));
        } else if (_mintType == MintType.MEMETIC_AIRDROP) {
            (, _prevStop) = _calculateTokenIdStartEnd(MintType.R3L0C_AIRDROP);
            return (_prevStop.add(1), _prevStop.add(DEV_MAX_MINT));
        } else {
            (, _prevStop) = _calculateTokenIdStartEnd(MintType.MEMETIC_AIRDROP);
            return (_prevStop.add(1), _prevStop.add(FIRST_GEN_LEVEL_MAX_MINT).add(WHITELIST_MAX_MINT));
        }
    }

    function _mint(
        address _to,
        uint256 _tokenId,
        MintType _mintType
    ) internal {
        uint256 _tokenIdStart;
        uint256 _maxMint;
        (_tokenIdStart, _maxMint) = _calculateTokenIdStartEnd(_mintType);

        if (_mintType == MintType.APELIEN_AIRDROP) {
            _tokenId = _apelienTokenIdTracker.current().add(_tokenIdStart);
            _apelienTokenIdTracker.increment();
        } else if (
            _mintType == MintType.NOOSH_AIRDROP ||
            _mintType == MintType.PILOT_AIRDROP ||
            _mintType == MintType.R3L0C_AIRDROP ||
            _mintType == MintType.MEMETIC_AIRDROP
        ) {
            _tokenId = _tokenIdStart;
        } else if (_mintType == MintType.STANDARD) {
            _tokenId = _standardTokenIdTracker.current().add(_tokenIdStart);
            _standardTokenIdTracker.increment();
        }

        require(_tokenId <= _maxMint, "PixelMushrohm: Maximum token ID reached");

        emit PixelMushrohmMint(_to, _tokenId);
        _safeMint(_to, _tokenId);
    }

    function _isWhitelisted(address _owner, bytes32[] calldata _merkleProof) internal view returns (bool) {
        if (merkleRoot == 0) {
            return true;
        }
        bytes32 leaf = keccak256(abi.encodePacked(_owner));
        return MerkleProof.verify(_merkleProof, merkleRoot, leaf);
    }

    function _beforeTokenTransfer(
        address _from,
        address _to,
        uint256 _tokenId
    ) internal override whenNotPaused {
        super._beforeTokenTransfer(_from, _to, _tokenId);

        if (address(staking) != address(0))
            require(!staking.isStaked(_tokenId), "PixelMushrohm: Is staked. Unstake to transfer.");
    }

    function _baseURI() internal view override returns (string memory) {
        return baseURI;
    }

    /* ======== VIEW FUNCTIONS ======== */

    function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, IERC165) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    function tokenURI(uint256 _tokenId) public view override returns (string memory) {
        if (!revealed) {
            return prerevealURI;
        } else {
            require(_exists(_tokenId), "PixelMushrohm: URI query for nonexistent token");

            uint256 sporePowerLevel = getSporePowerLevel(_tokenId);
            return
                bytes(baseURI).length > 0
                    ? string(abi.encodePacked(baseURI, _tokenId.toString(), "/", sporePowerLevel.toString(), ".json"))
                    : "";
        }
    }

    function exists(uint256 _tokenId) public view override returns (bool) {
        return _exists(_tokenId);
    }

    function getMintToken() public view override returns (address) {
        return _mintToken;
    }

    function getMintTokenPrice() public view override returns (uint256) {
        return _mintTokenPrice;
    }

    function getMaxMintPerWallet() public view override returns (uint256) {
        return _maxMintPerWallet;
    }

    function getSporePower(uint256 _tokenId) public view override returns (uint256) {
        uint256 maxSporePower = _sporePowerCost.mul(_maxSporePowerLevel);
        return Math.min(tokenData[_tokenId].sporePower.add(staking.sporePowerEarned(_tokenId)), maxSporePower);
    }

    function getSporePowerLevel(uint256 _tokenId) public view override returns (uint256) {
        return Math.min(getSporePower(_tokenId).div(_sporePowerCost), _maxSporePowerLevel);
    }

    function averageSporePower() public view override returns (uint256) {
        if (totalSupply() == 0) return 0;
        return totalSporePower.div(totalSupply());
    }

    function getSporePowerCost() public view override returns (uint256) {
        return _sporePowerCost;
    }

    function getMaxSporePowerLevel() public view override returns (uint256) {
        return _maxSporePowerLevel;
    }

    function getSporePowerPerWeek(uint256 _tokenId) public view override returns (uint256) {
        return tokenData[_tokenId].sporePowerPerWeek;
    }

    function getLevel(uint256 _tokenId) public view override returns (uint256) {
        return tokenData[_tokenId].level.add(1);
    }

    function getLevelPower(uint256 _tokenId) public view override returns (uint256) {
        return Math.min(tokenData[_tokenId].levelPower.add(staking.levelPowerEarned(_tokenId)), _levelCost);
    }

    function getLevelCost() public view override returns (uint256) {
        return _levelCost;
    }

    function getMaxLevel() public view override returns (uint256) {
        return _maxLevel;
    }

    function getBaseLevelMultiplier() public view override returns (uint256) {
        return _baseLevelMultiplier;
    }

    function getLevelMultiplier(uint256 _tokenId) public view override returns (uint256) {
        return _baseLevelMultiplier.mul(tokenData[_tokenId].level);
    }

    function getAdditionalMultiplier(uint256 _tokenId) public view override returns (uint256) {
        return tokenData[_tokenId].additionalMultiplier;
    }

    function getTokenURIsForOwner(address _owner) public view override returns (string[] memory) {
        uint256 ownerBalance = balanceOf(_owner);
        string[] memory tokenURIs = new string[](ownerBalance);
        for (uint256 i = 0; i < ownerBalance; i++) {
            tokenURIs[i] = tokenURI(tokenOfOwnerByIndex(_owner, i));
        }
        return tokenURIs;
    }

    function isEligibleForLevelMint(uint256 _tokenId) public view override returns (bool) {
        return _tokenId <= 1500 && getLevel(_tokenId) >= firstGenLevelMintLevel && !firstGenLevelMintComplete[_tokenId];
    }

    function getNumTokensMinted(address _owner) public view override returns (uint256) {
        return _numUserTokensMinted[_owner];
    }

    function isSporePowerMaxed(uint256 _tokenId) public view override returns (bool) {
        uint256 maxSporePower = _sporePowerCost.mul(_maxSporePowerLevel);
        return tokenData[_tokenId].sporePower >= maxSporePower;
    }

    function isLevelPowerMaxed(uint256 _tokenId) public view override returns (bool) {
        return tokenData[_tokenId].levelPower >= _levelCost;
    }

    function isLevelMaxed(uint256 _tokenId) public view override returns (bool) {
        return getLevel(_tokenId) >= getMaxLevel();
    }

    function hasUserHitMaxMint(address _user) public view override returns (bool) {
        return _numUserTokensMinted[_user] >= _maxMintPerWallet;
    }
}

File 2 of 27 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 3 of 27 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

File 4 of 27 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 5 of 27 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 6 of 27 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

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

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

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

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 7 of 27 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 8 of 27 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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. It 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)`.
        // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.
        // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.
        // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a
        // good first aproximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1;
        uint256 x = a;
        if (x >> 128 > 0) {
            x >>= 128;
            result <<= 64;
        }
        if (x >> 64 > 0) {
            x >>= 64;
            result <<= 32;
        }
        if (x >> 32 > 0) {
            x >>= 32;
            result <<= 16;
        }
        if (x >> 16 > 0) {
            x >>= 16;
            result <<= 8;
        }
        if (x >> 8 > 0) {
            x >>= 8;
            result <<= 4;
        }
        if (x >> 4 > 0) {
            x >>= 4;
            result <<= 2;
        }
        if (x >> 2 > 0) {
            result <<= 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) {
        uint256 result = sqrt(a);
        if (rounding == Rounding.Up && result * result < a) {
            result += 1;
        }
        return result;
    }
}

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

pragma solidity ^0.8.0;

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

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 10 of 27 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_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) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @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] = _HEX_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 11 of 27 : 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 12 of 27 : IPixelMushrohmAuthority.sol
// SPDX-License-Identifier: GPLv2
pragma solidity ^0.8.1;

interface IPixelMushrohmAuthority {
    /* ========== EVENTS ========== */

    event OwnerPushed(address indexed from, address indexed to, bool _effectiveImmediately);
    event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately);
    event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately);

    event OwnerPulled(address indexed from, address indexed to);
    event PolicyPulled(address indexed from, address indexed to);
    event VaultPulled(address indexed from, address indexed to);

    event Paused(address by);
    event Unpaused(address by);

    /* ========== VIEW ========== */

    function owner() external view returns (address);

    function policy() external view returns (address);

    function vault() external view returns (address);

    function paused() external view returns (bool);
}

File 13 of 27 : IPixelMushrohmERC721.sol
// SPDX-License-Identifier: GPLv2
pragma solidity ^0.8.1;

import "@openzeppelin/contracts/interfaces/IERC721Enumerable.sol";

interface IPixelMushrohmERC721 is IERC721Enumerable {
    /* ========== EVENTS ========== */

    event PixelMushrohmMint(address to, uint256 tokenId);
    event RedeemSporePower(uint256 tokenId, uint256 amount);
    event SporePowerCost(uint256 sporePowerCost);
    event MaxSporePowerLevel(uint256 maxSporePowerLevel);
    event LevelCost(uint256 levelCost);
    event MaxLevel(uint256 maxLevel);
    event BaseLevelMultiplier(uint256 levelMultiplier);
    event AdditionalMultiplier(uint256 tokenId, uint256 multiplier);
    event FirstGenLevelMintLevel(uint256 level);
    event StakingSet(address staking);
    event RedeemerAdded(address redeemer);
    event RedeemerRemoved(address redeemer);
    event MultiplierAdded(address multiplier);
    event MultiplierRemoved(address multiplier);
    event BridgeSet(address bridge);

    /* ========== ENUMS ========== */

    enum MintType {
        APELIEN_AIRDROP,
        NOOSH_AIRDROP,
        PILOT_AIRDROP,
        R3L0C_AIRDROP,
        MEMETIC_AIRDROP,
        BRIDGE,
        STANDARD
    }

    /* ========== STRUCTS ========== */

    struct TokenData {
        uint256 sporePower;
        uint256 sporePowerPerWeek;
        uint256 level;
        uint256 levelPower;
        uint256 additionalMultiplier;
    }

    /* ======== ADMIN FUNCTIONS ======== */

    function setStaking(address _staking) external;

    function addRedeemer(address _redeemer) external;

    function removeRedeemer(address _redeemer) external;

    function addMultiplier(address _multiplier) external;

    function removeMultiplier(address _multiplier) external;

    function setBridge(address _bridge) external;

    function setMaxSporePowerLevel(uint256 _max) external;

    function setMaxLevel(uint256 _max) external;

    function setBaseLevelMultiplier(uint256 _multiplier) external;

    function setFirstGenLevelMintLevel(uint256 _level) external;

    function setSporePowerPerWeek(uint256 _sporePowerPerWeek, uint256[] calldata _tokenIds) external;

    function setBaseURI(string memory _baseURItoSet) external;

    function setPrerevealURI(string memory _prerevealURI) external;

    function setMintToken(address _tokenAddr) external;

    function setMintTokenPrice(uint256 _price) external;

    function setMaxMintPerWallet(uint256 _maxPerWallet) external;

    function setMerkleRoot(bytes32 _merkleRoot) external;

    function toggleReveal() external;

    function withdraw(address _tokenAddr) external;

    function manualBridgeMint(address[] calldata _to, uint256[] calldata _tokenId) external;

    function airdrop(
        MintType _mintType,
        address[] calldata _to,
        uint256[] calldata _amount
    ) external;

    /* ======== MUTABLE FUNCTIONS ======== */

    function whitelistMint(uint256 _amount, bytes32[] calldata _merkleProof) external;

    function bridgeMint(address _to, uint256 _tokenId) external;

    function firstGenLevelMint(uint256 _tokenId) external;

    function updateSporePower(uint256 _tokenId, uint256 _sporePowerEarned) external;

    function updateLevelPower(uint256 _tokenId, uint256 _levelPowerEarned) external;

    function updateLevel(uint256 _tokenId) external;

    function redeemSporePower(uint256 _tokenId, uint256 _amount) external;

    function setAdditionalMultiplier(uint256 _tokenId, uint256 _multiplier) external;

    /* ======== VIEW FUNCTIONS ======== */

    function exists(uint256 _tokenId) external view returns (bool);

    function getMintToken() external view returns (address);

    function getMintTokenPrice() external view returns (uint256);

    function getMaxMintPerWallet() external view returns (uint256);

    function getSporePower(uint256 _tokenId) external view returns (uint256);

    function getSporePowerLevel(uint256 _tokenId) external view returns (uint256);

    function averageSporePower() external view returns (uint256);

    function getSporePowerCost() external view returns (uint256);

    function getMaxSporePowerLevel() external view returns (uint256);

    function getSporePowerPerWeek(uint256 _tokenId) external view returns (uint256);

    function getLevel(uint256 _tokenId) external view returns (uint256);

    function getLevelPower(uint256 _tokenId) external view returns (uint256);

    function getLevelCost() external view returns (uint256);

    function getMaxLevel() external view returns (uint256);

    function getBaseLevelMultiplier() external view returns (uint256);

    function getLevelMultiplier(uint256 _tokenId) external view returns (uint256);

    function getAdditionalMultiplier(uint256 _tokenId) external view returns (uint256);

    function getTokenURIsForOwner(address _owner) external view returns (string[] memory);

    function isEligibleForLevelMint(uint256 _tokenId) external view returns (bool);

    function getNumTokensMinted(address _owner) external view returns (uint256);

    function isSporePowerMaxed(uint256 _tokenId) external view returns (bool);

    function isLevelPowerMaxed(uint256 _tokenId) external view returns (bool);

    function isLevelMaxed(uint256 _tokenId) external view returns (bool);

    function hasUserHitMaxMint(address _user) external view returns (bool);
}

File 14 of 27 : IPixelMushrohmStaking.sol
// SPDX-License-Identifier: GPLv2
pragma solidity ^0.8.1;

interface IPixelMushrohmStaking {
    /* ========== EVENTS ========== */

    event Staked(uint256 tokenId);
    event Unstaked(uint256 tokenId);
    event PixelMushrohmSet(address pixelMushrohm);

    /* ========== STRUCTS ========== */

    struct StakedTokenData {
        uint256 timestampStake;
        uint256 timestampLevel;
    }

    /* ======== ADMIN FUNCTIONS ======== */

    function setPixelMushrohm(address _pixelMushrohm) external;

    function setPaymentToken(address _tokenAddr) external;

    function setStakingPrice(uint256 _price) external;

    function setLevelUpPrice(uint256 _price) external;

    function inPlaceSporePowerUpdate(uint256 _tokenId) external;

    function withdraw(address _tokenAddr) external;

    /* ======== MUTABLE FUNCTIONS ======== */

    function stake(uint256 _tokenId) external;

    function unstake(uint256 _tokenId) external;

    function levelUp(uint256 _tokenId) external;

    /* ======== VIEW FUNCTIONS ======== */

    function getPaymentToken() external view returns (address);

    function getStakingPrice() external view returns (uint256);

    function getLevelUpPrice() external view returns (uint256);

    function sporePowerEarned(uint256 _tokenId) external view returns (uint256);

    function levelPowerEarned(uint256 _tokenId) external view returns (uint256);

    function levelPerWeek(uint256 _tokenId) external view returns (uint256);

    function isStaked(uint256 _tokenId) external view returns (bool);

    function isEligibleForLevelUp(uint256 _tokenId) external view returns (bool);
}

File 15 of 27 : PixelMushrohmAccessControlled.sol
// SPDX-License-Identifier: GPLv2
pragma solidity ^0.8.1;

import "../interfaces/IPixelMushrohmAuthority.sol";

abstract contract PixelMushrohmAccessControlled {
    /* ========== EVENTS ========== */

    event AuthorityUpdated(IPixelMushrohmAuthority indexed authority);

    string UNAUTHORIZED = "UNAUTHORIZED"; // save gas
    string PAUSED = "PAUSED";
    string UNPAUSED = "UNPAUSED";

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

    IPixelMushrohmAuthority public authority;

    /* ========== Constructor ========== */

    constructor(IPixelMushrohmAuthority _authority) {
        authority = _authority;
        emit AuthorityUpdated(_authority);
    }

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

    modifier onlyOwner() {
        require(msg.sender == authority.owner(), UNAUTHORIZED);
        _;
    }

    modifier onlyPolicy() {
        require(msg.sender == authority.policy(), UNAUTHORIZED);
        _;
    }

    modifier onlyVault() {
        require(msg.sender == authority.vault(), UNAUTHORIZED);
        _;
    }

    modifier whenNotPaused() {
        require(!authority.paused(), PAUSED);
        _;
    }

    modifier whenPaused() {
        require(authority.paused(), UNPAUSED);
        _;
    }

    /* ========== OWNER ONLY ========== */

    function setAuthority(IPixelMushrohmAuthority _newAuthority) external onlyOwner {
        authority = _newAuthority;
        emit AuthorityUpdated(_newAuthority);
    }
}

File 16 of 27 : 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 17 of 27 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 18 of 27 : 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 19 of 27 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 20 of 27 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` 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 tokenId
    ) 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.
     * - `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 tokenId
    ) internal virtual {}
}

File 21 of 27 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 22 of 27 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 23 of 27 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 24 of 27 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 25 of 27 : 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 26 of 27 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 27 of 27 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/extensions/IERC721Enumerable.sol";

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_authority","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"AdditionalMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IPixelMushrohmAuthority","name":"authority","type":"address"}],"name":"AuthorityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"levelMultiplier","type":"uint256"}],"name":"BaseLevelMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"bridge","type":"address"}],"name":"BridgeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"}],"name":"FirstGenLevelMintLevel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"levelCost","type":"uint256"}],"name":"LevelCost","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxLevel","type":"uint256"}],"name":"MaxLevel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxSporePowerLevel","type":"uint256"}],"name":"MaxSporePowerLevel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"multiplier","type":"address"}],"name":"MultiplierAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"multiplier","type":"address"}],"name":"MultiplierRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"PixelMushrohmMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RedeemSporePower","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"redeemer","type":"address"}],"name":"RedeemerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"redeemer","type":"address"}],"name":"RedeemerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"sporePowerCost","type":"uint256"}],"name":"SporePowerCost","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staking","type":"address"}],"name":"StakingSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_multiplier","type":"address"}],"name":"addMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_redeemer","type":"address"}],"name":"addRedeemer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IPixelMushrohmERC721.MintType","name":"_mintType","type":"uint8"},{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_amount","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"authority","outputs":[{"internalType":"contract IPixelMushrohmAuthority","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"averageSporePower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"bridgeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"firstGenLevelMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"firstGenLevelMintComplete","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"firstGenLevelMintLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getAdditionalMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBaseLevelMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLevelCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getLevelMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getLevelPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxMintPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxSporePowerLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getNumTokensMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getSporePower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSporePowerCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getSporePowerLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getSporePowerPerWeek","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getTokenURIsForOwner","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"hasUserHitMaxMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isEligibleForLevelMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isLevelMaxed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isLevelPowerMaxed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isSporePowerMaxed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_tokenId","type":"uint256[]"}],"name":"manualBridgeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"multipliers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prerevealURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"redeemSporePower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"redeemers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_multiplier","type":"address"}],"name":"removeMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_redeemer","type":"address"}],"name":"removeRedeemer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_multiplier","type":"uint256"}],"name":"setAdditionalMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPixelMushrohmAuthority","name":"_newAuthority","type":"address"}],"name":"setAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_multiplier","type":"uint256"}],"name":"setBaseLevelMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURItoSet","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"}],"name":"setBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_level","type":"uint256"}],"name":"setFirstGenLevelMintLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_max","type":"uint256"}],"name":"setMaxLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"setMaxMintPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_max","type":"uint256"}],"name":"setMaxSporePowerLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddr","type":"address"}],"name":"setMintToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setMintTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_prerevealURI","type":"string"}],"name":"setPrerevealURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sporePowerPerWeek","type":"uint256"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"setSporePowerPerWeek","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_staking","type":"address"}],"name":"setStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"contract IPixelMushrohmStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenData","outputs":[{"internalType":"uint256","name":"sporePower","type":"uint256"},{"internalType":"uint256","name":"sporePowerPerWeek","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"levelPower","type":"uint256"},{"internalType":"uint256","name":"additionalMultiplier","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSporePower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"updateLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_levelPowerEarned","type":"uint256"}],"name":"updateLevelPower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_sporePowerEarned","type":"uint256"}],"name":"updateSporePower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"whitelistMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddr","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052600c60808190526b15539055551213d49256915160a21b60a09081526200002f91600a9190620001c5565b506040805180820190915260068082526514105554d15160d21b60209092019182526200005f91600b91620001c5565b5060408051808201909152600880825267155394105554d15160c21b60209092019182526200009191600c91620001c5565b50600f805460ff1916905560016018556004601a55600a601b556802b5e3af16b1880000601c819055601d556301312d00601f556002602055348015620000d757600080fd5b50604051620062d3380380620062d3833981016040819052620000fa916200026b565b604080518082018252600e81526d506978656c204d757368726f686d60901b60208083019182528351808501909452600d84526c506978656c4d757368726f686d60981b908401528151849391620001569160009190620001c5565b5080516200016c906001906020840190620001c5565b5050600d80546001600160a01b0319166001600160a01b0384169081179091556040519091507f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250506001600e55620002d8565b828054620001d3906200029b565b90600052602060002090601f016020900481019282620001f7576000855562000242565b82601f106200021257805160ff191683800117855562000242565b8280016001018555821562000242579182015b828111156200024257825182559160200191906001019062000225565b506200025092915062000254565b5090565b5b8082111562000250576000815560010162000255565b6000602082840312156200027d578081fd5b81516001600160a01b038116811462000294578182fd5b9392505050565b600281046001821680620002b057607f821691505b60208210811415620002d257634e487b7160e01b600052602260045260246000fd5b50919050565b615feb80620002e86000396000f3fe608060405234801561001057600080fd5b50600436106104a05760003560e01c80635b8ad4291161026d578063a27272a811610151578063d2cab056116100ce578063e78cea9211610092578063e78cea92146109dd578063e985e9c5146109e5578063e99a45ec146109f8578063eb6c8eda14610a0b578063f227d38214610a1e578063f28e91d714610a26576104a0565b8063d2cab05614610994578063d5fd4c49146109a7578063d62280b2146109ba578063d8c2094f146109c2578063dcbf44a3146109d5576104a0565b8063b4b5b48f11610115578063b4b5b48f1461093a578063b88d4fde1461095e578063bb2f800114610971578063bf7e214f14610979578063c87b56dd14610981576104a0565b8063a27272a8146108db578063a57d4f88146108ee578063a8ef075514610901578063ac524f3d14610914578063afdf613414610927576104a0565b8063885e3f64116101ea5780638ff39099116101ae5780638ff39099146108745780639108bd031461088757806392e0150b1461089a57806395d89b41146108ad5780639aadc32d146108b5578063a22cb465146108c8576104a0565b8063885e3f641461081557806388bb6ebb146108285780638c2a993e1461083b5780638d32d0861461084e5780638dd1480214610861576104a0565b80636ca4647e116102315780636ca4647e146107b657806370a08231146107c95780637a9e5e4b146107dc5780637cb64759146107ef57806386481d4014610802576104a0565b80635b8ad429146107785780635e6ea6fa146107805780636352211e146107885780636b41f3dd1461079b5780636c0360eb146107ae576104a0565b80633aa5bf9c116103945780634cf088d91161031157806351830227116102d5578063518302271461073257806351cff8d91461073a57806353bbfa421461074d578063558d4b171461075557806355f804b31461075d5780635a0d82ff14610770576104a0565b80634cf088d9146106e95780634d86f93a146106f15780634f558e79146107045780634f6ccce7146107175780635141fd6d1461072a576104a0565b806342842e0e1161035857806342842e0e1461068a578063432f50c61461069d57806347b1c4e7146106b05780634a13e91d146106c35780634b109ee6146106d6576104a0565b80633aa5bf9c146106295780633aec9641146106315780633e33139a146106445780633fcc56b6146106575780634107f57014610677576104a0565b806323b872dd116104225780632f745c59116103e65780632f745c59146105d557806331cfa1e8146105e8578063334581c3146105fb578063344f1ba51461060e5780633798fe5614610621576104a0565b806323b872dd146105815780632be3ba16146105945780632eb4a7ab146105a75780632f120f8a146105af5780632f5c91d8146105c2576104a0565b8063095ea7b311610469578063095ea7b31461052b578063165377861461053e57806318160ddd146105515780631e2dcb151461056657806323b7fc5d1461056e576104a0565b8062b91b71146104a557806301ffc9a7146104ce57806306fdde03146104e1578063078eef28146104f6578063081812fc1461050b575b600080fd5b6104b86104b3366004614e74565b610a39565b6040516104c59190615223565b60405180910390f35b6104b86104dc366004614e8c565b610a56565b6104e9610a67565b6040516104c59190615237565b610509610504366004614f47565b610afa565b005b61051e610519366004614e74565b610bd5565b6040516104c59190615135565b610509610539366004614dc4565b610bfc565b61050961054c366004614c6a565b610c94565b610559610daa565b6040516104c5919061522e565b610559610db0565b61055961057c366004614e74565b610db6565b61050961058f366004614cda565b610dcb565b6105596105a2366004614e74565b610e03565b610559610e18565b6105596105bd366004614c6a565b610e1e565b6104b86105d0366004614e74565b610e39565b6105596105e3366004614dc4565b610e6c565b6105096105f6366004614e74565b610ebe565b610509610609366004614e74565b610f7e565b61050961061c366004614e74565b61106e565b61055961115e565b610559611164565b6104b861063f366004614e74565b61116a565b6104b8610652366004614c6a565b6111a6565b61066a610665366004614c6a565b6111bb565b6040516104c591906151c3565b610509610685366004614fa5565b611287565b610509610698366004614cda565b6113c7565b6104b86106ab366004614e74565b6113e2565b6104b86106be366004614c6a565b6113f7565b6105096106d1366004614c6a565b61141a565b6105596106e4366004614e74565b6114f7565b61051e6115a0565b6105096106ff366004614def565b6115af565b6104b8610712366004614e74565b61175f565b610559610725366004614e74565b61176a565b6105596117c5565b6104b86117cb565b610509610748366004614c6a565b6117d4565b6105596119d6565b6105596119dc565b61050961076b366004614f47565b6119e2565b61051e611ab0565b610509611abf565b610559611b8e565b61051e610796366004614e74565b611b94565b6105596107a9366004614e74565b611bc9565b6104e9611beb565b6105096107c4366004614fef565b611c79565b6105596107d7366004614c6a565b611d84565b6105096107ea366004614c6a565b611dc8565b6105096107fd366004614e74565b611ecd565b610559610810366004614e74565b611f8d565b610509610823366004614c6a565b611faa565b610559610836366004614e74565b6120b8565b610509610849366004614dc4565b61217d565b6104b861085c366004614e74565b612281565b61050961086f366004614c6a565b61229c565b610509610882366004614c6a565b6123a2565b610509610895366004614e74565b6124a8565b6105096108a8366004614e74565b6125fb565b6104e9612730565b6105096108c3366004614fef565b61273f565b6105096108d6366004614d97565b612895565b6105096108e9366004614e74565b6128a7565b6105096108fc366004614c6a565b612997565b61055961090f366004614e74565b612aa2565b6104b8610922366004614c6a565b612ac0565b610509610935366004614e74565b612ad5565b61094d610948366004614e74565b612b95565b6040516104c5959493929190615e1f565b61050961096c366004614d1a565b612bc4565b610559612bfd565b61051e612c03565b6104e961098f366004614e74565b612c12565b6105096109a2366004614fa5565b612d4c565b6105096109b5366004614fef565b612fa5565b6104e961312c565b6105096109d0366004614ec4565b613139565b6105596134b1565b61051e6134e0565b6104b86109f3366004614ca2565b6134ef565b610509610a06366004614fef565b61351d565b610509610a19366004614e74565b61373a565b61055961382a565b610509610a34366004614c6a565b613830565b6000610a4361115e565b610a4c83611f8d565b101590505b919050565b6000610a618261393e565b92915050565b606060008054610a7690615ed0565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa290615ed0565b8015610aef5780601f10610ac457610100808354040283529160200191610aef565b820191906000526020600020905b815481529060010190602001808311610ad257829003601f168201915b505050505090505b90565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4857600080fd5b505afa158015610b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b809190614c86565b6001600160a01b0316336001600160a01b031614600a90610bbd5760405162461bcd60e51b8152600401610bb4919061524a565b60405180910390fd5b508051610bd1906015906020840190614b19565b5050565b6000610be082613963565b506000908152600460205260409020546001600160a01b031690565b6000610c0782611b94565b9050806001600160a01b0316836001600160a01b03161415610c3b5760405162461bcd60e51b8152600401610bb490615a16565b806001600160a01b0316610c4d61398b565b6001600160a01b03161480610c695750610c69816109f361398b565b610c855760405162461bcd60e51b8152600401610bb49061584f565b610c8f838361398f565b505050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ce257600080fd5b505afa158015610cf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1a9190614c86565b6001600160a01b0316336001600160a01b031614600a90610d4e5760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b03811660009081526022602052604090819020805460ff19169055517f6a38b6b3ea94c488826961d881939fe4ed14db3794a241538a62cc9d9e3c786590610d9f908390615135565b60405180910390a150565b60085490565b601a5490565b60009081526025602052604090206001015490565b610ddc610dd661398b565b826139fd565b610df85760405162461bcd60e51b8152600401610bb490615d55565b610c8f838383613a5c565b60009081526025602052604090206004015490565b60195481565b6001600160a01b031660009081526010602052604090205490565b600080610e53601a54601c54613b8f90919063ffffffff16565b6000848152602560205260409020541015915050919050565b6000610e7783611d84565b8210610e955760405162461bcd60e51b8152600401610bb4906153a8565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0c57600080fd5b505afa158015610f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f449190614c86565b6001600160a01b0316336001600160a01b031614600a90610f785760405162461bcd60e51b8152600401610bb4919061524a565b50601755565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015610fcc57600080fd5b505afa158015610fe0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110049190614c86565b6001600160a01b0316336001600160a01b031614600a906110385760405162461bcd60e51b8152600401610bb4919061524a565b50601a8190556040517fa0b8b1ac6610b29190634b1f7f57e0097912dc0c9e79fa819ded30aa708db4cd90610d9f90839061522e565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b1580156110bc57600080fd5b505afa1580156110d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f49190614c86565b6001600160a01b0316336001600160a01b031614600a906111285760405162461bcd60e51b8152600401610bb4919061524a565b50601b8190556040517f6fb77064c357242637b711a88342615615fa1bb1a2d8cab4c930f6f4d580d65a90610d9f90839061522e565b601b5490565b601e5481565b60006105dc8211158015611188575060205461118583611f8d565b10155b8015610a6157505060009081526026602052604090205460ff161590565b60226020526000908152604090205460ff1681565b606060006111c883611d84565b905060008167ffffffffffffffff8111156111f357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561122657816020015b60608152602001906001900390816112115790505b50905060005b8281101561127f5761124161098f8683610e6c565b82828151811061126157634e487b7160e01b600052603260045260246000fd5b6020026020010181905250808061127790615f0b565b91505061122c565b509392505050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d557600080fd5b505afa1580156112e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130d9190614c86565b6001600160a01b0316336001600160a01b031614600a906113415760405162461bcd60e51b8152600401610bb4919061524a565b50600083116113625760405162461bcd60e51b8152600401610bb49061560d565b60005b818110156113c157836025600085858581811061139257634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000206001018190555080806113b990615f0b565b915050611365565b50505050565b610c8f83838360405180602001604052806000815250612bc4565b60266020526000908152604090205460ff1681565b6018546001600160a01b0382166000908152601060205260409020541015919050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561146857600080fd5b505afa15801561147c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a09190614c86565b6001600160a01b0316336001600160a01b031614600a906114d45760405162461bcd60e51b8152600401610bb4919061524a565b50601680546001600160a01b0319166001600160a01b0392909216919091179055565b60215460405163678baccf60e11b8152600091610a6191611598916001600160a01b03169063cf17599e9061153090879060040161522e565b60206040518083038186803b15801561154857600080fd5b505afa15801561155c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115809190614f8d565b60008581526025602052604090206003015490613b9b565b601d54613ba7565b6021546001600160a01b031681565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b1580156115fd57600080fd5b505afa158015611611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116359190614c86565b6001600160a01b0316336001600160a01b031614600a906116695760405162461bcd60e51b8152600401610bb4919061524a565b508281146116895760405162461bcd60e51b8152600401610bb490615b4c565b60005b83811015611758576116c38383838181106116b757634e487b7160e01b600052603260045260246000fd5b90506020020135613bbd565b156116e05760405162461bcd60e51b8152600401610bb490615bbe565b61174685858381811061170357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906117189190614c6a565b84848481811061173857634e487b7160e01b600052603260045260246000fd5b905060200201356005613bda565b8061175081615f0b565b91505061168c565b5050505050565b6000610a6182613bbd565b6000611774610daa565b82106117925760405162461bcd60e51b8152600401610bb490615c45565b600882815481106117b357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b601f5490565b600f5460ff1681565b600d60009054906101000a90046001600160a01b03166001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561182257600080fd5b505afa158015611836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185a9190614c86565b6001600160a01b0316336001600160a01b031614600a9061188e5760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b0381166118b55760405162461bcd60e51b8152600401610bb490615c01565b6040516370a0823160e01b81526000906001600160a01b038316906370a08231906118e4903090600401615135565b60206040518083038186803b1580156118fc57600080fd5b505afa158015611910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119349190614f8d565b9050600081116119565760405162461bcd60e51b8152600401610bb4906157cd565b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb9061198490339085906004016151aa565b602060405180830381600087803b15801561199e57600080fd5b505af11580156119b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f9190614e58565b601c5490565b60185490565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015611a3057600080fd5b505afa158015611a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a689190614c86565b6001600160a01b0316336001600160a01b031614600a90611a9c5760405162461bcd60e51b8152600401610bb4919061524a565b508051610bd1906014906020840190614b19565b6016546001600160a01b031690565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b0d57600080fd5b505afa158015611b21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b459190614c86565b6001600160a01b0316336001600160a01b031614600a90611b795760405162461bcd60e51b8152600401610bb4919061524a565b50600f805460ff19811660ff90911615179055565b60175490565b6000818152600260205260408120546001600160a01b031680610a615760405162461bcd60e51b8152600401610bb4906159df565b6000610a61611be3601c54611bdd856120b8565b90613d8b565b601a54613ba7565b60148054611bf890615ed0565b80601f0160208091040260200160405190810160405280929190818152602001828054611c2490615ed0565b8015611c715780601f10611c4657610100808354040283529160200191611c71565b820191906000526020600020905b815481529060010190602001808311611c5457829003601f168201915b505050505081565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc757600080fd5b505afa158015611cdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cff9190614e58565b15600b90611d205760405162461bcd60e51b8152600401610bb4919061524a565b506021546001600160a01b03163314611d4b5760405162461bcd60e51b8152600401610bb490615cd4565b600082815260256020526040902060030154611d6b906115989083613b9b565b6000928352602560205260409092206003019190915550565b60006001600160a01b038216611dac5760405162461bcd60e51b8152600401610bb4906156f7565b506001600160a01b031660009081526003602052604090205490565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e1657600080fd5b505afa158015611e2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4e9190614c86565b6001600160a01b0316336001600160a01b031614600a90611e825760405162461bcd60e51b8152600401610bb4919061524a565b50600d80546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f1b57600080fd5b505afa158015611f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f539190614c86565b6001600160a01b0316336001600160a01b031614600a90611f875760405162461bcd60e51b8152600401610bb4919061524a565b50601955565b600081815260256020526040812060020154610a61906001613b9b565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff857600080fd5b505afa15801561200c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120309190614c86565b6001600160a01b0316336001600160a01b031614600a906120645760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b03811660009081526023602052604090819020805460ff19166001179055517f57592bf6be276b8fe1111c3b9795762cdb2368b1badec6d34e41fb9072a0a7e990610d9f908390615135565b6000806120d2601a54601c54613b8f90919063ffffffff16565b602154604051634bf69b2760e01b815291925061217691612170916001600160a01b031690634bf69b279061210b90889060040161522e565b60206040518083038186803b15801561212357600080fd5b505afa158015612137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215b9190614f8d565b60008681526025602052604090205490613b9b565b82613ba7565b9392505050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121cb57600080fd5b505afa1580156121df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122039190614e58565b15600b906122245760405162461bcd60e51b8152600401610bb4919061524a565b506024546001600160a01b0316331461224f5760405162461bcd60e51b8152600401610bb49061579d565b61225881613bbd565b156122755760405162461bcd60e51b8152600401610bb490615bbe565b610bd182826005613bda565b601d5460009182526025602052604090912060030154101590565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122ea57600080fd5b505afa1580156122fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123229190614c86565b6001600160a01b0316336001600160a01b031614600a906123565760405162461bcd60e51b8152600401610bb4919061524a565b50602480546001600160a01b0319166001600160a01b0383161790556040517fa49730bff544fd0b716395c592e39c6fd2d2481a19b9229b5b240483db95a49590610d9f908390615135565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123f057600080fd5b505afa158015612404573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124289190614c86565b6001600160a01b0316336001600160a01b031614600a9061245c5760405162461bcd60e51b8152600401610bb4919061524a565b50602180546001600160a01b0319166001600160a01b0383161790556040517ff520447191196b125f76f7110397fdf32b1b9cefb7dec323bd3b998022ac233890610d9f908390615135565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156124f657600080fd5b505afa15801561250a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061252e9190614e58565b15600b9061254f5760405162461bcd60e51b8152600401610bb4919061524a565b506002600e5414156125735760405162461bcd60e51b8152600401610bb490615da3565b6002600e553361258282611b94565b6001600160a01b0316146125a85760405162461bcd60e51b8152600401610bb4906154f8565b6125b18161116a565b6125cd5760405162461bcd60e51b8152600401610bb4906152cb565b6125da3360006006613bda565b6000908152602660205260409020805460ff19166001908117909155600e55565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561264957600080fd5b505afa15801561265d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126819190614e58565b15600b906126a25760405162461bcd60e51b8152600401610bb4919061524a565b506021546001600160a01b031633146126cd5760405162461bcd60e51b8152600401610bb490615cd4565b601b546126d982611f8d565b106126f65760405162461bcd60e51b8152600401610bb490615c91565b600081815260256020526040812060038101919091556002015461271b906001613b9b565b60009182526025602052604090912060020155565b606060018054610a7690615ed0565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561278d57600080fd5b505afa1580156127a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c59190614e58565b15600b906127e65760405162461bcd60e51b8152600401610bb4919061524a565b506002600e54141561280a5760405162461bcd60e51b8152600401610bb490615da3565b6002600e553360009081526023602052604090205460ff1661283e5760405162461bcd60e51b8152600401610bb49061595c565b60008281526025602052604090819020600401829055517f14e65d98aa0abf9a31acb3279a5d46ca26a4a2abf7142d51fdc6ff8c4ec7a377906128849084908490615e11565b60405180910390a150506001600e55565b610bd16128a061398b565b8383613d97565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b1580156128f557600080fd5b505afa158015612909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292d9190614c86565b6001600160a01b0316336001600160a01b031614600a906129615760405162461bcd60e51b8152600401610bb4919061524a565b5060208190556040517f973cdf7bc4ec77187b3833eb6f085494ce017b087c22960a6ed355c9112856d890610d9f90839061522e565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156129e557600080fd5b505afa1580156129f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1d9190614c86565b6001600160a01b0316336001600160a01b031614600a90612a515760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b03811660009081526023602052604090819020805460ff19169055517ffdcba8b229914018267118ec363f5fa24a2eaadaff1e6ceec872bc837f94ec9190610d9f908390615135565b600081815260256020526040812060020154601f54610a6191613b8f565b60236020526000908152604090205460ff1681565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b2357600080fd5b505afa158015612b37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b5b9190614c86565b6001600160a01b0316336001600160a01b031614600a90612b8f5760405162461bcd60e51b8152600401610bb4919061524a565b50601855565b602560205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b612bd5612bcf61398b565b836139fd565b612bf15760405162461bcd60e51b8152600401610bb490615d55565b6113c184848484613e3a565b60205481565b600d546001600160a01b031681565b600f5460609060ff16612cb15760158054612c2c90615ed0565b80601f0160208091040260200160405190810160405280929190818152602001828054612c5890615ed0565b8015612ca55780601f10612c7a57610100808354040283529160200191612ca5565b820191906000526020600020905b815481529060010190602001808311612c8857829003601f168201915b50505050509050610a51565b612cba82613bbd565b612cd65760405162461bcd60e51b8152600401610bb490615315565b6000612ce183611bc9565b9050600060148054612cf290615ed0565b905011612d0e5760405180602001604052806000815250612d44565b6014612d1984613e6d565b612d2283613e6d565b604051602001612d3493929190615086565b6040516020818303038152906040525b915050610a51565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d9a57600080fd5b505afa158015612dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd29190614e58565b15600b90612df35760405162461bcd60e51b8152600401610bb4919061524a565b506002600e541415612e175760405162461bcd60e51b8152600401610bb490615da3565b6002600e5582612e395760405162461bcd60e51b8152600401610bb490615993565b6107ee612e466013613f88565b10612e635760405162461bcd60e51b8152600401610bb4906153f3565b6016546001600160a01b0316612e8b5760405162461bcd60e51b8152600401610bb490615918565b601754612eaa5760405162461bcd60e51b8152600401610bb49061554e565b60185433600090815260106020526040902054612ec79085613b9b565b1115612ee55760405162461bcd60e51b8152600401610bb490615363565b612ef0338383613f8c565b612f0c5760405162461bcd60e51b8152600401610bb4906158e1565b612f3a3330612f2686601754613b8f90919063ffffffff16565b6016546001600160a01b0316929190614013565b60005b83811015612f9a57612f4f601361406b565b33600090815260106020526040902054612f6a906001613b9b565b33600081815260106020526040812092909255612f88916006613bda565b80612f9281615f0b565b915050612f3d565b50506001600e555050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612ff357600080fd5b505afa158015613007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061302b9190614e58565b15600b9061304c5760405162461bcd60e51b8152600401610bb4919061524a565b506021546001600160a01b031633146130775760405162461bcd60e51b8152600401610bb490615cd4565b6000613090601a54601c54613b8f90919063ffffffff16565b60008481526025602052604090205490915081906130ae9084613b9b565b116130c857601e546130c09083613b9b565b601e556130f8565b6000838152602560205260408120546130e2908390614074565b601e549092506130f3915082613b9b565b601e55505b600083815260256020526040902054613115906121709084613b9b565b600093845260256020526040909320929092555050565b60158054611bf890615ed0565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561318757600080fd5b505afa15801561319b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131bf9190614c86565b6001600160a01b0316336001600160a01b031614600a906131f35760405162461bcd60e51b8152600401610bb4919061524a565b50600085600681111561321657634e487b7160e01b600052602160045260246000fd5b14806132415750600185600681111561323f57634e487b7160e01b600052602160045260246000fd5b145b8061326b5750600285600681111561326957634e487b7160e01b600052602160045260246000fd5b145b806132955750600385600681111561329357634e487b7160e01b600052602160045260246000fd5b145b806132bf575060048560068111156132bd57634e487b7160e01b600052602160045260246000fd5b145b806132e9575060068560068111156132e757634e487b7160e01b600052602160045260246000fd5b145b6133055760405162461bcd60e51b8152600401610bb490615804565b8281146133245760405162461bcd60e51b8152600401610bb490615a57565b60005b838110156134a95760005b83838381811061335257634e487b7160e01b600052603260045260246000fd5b9050602002013581101561349657600687600681111561338257634e487b7160e01b600052602160045260246000fd5b141561344457613392601361406b565b6133f06001601060008989878181106133bb57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906133d09190614c6a565b6001600160a01b0316815260208101919091526040016000205490613b9b565b6010600088888681811061341457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906134299190614c6a565b6001600160a01b031681526020810191909152604001600020555b61348486868481811061346757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061347c9190614c6a565b600089613bda565b8061348e81615f0b565b915050613332565b50806134a181615f0b565b915050613327565b505050505050565b60006134bb610daa565b6134c757506000610af7565b6134db6134d2610daa565b601e5490613d8b565b905090565b6024546001600160a01b031681565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561356b57600080fd5b505afa15801561357f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135a39190614e58565b15600b906135c45760405162461bcd60e51b8152600401610bb4919061524a565b506002600e5414156135e85760405162461bcd60e51b8152600401610bb490615da3565b6002600e553360009081526022602052604090205460ff1661361c5760405162461bcd60e51b8152600401610bb490615dda565b6000811161363c5760405162461bcd60e51b8152600401610bb490615993565b602154604051639132cb4960e01b81526001600160a01b0390911690639132cb499061366c90859060040161522e565b600060405180830381600087803b15801561368657600080fd5b505af115801561369a573d6000803e3d6000fd5b50505060008381526025602052604090205482111590506136cd5760405162461bcd60e51b8152600401610bb490615740565b601e546136da908261409a565b601e556000828152602560205260409020546136f6908261409a565b6000838152602560205260409081902091909155517fca933db0726ff1c976605a950466779774a9b65ff7ed492c1a92af0226b8feaf906128849084908490615e11565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b15801561378857600080fd5b505afa15801561379c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137c09190614c86565b6001600160a01b0316336001600160a01b031614600a906137f45760405162461bcd60e51b8152600401610bb4919061524a565b50601f8190556040517fb8b6eb9343bdd0e9fb758d41e819caae10b73e981578382d4bafee0e933bf9c390610d9f90839061522e565b601d5490565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561387e57600080fd5b505afa158015613892573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138b69190614c86565b6001600160a01b0316336001600160a01b031614600a906138ea5760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b03811660009081526022602052604090819020805460ff19166001179055517f9723df9a48e932d10d8861ccc69f9ae330dbc5cb19d20494edd79f6ff1277ade90610d9f908390615135565b60006001600160e01b0319821663780e9d6360e01b1480610a615750610a61826140a6565b61396c81613bbd565b6139885760405162461bcd60e51b8152600401610bb4906159df565b50565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906139c482611b94565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080613a0983611b94565b9050806001600160a01b0316846001600160a01b03161480613a305750613a3081856134ef565b80613a545750836001600160a01b0316613a4984610bd5565b6001600160a01b0316145b949350505050565b826001600160a01b0316613a6f82611b94565b6001600160a01b031614613a955760405162461bcd60e51b8152600401610bb49061547c565b6001600160a01b038216613abb5760405162461bcd60e51b8152600401610bb490615592565b613ac68383836140e6565b613ad160008261398f565b6001600160a01b0383166000908152600360205260408120805460019290613afa908490615e8d565b90915550506001600160a01b0382166000908152600360205260408120805460019290613b28908490615e42565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610c8f838383610c8f565b60006121768284615e6e565b60006121768284615e42565b6000818310613bb65781612176565b5090919050565b6000908152600260205260409020546001600160a01b0316151590565b600080613be683614247565b90925090506000836006811115613c0d57634e487b7160e01b600052602160045260246000fd5b1415613c3857613c2782613c216012613f88565b90613b9b565b9350613c33601261406b565b613d28565b6001836006811115613c5a57634e487b7160e01b600052602160045260246000fd5b1480613c8557506002836006811115613c8357634e487b7160e01b600052602160045260246000fd5b145b80613caf57506003836006811115613cad57634e487b7160e01b600052602160045260246000fd5b145b80613cd957506004836006811115613cd757634e487b7160e01b600052602160045260246000fd5b145b15613ce657819350613d28565b6006836006811115613d0857634e487b7160e01b600052602160045260246000fd5b1415613d2857613d1c82613c216011613f88565b9350613d28601161406b565b80841115613d485760405162461bcd60e51b8152600401610bb4906156b0565b7f755b2a86466bbe1ad089257e0ff69975b46f7bf2e672c704dda9b08b8f870a9a8585604051613d799291906151aa565b60405180910390a161175885856143ea565b60006121768284615e5a565b816001600160a01b0316836001600160a01b03161415613dc95760405162461bcd60e51b8152600401610bb4906155d6565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190613e2d908590615223565b60405180910390a3505050565b613e45848484613a5c565b613e5184848484614404565b6113c15760405162461bcd60e51b8152600401610bb49061542a565b606081613e9257506040805180820190915260018152600360fc1b6020820152610a51565b8160005b8115613ebc5780613ea681615f0b565b9150613eb59050600a83615e5a565b9150613e96565b60008167ffffffffffffffff811115613ee557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613f0f576020820181803683370190505b5090505b8415613a5457613f24600183615e8d565b9150613f31600a86615f26565b613f3c906030615e42565b60f81b818381518110613f5f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613f81600a86615e5a565b9450613f13565b5490565b601954600090613f9e57506001612176565b600084604051602001613fb1919061504d565b60405160208183030381529060405280519060200120905061400a84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601954915084905061451f565b95945050505050565b6113c1846323b872dd60e01b85858560405160240161403493929190615149565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614535565b80546001019055565b6000808383111561408a57506000905080614093565b50600190508183035b9250929050565b60006121768284615e8d565b60006001600160e01b031982166380ac58cd60e01b14806140d757506001600160e01b03198216635b5e139f60e01b145b80610a615750610a61826145c4565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561413457600080fd5b505afa158015614148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061416c9190614e58565b15600b9061418d5760405162461bcd60e51b8152600401610bb4919061524a565b506141998383836145dd565b6021546001600160a01b031615610c8f57602154604051635d528fc360e11b81526001600160a01b039091169063baa51f86906141da90849060040161522e565b60206040518083038186803b1580156141f257600080fd5b505afa158015614206573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061422a9190614e58565b15610c8f5760405162461bcd60e51b8152600401610bb490615ac7565b60008080600584600681111561426d57634e487b7160e01b600052602160045260246000fd5b14156142825760016105dc92509250506143e5565b60008460068111156142a457634e487b7160e01b600052602160045260246000fd5b14156142d8576142b46005614247565b91506142c39050816001613b9b565b6142ce826032613b9b565b92509250506143e5565b60018460068111156142fa57634e487b7160e01b600052602160045260246000fd5b14156143245761430a6000614247565b91506143199050816001613b9b565b6142ce826001613b9b565b600284600681111561434657634e487b7160e01b600052602160045260246000fd5b14156143565761430a6001614247565b600384600681111561437857634e487b7160e01b600052602160045260246000fd5b14156143885761430a6002614247565b60048460068111156143aa57634e487b7160e01b600052602160045260246000fd5b14156143ba5761430a6003614247565b6143c46004614247565b91506143d39050816001613b9b565b6142ce6107ee613c21846105dc613b9b565b915091565b610bd1828260405180602001604052806000815250614666565b6000614418846001600160a01b0316614699565b1561451457836001600160a01b031663150b7a0261443461398b565b8786866040518563ffffffff1660e01b8152600401614456949392919061516d565b602060405180830381600087803b15801561447057600080fd5b505af19250505080156144a0575060408051601f3d908101601f1916820190925261449d91810190614ea8565b60015b6144fa573d8080156144ce576040519150601f19603f3d011682016040523d82523d6000602084013e6144d3565b606091505b5080516144f25760405162461bcd60e51b8152600401610bb49061542a565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613a54565b506001949350505050565b60008261452c85846146a8565b14949350505050565b600061458a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166146fb9092919063ffffffff16565b805190915015610c8f57808060200190518101906145a89190614e58565b610c8f5760405162461bcd60e51b8152600401610bb490615d0b565b6001600160e01b031981166301ffc9a760e01b14919050565b6145e8838383610c8f565b6001600160a01b038316614604576145ff8161470a565b614627565b816001600160a01b0316836001600160a01b03161461462757614627838261474e565b6001600160a01b0382166146435761463e816147eb565b610c8f565b826001600160a01b0316826001600160a01b031614610c8f57610c8f82826148c4565b6146708383614908565b61467d6000848484614404565b610c8f5760405162461bcd60e51b8152600401610bb49061542a565b6001600160a01b03163b151590565b600081815b845181101561127f576146e7828683815181106146da57634e487b7160e01b600052603260045260246000fd5b60200260200101516149ef565b9150806146f381615f0b565b9150506146ad565b6060613a548484600085614a11565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161475b84611d84565b6147659190615e8d565b6000838152600760205260409020549091508082146147b8576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906147fd90600190615e8d565b6000838152600960205260408120546008805493945090928490811061483357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061486257634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806148a857634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006148cf83611d84565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b03821661492e5760405162461bcd60e51b8152600401610bb4906158ac565b61493781613bbd565b156149545760405162461bcd60e51b8152600401610bb4906154c1565b614960600083836140e6565b6001600160a01b0382166000908152600360205260408120805460019290614989908490615e42565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610bd160008383610c8f565b6000818310614a0757614a028284614ad1565b612176565b6121768383614ad1565b606082471015614a335760405162461bcd60e51b8152600401610bb49061566a565b614a3c85614699565b614a585760405162461bcd60e51b8152600401610bb490615b15565b600080866001600160a01b03168587604051614a74919061506a565b60006040518083038185875af1925050503d8060008114614ab1576040519150601f19603f3d011682016040523d82523d6000602084013e614ab6565b606091505b5091509150614ac6828286614ae0565b979650505050505050565b60009182526020526040902090565b60608315614aef575081612176565b825115614aff5782518084602001fd5b8160405162461bcd60e51b8152600401610bb49190615237565b828054614b2590615ed0565b90600052602060002090601f016020900481019282614b475760008555614b8d565b82601f10614b6057805160ff1916838001178555614b8d565b82800160010185558215614b8d579182015b82811115614b8d578251825591602001919060010190614b72565b50614b99929150614b9d565b5090565b5b80821115614b995760008155600101614b9e565b600067ffffffffffffffff80841115614bcd57614bcd615f66565b604051601f8501601f19908116603f01168101908282118183101715614bf557614bf5615f66565b81604052809350858152868686011115614c0e57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112614c39578182fd5b50813567ffffffffffffffff811115614c50578182fd5b602083019150836020808302850101111561409357600080fd5b600060208284031215614c7b578081fd5b813561217681615f7c565b600060208284031215614c97578081fd5b815161217681615f7c565b60008060408385031215614cb4578081fd5b8235614cbf81615f7c565b91506020830135614ccf81615f7c565b809150509250929050565b600080600060608486031215614cee578081fd5b8335614cf981615f7c565b92506020840135614d0981615f7c565b929592945050506040919091013590565b60008060008060808587031215614d2f578081fd5b8435614d3a81615f7c565b93506020850135614d4a81615f7c565b925060408501359150606085013567ffffffffffffffff811115614d6c578182fd5b8501601f81018713614d7c578182fd5b614d8b87823560208401614bb2565b91505092959194509250565b60008060408385031215614da9578182fd5b8235614db481615f7c565b91506020830135614ccf81615f91565b60008060408385031215614dd6578182fd5b8235614de181615f7c565b946020939093013593505050565b60008060008060408587031215614e04578384fd5b843567ffffffffffffffff80821115614e1b578586fd5b614e2788838901614c28565b90965094506020870135915080821115614e3f578384fd5b50614e4c87828801614c28565b95989497509550505050565b600060208284031215614e69578081fd5b815161217681615f91565b600060208284031215614e85578081fd5b5035919050565b600060208284031215614e9d578081fd5b813561217681615f9f565b600060208284031215614eb9578081fd5b815161217681615f9f565b600080600080600060608688031215614edb578283fd5b853560078110614ee9578384fd5b9450602086013567ffffffffffffffff80821115614f05578485fd5b614f1189838a01614c28565b90965094506040880135915080821115614f29578283fd5b50614f3688828901614c28565b969995985093965092949392505050565b600060208284031215614f58578081fd5b813567ffffffffffffffff811115614f6e578182fd5b8201601f81018413614f7e578182fd5b613a5484823560208401614bb2565b600060208284031215614f9e578081fd5b5051919050565b600080600060408486031215614fb9578081fd5b83359250602084013567ffffffffffffffff811115614fd6578182fd5b614fe286828701614c28565b9497909650939450505050565b60008060408385031215615001578182fd5b50508035926020909101359150565b60008151808452615028816020860160208601615ea4565b601f01601f19169290920160200192915050565b64173539b7b760d91b815260050190565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6000825161507c818460208701615ea4565b9190910192915050565b600080855461509481615ed0565b600182811680156150ac57600181146150bd576150e9565b60ff198416875282870194506150e9565b8986526020808720875b858110156150e05781548a8201529084019082016150c7565b50505082870194505b50875192506150fc838560208b01615ea4565b602f60f81b9390920192835285519161511b8382860160208a01615ea4565b615128818486010161503c565b9998505050505050505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906151a090830184615010565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6000602080830181845280855180835260408601915060408482028701019250838701855b8281101561521657603f19888603018452615204858351615010565b945092850192908501906001016151e8565b5092979650505050505050565b901515815260200190565b90815260200190565b6000602082526121766020830184615010565b6000602080835281845461525d81615ed0565b8084870152604060018084166000811461527e5760018114615292576152bd565b60ff198516898401526060890195506152bd565b898852868820885b858110156152b55781548b820186015290830190880161529a565b8a0184019650505b509398975050505050505050565b6020808252602a908201527f506978656c4d757368726f686d3a204e6f7420656c696769626c6520666f72206040820152691b195d995b081b5a5b9d60b21b606082015260800190565b6020808252602e908201527f506978656c4d757368726f686d3a2055524920717565727920666f72206e6f6e60408201526d32bc34b9ba32b73a103a37b5b2b760911b606082015260800190565b60208082526025908201527f506978656c4d757368726f686d3a204d6178206d696e74206c696d69742072656040820152641858da195960da1b606082015260800190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b6020808252601c908201527f506978656c4d757368726f686d3a204d696e7420636f6d706c65746500000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526036908201527f506978656c4d757368726f686d3a2053656e646572206973206e6f7420746865604082015275081bdddb995c881bd9881d1a19481d1bdad95b88125160521b606082015260800190565b60208082526024908201527f506978656c4d757368726f686d3a205061796d656e74207072696365206e6f74604082015263081cd95d60e21b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252603a908201527f506978656c4d757368726f686d3a2053706f726520706f77657220706572207760408201527f65656b206d7573742062652067726561746572207468616e2030000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526027908201527f506978656c4d757368726f686d3a204d6178696d756d20746f6b656e204944206040820152661c995858da195960ca1b606082015260800190565b60208082526029908201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616040820152683634b21037bbb732b960b91b606082015260800190565b6020808252603f908201527f506978656c4d757368726f686d3a2043616e6e6f742072656465656d206d6f7260408201527f652073706f726520706f776572207468616e20697320617661696c61626c6500606082015260800190565b602080825260169082015275506978656c4d757368726f686d3a202162726964676560501b604082015260600190565b6020808252601f908201527f506978656c4d757368726f686d3a204e6f20746f6b656e2062616c616e636500604082015260600190565b6020808252602b908201527f506978656c4d757368726f686d3a204d75737420626520616e2061697264726f60408201526a70206d696e74207479706560a81b606082015260800190565b6020808252603e908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60408201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252601f908201527f506978656c4d757368726f686d3a204e6f7420696e2077686974656c69737400604082015260600190565b60208082526024908201527f506978656c4d757368726f686d3a205061796d656e7420746f6b656e206e6f74604082015263081cd95d60e21b606082015260800190565b6020808252601a908201527f506978656c4d757368726f686d3a20216d756c7469706c696572000000000000604082015260600190565b6020808252602c908201527f506978656c4d757368726f686d3a20416d6f756e74206d75737420626520677260408201526b06561746572207468616e20360a41b606082015260800190565b60208082526018908201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252604a908201527f506978656c4d757368726f686d3a204c697374206f662061646472657373657360408201527f20616e64206c697374206f6620616d6f756e7473206d757374206265207468656060820152692073616d652073697a6560b01b608082015260a00190565b6020808252602e908201527f506978656c4d757368726f686d3a204973207374616b65642e20556e7374616b60408201526d32903a37903a3930b739b332b91760911b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252604c908201527f506978656c4d757368726f686d3a204c697374206f662061646472657373657360408201527f20616e64206c697374206f6620746f6b656e20494473206d757374206265207460608201526b68652073616d652073697a6560a01b608082015260a00190565b60208082526023908201527f506978656c4d757368726f686d3a20546f6b656e20616c72656164792065786960408201526273747360e81b606082015260800190565b60208082526024908201527f506978656c4d757368726f686d3a20496e76616c696420746f6b656e206164646040820152637265737360e01b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b60208082526023908201527f506978656c4d757368726f686d3a204c6576656c20616c7265616479206d61786040820152621e195960ea1b606082015260800190565b60208082526017908201527f506978656c4d757368726f686d3a20217374616b696e67000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526018908201527f506978656c4d757368726f686d3a202172656465656d65720000000000000000604082015260600190565b918252602082015260400190565b948552602085019390935260408401919091526060830152608082015260a00190565b60008219821115615e5557615e55615f3a565b500190565b600082615e6957615e69615f50565b500490565b6000816000190483118215151615615e8857615e88615f3a565b500290565b600082821015615e9f57615e9f615f3a565b500390565b60005b83811015615ebf578181015183820152602001615ea7565b838111156113c15750506000910152565b600281046001821680615ee457607f821691505b60208210811415615f0557634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415615f1f57615f1f615f3a565b5060010190565b600082615f3557615f35615f50565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461398857600080fd5b801515811461398857600080fd5b6001600160e01b03198116811461398857600080fdfea26469706673582212206ceba28ddf21684c5ea148c654d1c5cc50585078586c852941ecb9726c0e20a264736f6c6343000801003300000000000000000000000072794d77c6767b39386820971c8c98b398f2e38d

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106104a05760003560e01c80635b8ad4291161026d578063a27272a811610151578063d2cab056116100ce578063e78cea9211610092578063e78cea92146109dd578063e985e9c5146109e5578063e99a45ec146109f8578063eb6c8eda14610a0b578063f227d38214610a1e578063f28e91d714610a26576104a0565b8063d2cab05614610994578063d5fd4c49146109a7578063d62280b2146109ba578063d8c2094f146109c2578063dcbf44a3146109d5576104a0565b8063b4b5b48f11610115578063b4b5b48f1461093a578063b88d4fde1461095e578063bb2f800114610971578063bf7e214f14610979578063c87b56dd14610981576104a0565b8063a27272a8146108db578063a57d4f88146108ee578063a8ef075514610901578063ac524f3d14610914578063afdf613414610927576104a0565b8063885e3f64116101ea5780638ff39099116101ae5780638ff39099146108745780639108bd031461088757806392e0150b1461089a57806395d89b41146108ad5780639aadc32d146108b5578063a22cb465146108c8576104a0565b8063885e3f641461081557806388bb6ebb146108285780638c2a993e1461083b5780638d32d0861461084e5780638dd1480214610861576104a0565b80636ca4647e116102315780636ca4647e146107b657806370a08231146107c95780637a9e5e4b146107dc5780637cb64759146107ef57806386481d4014610802576104a0565b80635b8ad429146107785780635e6ea6fa146107805780636352211e146107885780636b41f3dd1461079b5780636c0360eb146107ae576104a0565b80633aa5bf9c116103945780634cf088d91161031157806351830227116102d5578063518302271461073257806351cff8d91461073a57806353bbfa421461074d578063558d4b171461075557806355f804b31461075d5780635a0d82ff14610770576104a0565b80634cf088d9146106e95780634d86f93a146106f15780634f558e79146107045780634f6ccce7146107175780635141fd6d1461072a576104a0565b806342842e0e1161035857806342842e0e1461068a578063432f50c61461069d57806347b1c4e7146106b05780634a13e91d146106c35780634b109ee6146106d6576104a0565b80633aa5bf9c146106295780633aec9641146106315780633e33139a146106445780633fcc56b6146106575780634107f57014610677576104a0565b806323b872dd116104225780632f745c59116103e65780632f745c59146105d557806331cfa1e8146105e8578063334581c3146105fb578063344f1ba51461060e5780633798fe5614610621576104a0565b806323b872dd146105815780632be3ba16146105945780632eb4a7ab146105a75780632f120f8a146105af5780632f5c91d8146105c2576104a0565b8063095ea7b311610469578063095ea7b31461052b578063165377861461053e57806318160ddd146105515780631e2dcb151461056657806323b7fc5d1461056e576104a0565b8062b91b71146104a557806301ffc9a7146104ce57806306fdde03146104e1578063078eef28146104f6578063081812fc1461050b575b600080fd5b6104b86104b3366004614e74565b610a39565b6040516104c59190615223565b60405180910390f35b6104b86104dc366004614e8c565b610a56565b6104e9610a67565b6040516104c59190615237565b610509610504366004614f47565b610afa565b005b61051e610519366004614e74565b610bd5565b6040516104c59190615135565b610509610539366004614dc4565b610bfc565b61050961054c366004614c6a565b610c94565b610559610daa565b6040516104c5919061522e565b610559610db0565b61055961057c366004614e74565b610db6565b61050961058f366004614cda565b610dcb565b6105596105a2366004614e74565b610e03565b610559610e18565b6105596105bd366004614c6a565b610e1e565b6104b86105d0366004614e74565b610e39565b6105596105e3366004614dc4565b610e6c565b6105096105f6366004614e74565b610ebe565b610509610609366004614e74565b610f7e565b61050961061c366004614e74565b61106e565b61055961115e565b610559611164565b6104b861063f366004614e74565b61116a565b6104b8610652366004614c6a565b6111a6565b61066a610665366004614c6a565b6111bb565b6040516104c591906151c3565b610509610685366004614fa5565b611287565b610509610698366004614cda565b6113c7565b6104b86106ab366004614e74565b6113e2565b6104b86106be366004614c6a565b6113f7565b6105096106d1366004614c6a565b61141a565b6105596106e4366004614e74565b6114f7565b61051e6115a0565b6105096106ff366004614def565b6115af565b6104b8610712366004614e74565b61175f565b610559610725366004614e74565b61176a565b6105596117c5565b6104b86117cb565b610509610748366004614c6a565b6117d4565b6105596119d6565b6105596119dc565b61050961076b366004614f47565b6119e2565b61051e611ab0565b610509611abf565b610559611b8e565b61051e610796366004614e74565b611b94565b6105596107a9366004614e74565b611bc9565b6104e9611beb565b6105096107c4366004614fef565b611c79565b6105596107d7366004614c6a565b611d84565b6105096107ea366004614c6a565b611dc8565b6105096107fd366004614e74565b611ecd565b610559610810366004614e74565b611f8d565b610509610823366004614c6a565b611faa565b610559610836366004614e74565b6120b8565b610509610849366004614dc4565b61217d565b6104b861085c366004614e74565b612281565b61050961086f366004614c6a565b61229c565b610509610882366004614c6a565b6123a2565b610509610895366004614e74565b6124a8565b6105096108a8366004614e74565b6125fb565b6104e9612730565b6105096108c3366004614fef565b61273f565b6105096108d6366004614d97565b612895565b6105096108e9366004614e74565b6128a7565b6105096108fc366004614c6a565b612997565b61055961090f366004614e74565b612aa2565b6104b8610922366004614c6a565b612ac0565b610509610935366004614e74565b612ad5565b61094d610948366004614e74565b612b95565b6040516104c5959493929190615e1f565b61050961096c366004614d1a565b612bc4565b610559612bfd565b61051e612c03565b6104e961098f366004614e74565b612c12565b6105096109a2366004614fa5565b612d4c565b6105096109b5366004614fef565b612fa5565b6104e961312c565b6105096109d0366004614ec4565b613139565b6105596134b1565b61051e6134e0565b6104b86109f3366004614ca2565b6134ef565b610509610a06366004614fef565b61351d565b610509610a19366004614e74565b61373a565b61055961382a565b610509610a34366004614c6a565b613830565b6000610a4361115e565b610a4c83611f8d565b101590505b919050565b6000610a618261393e565b92915050565b606060008054610a7690615ed0565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa290615ed0565b8015610aef5780601f10610ac457610100808354040283529160200191610aef565b820191906000526020600020905b815481529060010190602001808311610ad257829003601f168201915b505050505090505b90565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4857600080fd5b505afa158015610b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b809190614c86565b6001600160a01b0316336001600160a01b031614600a90610bbd5760405162461bcd60e51b8152600401610bb4919061524a565b60405180910390fd5b508051610bd1906015906020840190614b19565b5050565b6000610be082613963565b506000908152600460205260409020546001600160a01b031690565b6000610c0782611b94565b9050806001600160a01b0316836001600160a01b03161415610c3b5760405162461bcd60e51b8152600401610bb490615a16565b806001600160a01b0316610c4d61398b565b6001600160a01b03161480610c695750610c69816109f361398b565b610c855760405162461bcd60e51b8152600401610bb49061584f565b610c8f838361398f565b505050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ce257600080fd5b505afa158015610cf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1a9190614c86565b6001600160a01b0316336001600160a01b031614600a90610d4e5760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b03811660009081526022602052604090819020805460ff19169055517f6a38b6b3ea94c488826961d881939fe4ed14db3794a241538a62cc9d9e3c786590610d9f908390615135565b60405180910390a150565b60085490565b601a5490565b60009081526025602052604090206001015490565b610ddc610dd661398b565b826139fd565b610df85760405162461bcd60e51b8152600401610bb490615d55565b610c8f838383613a5c565b60009081526025602052604090206004015490565b60195481565b6001600160a01b031660009081526010602052604090205490565b600080610e53601a54601c54613b8f90919063ffffffff16565b6000848152602560205260409020541015915050919050565b6000610e7783611d84565b8210610e955760405162461bcd60e51b8152600401610bb4906153a8565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0c57600080fd5b505afa158015610f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f449190614c86565b6001600160a01b0316336001600160a01b031614600a90610f785760405162461bcd60e51b8152600401610bb4919061524a565b50601755565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015610fcc57600080fd5b505afa158015610fe0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110049190614c86565b6001600160a01b0316336001600160a01b031614600a906110385760405162461bcd60e51b8152600401610bb4919061524a565b50601a8190556040517fa0b8b1ac6610b29190634b1f7f57e0097912dc0c9e79fa819ded30aa708db4cd90610d9f90839061522e565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b1580156110bc57600080fd5b505afa1580156110d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f49190614c86565b6001600160a01b0316336001600160a01b031614600a906111285760405162461bcd60e51b8152600401610bb4919061524a565b50601b8190556040517f6fb77064c357242637b711a88342615615fa1bb1a2d8cab4c930f6f4d580d65a90610d9f90839061522e565b601b5490565b601e5481565b60006105dc8211158015611188575060205461118583611f8d565b10155b8015610a6157505060009081526026602052604090205460ff161590565b60226020526000908152604090205460ff1681565b606060006111c883611d84565b905060008167ffffffffffffffff8111156111f357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561122657816020015b60608152602001906001900390816112115790505b50905060005b8281101561127f5761124161098f8683610e6c565b82828151811061126157634e487b7160e01b600052603260045260246000fd5b6020026020010181905250808061127790615f0b565b91505061122c565b509392505050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d557600080fd5b505afa1580156112e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130d9190614c86565b6001600160a01b0316336001600160a01b031614600a906113415760405162461bcd60e51b8152600401610bb4919061524a565b50600083116113625760405162461bcd60e51b8152600401610bb49061560d565b60005b818110156113c157836025600085858581811061139257634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000206001018190555080806113b990615f0b565b915050611365565b50505050565b610c8f83838360405180602001604052806000815250612bc4565b60266020526000908152604090205460ff1681565b6018546001600160a01b0382166000908152601060205260409020541015919050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561146857600080fd5b505afa15801561147c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a09190614c86565b6001600160a01b0316336001600160a01b031614600a906114d45760405162461bcd60e51b8152600401610bb4919061524a565b50601680546001600160a01b0319166001600160a01b0392909216919091179055565b60215460405163678baccf60e11b8152600091610a6191611598916001600160a01b03169063cf17599e9061153090879060040161522e565b60206040518083038186803b15801561154857600080fd5b505afa15801561155c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115809190614f8d565b60008581526025602052604090206003015490613b9b565b601d54613ba7565b6021546001600160a01b031681565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b1580156115fd57600080fd5b505afa158015611611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116359190614c86565b6001600160a01b0316336001600160a01b031614600a906116695760405162461bcd60e51b8152600401610bb4919061524a565b508281146116895760405162461bcd60e51b8152600401610bb490615b4c565b60005b83811015611758576116c38383838181106116b757634e487b7160e01b600052603260045260246000fd5b90506020020135613bbd565b156116e05760405162461bcd60e51b8152600401610bb490615bbe565b61174685858381811061170357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906117189190614c6a565b84848481811061173857634e487b7160e01b600052603260045260246000fd5b905060200201356005613bda565b8061175081615f0b565b91505061168c565b5050505050565b6000610a6182613bbd565b6000611774610daa565b82106117925760405162461bcd60e51b8152600401610bb490615c45565b600882815481106117b357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b601f5490565b600f5460ff1681565b600d60009054906101000a90046001600160a01b03166001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561182257600080fd5b505afa158015611836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185a9190614c86565b6001600160a01b0316336001600160a01b031614600a9061188e5760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b0381166118b55760405162461bcd60e51b8152600401610bb490615c01565b6040516370a0823160e01b81526000906001600160a01b038316906370a08231906118e4903090600401615135565b60206040518083038186803b1580156118fc57600080fd5b505afa158015611910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119349190614f8d565b9050600081116119565760405162461bcd60e51b8152600401610bb4906157cd565b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb9061198490339085906004016151aa565b602060405180830381600087803b15801561199e57600080fd5b505af11580156119b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f9190614e58565b601c5490565b60185490565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015611a3057600080fd5b505afa158015611a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a689190614c86565b6001600160a01b0316336001600160a01b031614600a90611a9c5760405162461bcd60e51b8152600401610bb4919061524a565b508051610bd1906014906020840190614b19565b6016546001600160a01b031690565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b0d57600080fd5b505afa158015611b21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b459190614c86565b6001600160a01b0316336001600160a01b031614600a90611b795760405162461bcd60e51b8152600401610bb4919061524a565b50600f805460ff19811660ff90911615179055565b60175490565b6000818152600260205260408120546001600160a01b031680610a615760405162461bcd60e51b8152600401610bb4906159df565b6000610a61611be3601c54611bdd856120b8565b90613d8b565b601a54613ba7565b60148054611bf890615ed0565b80601f0160208091040260200160405190810160405280929190818152602001828054611c2490615ed0565b8015611c715780601f10611c4657610100808354040283529160200191611c71565b820191906000526020600020905b815481529060010190602001808311611c5457829003601f168201915b505050505081565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc757600080fd5b505afa158015611cdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cff9190614e58565b15600b90611d205760405162461bcd60e51b8152600401610bb4919061524a565b506021546001600160a01b03163314611d4b5760405162461bcd60e51b8152600401610bb490615cd4565b600082815260256020526040902060030154611d6b906115989083613b9b565b6000928352602560205260409092206003019190915550565b60006001600160a01b038216611dac5760405162461bcd60e51b8152600401610bb4906156f7565b506001600160a01b031660009081526003602052604090205490565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e1657600080fd5b505afa158015611e2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4e9190614c86565b6001600160a01b0316336001600160a01b031614600a90611e825760405162461bcd60e51b8152600401610bb4919061524a565b50600d80546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f1b57600080fd5b505afa158015611f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f539190614c86565b6001600160a01b0316336001600160a01b031614600a90611f875760405162461bcd60e51b8152600401610bb4919061524a565b50601955565b600081815260256020526040812060020154610a61906001613b9b565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff857600080fd5b505afa15801561200c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120309190614c86565b6001600160a01b0316336001600160a01b031614600a906120645760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b03811660009081526023602052604090819020805460ff19166001179055517f57592bf6be276b8fe1111c3b9795762cdb2368b1badec6d34e41fb9072a0a7e990610d9f908390615135565b6000806120d2601a54601c54613b8f90919063ffffffff16565b602154604051634bf69b2760e01b815291925061217691612170916001600160a01b031690634bf69b279061210b90889060040161522e565b60206040518083038186803b15801561212357600080fd5b505afa158015612137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215b9190614f8d565b60008681526025602052604090205490613b9b565b82613ba7565b9392505050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121cb57600080fd5b505afa1580156121df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122039190614e58565b15600b906122245760405162461bcd60e51b8152600401610bb4919061524a565b506024546001600160a01b0316331461224f5760405162461bcd60e51b8152600401610bb49061579d565b61225881613bbd565b156122755760405162461bcd60e51b8152600401610bb490615bbe565b610bd182826005613bda565b601d5460009182526025602052604090912060030154101590565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122ea57600080fd5b505afa1580156122fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123229190614c86565b6001600160a01b0316336001600160a01b031614600a906123565760405162461bcd60e51b8152600401610bb4919061524a565b50602480546001600160a01b0319166001600160a01b0383161790556040517fa49730bff544fd0b716395c592e39c6fd2d2481a19b9229b5b240483db95a49590610d9f908390615135565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123f057600080fd5b505afa158015612404573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124289190614c86565b6001600160a01b0316336001600160a01b031614600a9061245c5760405162461bcd60e51b8152600401610bb4919061524a565b50602180546001600160a01b0319166001600160a01b0383161790556040517ff520447191196b125f76f7110397fdf32b1b9cefb7dec323bd3b998022ac233890610d9f908390615135565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156124f657600080fd5b505afa15801561250a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061252e9190614e58565b15600b9061254f5760405162461bcd60e51b8152600401610bb4919061524a565b506002600e5414156125735760405162461bcd60e51b8152600401610bb490615da3565b6002600e553361258282611b94565b6001600160a01b0316146125a85760405162461bcd60e51b8152600401610bb4906154f8565b6125b18161116a565b6125cd5760405162461bcd60e51b8152600401610bb4906152cb565b6125da3360006006613bda565b6000908152602660205260409020805460ff19166001908117909155600e55565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561264957600080fd5b505afa15801561265d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126819190614e58565b15600b906126a25760405162461bcd60e51b8152600401610bb4919061524a565b506021546001600160a01b031633146126cd5760405162461bcd60e51b8152600401610bb490615cd4565b601b546126d982611f8d565b106126f65760405162461bcd60e51b8152600401610bb490615c91565b600081815260256020526040812060038101919091556002015461271b906001613b9b565b60009182526025602052604090912060020155565b606060018054610a7690615ed0565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561278d57600080fd5b505afa1580156127a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c59190614e58565b15600b906127e65760405162461bcd60e51b8152600401610bb4919061524a565b506002600e54141561280a5760405162461bcd60e51b8152600401610bb490615da3565b6002600e553360009081526023602052604090205460ff1661283e5760405162461bcd60e51b8152600401610bb49061595c565b60008281526025602052604090819020600401829055517f14e65d98aa0abf9a31acb3279a5d46ca26a4a2abf7142d51fdc6ff8c4ec7a377906128849084908490615e11565b60405180910390a150506001600e55565b610bd16128a061398b565b8383613d97565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b1580156128f557600080fd5b505afa158015612909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292d9190614c86565b6001600160a01b0316336001600160a01b031614600a906129615760405162461bcd60e51b8152600401610bb4919061524a565b5060208190556040517f973cdf7bc4ec77187b3833eb6f085494ce017b087c22960a6ed355c9112856d890610d9f90839061522e565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156129e557600080fd5b505afa1580156129f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1d9190614c86565b6001600160a01b0316336001600160a01b031614600a90612a515760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b03811660009081526023602052604090819020805460ff19169055517ffdcba8b229914018267118ec363f5fa24a2eaadaff1e6ceec872bc837f94ec9190610d9f908390615135565b600081815260256020526040812060020154601f54610a6191613b8f565b60236020526000908152604090205460ff1681565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b2357600080fd5b505afa158015612b37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b5b9190614c86565b6001600160a01b0316336001600160a01b031614600a90612b8f5760405162461bcd60e51b8152600401610bb4919061524a565b50601855565b602560205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b612bd5612bcf61398b565b836139fd565b612bf15760405162461bcd60e51b8152600401610bb490615d55565b6113c184848484613e3a565b60205481565b600d546001600160a01b031681565b600f5460609060ff16612cb15760158054612c2c90615ed0565b80601f0160208091040260200160405190810160405280929190818152602001828054612c5890615ed0565b8015612ca55780601f10612c7a57610100808354040283529160200191612ca5565b820191906000526020600020905b815481529060010190602001808311612c8857829003601f168201915b50505050509050610a51565b612cba82613bbd565b612cd65760405162461bcd60e51b8152600401610bb490615315565b6000612ce183611bc9565b9050600060148054612cf290615ed0565b905011612d0e5760405180602001604052806000815250612d44565b6014612d1984613e6d565b612d2283613e6d565b604051602001612d3493929190615086565b6040516020818303038152906040525b915050610a51565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d9a57600080fd5b505afa158015612dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd29190614e58565b15600b90612df35760405162461bcd60e51b8152600401610bb4919061524a565b506002600e541415612e175760405162461bcd60e51b8152600401610bb490615da3565b6002600e5582612e395760405162461bcd60e51b8152600401610bb490615993565b6107ee612e466013613f88565b10612e635760405162461bcd60e51b8152600401610bb4906153f3565b6016546001600160a01b0316612e8b5760405162461bcd60e51b8152600401610bb490615918565b601754612eaa5760405162461bcd60e51b8152600401610bb49061554e565b60185433600090815260106020526040902054612ec79085613b9b565b1115612ee55760405162461bcd60e51b8152600401610bb490615363565b612ef0338383613f8c565b612f0c5760405162461bcd60e51b8152600401610bb4906158e1565b612f3a3330612f2686601754613b8f90919063ffffffff16565b6016546001600160a01b0316929190614013565b60005b83811015612f9a57612f4f601361406b565b33600090815260106020526040902054612f6a906001613b9b565b33600081815260106020526040812092909255612f88916006613bda565b80612f9281615f0b565b915050612f3d565b50506001600e555050565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612ff357600080fd5b505afa158015613007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061302b9190614e58565b15600b9061304c5760405162461bcd60e51b8152600401610bb4919061524a565b506021546001600160a01b031633146130775760405162461bcd60e51b8152600401610bb490615cd4565b6000613090601a54601c54613b8f90919063ffffffff16565b60008481526025602052604090205490915081906130ae9084613b9b565b116130c857601e546130c09083613b9b565b601e556130f8565b6000838152602560205260408120546130e2908390614074565b601e549092506130f3915082613b9b565b601e55505b600083815260256020526040902054613115906121709084613b9b565b600093845260256020526040909320929092555050565b60158054611bf890615ed0565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561318757600080fd5b505afa15801561319b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131bf9190614c86565b6001600160a01b0316336001600160a01b031614600a906131f35760405162461bcd60e51b8152600401610bb4919061524a565b50600085600681111561321657634e487b7160e01b600052602160045260246000fd5b14806132415750600185600681111561323f57634e487b7160e01b600052602160045260246000fd5b145b8061326b5750600285600681111561326957634e487b7160e01b600052602160045260246000fd5b145b806132955750600385600681111561329357634e487b7160e01b600052602160045260246000fd5b145b806132bf575060048560068111156132bd57634e487b7160e01b600052602160045260246000fd5b145b806132e9575060068560068111156132e757634e487b7160e01b600052602160045260246000fd5b145b6133055760405162461bcd60e51b8152600401610bb490615804565b8281146133245760405162461bcd60e51b8152600401610bb490615a57565b60005b838110156134a95760005b83838381811061335257634e487b7160e01b600052603260045260246000fd5b9050602002013581101561349657600687600681111561338257634e487b7160e01b600052602160045260246000fd5b141561344457613392601361406b565b6133f06001601060008989878181106133bb57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906133d09190614c6a565b6001600160a01b0316815260208101919091526040016000205490613b9b565b6010600088888681811061341457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906134299190614c6a565b6001600160a01b031681526020810191909152604001600020555b61348486868481811061346757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061347c9190614c6a565b600089613bda565b8061348e81615f0b565b915050613332565b50806134a181615f0b565b915050613327565b505050505050565b60006134bb610daa565b6134c757506000610af7565b6134db6134d2610daa565b601e5490613d8b565b905090565b6024546001600160a01b031681565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561356b57600080fd5b505afa15801561357f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135a39190614e58565b15600b906135c45760405162461bcd60e51b8152600401610bb4919061524a565b506002600e5414156135e85760405162461bcd60e51b8152600401610bb490615da3565b6002600e553360009081526022602052604090205460ff1661361c5760405162461bcd60e51b8152600401610bb490615dda565b6000811161363c5760405162461bcd60e51b8152600401610bb490615993565b602154604051639132cb4960e01b81526001600160a01b0390911690639132cb499061366c90859060040161522e565b600060405180830381600087803b15801561368657600080fd5b505af115801561369a573d6000803e3d6000fd5b50505060008381526025602052604090205482111590506136cd5760405162461bcd60e51b8152600401610bb490615740565b601e546136da908261409a565b601e556000828152602560205260409020546136f6908261409a565b6000838152602560205260409081902091909155517fca933db0726ff1c976605a950466779774a9b65ff7ed492c1a92af0226b8feaf906128849084908490615e11565b600d60009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b15801561378857600080fd5b505afa15801561379c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137c09190614c86565b6001600160a01b0316336001600160a01b031614600a906137f45760405162461bcd60e51b8152600401610bb4919061524a565b50601f8190556040517fb8b6eb9343bdd0e9fb758d41e819caae10b73e981578382d4bafee0e933bf9c390610d9f90839061522e565b601d5490565b600d60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561387e57600080fd5b505afa158015613892573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138b69190614c86565b6001600160a01b0316336001600160a01b031614600a906138ea5760405162461bcd60e51b8152600401610bb4919061524a565b506001600160a01b03811660009081526022602052604090819020805460ff19166001179055517f9723df9a48e932d10d8861ccc69f9ae330dbc5cb19d20494edd79f6ff1277ade90610d9f908390615135565b60006001600160e01b0319821663780e9d6360e01b1480610a615750610a61826140a6565b61396c81613bbd565b6139885760405162461bcd60e51b8152600401610bb4906159df565b50565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906139c482611b94565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080613a0983611b94565b9050806001600160a01b0316846001600160a01b03161480613a305750613a3081856134ef565b80613a545750836001600160a01b0316613a4984610bd5565b6001600160a01b0316145b949350505050565b826001600160a01b0316613a6f82611b94565b6001600160a01b031614613a955760405162461bcd60e51b8152600401610bb49061547c565b6001600160a01b038216613abb5760405162461bcd60e51b8152600401610bb490615592565b613ac68383836140e6565b613ad160008261398f565b6001600160a01b0383166000908152600360205260408120805460019290613afa908490615e8d565b90915550506001600160a01b0382166000908152600360205260408120805460019290613b28908490615e42565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610c8f838383610c8f565b60006121768284615e6e565b60006121768284615e42565b6000818310613bb65781612176565b5090919050565b6000908152600260205260409020546001600160a01b0316151590565b600080613be683614247565b90925090506000836006811115613c0d57634e487b7160e01b600052602160045260246000fd5b1415613c3857613c2782613c216012613f88565b90613b9b565b9350613c33601261406b565b613d28565b6001836006811115613c5a57634e487b7160e01b600052602160045260246000fd5b1480613c8557506002836006811115613c8357634e487b7160e01b600052602160045260246000fd5b145b80613caf57506003836006811115613cad57634e487b7160e01b600052602160045260246000fd5b145b80613cd957506004836006811115613cd757634e487b7160e01b600052602160045260246000fd5b145b15613ce657819350613d28565b6006836006811115613d0857634e487b7160e01b600052602160045260246000fd5b1415613d2857613d1c82613c216011613f88565b9350613d28601161406b565b80841115613d485760405162461bcd60e51b8152600401610bb4906156b0565b7f755b2a86466bbe1ad089257e0ff69975b46f7bf2e672c704dda9b08b8f870a9a8585604051613d799291906151aa565b60405180910390a161175885856143ea565b60006121768284615e5a565b816001600160a01b0316836001600160a01b03161415613dc95760405162461bcd60e51b8152600401610bb4906155d6565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190613e2d908590615223565b60405180910390a3505050565b613e45848484613a5c565b613e5184848484614404565b6113c15760405162461bcd60e51b8152600401610bb49061542a565b606081613e9257506040805180820190915260018152600360fc1b6020820152610a51565b8160005b8115613ebc5780613ea681615f0b565b9150613eb59050600a83615e5a565b9150613e96565b60008167ffffffffffffffff811115613ee557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613f0f576020820181803683370190505b5090505b8415613a5457613f24600183615e8d565b9150613f31600a86615f26565b613f3c906030615e42565b60f81b818381518110613f5f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613f81600a86615e5a565b9450613f13565b5490565b601954600090613f9e57506001612176565b600084604051602001613fb1919061504d565b60405160208183030381529060405280519060200120905061400a84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601954915084905061451f565b95945050505050565b6113c1846323b872dd60e01b85858560405160240161403493929190615149565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614535565b80546001019055565b6000808383111561408a57506000905080614093565b50600190508183035b9250929050565b60006121768284615e8d565b60006001600160e01b031982166380ac58cd60e01b14806140d757506001600160e01b03198216635b5e139f60e01b145b80610a615750610a61826145c4565b600d60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561413457600080fd5b505afa158015614148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061416c9190614e58565b15600b9061418d5760405162461bcd60e51b8152600401610bb4919061524a565b506141998383836145dd565b6021546001600160a01b031615610c8f57602154604051635d528fc360e11b81526001600160a01b039091169063baa51f86906141da90849060040161522e565b60206040518083038186803b1580156141f257600080fd5b505afa158015614206573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061422a9190614e58565b15610c8f5760405162461bcd60e51b8152600401610bb490615ac7565b60008080600584600681111561426d57634e487b7160e01b600052602160045260246000fd5b14156142825760016105dc92509250506143e5565b60008460068111156142a457634e487b7160e01b600052602160045260246000fd5b14156142d8576142b46005614247565b91506142c39050816001613b9b565b6142ce826032613b9b565b92509250506143e5565b60018460068111156142fa57634e487b7160e01b600052602160045260246000fd5b14156143245761430a6000614247565b91506143199050816001613b9b565b6142ce826001613b9b565b600284600681111561434657634e487b7160e01b600052602160045260246000fd5b14156143565761430a6001614247565b600384600681111561437857634e487b7160e01b600052602160045260246000fd5b14156143885761430a6002614247565b60048460068111156143aa57634e487b7160e01b600052602160045260246000fd5b14156143ba5761430a6003614247565b6143c46004614247565b91506143d39050816001613b9b565b6142ce6107ee613c21846105dc613b9b565b915091565b610bd1828260405180602001604052806000815250614666565b6000614418846001600160a01b0316614699565b1561451457836001600160a01b031663150b7a0261443461398b565b8786866040518563ffffffff1660e01b8152600401614456949392919061516d565b602060405180830381600087803b15801561447057600080fd5b505af19250505080156144a0575060408051601f3d908101601f1916820190925261449d91810190614ea8565b60015b6144fa573d8080156144ce576040519150601f19603f3d011682016040523d82523d6000602084013e6144d3565b606091505b5080516144f25760405162461bcd60e51b8152600401610bb49061542a565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613a54565b506001949350505050565b60008261452c85846146a8565b14949350505050565b600061458a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166146fb9092919063ffffffff16565b805190915015610c8f57808060200190518101906145a89190614e58565b610c8f5760405162461bcd60e51b8152600401610bb490615d0b565b6001600160e01b031981166301ffc9a760e01b14919050565b6145e8838383610c8f565b6001600160a01b038316614604576145ff8161470a565b614627565b816001600160a01b0316836001600160a01b03161461462757614627838261474e565b6001600160a01b0382166146435761463e816147eb565b610c8f565b826001600160a01b0316826001600160a01b031614610c8f57610c8f82826148c4565b6146708383614908565b61467d6000848484614404565b610c8f5760405162461bcd60e51b8152600401610bb49061542a565b6001600160a01b03163b151590565b600081815b845181101561127f576146e7828683815181106146da57634e487b7160e01b600052603260045260246000fd5b60200260200101516149ef565b9150806146f381615f0b565b9150506146ad565b6060613a548484600085614a11565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161475b84611d84565b6147659190615e8d565b6000838152600760205260409020549091508082146147b8576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906147fd90600190615e8d565b6000838152600960205260408120546008805493945090928490811061483357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061486257634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806148a857634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006148cf83611d84565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b03821661492e5760405162461bcd60e51b8152600401610bb4906158ac565b61493781613bbd565b156149545760405162461bcd60e51b8152600401610bb4906154c1565b614960600083836140e6565b6001600160a01b0382166000908152600360205260408120805460019290614989908490615e42565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610bd160008383610c8f565b6000818310614a0757614a028284614ad1565b612176565b6121768383614ad1565b606082471015614a335760405162461bcd60e51b8152600401610bb49061566a565b614a3c85614699565b614a585760405162461bcd60e51b8152600401610bb490615b15565b600080866001600160a01b03168587604051614a74919061506a565b60006040518083038185875af1925050503d8060008114614ab1576040519150601f19603f3d011682016040523d82523d6000602084013e614ab6565b606091505b5091509150614ac6828286614ae0565b979650505050505050565b60009182526020526040902090565b60608315614aef575081612176565b825115614aff5782518084602001fd5b8160405162461bcd60e51b8152600401610bb49190615237565b828054614b2590615ed0565b90600052602060002090601f016020900481019282614b475760008555614b8d565b82601f10614b6057805160ff1916838001178555614b8d565b82800160010185558215614b8d579182015b82811115614b8d578251825591602001919060010190614b72565b50614b99929150614b9d565b5090565b5b80821115614b995760008155600101614b9e565b600067ffffffffffffffff80841115614bcd57614bcd615f66565b604051601f8501601f19908116603f01168101908282118183101715614bf557614bf5615f66565b81604052809350858152868686011115614c0e57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112614c39578182fd5b50813567ffffffffffffffff811115614c50578182fd5b602083019150836020808302850101111561409357600080fd5b600060208284031215614c7b578081fd5b813561217681615f7c565b600060208284031215614c97578081fd5b815161217681615f7c565b60008060408385031215614cb4578081fd5b8235614cbf81615f7c565b91506020830135614ccf81615f7c565b809150509250929050565b600080600060608486031215614cee578081fd5b8335614cf981615f7c565b92506020840135614d0981615f7c565b929592945050506040919091013590565b60008060008060808587031215614d2f578081fd5b8435614d3a81615f7c565b93506020850135614d4a81615f7c565b925060408501359150606085013567ffffffffffffffff811115614d6c578182fd5b8501601f81018713614d7c578182fd5b614d8b87823560208401614bb2565b91505092959194509250565b60008060408385031215614da9578182fd5b8235614db481615f7c565b91506020830135614ccf81615f91565b60008060408385031215614dd6578182fd5b8235614de181615f7c565b946020939093013593505050565b60008060008060408587031215614e04578384fd5b843567ffffffffffffffff80821115614e1b578586fd5b614e2788838901614c28565b90965094506020870135915080821115614e3f578384fd5b50614e4c87828801614c28565b95989497509550505050565b600060208284031215614e69578081fd5b815161217681615f91565b600060208284031215614e85578081fd5b5035919050565b600060208284031215614e9d578081fd5b813561217681615f9f565b600060208284031215614eb9578081fd5b815161217681615f9f565b600080600080600060608688031215614edb578283fd5b853560078110614ee9578384fd5b9450602086013567ffffffffffffffff80821115614f05578485fd5b614f1189838a01614c28565b90965094506040880135915080821115614f29578283fd5b50614f3688828901614c28565b969995985093965092949392505050565b600060208284031215614f58578081fd5b813567ffffffffffffffff811115614f6e578182fd5b8201601f81018413614f7e578182fd5b613a5484823560208401614bb2565b600060208284031215614f9e578081fd5b5051919050565b600080600060408486031215614fb9578081fd5b83359250602084013567ffffffffffffffff811115614fd6578182fd5b614fe286828701614c28565b9497909650939450505050565b60008060408385031215615001578182fd5b50508035926020909101359150565b60008151808452615028816020860160208601615ea4565b601f01601f19169290920160200192915050565b64173539b7b760d91b815260050190565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6000825161507c818460208701615ea4565b9190910192915050565b600080855461509481615ed0565b600182811680156150ac57600181146150bd576150e9565b60ff198416875282870194506150e9565b8986526020808720875b858110156150e05781548a8201529084019082016150c7565b50505082870194505b50875192506150fc838560208b01615ea4565b602f60f81b9390920192835285519161511b8382860160208a01615ea4565b615128818486010161503c565b9998505050505050505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906151a090830184615010565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6000602080830181845280855180835260408601915060408482028701019250838701855b8281101561521657603f19888603018452615204858351615010565b945092850192908501906001016151e8565b5092979650505050505050565b901515815260200190565b90815260200190565b6000602082526121766020830184615010565b6000602080835281845461525d81615ed0565b8084870152604060018084166000811461527e5760018114615292576152bd565b60ff198516898401526060890195506152bd565b898852868820885b858110156152b55781548b820186015290830190880161529a565b8a0184019650505b509398975050505050505050565b6020808252602a908201527f506978656c4d757368726f686d3a204e6f7420656c696769626c6520666f72206040820152691b195d995b081b5a5b9d60b21b606082015260800190565b6020808252602e908201527f506978656c4d757368726f686d3a2055524920717565727920666f72206e6f6e60408201526d32bc34b9ba32b73a103a37b5b2b760911b606082015260800190565b60208082526025908201527f506978656c4d757368726f686d3a204d6178206d696e74206c696d69742072656040820152641858da195960da1b606082015260800190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b6020808252601c908201527f506978656c4d757368726f686d3a204d696e7420636f6d706c65746500000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526036908201527f506978656c4d757368726f686d3a2053656e646572206973206e6f7420746865604082015275081bdddb995c881bd9881d1a19481d1bdad95b88125160521b606082015260800190565b60208082526024908201527f506978656c4d757368726f686d3a205061796d656e74207072696365206e6f74604082015263081cd95d60e21b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252603a908201527f506978656c4d757368726f686d3a2053706f726520706f77657220706572207760408201527f65656b206d7573742062652067726561746572207468616e2030000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526027908201527f506978656c4d757368726f686d3a204d6178696d756d20746f6b656e204944206040820152661c995858da195960ca1b606082015260800190565b60208082526029908201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616040820152683634b21037bbb732b960b91b606082015260800190565b6020808252603f908201527f506978656c4d757368726f686d3a2043616e6e6f742072656465656d206d6f7260408201527f652073706f726520706f776572207468616e20697320617661696c61626c6500606082015260800190565b602080825260169082015275506978656c4d757368726f686d3a202162726964676560501b604082015260600190565b6020808252601f908201527f506978656c4d757368726f686d3a204e6f20746f6b656e2062616c616e636500604082015260600190565b6020808252602b908201527f506978656c4d757368726f686d3a204d75737420626520616e2061697264726f60408201526a70206d696e74207479706560a81b606082015260800190565b6020808252603e908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60408201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252601f908201527f506978656c4d757368726f686d3a204e6f7420696e2077686974656c69737400604082015260600190565b60208082526024908201527f506978656c4d757368726f686d3a205061796d656e7420746f6b656e206e6f74604082015263081cd95d60e21b606082015260800190565b6020808252601a908201527f506978656c4d757368726f686d3a20216d756c7469706c696572000000000000604082015260600190565b6020808252602c908201527f506978656c4d757368726f686d3a20416d6f756e74206d75737420626520677260408201526b06561746572207468616e20360a41b606082015260800190565b60208082526018908201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252604a908201527f506978656c4d757368726f686d3a204c697374206f662061646472657373657360408201527f20616e64206c697374206f6620616d6f756e7473206d757374206265207468656060820152692073616d652073697a6560b01b608082015260a00190565b6020808252602e908201527f506978656c4d757368726f686d3a204973207374616b65642e20556e7374616b60408201526d32903a37903a3930b739b332b91760911b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252604c908201527f506978656c4d757368726f686d3a204c697374206f662061646472657373657360408201527f20616e64206c697374206f6620746f6b656e20494473206d757374206265207460608201526b68652073616d652073697a6560a01b608082015260a00190565b60208082526023908201527f506978656c4d757368726f686d3a20546f6b656e20616c72656164792065786960408201526273747360e81b606082015260800190565b60208082526024908201527f506978656c4d757368726f686d3a20496e76616c696420746f6b656e206164646040820152637265737360e01b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b60208082526023908201527f506978656c4d757368726f686d3a204c6576656c20616c7265616479206d61786040820152621e195960ea1b606082015260800190565b60208082526017908201527f506978656c4d757368726f686d3a20217374616b696e67000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526018908201527f506978656c4d757368726f686d3a202172656465656d65720000000000000000604082015260600190565b918252602082015260400190565b948552602085019390935260408401919091526060830152608082015260a00190565b60008219821115615e5557615e55615f3a565b500190565b600082615e6957615e69615f50565b500490565b6000816000190483118215151615615e8857615e88615f3a565b500290565b600082821015615e9f57615e9f615f3a565b500390565b60005b83811015615ebf578181015183820152602001615ea7565b838111156113c15750506000910152565b600281046001821680615ee457607f821691505b60208210811415615f0557634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415615f1f57615f1f615f3a565b5060010190565b600082615f3557615f35615f50565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461398857600080fd5b801515811461398857600080fd5b6001600160e01b03198116811461398857600080fdfea26469706673582212206ceba28ddf21684c5ea148c654d1c5cc50585078586c852941ecb9726c0e20a264736f6c63430008010033

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

00000000000000000000000072794d77c6767b39386820971c8c98b398f2e38d

-----Decoded View---------------
Arg [0] : _authority (address): 0x72794D77C6767B39386820971c8c98B398f2E38D

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000072794d77c6767b39386820971c8c98b398f2e38d


[ 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.