ETH Price: $3,143.59 (-8.53%)
Gas: 9 Gwei

Token

MojoHeads (MJH)
 

Overview

Max Total Supply

0 MJH

Holders

41

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 MJH
0xb1C72FEe77254725D365Be0f9cc1667F94Ee7967
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
MojoHeads

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1500 runs

Other Settings:
default evmVersion
File 1 of 20 : MojoHeads.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;


import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

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

import "./interface/IAccessPass.sol";


contract MojoHeads is ERC721URIStorage, AccessControl, IERC2981, Ownable {

    using Counters for Counters.Counter;
    Counters.Counter private tokenIdCounter;

    Counters.Counter private campaignCounter;

    Counters.Counter private artistTokensCounter;

    enum CampaignState {PENDING, READY, PRESALE, ONGOING, PAUSED, FINISH}

    struct NftHash {
        bytes32 hash;
        bool sold;
    }

    //TODO tokenURI pre reveal in backend (ipfs folder)
    //TODO mintArtistToken batch also in backend
    struct Campaign {
        CampaignState state;
        address accessPassAddress;
        uint256 preSalePassId;
        uint256 vipSalePassId;
        string defaultUri;
        bool mintFromArtistEnabled;
        uint256 totalHashCount;
        uint256 freeHashCount;
        uint256 maxPresaleTokens;
        uint256 maxOngoingTokens;
    }

    struct CampaignPrice {
        uint256 unitPricePresale;
        uint256 unitPriceVipSale;
        uint256 unitPriceStartPublicSale;
        uint256 unitPriceEndPublicSale;
        uint256 totalBlockUntilUnitPriceEnd;
        uint256 publicSaleStartBlock;
    }

    struct CampaignPriceInput {
        uint256 unitPricePresale;
        uint256 unitPriceVipSale;
        uint256 unitPriceStartPublicSale;
        uint256 unitPriceEndPublicSale;
        uint256 totalBlockUntilUnitPriceEnd;
    }

    mapping(uint256 => NftHash[]) hashListMapping;

    event CampaignRegisteredEvent(
        uint256 indexed campaignId,
        string defaultUri
    );

    event CampaignUpdatedEvent(
        uint256 indexed campaignId,
        string defaultUri
    );

    event CampaignStateChangedEvent(
        uint256 indexed campaignId,
        CampaignState state
    );

    event CampaignNewHashAddedEvent(
        uint256 indexed campaignId
    );

    event WithdrawEth(
        uint256 indexed amount,
        address indexed receiver
    );

    event WithdrawERC20(
        address indexed token,
        uint256 indexed amount,
        address indexed receiver
    );


    mapping(uint256 => mapping(uint256 => uint256)) campaignArtistFreeTokenMapping;
    mapping(uint256 => Campaign) public campaignList;
    mapping(uint256 => CampaignPrice) public campaignPriceList;
    mapping(uint256 => bytes32) public tokenHashMapping;
    mapping(bytes32 => uint256) public hashTokenMapping;
    mapping(uint256 => uint256) public tokenToArtistMapping;
    mapping(uint256 => address) public tokenRoyaltyMapping;

    mapping(uint256 => bool) public tokenRevealMapping;

    address public defaultRoyaltyAddress;
    uint256 public royaltyPercentage;
    uint256 public artistTokenReserve;

    bytes32 public constant CAMPAIGN_ADMIN_ROLE = keccak256("CAMPAIGN_ADMIN");
    bytes32 public constant WITHDRAW_ROLE = keccak256("WITHDRAW");

    constructor(string memory name_, string memory symbol_, uint256 artistTokenReserve_, uint256 royaltyPercentage_, address defaultRoyaltyAddress_) ERC721(name_, symbol_) {
        require(royaltyPercentage_ <= 10000, "royaltyPercentage_ must be lte 10000.");
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(CAMPAIGN_ADMIN_ROLE, _msgSender());
        _setRoleAdmin(WITHDRAW_ROLE, DEFAULT_ADMIN_ROLE);
        artistTokenReserve = artistTokenReserve_;
        royaltyPercentage = royaltyPercentage_;
        defaultRoyaltyAddress = defaultRoyaltyAddress_;
    }

    function register(address accessPassAddress,
        uint256 preSalePassId,
        uint256 vipSalePassId,
        CampaignPriceInput memory campaignPriceInput,
        string memory defaultUri,
        uint256 maxPresaleTokens,
        uint256 maxOngoingTokens,
        bool mintFromArtistEnabled) public onlyRole(CAMPAIGN_ADMIN_ROLE) returns (uint256) {

        campaignCounter.increment();
        uint256 campaignId = campaignCounter.current();
        campaignList[campaignId].state = CampaignState.PENDING;
        campaignList[campaignId].accessPassAddress = accessPassAddress;
        campaignList[campaignId].preSalePassId = preSalePassId;
        campaignList[campaignId].vipSalePassId = vipSalePassId;
        campaignList[campaignId].mintFromArtistEnabled = mintFromArtistEnabled;

        campaignList[campaignId].maxPresaleTokens = maxPresaleTokens;
        campaignList[campaignId].maxOngoingTokens = maxOngoingTokens;

        campaignPriceList[campaignId].unitPricePresale = campaignPriceInput.unitPricePresale;
        campaignPriceList[campaignId].unitPriceVipSale = campaignPriceInput.unitPriceVipSale;
        campaignPriceList[campaignId].unitPriceStartPublicSale = campaignPriceInput.unitPriceStartPublicSale;
        campaignPriceList[campaignId].unitPriceEndPublicSale = campaignPriceInput.unitPriceEndPublicSale;
        campaignPriceList[campaignId].totalBlockUntilUnitPriceEnd = campaignPriceInput.totalBlockUntilUnitPriceEnd;

        campaignList[campaignId].totalHashCount = 0;
        campaignList[campaignId].freeHashCount = 0;
        campaignList[campaignId].defaultUri = defaultUri;


        emit CampaignRegisteredEvent(
            campaignId,
            defaultUri
        );

        return campaignId;

    }

    function finishCampaign(uint256 campaignId) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(campaignList[campaignId].state == CampaignState.PAUSED || campaignList[campaignId].state == CampaignState.ONGOING, "Campaign should be started.");

        campaignList[campaignId].state = CampaignState.FINISH;

        emit CampaignStateChangedEvent(
            campaignId,
            CampaignState.FINISH
        );
    }

    function setCampaignReady(uint256 campaignId) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(campaignList[campaignId].state == CampaignState.PENDING, "Campaign should be pending.");

        campaignList[campaignId].state = CampaignState.READY;

        emit CampaignStateChangedEvent(
            campaignId,
            CampaignState.READY
        );
    }


    function startPresale(uint256 campaignId) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(campaignList[campaignId].state == CampaignState.READY
        || campaignList[campaignId].state == CampaignState.ONGOING
            || campaignList[campaignId].state == CampaignState.PAUSED, "Campaign should be READY, PAUSED or ONGOING.");

        campaignList[campaignId].state = CampaignState.PRESALE;

        emit CampaignStateChangedEvent(
            campaignId,
            CampaignState.PRESALE
        );
    }

    function startCampaign(uint256 campaignId) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(campaignList[campaignId].state == CampaignState.READY
        || campaignList[campaignId].state == CampaignState.PAUSED
            || campaignList[campaignId].state == CampaignState.PRESALE, "Campaign should be READY or PAUSED.");

        campaignList[campaignId].state = CampaignState.ONGOING;
        campaignPriceList[campaignId].publicSaleStartBlock = block.number;

        emit CampaignStateChangedEvent(
            campaignId,
            CampaignState.ONGOING
        );
    }


    function pauseCampaign(uint256 campaignId) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(campaignList[campaignId].state == CampaignState.ONGOING
            || campaignList[campaignId].state == CampaignState.PRESALE, "Campaign should be ONGOING.");

        campaignList[campaignId].state = CampaignState.PAUSED;

        emit CampaignStateChangedEvent(
            campaignId,
            CampaignState.PAUSED
        );
    }

    function update(uint256 campaignId, address accessPassAddress,
        uint256 preSalePassId,
        uint256 vipSalePassId,
        CampaignPriceInput memory campaignPriceInput,
        string memory defaultUri,
        uint256 maxPresaleTokens,
        uint256 maxOngoingTokens,
        bool mintFromArtistEnabled) public onlyRole(CAMPAIGN_ADMIN_ROLE) returns (uint256) {

        campaignList[campaignId].accessPassAddress = accessPassAddress;
        campaignList[campaignId].preSalePassId = preSalePassId;
        campaignList[campaignId].vipSalePassId = vipSalePassId;
        campaignList[campaignId].defaultUri = defaultUri;
        campaignList[campaignId].maxPresaleTokens = maxPresaleTokens;
        campaignList[campaignId].maxOngoingTokens = maxOngoingTokens;
        campaignList[campaignId].mintFromArtistEnabled = mintFromArtistEnabled;

        campaignPriceList[campaignId].unitPricePresale = campaignPriceInput.unitPricePresale;
        campaignPriceList[campaignId].unitPriceVipSale = campaignPriceInput.unitPriceVipSale;
        campaignPriceList[campaignId].unitPriceStartPublicSale = campaignPriceInput.unitPriceStartPublicSale;
        campaignPriceList[campaignId].unitPriceEndPublicSale = campaignPriceInput.unitPriceEndPublicSale;
        campaignPriceList[campaignId].totalBlockUntilUnitPriceEnd = campaignPriceInput.totalBlockUntilUnitPriceEnd;


        emit CampaignUpdatedEvent(
            campaignId,
            defaultUri
        );

        return campaignId;

    }

    function addNewHash(uint256 campaignId, bytes32[] calldata hashList, uint256[] calldata artistTokenList) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(campaignList[campaignId].state == CampaignState.PENDING, "Can not add hash to Started campaign");
        require(hashList.length == artistTokenList.length, "hashList and artistTokenList must be in same length");

        campaignList[campaignId].totalHashCount += hashList.length;
        campaignList[campaignId].freeHashCount += hashList.length;

        for (uint i = 0; i < hashList.length; i++) {
            hashListMapping[campaignId].push(NftHash(hashList[i], false));
            tokenIdCounter.increment();
            uint256 tokenId = artistTokenReserve + tokenIdCounter.current();
            hashTokenMapping[hashList[i]] = tokenId;
            tokenHashMapping[tokenId] = hashList[i];
            tokenToArtistMapping[tokenId] = artistTokenList[i];
            campaignArtistFreeTokenMapping[campaignId][artistTokenList[i]] = campaignArtistFreeTokenMapping[campaignId][artistTokenList[i]] + 1;
        }

        emit CampaignNewHashAddedEvent(
            campaignId
        );
    }

    function mintFromArtist(uint256 campaignId, uint256 artistTokenId, address receiver) public payable {
        require(campaignList[campaignId].mintFromArtistEnabled, "Minting from an artist is not enabled for this campaign.");
        uint256 price = _checkCampaignStateForMinting(campaignId);
        require(msg.value >= price, "Insufficient funds.");
        require(_exists(artistTokenId), "Artist token is nonexistent.");

        _randomMintFromArtist(campaignId, artistTokenId, receiver);

        if (msg.value > price) {
            payable(msg.sender).transfer(msg.value - price);
        }
    }

    function mint(uint256 campaignId, uint256 amount, address receiver) public payable {
        if (campaignList[campaignId].state == CampaignState.PRESALE) {
            require(amount <= campaignList[campaignId].maxPresaleTokens, "Can not mint more than allowed in presale.");
        } else {
            require(amount <= campaignList[campaignId].maxOngoingTokens, "Can not mint more than allowed.");
        }

        uint256 totalCost = 0;

        for (uint i; i < amount; i++) {
            uint256 price = _checkCampaignStateForMinting(campaignId);
            totalCost = totalCost + price;
            _randomMint(campaignId, receiver);
        }


        require(msg.value >= totalCost, "Insufficient funds.");

        if (msg.value > totalCost) {
            payable(msg.sender).transfer(msg.value - totalCost);
        }
    }

    function getOngoingPrice(uint256 campaignId) public view returns (uint256) {
        require(campaignList[campaignId].state == CampaignState.ONGOING, "Campaign is not started yet.");
        uint256 blockPasted = block.number - campaignPriceList[campaignId].publicSaleStartBlock;

        if (blockPasted > campaignPriceList[campaignId].totalBlockUntilUnitPriceEnd) {
            blockPasted = campaignPriceList[campaignId].totalBlockUntilUnitPriceEnd;
        }
        if (campaignPriceList[campaignId].unitPriceEndPublicSale > campaignPriceList[campaignId].unitPriceStartPublicSale) {
            return campaignPriceList[campaignId].unitPriceStartPublicSale + (campaignPriceList[campaignId].unitPriceEndPublicSale - campaignPriceList[campaignId].unitPriceStartPublicSale) / campaignPriceList[campaignId].totalBlockUntilUnitPriceEnd * blockPasted;
        } else {
            return campaignPriceList[campaignId].unitPriceStartPublicSale - (campaignPriceList[campaignId].unitPriceStartPublicSale - campaignPriceList[campaignId].unitPriceEndPublicSale) / campaignPriceList[campaignId].totalBlockUntilUnitPriceEnd * blockPasted;
        }
    }
    //TODO improve
    function _checkCampaignStateForMinting(uint256 campaignId) internal returns (uint256) {
        if (campaignList[campaignId].state == CampaignState.PRESALE) {
            IAccessPass accessPass = IAccessPass(campaignList[campaignId].accessPassAddress);
            if (accessPass.balanceOf(msg.sender, campaignList[campaignId].vipSalePassId) > 0) {
                accessPass.burn(msg.sender, campaignList[campaignId].vipSalePassId, 1);
                return campaignPriceList[campaignId].unitPriceVipSale;
            } else if (accessPass.balanceOf(msg.sender, campaignList[campaignId].preSalePassId) > 0) {
                accessPass.burn(msg.sender, campaignList[campaignId].preSalePassId, 1);
                return campaignPriceList[campaignId].unitPricePresale;
            } else {
                revert("No Access token.");
            }

        } else {
            return getOngoingPrice(campaignId);
        }
    }

    function preMint(uint256 campaignId, address receiver) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(campaignList[campaignId].state != CampaignState.PENDING, "Campaign is not ready yet.");
        _randomMint(campaignId, receiver);
    }

    function preMintBatch(uint256 campaignId, address[] memory receiverList) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(campaignList[campaignId].state != CampaignState.PENDING, "Campaign is not ready yet.");
        require(receiverList.length <= campaignList[campaignId].freeHashCount, "Campaign does not have enough hashes.");
        for (uint i = 0; i < receiverList.length; i++) {
            _randomMint(campaignId, receiverList[i]);
        }
    }

    function _randomMint(uint256 campaignId, address receiver) private {
        require(campaignList[campaignId].freeHashCount > 0, "All NFTs are sold.");
        uint256 random;
        if (campaignList[campaignId].freeHashCount > 1) {
            random = uint256(keccak256(abi.encodePacked(campaignList[campaignId].freeHashCount, blockhash(block.number), block.difficulty))) % campaignList[campaignId].freeHashCount;
        } else {
            random = 0;
        }

        uint256 foundAt = 0;
        uint256 unsoldCounter = 0;

        for (uint i = 0; i < campaignList[campaignId].totalHashCount; i++) {
            if (!hashListMapping[campaignId][i].sold) {
                if (unsoldCounter == random) {
                    foundAt = i;
                    break;
                }
                unsoldCounter += 1;
            }

        }

        hashListMapping[campaignId][foundAt].sold = true;
        campaignList[campaignId].freeHashCount -= 1;
        uint256 tokenId = hashTokenMapping[hashListMapping[campaignId][foundAt].hash];
        _mint(receiver, tokenId);

        _setTokenURI(tokenId, campaignList[campaignId].defaultUri);

    }

    function _randomMintFromArtist(uint256 campaignId, uint256 artistTokenId, address receiver) private {
        require(campaignArtistFreeTokenMapping[campaignId][artistTokenId] > 0, "All ntfs are sold for artist.");
        uint256 random;
        if (campaignArtistFreeTokenMapping[campaignId][artistTokenId] > 1) {
            random = uint256(keccak256(abi.encodePacked(campaignArtistFreeTokenMapping[campaignId][artistTokenId], blockhash(block.number), block.difficulty))) % campaignArtistFreeTokenMapping[campaignId][artistTokenId];
        } else {
            random = 0;
        }

        uint256 foundAt = 0;
        uint256 unsoldCounter = 0;

        for (uint i = 0; i < campaignList[campaignId].totalHashCount; i++) {
            if (!hashListMapping[campaignId][i].sold
            && artistTokenId == tokenToArtistMapping[hashTokenMapping[hashListMapping[campaignId][i].hash]]) {
                if (unsoldCounter == random) {
                    foundAt = i;
                    break;
                }
                unsoldCounter += 1;
            }

        }
        require(!hashListMapping[campaignId][foundAt].sold
        && artistTokenId == tokenToArtistMapping[hashTokenMapping[hashListMapping[campaignId][foundAt].hash]], "Token must be found.");

        campaignArtistFreeTokenMapping[campaignId][artistTokenId] = campaignArtistFreeTokenMapping[campaignId][artistTokenId] - 1;

        hashListMapping[campaignId][foundAt].sold = true;
        campaignList[campaignId].freeHashCount -= 1;
        uint256 tokenId = hashTokenMapping[hashListMapping[campaignId][foundAt].hash];
        _mint(receiver, tokenId);
        _setTokenURI(tokenId, string(abi.encodePacked(campaignList[campaignId].defaultUri, tokenId)));

    }


    function mintArtistToken(address to, string calldata uri) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        artistTokensCounter.increment();
        uint256 tokenId = artistTokensCounter.current();
        require(tokenId <= artistTokenReserve, "Artist token id reserves finished.");
        _mint(to, tokenId);
        tokenRoyaltyMapping[tokenId] = defaultRoyaltyAddress;
        _setTokenURI(tokenId, uri);

    }

    //TODO ERC20

    function withdrawERC20(address token, uint256 amount, address payable receiver) external onlyRole(WITHDRAW_ROLE) {
        IERC20(token).transfer(receiver, amount);
        emit WithdrawERC20(token, amount, receiver);
    }

    function withdrawEth(uint256 amount, address payable receiver) external onlyRole(WITHDRAW_ROLE) {
        receiver.transfer(amount);
        emit WithdrawEth(amount, receiver);
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, AccessControl, IERC165) returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId
        || interfaceId == type(IERC721).interfaceId
        || interfaceId == type(IERC2981).interfaceId
        || interfaceId == type(ERC721URIStorage).interfaceId;
    }

    function campaignCount() public view returns (uint256) {
        return campaignCounter.current();
    }

    function getCampaign(uint256 id) public view returns (Campaign memory) {
        return campaignList[id];
    }

    function getCampaignPrice(uint256 id) public view returns (CampaignPrice memory) {
        return campaignPriceList[id];
    }


    function royaltyInfo(uint256 tokenId, uint256 salePrice) external view override returns (address, uint256) {
        uint256 artistTokenId = tokenToArtistMapping[tokenId];
        address royaltyAddress = tokenRoyaltyMapping[artistTokenId];
        if (royaltyAddress == address(0)) {
            return (address(0), 0);
        }
        uint256 royaltyAmount = salePrice * royaltyPercentage / 10000;
        return (royaltyAddress, royaltyAmount);
    }

    //TODO USE default royalty address if not set.
    function setTokenRoyaltyAddress(uint256 tokenId, address royaltyAddress) external onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(_exists(tokenId), "Token must be exist to set royalty info.");
        tokenRoyaltyMapping[tokenId] = royaltyAddress;
    }

    function revealToken(uint256 tokenId, string calldata tokenUri) public onlyRole(CAMPAIGN_ADMIN_ROLE) {
        require(_exists(tokenId), "URI set of nonexistent token");
        tokenRevealMapping[tokenId] = true;
        _setTokenURI(tokenId, tokenUri);
    }

    function batchRevealToken(uint256[] calldata tokenIds, string[] calldata tokenUris) external onlyRole(CAMPAIGN_ADMIN_ROLE) {
        for (uint256 i; i < tokenIds.length; i ++) {
            revealToken(tokenIds[i], tokenUris[i]);
        }
    }

    function getCampaignHash(uint256 campaignId, uint256 hashIndex) external view returns (bytes32, bool) {
        return (hashListMapping[campaignId][hashIndex].hash, hashListMapping[campaignId][hashIndex].sold);
    }

    function getMaxTokenIndex() external view returns (uint256) {
        return tokenIdCounter.current();
    }

    function setRoyaltyPercentage(uint256 _royaltyPercentage) external onlyRole(CAMPAIGN_ADMIN_ROLE) {
        royaltyPercentage = _royaltyPercentage;
    }

}

File 2 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT

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 3 of 20 : ERC165.sol
// SPDX-License-Identifier: MIT

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 4 of 20 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

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

File 5 of 20 : Counters.sol
// SPDX-License-Identifier: MIT

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 6 of 20 : Context.sol
// SPDX-License-Identifier: MIT

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 7 of 20 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 20 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 9 of 20 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @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 override {
        super._burn(tokenId);

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

File 10 of 20 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 11 of 20 : IERC721.sol
// SPDX-License-Identifier: MIT

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`, 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 be 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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

File 12 of 20 : ERC721.sol
// SPDX-License-Identifier: MIT

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: balance query for the zero address");
        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: owner query for nonexistent token");
        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) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        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 overriden 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 owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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: transfer caller is not 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: transfer caller is not 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) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, 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);
    }

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

    /**
     * @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 of token that is not own");
        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);
    }

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

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

File 13 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 14 of 20 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 15 of 20 : IERC2981.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Called with the sale price to determine how much royalty is owed and to whom.
     * @param tokenId - the NFT asset queried for royalty information
     * @param salePrice - the sale price of the NFT asset specified by `tokenId`
     * @return receiver - address of who should be sent the royalty payment
     * @return royaltyAmount - the royalty payment amount for `salePrice`
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 16 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 17 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 18 of 20 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

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

File 19 of 20 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

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

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

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

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

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

        _revokeRole(role, account);
    }

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

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

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

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

File 20 of 20 : IAccessPass.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/access/IAccessControl.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";


interface IAccessPass is IERC1155, IERC2981 {


    function burn(
        address account,
        uint256 id,
        uint256 amount
    ) external;

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external;

    function mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) external;

    function mintBatch(
        address[] memory tos,
        uint256[] memory ids,
        uint256 amount,
        bytes memory data
    ) external;

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint256","name":"artistTokenReserve_","type":"uint256"},{"internalType":"uint256","name":"royaltyPercentage_","type":"uint256"},{"internalType":"address","name":"defaultRoyaltyAddress_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"uint256","name":"campaignId","type":"uint256"}],"name":"CampaignNewHashAddedEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"campaignId","type":"uint256"},{"indexed":false,"internalType":"string","name":"defaultUri","type":"string"}],"name":"CampaignRegisteredEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"campaignId","type":"uint256"},{"indexed":false,"internalType":"enum MojoHeads.CampaignState","name":"state","type":"uint8"}],"name":"CampaignStateChangedEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"campaignId","type":"uint256"},{"indexed":false,"internalType":"string","name":"defaultUri","type":"string"}],"name":"CampaignUpdatedEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"}],"name":"WithdrawERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"}],"name":"WithdrawEth","type":"event"},{"inputs":[],"name":"CAMPAIGN_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"},{"internalType":"bytes32[]","name":"hashList","type":"bytes32[]"},{"internalType":"uint256[]","name":"artistTokenList","type":"uint256[]"}],"name":"addNewHash","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":"artistTokenReserve","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":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"tokenUris","type":"string[]"}],"name":"batchRevealToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"campaignCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"campaignList","outputs":[{"internalType":"enum MojoHeads.CampaignState","name":"state","type":"uint8"},{"internalType":"address","name":"accessPassAddress","type":"address"},{"internalType":"uint256","name":"preSalePassId","type":"uint256"},{"internalType":"uint256","name":"vipSalePassId","type":"uint256"},{"internalType":"string","name":"defaultUri","type":"string"},{"internalType":"bool","name":"mintFromArtistEnabled","type":"bool"},{"internalType":"uint256","name":"totalHashCount","type":"uint256"},{"internalType":"uint256","name":"freeHashCount","type":"uint256"},{"internalType":"uint256","name":"maxPresaleTokens","type":"uint256"},{"internalType":"uint256","name":"maxOngoingTokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"campaignPriceList","outputs":[{"internalType":"uint256","name":"unitPricePresale","type":"uint256"},{"internalType":"uint256","name":"unitPriceVipSale","type":"uint256"},{"internalType":"uint256","name":"unitPriceStartPublicSale","type":"uint256"},{"internalType":"uint256","name":"unitPriceEndPublicSale","type":"uint256"},{"internalType":"uint256","name":"totalBlockUntilUnitPriceEnd","type":"uint256"},{"internalType":"uint256","name":"publicSaleStartBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultRoyaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"}],"name":"finishCampaign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getCampaign","outputs":[{"components":[{"internalType":"enum MojoHeads.CampaignState","name":"state","type":"uint8"},{"internalType":"address","name":"accessPassAddress","type":"address"},{"internalType":"uint256","name":"preSalePassId","type":"uint256"},{"internalType":"uint256","name":"vipSalePassId","type":"uint256"},{"internalType":"string","name":"defaultUri","type":"string"},{"internalType":"bool","name":"mintFromArtistEnabled","type":"bool"},{"internalType":"uint256","name":"totalHashCount","type":"uint256"},{"internalType":"uint256","name":"freeHashCount","type":"uint256"},{"internalType":"uint256","name":"maxPresaleTokens","type":"uint256"},{"internalType":"uint256","name":"maxOngoingTokens","type":"uint256"}],"internalType":"struct MojoHeads.Campaign","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"},{"internalType":"uint256","name":"hashIndex","type":"uint256"}],"name":"getCampaignHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getCampaignPrice","outputs":[{"components":[{"internalType":"uint256","name":"unitPricePresale","type":"uint256"},{"internalType":"uint256","name":"unitPriceVipSale","type":"uint256"},{"internalType":"uint256","name":"unitPriceStartPublicSale","type":"uint256"},{"internalType":"uint256","name":"unitPriceEndPublicSale","type":"uint256"},{"internalType":"uint256","name":"totalBlockUntilUnitPriceEnd","type":"uint256"},{"internalType":"uint256","name":"publicSaleStartBlock","type":"uint256"}],"internalType":"struct MojoHeads.CampaignPrice","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxTokenIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"}],"name":"getOngoingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"hashTokenMapping","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"campaignId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"uri","type":"string"}],"name":"mintArtistToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"},{"internalType":"uint256","name":"artistTokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mintFromArtist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"}],"name":"pauseCampaign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"preMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"},{"internalType":"address[]","name":"receiverList","type":"address[]"}],"name":"preMintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"accessPassAddress","type":"address"},{"internalType":"uint256","name":"preSalePassId","type":"uint256"},{"internalType":"uint256","name":"vipSalePassId","type":"uint256"},{"components":[{"internalType":"uint256","name":"unitPricePresale","type":"uint256"},{"internalType":"uint256","name":"unitPriceVipSale","type":"uint256"},{"internalType":"uint256","name":"unitPriceStartPublicSale","type":"uint256"},{"internalType":"uint256","name":"unitPriceEndPublicSale","type":"uint256"},{"internalType":"uint256","name":"totalBlockUntilUnitPriceEnd","type":"uint256"}],"internalType":"struct MojoHeads.CampaignPriceInput","name":"campaignPriceInput","type":"tuple"},{"internalType":"string","name":"defaultUri","type":"string"},{"internalType":"uint256","name":"maxPresaleTokens","type":"uint256"},{"internalType":"uint256","name":"maxOngoingTokens","type":"uint256"},{"internalType":"bool","name":"mintFromArtistEnabled","type":"bool"}],"name":"register","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"tokenUri","type":"string"}],"name":"revealToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyPercentage","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":"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":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"}],"name":"setCampaignReady","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_royaltyPercentage","type":"uint256"}],"name":"setRoyaltyPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"royaltyAddress","type":"address"}],"name":"setTokenRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"}],"name":"startCampaign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"}],"name":"startPresale","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenHashMapping","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenRevealMapping","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenRoyaltyMapping","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToArtistMapping","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":[{"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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"campaignId","type":"uint256"},{"internalType":"address","name":"accessPassAddress","type":"address"},{"internalType":"uint256","name":"preSalePassId","type":"uint256"},{"internalType":"uint256","name":"vipSalePassId","type":"uint256"},{"components":[{"internalType":"uint256","name":"unitPricePresale","type":"uint256"},{"internalType":"uint256","name":"unitPriceVipSale","type":"uint256"},{"internalType":"uint256","name":"unitPriceStartPublicSale","type":"uint256"},{"internalType":"uint256","name":"unitPriceEndPublicSale","type":"uint256"},{"internalType":"uint256","name":"totalBlockUntilUnitPriceEnd","type":"uint256"}],"internalType":"struct MojoHeads.CampaignPriceInput","name":"campaignPriceInput","type":"tuple"},{"internalType":"string","name":"defaultUri","type":"string"},{"internalType":"uint256","name":"maxPresaleTokens","type":"uint256"},{"internalType":"uint256","name":"maxOngoingTokens","type":"uint256"},{"internalType":"bool","name":"mintFromArtistEnabled","type":"bool"}],"name":"update","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"receiver","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"receiver","type":"address"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162005d4438038062005d44833981016040819052620000349162000444565b8451859085906200004d906000906020850190620002d1565b50805162000063906001906020840190620002d1565b505050620000806200007a6200017c60201b60201c565b62000180565b612710821115620000e55760405162461bcd60e51b815260206004820152602560248201527f726f79616c747950657263656e746167655f206d757374206265206c74652031604482015264181818181760d91b606482015260840160405180910390fd5b620000f2600033620001d2565b6200011e7f1defd8ef915dc8ec87e9048048c7076484c6d2162021b65fd4a8c056057d936333620001d2565b6200014b7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e9828696000620001e2565b601792909255601655601580546001600160a01b0319166001600160a01b0390921691909117905550620005239050565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001de82826200022d565b5050565b600082815260076020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16620001de5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200028d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620002df90620004e6565b90600052602060002090601f0160209004810192826200030357600085556200034e565b82601f106200031e57805160ff19168380011785556200034e565b828001600101855582156200034e579182015b828111156200034e57825182559160200191906001019062000331565b506200035c92915062000360565b5090565b5b808211156200035c576000815560010162000361565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200039f57600080fd5b81516001600160401b0380821115620003bc57620003bc62000377565b604051601f8301601f19908116603f01168101908282118183101715620003e757620003e762000377565b816040528381526020925086838588010111156200040457600080fd5b600091505b8382101562000428578582018301518183018401529082019062000409565b838211156200043a5760008385830101525b9695505050505050565b600080600080600060a086880312156200045d57600080fd5b85516001600160401b03808211156200047557600080fd5b6200048389838a016200038d565b965060208801519150808211156200049a57600080fd5b50620004a9888289016200038d565b6040880151606089015160808a0151929750909550935090506001600160a01b0381168114620004d857600080fd5b809150509295509295909350565b600181811c90821680620004fb57607f821691505b602082108114156200051d57634e487b7160e01b600052602260045260246000fd5b50919050565b61581180620005336000396000f3fe6080604052600436106103975760003560e01c806375fdf4f8116101dc578063c46d6d4311610102578063e34c3236116100a0578063eb785b2c1161006f578063eb785b2c14610c29578063f163108514610c49578063f2fde38b14610c76578063f593027214610c9657600080fd5b8063e34c323614610b8d578063e4bdc1e214610bad578063e7d3fe6b14610bcd578063e985e9c514610be057600080fd5b8063d547741f116100dc578063d547741f14610b03578063d6b364b114610b23578063de99347a14610b39578063e02023a114610b5957600080fd5b8063c46d6d4314610a55578063c5e5554b14610a77578063c87b56dd14610ae357600080fd5b806395d89b411161017a578063a217fddf11610149578063a217fddf146109e0578063a22cb465146109f5578063b6203ed614610a15578063b88d4fde14610a3557600080fd5b806395d89b411461096b57806397a61b1f14610980578063a132aad1146109a0578063a158657c146109c057600080fd5b80638a71bb2d116101b65780638a71bb2d146108c45780638da5cb5b146108da57806391d14854146108f857806391d401c51461093e57600080fd5b806375fdf4f81461087c57806380135dd71461088f578063870c4140146108a457600080fd5b80634912c658116102c15780635ffa61bd1161025f5780636f1ec68f1161022e5780636f1ec68f1461080257806370a0823114610832578063715018a6146108525780637274e30d1461086757600080fd5b80635ffa61bd1461078257806361ba27da146107a25780636352211e146107c25780636da16afe146107e257600080fd5b80635598f8cc1161029b5780635598f8cc14610698578063559b24ba146106c55780635653bb29146106e55780635fc3ea0b1461076257600080fd5b80634912c6581461060d5780634efbf6b2146106435780635545db0d1461067857600080fd5b8063248a9ca31161033957806335dda05a1161030857806335dda05a1461057757806336568abe146105975780633cd24bfd146105b757806342842e0e146105ed57600080fd5b8063248a9ca3146104ad5780632a55205a146104eb5780632c270b751461052a5780632f2ff15d1461055757600080fd5b8063095ea7b311610375578063095ea7b31461042b578063144cc99e1461044d57806320bdf9aa1461046d57806323b872dd1461048d57600080fd5b806301ffc9a71461039c57806306fdde03146103d1578063081812fc146103f3575b600080fd5b3480156103a857600080fd5b506103bc6103b7366004614afe565b610cb6565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506103e6610d87565b6040516103c89190614b73565b3480156103ff57600080fd5b5061041361040e366004614b86565b610e19565b6040516001600160a01b0390911681526020016103c8565b34801561043757600080fd5b5061044b610446366004614bb4565b610ec4565b005b34801561045957600080fd5b5061044b610468366004614c25565b610ff6565b34801561047957600080fd5b5061044b610488366004614b86565b611074565b34801561049957600080fd5b5061044b6104a8366004614c91565b611159565b3480156104b957600080fd5b506104dd6104c8366004614b86565b60009081526007602052604090206001015490565b6040519081526020016103c8565b3480156104f757600080fd5b5061050b610506366004614cd2565b6111e0565b604080516001600160a01b0390931683526020830191909152016103c8565b34801561053657600080fd5b506104dd610545366004614b86565b60106020526000908152604090205481565b34801561056357600080fd5b5061044b610572366004614cf4565b611249565b34801561058357600080fd5b5061044b610592366004614b86565b61126f565b3480156105a357600080fd5b5061044b6105b2366004614cf4565b6113d9565b3480156105c357600080fd5b506104136105d2366004614b86565b6013602052600090815260409020546001600160a01b031681565b3480156105f957600080fd5b5061044b610608366004614c91565b611465565b34801561061957600080fd5b5061062d610628366004614b86565b611480565b6040516103c89a99989796959493929190614d5c565b34801561064f57600080fd5b5061066361065e366004614cd2565b611566565b604080519283529015156020830152016103c8565b34801561068457600080fd5b5061044b610693366004614b86565b6115e2565b3480156106a457600080fd5b506106b86106b3366004614b86565b6116eb565b6040516103c89190614dc8565b3480156106d157600080fd5b5061044b6106e0366004614ebd565b611890565b3480156106f157600080fd5b50610735610700366004614b86565b600f60205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909186565b604080519687526020870195909552938501929092526060840152608083015260a082015260c0016103c8565b34801561076e57600080fd5b5061044b61077d366004614f7b565b6119e9565b34801561078e57600080fd5b506104dd61079d3660046150b3565b611af7565b3480156107ae57600080fd5b5061044b6107bd366004614b86565b611d65565b3480156107ce57600080fd5b506104136107dd366004614b86565b611d84565b3480156107ee57600080fd5b506104dd6107fd366004614b86565b611e0f565b34801561080e57600080fd5b506103bc61081d366004614b86565b60146020526000908152604090205460ff1681565b34801561083e57600080fd5b506104dd61084d366004615154565b611fad565b34801561085e57600080fd5b5061044b612047565b34801561087357600080fd5b506104dd6120ad565b61044b61088a366004615171565b6120bd565b34801561089b57600080fd5b506104dd612255565b3480156108b057600080fd5b5061044b6108bf366004614cf4565b612260565b3480156108d057600080fd5b506104dd60165481565b3480156108e657600080fd5b506008546001600160a01b0316610413565b34801561090457600080fd5b506103bc610913366004614cf4565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561094a57600080fd5b506104dd610959366004614b86565b60116020526000908152604090205481565b34801561097757600080fd5b506103e661233f565b34801561098c57600080fd5b5061044b61099b366004614cf4565b61234e565b3480156109ac57600080fd5b5061044b6109bb366004614b86565b6123e2565b3480156109cc57600080fd5b5061044b6109db366004614cf4565b61253e565b3480156109ec57600080fd5b506104dd600081565b348015610a0157600080fd5b5061044b610a1036600461519f565b6125db565b348015610a2157600080fd5b5061044b610a3036600461520f565b6126a0565b348015610a4157600080fd5b5061044b610a5036600461525b565b612775565b348015610a6157600080fd5b506104dd6000805160206157bc83398151915281565b348015610a8357600080fd5b50610a97610a92366004614b86565b6127fd565b6040516103c89190600060c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015292915050565b348015610aef57600080fd5b506103e6610afe366004614b86565b61288f565b348015610b0f57600080fd5b5061044b610b1e366004614cf4565b612a22565b348015610b2f57600080fd5b506104dd60175481565b348015610b4557600080fd5b5061044b610b54366004614b86565b612a48565b348015610b6557600080fd5b506104dd7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286981565b348015610b9957600080fd5b506104dd610ba83660046152db565b612b51565b348015610bb957600080fd5b5061044b610bc8366004615385565b612c82565b61044b610bdb366004615171565b612fef565b348015610bec57600080fd5b506103bc610bfb3660046153ff565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610c3557600080fd5b5061044b610c4436600461542d565b61319a565b348015610c5557600080fd5b506104dd610c64366004614b86565b60126020526000908152604090205481565b348015610c8257600080fd5b5061044b610c91366004615154565b6132cc565b348015610ca257600080fd5b50601554610413906001600160a01b031681565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610d1957506001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000145b80610d4d57506001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000145b80610d8157506001600160e01b031982167fc87b56dd00000000000000000000000000000000000000000000000000000000145b92915050565b606060008054610d9690615469565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc290615469565b8015610e0f5780601f10610de457610100808354040283529160200191610e0f565b820191906000526020600020905b815481529060010190602001808311610df257829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610ea85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610ecf82611d84565b9050806001600160a01b0316836001600160a01b03161415610f595760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b336001600160a01b0382161480610f755750610f758133610bfb565b610fe75760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610e9f565b610ff183836133ae565b505050565b6000805160206157bc83398151915261100f8133613429565b60005b8481101561106c5761105a86868381811061102f5761102f61549e565b905060200201358585848181106110485761104861549e565b9050602002810190610a3091906154b4565b8061106481615511565b915050611012565b505050505050565b6000805160206157bc83398151915261108d8133613429565b6000828152600e602052604081205460ff1660058111156110b0576110b0614d24565b146110fd5760405162461bcd60e51b815260206004820152601b60248201527f43616d706169676e2073686f756c642062652070656e64696e672e00000000006044820152606401610e9f565b6000828152600e6020526040902080546001919060ff191682800217905550817f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d600160405161114d919061552c565b60405180910390a25050565b61116333826134a9565b6111d55760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610e9f565b610ff18383836135ad565b60008281526012602090815260408083205480845260139092528220548291906001600160a01b03168061121c57600080935093505050611242565b60006127106016548761122f919061553a565b611239919061556f565b91945090925050505b9250929050565b6000828152600760205260409020600101546112658133613429565b610ff18383613787565b6000805160206157bc8339815191526112888133613429565b60016000838152600e602052604090205460ff1660058111156112ad576112ad614d24565b14806112db575060046000838152600e602052604090205460ff1660058111156112d9576112d9614d24565b145b80611308575060026000838152600e602052604090205460ff16600581111561130657611306614d24565b145b61137a5760405162461bcd60e51b815260206004820152602360248201527f43616d706169676e2073686f756c64206265205245414459206f72205041555360448201527f45442e00000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b6000828152600e60209081526040808320805460ff19166003908117909155600f9092529182902043600590910155905183917f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d9161114d919061552c565b6001600160a01b03811633146114575760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610e9f565b6114618282613829565b5050565b610ff183838360405180602001604052806000815250612775565b600e60205260009081526040902080546001820154600283015460038401805460ff8516956101009095046001600160a01b03169491906114c090615469565b80601f01602080910402602001604051908101604052809291908181526020018280546114ec90615469565b80156115395780601f1061150e57610100808354040283529160200191611539565b820191906000526020600020905b81548152906001019060200180831161151c57829003601f168201915b5050506004840154600585015460068601546007870154600890970154959660ff9093169591945092508a565b6000828152600c602052604081208054829190849081106115895761158961549e565b906000526020600020906002020160000154600c600086815260200190815260200160002084815481106115bf576115bf61549e565b600091825260209091206001600290920201015490925060ff1690509250929050565b6000805160206157bc8339815191526115fb8133613429565b60046000838152600e602052604090205460ff16600581111561162057611620614d24565b148061164e575060036000838152600e602052604090205460ff16600581111561164c5761164c614d24565b145b61169a5760405162461bcd60e51b815260206004820152601b60248201527f43616d706169676e2073686f756c6420626520737461727465642e00000000006044820152606401610e9f565b6000828152600e6020526040902080546005919060ff19166001830217905550817f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d600560405161114d919061552c565b61174d604080516101408101909152806000815260200160006001600160a01b03168152602001600081526020016000815260200160608152602001600015158152602001600081526020016000815260200160008152602001600081525090565b6000828152600e602052604090819020815161014081019092528054829060ff16600581111561177f5761177f614d24565b600581111561179057611790614d24565b8152815461010090046001600160a01b0316602082015260018201546040820152600282015460608201526003820180546080909201916117d090615469565b80601f01602080910402602001604051908101604052809291908181526020018280546117fc90615469565b80156118495780601f1061181e57610100808354040283529160200191611849565b820191906000526020600020905b81548152906001019060200180831161182c57829003601f168201915b5050509183525050600482015460ff161515602082015260058201546040820152600682015460608201526007820154608082015260089091015460a09091015292915050565b6000805160206157bc8339815191526118a98133613429565b6000838152600e602052604081205460ff1660058111156118cc576118cc614d24565b141561191a5760405162461bcd60e51b815260206004820152601a60248201527f43616d706169676e206973206e6f74207265616479207965742e0000000000006044820152606401610e9f565b6000838152600e6020526040902060060154825111156119a25760405162461bcd60e51b815260206004820152602560248201527f43616d706169676e20646f6573206e6f74206861766520656e6f75676820686160448201527f736865732e0000000000000000000000000000000000000000000000000000006064820152608401610e9f565b60005b82518110156119e3576119d1848483815181106119c4576119c461549e565b60200260200101516138ac565b806119db81615511565b9150506119a5565b50505050565b7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e982869611a148133613429565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820185905285169063a9059cbb90604401602060405180830381600087803b158015611a7757600080fd5b505af1158015611a8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aaf9190615583565b50816001600160a01b031683856001600160a01b03167f15e848750ab66cd66f07bebaf8dab757d6d4af0895afc4ff867f35baf163ee2d60405160405180910390a450505050565b60006000805160206157bc833981519152611b128133613429565b611b20600a80546001019055565b6000611b2b600a5490565b6000818152600e602052604081208054929350909160ff191660018302179055508a600e600083815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555089600e60008381526020019081526020016000206001018190555088600e60008381526020019081526020016000206002018190555083600e600083815260200190815260200160002060040160006101000a81548160ff02191690831515021790555085600e60008381526020019081526020016000206007018190555084600e6000838152602001908152602001600020600801819055508760000151600f6000838152602001908152602001600020600001819055508760200151600f6000838152602001908152602001600020600101819055508760400151600f6000838152602001908152602001600020600201819055508760600151600f6000838152602001908152602001600020600301819055508760800151600f6000838152602001908152602001600020600401819055506000600e6000838152602001908152602001600020600501819055506000600e60008381526020019081526020016000206006018190555086600e60008381526020019081526020016000206003019080519060200190611d1e929190614a4f565b50807fa6afb3a5ab1f546b8412c26146095429ff8e45e24f585babc27f0b2b954ee63c88604051611d4f9190614b73565b60405180910390a29a9950505050505050505050565b6000805160206157bc833981519152611d7e8133613429565b50601655565b6000818152600260205260408120546001600160a01b031680610d815760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610e9f565b600060036000838152600e602052604090205460ff166005811115611e3657611e36614d24565b14611e835760405162461bcd60e51b815260206004820152601c60248201527f43616d706169676e206973206e6f742073746172746564207965742e000000006044820152606401610e9f565b6000828152600f6020526040812060050154611e9f90436155a0565b6000848152600f6020526040902060040154909150811115611ecf57506000828152600f60205260409020600401545b6000838152600f6020526040902060028101546003909101541115611f4e576000838152600f60205260409020600481015460028201546003909201548392611f17916155a0565b611f21919061556f565b611f2b919061553a565b6000848152600f6020526040902060020154611f4791906155b7565b9392505050565b6000838152600f60205260409020600481015460038201546002909201548392611f77916155a0565b611f81919061556f565b611f8b919061553a565b6000848152600f6020526040902060020154611f4791906155a0565b50919050565b60006001600160a01b03821661202b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610e9f565b506001600160a01b031660009081526003602052604090205490565b6008546001600160a01b031633146120a15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e9f565b6120ab6000613b72565b565b60006120b8600a5490565b905090565b6000838152600e602052604090206004015460ff166121445760405162461bcd60e51b815260206004820152603860248201527f4d696e74696e672066726f6d20616e20617274697374206973206e6f7420656e60448201527f61626c656420666f7220746869732063616d706169676e2e00000000000000006064820152608401610e9f565b600061214f84613bd1565b9050803410156121a15760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e64732e000000000000000000000000006044820152606401610e9f565b6000838152600260205260409020546001600160a01b03166122055760405162461bcd60e51b815260206004820152601c60248201527f41727469737420746f6b656e206973206e6f6e6578697374656e742e000000006044820152606401610e9f565b612210848484613ea5565b803411156119e357336108fc61222683346155a0565b6040518115909202916000818181858888f1935050505015801561224e573d6000803e3d6000fd5b5050505050565b60006120b860095490565b6000805160206157bc8339815191526122798133613429565b6000838152600260205260409020546001600160a01b03166123035760405162461bcd60e51b815260206004820152602860248201527f546f6b656e206d75737420626520657869737420746f2073657420726f79616c60448201527f747920696e666f2e0000000000000000000000000000000000000000000000006064820152608401610e9f565b50600091825260136020526040909120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b606060018054610d9690615469565b6000805160206157bc8339815191526123678133613429565b6000838152600e602052604081205460ff16600581111561238a5761238a614d24565b14156123d85760405162461bcd60e51b815260206004820152601a60248201527f43616d706169676e206973206e6f74207265616479207965742e0000000000006044820152606401610e9f565b610ff183836138ac565b6000805160206157bc8339815191526123fb8133613429565b60016000838152600e602052604090205460ff16600581111561242057612420614d24565b148061244e575060036000838152600e602052604090205460ff16600581111561244c5761244c614d24565b145b8061247b575060046000838152600e602052604090205460ff16600581111561247957612479614d24565b145b6124ed5760405162461bcd60e51b815260206004820152602c60248201527f43616d706169676e2073686f756c642062652052454144592c2050415553454460448201527f206f72204f4e474f494e472e00000000000000000000000000000000000000006064820152608401610e9f565b6000828152600e6020526040902080546002919060ff19166001830217905550817f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d600260405161114d919061552c565b7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e9828696125698133613429565b6040516001600160a01b0383169084156108fc029085906000818181858888f1935050505015801561259f573d6000803e3d6000fd5b506040516001600160a01b0383169084907fdb987c1c65c75a9e9046a3ca9bdc236b547e784f7077581105a193d618c2e3a590600090a3505050565b6001600160a01b0382163314156126345760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610e9f565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000805160206157bc8339815191526126b98133613429565b6000848152600260205260409020546001600160a01b031661271d5760405162461bcd60e51b815260206004820152601c60248201527f55524920736574206f66206e6f6e6578697374656e7420746f6b656e000000006044820152606401610e9f565b600084815260146020908152604091829020805460ff191660011790558151601f85018290048202810182019092528382526119e391869186908690819084018382808284376000920191909152506142b392505050565b61277f33836134a9565b6127f15760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610e9f565b6119e38484848461435c565b6128366040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b506000908152600f6020908152604091829020825160c08101845281548152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260059091015460a082015290565b6000818152600260205260409020546060906001600160a01b031661291c5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006064820152608401610e9f565b6000828152600660205260408120805461293590615469565b80601f016020809104026020016040519081016040528092919081815260200182805461296190615469565b80156129ae5780601f10612983576101008083540402835291602001916129ae565b820191906000526020600020905b81548152906001019060200180831161299157829003601f168201915b5050505050905060006129cc60408051602081019091526000815290565b90508051600014156129df575092915050565b815115612a115780826040516020016129f99291906155cf565b60405160208183030381529060405292505050919050565b612a1a846143e5565b949350505050565b600082815260076020526040902060010154612a3e8133613429565b610ff18383613829565b6000805160206157bc833981519152612a618133613429565b60036000838152600e602052604090205460ff166005811115612a8657612a86614d24565b1480612ab4575060026000838152600e602052604090205460ff166005811115612ab257612ab2614d24565b145b612b005760405162461bcd60e51b815260206004820152601b60248201527f43616d706169676e2073686f756c64206265204f4e474f494e472e00000000006044820152606401610e9f565b6000828152600e6020526040902080546004919060ff19166001830217905550817f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d600460405161114d919061552c565b60006000805160206157bc833981519152612b6c8133613429565b60008b8152600e6020908152604090912080547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038e1602178155600181018b9055600281018a90558751612bd492600390920191890190614a4f565b5060008b8152600e6020908152604080832060078101899055600881018890556004908101805460ff19168815151790558a51600f845293829020938455918a0151600184015589810151600284015560608a0151600384015560808a01519290910191909155518b907f0177b669f57c071a194a1b5dc964c464a844367a5851384ecf8329867757282890612c6b908990614b73565b60405180910390a250989998505050505050505050565b6000805160206157bc833981519152612c9b8133613429565b6000868152600e602052604081205460ff166005811115612cbe57612cbe614d24565b14612d305760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f7420616464206861736820746f20537461727465642063616d7060448201527f6169676e000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b838214612da55760405162461bcd60e51b815260206004820152603360248201527f686173684c69737420616e6420617274697374546f6b656e4c697374206d757360448201527f7420626520696e2073616d65206c656e677468000000000000000000000000006064820152608401610e9f565b6000868152600e602052604081206005018054869290612dc69084906155b7565b90915550506000868152600e602052604081206006018054869290612dec9084906155b7565b90915550600090505b84811015612fbb57600c60008881526020019081526020016000206040518060400160405280888885818110612e2d57612e2d61549e565b60209081029290920135835250600091810182905283546001818101865594835291819020835160029093020191825591909101519101805491151560ff19909216919091179055612e83600980546001019055565b6000612e8e60095490565b601754612e9b91906155b7565b90508060116000898986818110612eb457612eb461549e565b90506020020135815260200190815260200160002081905550868683818110612edf57612edf61549e565b905060200201356010600083815260200190815260200160002081905550848483818110612f0f57612f0f61549e565b600084815260126020908152604080832093820295909501359092558b8152600d909152918220919050868685818110612f4b57612f4b61549e565b905060200201358152602001908152602001600020546001612f6d91906155b7565b6000898152600d6020526040812090878786818110612f8e57612f8e61549e565b90506020020135815260200190815260200160002081905550508080612fb390615511565b915050612df5565b5060405186907f10186e690c23a168df268408652525dd4fc307fea5875f017ef9734b90dbc63b90600090a2505050505050565b60026000848152600e602052604090205460ff16600581111561301457613014614d24565b14156130a6576000838152600e60205260409020600701548211156130a15760405162461bcd60e51b815260206004820152602a60248201527f43616e206e6f74206d696e74206d6f7265207468616e20616c6c6f776564206960448201527f6e2070726573616c652e000000000000000000000000000000000000000000006064820152608401610e9f565b613107565b6000838152600e60205260409020600801548211156131075760405162461bcd60e51b815260206004820152601f60248201527f43616e206e6f74206d696e74206d6f7265207468616e20616c6c6f7765642e006044820152606401610e9f565b6000805b8381101561314957600061311e86613bd1565b905061312a81846155b7565b925061313686856138ac565b508061314181615511565b91505061310b565b50803410156122105760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e64732e000000000000000000000000006044820152606401610e9f565b6000805160206157bc8339815191526131b38133613429565b6131c1600b80546001019055565b60006131cc600b5490565b90506017548111156132465760405162461bcd60e51b815260206004820152602260248201527f41727469737420746f6b656e2069642072657365727665732066696e6973686560448201527f642e0000000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b61325085826144da565b601554600082815260136020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909416939093179092558051601f860183900483028101830190915284815261224e9183919087908790819084018382808284376000920191909152506142b392505050565b6008546001600160a01b031633146133265760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e9f565b6001600160a01b0381166133a25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610e9f565b6133ab81613b72565b50565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906133f082611d84565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff1661146157613467816001600160a01b03166014614629565b613472836020614629565b6040516020016134839291906155fe565b60408051601f198184030181529082905262461bcd60e51b8252610e9f91600401614b73565b6000818152600260205260408120546001600160a01b03166135335760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610e9f565b600061353e83611d84565b9050806001600160a01b0316846001600160a01b031614806135795750836001600160a01b031661356e84610e19565b6001600160a01b0316145b80612a1a57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16612a1a565b826001600160a01b03166135c082611d84565b6001600160a01b03161461363c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610e9f565b6001600160a01b0382166136b75760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b6136c26000826133ae565b6001600160a01b03831660009081526003602052604081208054600192906136eb9084906155a0565b90915550506001600160a01b03821660009081526003602052604081208054600192906137199084906155b7565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166114615760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556137e53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156114615760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000828152600e602052604090206006015461390a5760405162461bcd60e51b815260206004820152601260248201527f416c6c204e4654732061726520736f6c642e00000000000000000000000000006044820152606401610e9f565b6000828152600e60205260408120600601546001101561397e576000838152600e60209081526040918290206006015482519182018190524340928201929092524460608201526080016040516020818303038152906040528051906020012060001c613977919061567f565b9050613982565b5060005b60008060005b6000868152600e6020526040902060050154811015613a0c576000868152600c602052604090208054829081106139c1576139c161549e565b600091825260209091206001600290920201015460ff166139fa57838214156139ec57809250613a0c565b6139f76001836155b7565b91505b80613a0481615511565b915050613988565b506000858152600c6020526040902080546001919084908110613a3157613a3161549e565b6000918252602080832060016002909302018201805494151560ff1990951694909417909355878252600e909252604081206006018054909190613a769084906155a0565b90915550506000858152600c602052604081208054601191839186908110613aa057613aa061549e565b9060005260206000209060020201600001548152602001908152602001600020549050613acd85826144da565b6000868152600e60205260409020600301805461106c918391613aef90615469565b80601f0160208091040260200160405190810160405280929190818152602001828054613b1b90615469565b8015613b685780601f10613b3d57610100808354040283529160200191613b68565b820191906000526020600020905b815481529060010190602001808311613b4b57829003601f168201915b50505050506142b3565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060026000838152600e602052604090205460ff166005811115613bf857613bf8614d24565b1415613e9c576000828152600e602052604080822080546002909101549151627eeac760e11b8152336004820152602481019290925261010090046001600160a01b03169190829062fdd58e9060440160206040518083038186803b158015613c6057600080fd5b505afa158015613c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c989190615693565b1115613d30576000838152600e602052604090819020600201549051637a94c56560e11b81523360048201526024810191909152600160448201526001600160a01b0382169063f5298aca90606401600060405180830381600087803b158015613d0157600080fd5b505af1158015613d15573d6000803e3d6000fd5b50505060009384525050600f60205250604090206001015490565b6000838152600e6020526040808220600101549051627eeac760e11b815233600482015260248101919091526001600160a01b0383169062fdd58e9060440160206040518083038186803b158015613d8757600080fd5b505afa158015613d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dbf9190615693565b1115613e54576000838152600e6020526040908190206001908101549151637a94c56560e11b8152336004820152602481019290925260448201526001600160a01b0382169063f5298aca90606401600060405180830381600087803b158015613e2857600080fd5b505af1158015613e3c573d6000803e3d6000fd5b50505060009384525050600f60205250604090205490565b60405162461bcd60e51b815260206004820152601060248201527f4e6f2041636365737320746f6b656e2e000000000000000000000000000000006044820152606401610e9f565b610d8182611e0f565b6000838152600d60209081526040808320858452909152902054613f0b5760405162461bcd60e51b815260206004820152601d60248201527f416c6c206e7466732061726520736f6c6420666f72206172746973742e0000006044820152606401610e9f565b6000838152600d6020908152604080832085845290915281205460011015613f8c576000848152600d602090815260408083208684528252918290205482519182018190524340928201929092524460608201526080016040516020818303038152906040528051906020012060001c613f85919061567f565b9050613f90565b5060005b60008060005b6000878152600e6020526040902060050154811015614082576000878152600c60205260409020805482908110613fcf57613fcf61549e565b600091825260209091206001600290920201015460ff1615801561404d57506012600060116000600c60008c8152602001908152602001600020858154811061401a5761401a61549e565b90600052602060002090600202016000015481526020019081526020016000205481526020019081526020016000205486145b15614070578382141561406257809250614082565b61406d6001836155b7565b91505b8061407a81615511565b915050613f96565b506000868152600c602052604090208054839081106140a3576140a361549e565b600091825260209091206001600290920201015460ff1615801561412157506012600060116000600c60008b815260200190815260200160002086815481106140ee576140ee61549e565b90600052602060002090600202016000015481526020019081526020016000205481526020019081526020016000205485145b61416d5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206d75737420626520666f756e642e0000000000000000000000006044820152606401610e9f565b6000868152600d60209081526040808320888452909152902054614193906001906155a0565b6000878152600d60209081526040808320898452825280832093909355888252600c905220805460019190849081106141ce576141ce61549e565b6000918252602080832060016002909302018201805494151560ff1990951694909417909355888252600e9092526040812060060180549091906142139084906155a0565b90915550506000868152600c60205260408120805460119183918690811061423d5761423d61549e565b906000526020600020906002020160000154815260200190815260200160002054905061426a85826144da565b6142aa81600e60008a8152602001908152602001600020600301836040516020016142969291906156ac565b6040516020818303038152906040526142b3565b50505050505050565b6000828152600260205260409020546001600160a01b031661433d5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610e9f565b60008281526006602090815260409091208251610ff192840190614a4f565b6143678484846135ad565b614373848484846147ee565b6119e35760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610e9f565b6000818152600260205260409020546060906001600160a01b03166144725760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610e9f565b600061448960408051602081019091526000815290565b905060008151116144a95760405180602001604052806000815250611f47565b806144b384614951565b6040516020016144c49291906155cf565b6040516020818303038152906040529392505050565b6001600160a01b0382166145305760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610e9f565b6000818152600260205260409020546001600160a01b0316156145955760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e9f565b6001600160a01b03821660009081526003602052604081208054600192906145be9084906155b7565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060600061463883600261553a565b6146439060026155b7565b67ffffffffffffffff81111561465b5761465b614e76565b6040519080825280601f01601f191660200182016040528015614685576020820181803683370190505b509050600360fc1b816000815181106146a0576146a061549e565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106146eb576146eb61549e565b60200101906001600160f81b031916908160001a905350600061470f84600261553a565b61471a9060016155b7565b90505b600181111561479f577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061475b5761475b61549e565b1a60f81b8282815181106147715761477161549e565b60200101906001600160f81b031916908160001a90535060049490941c936147988161574b565b905061471d565b508315611f475760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e9f565b60006001600160a01b0384163b1561494657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614832903390899088908890600401615762565b602060405180830381600087803b15801561484c57600080fd5b505af192505050801561487c575060408051601f3d908101601f191682019092526148799181019061579e565b60015b61492c573d8080156148aa576040519150601f19603f3d011682016040523d82523d6000602084013e6148af565b606091505b5080516149245760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610e9f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612a1a565b506001949350505050565b6060816149755750506040805180820190915260018152600360fc1b602082015290565b8160005b811561499f578061498981615511565b91506149989050600a8361556f565b9150614979565b60008167ffffffffffffffff8111156149ba576149ba614e76565b6040519080825280601f01601f1916602001820160405280156149e4576020820181803683370190505b5090505b8415612a1a576149f96001836155a0565b9150614a06600a8661567f565b614a119060306155b7565b60f81b818381518110614a2657614a2661549e565b60200101906001600160f81b031916908160001a905350614a48600a8661556f565b94506149e8565b828054614a5b90615469565b90600052602060002090601f016020900481019282614a7d5760008555614ac3565b82601f10614a9657805160ff1916838001178555614ac3565b82800160010185558215614ac3579182015b82811115614ac3578251825591602001919060010190614aa8565b50614acf929150614ad3565b5090565b5b80821115614acf5760008155600101614ad4565b6001600160e01b0319811681146133ab57600080fd5b600060208284031215614b1057600080fd5b8135611f4781614ae8565b60005b83811015614b36578181015183820152602001614b1e565b838111156119e35750506000910152565b60008151808452614b5f816020860160208601614b1b565b601f01601f19169290920160200192915050565b602081526000611f476020830184614b47565b600060208284031215614b9857600080fd5b5035919050565b6001600160a01b03811681146133ab57600080fd5b60008060408385031215614bc757600080fd5b8235614bd281614b9f565b946020939093013593505050565b60008083601f840112614bf257600080fd5b50813567ffffffffffffffff811115614c0a57600080fd5b6020830191508360208260051b850101111561124257600080fd5b60008060008060408587031215614c3b57600080fd5b843567ffffffffffffffff80821115614c5357600080fd5b614c5f88838901614be0565b90965094506020870135915080821115614c7857600080fd5b50614c8587828801614be0565b95989497509550505050565b600080600060608486031215614ca657600080fd5b8335614cb181614b9f565b92506020840135614cc181614b9f565b929592945050506040919091013590565b60008060408385031215614ce557600080fd5b50508035926020909101359150565b60008060408385031215614d0757600080fd5b823591506020830135614d1981614b9f565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b60068110614d5857634e487b7160e01b600052602160045260246000fd5b9052565b6000610140614d6b838e614d3a565b6001600160a01b038c1660208401528a6040840152896060840152806080840152614d988184018a614b47565b97151560a0840152505060c081019490945260e08401929092526101008301526101209091015295945050505050565b60208152614dda602082018351614d3a565b60006020830151614df660408401826001600160a01b03169052565b50604083015160608301526060830151608083015260808301516101408060a0850152614e27610160850183614b47565b915060a0850151614e3c60c086018215159052565b5060c085015160e0858101919091528501516101008086019190915285015161012080860191909152909401519390920192909252919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614eb557614eb5614e76565b604052919050565b60008060408385031215614ed057600080fd5b8235915060208084013567ffffffffffffffff80821115614ef057600080fd5b818601915086601f830112614f0457600080fd5b813581811115614f1657614f16614e76565b8060051b9150614f27848301614e8c565b8181529183018401918481019089841115614f4157600080fd5b938501935b83851015614f6b5784359250614f5b83614b9f565b8282529385019390850190614f46565b8096505050505050509250929050565b600080600060608486031215614f9057600080fd5b8335614f9b81614b9f565b9250602084013591506040840135614fb281614b9f565b809150509250925092565b600060a08284031215614fcf57600080fd5b60405160a0810181811067ffffffffffffffff82111715614ff257614ff2614e76565b806040525080915082358152602083013560208201526040830135604082015260608301356060820152608083013560808201525092915050565b600067ffffffffffffffff83111561504757615047614e76565b61505a601f8401601f1916602001614e8c565b905082815283838301111561506e57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261509657600080fd5b611f478383356020850161502d565b80151581146133ab57600080fd5b600080600080600080600080610180898b0312156150d057600080fd5b88356150db81614b9f565b975060208901359650604089013595506150f88a60608b01614fbd565b945061010089013567ffffffffffffffff81111561511557600080fd5b6151218b828c01615085565b94505061012089013592506101408901359150610160890135615143816150a5565b809150509295985092959890939650565b60006020828403121561516657600080fd5b8135611f4781614b9f565b60008060006060848603121561518657600080fd5b83359250602084013591506040840135614fb281614b9f565b600080604083850312156151b257600080fd5b82356151bd81614b9f565b91506020830135614d19816150a5565b60008083601f8401126151df57600080fd5b50813567ffffffffffffffff8111156151f757600080fd5b60208301915083602082850101111561124257600080fd5b60008060006040848603121561522457600080fd5b83359250602084013567ffffffffffffffff81111561524257600080fd5b61524e868287016151cd565b9497909650939450505050565b6000806000806080858703121561527157600080fd5b843561527c81614b9f565b9350602085013561528c81614b9f565b925060408501359150606085013567ffffffffffffffff8111156152af57600080fd5b8501601f810187136152c057600080fd5b6152cf8782356020840161502d565b91505092959194509250565b60008060008060008060008060006101a08a8c0312156152fa57600080fd5b8935985060208a013561530c81614b9f565b975060408a0135965060608a013595506153298b60808c01614fbd565b94506101208a013567ffffffffffffffff81111561534657600080fd5b6153528c828d01615085565b9450506101408a013592506101608a013591506101808a0135615374816150a5565b809150509295985092959850929598565b60008060008060006060868803121561539d57600080fd5b85359450602086013567ffffffffffffffff808211156153bc57600080fd5b6153c889838a01614be0565b909650945060408801359150808211156153e157600080fd5b506153ee88828901614be0565b969995985093965092949392505050565b6000806040838503121561541257600080fd5b823561541d81614b9f565b91506020830135614d1981614b9f565b60008060006040848603121561544257600080fd5b833561544d81614b9f565b9250602084013567ffffffffffffffff81111561524257600080fd5b600181811c9082168061547d57607f821691505b60208210811415611fa757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126154cb57600080fd5b83018035915067ffffffffffffffff8211156154e657600080fd5b60200191503681900382131561124257600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415615525576155256154fb565b5060010190565b60208101610d818284614d3a565b6000816000190483118215151615615554576155546154fb565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261557e5761557e615559565b500490565b60006020828403121561559557600080fd5b8151611f47816150a5565b6000828210156155b2576155b26154fb565b500390565b600082198211156155ca576155ca6154fb565b500190565b600083516155e1818460208801614b1b565b8351908301906155f5818360208801614b1b565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615636816017850160208801614b1b565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615673816028840160208801614b1b565b01602801949350505050565b60008261568e5761568e615559565b500690565b6000602082840312156156a557600080fd5b5051919050565b600080845481600182811c9150808316806156c857607f831692505b60208084108214156156e857634e487b7160e01b86526022600452602486fd5b8180156156fc576001811461570d5761573a565b60ff1986168952848901965061573a565b60008b81526020902060005b868110156157325781548b820152908501908301615719565b505084890196505b509785525050509301949350505050565b60008161575a5761575a6154fb565b506000190190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526157946080830184614b47565b9695505050505050565b6000602082840312156157b057600080fd5b8151611f4781614ae856fe1defd8ef915dc8ec87e9048048c7076484c6d2162021b65fd4a8c056057d9363a2646970667358221220ccc2346e017a0538e5e26b28b19c3d60bbd2927ecff399df520b2718dd9dfbc364736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000003e80000000000000000000000009faa9c42be3e8e7908b96344fbb8d84f9517e42400000000000000000000000000000000000000000000000000000000000000094d6f6a6f4865616473000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034d4a480000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106103975760003560e01c806375fdf4f8116101dc578063c46d6d4311610102578063e34c3236116100a0578063eb785b2c1161006f578063eb785b2c14610c29578063f163108514610c49578063f2fde38b14610c76578063f593027214610c9657600080fd5b8063e34c323614610b8d578063e4bdc1e214610bad578063e7d3fe6b14610bcd578063e985e9c514610be057600080fd5b8063d547741f116100dc578063d547741f14610b03578063d6b364b114610b23578063de99347a14610b39578063e02023a114610b5957600080fd5b8063c46d6d4314610a55578063c5e5554b14610a77578063c87b56dd14610ae357600080fd5b806395d89b411161017a578063a217fddf11610149578063a217fddf146109e0578063a22cb465146109f5578063b6203ed614610a15578063b88d4fde14610a3557600080fd5b806395d89b411461096b57806397a61b1f14610980578063a132aad1146109a0578063a158657c146109c057600080fd5b80638a71bb2d116101b65780638a71bb2d146108c45780638da5cb5b146108da57806391d14854146108f857806391d401c51461093e57600080fd5b806375fdf4f81461087c57806380135dd71461088f578063870c4140146108a457600080fd5b80634912c658116102c15780635ffa61bd1161025f5780636f1ec68f1161022e5780636f1ec68f1461080257806370a0823114610832578063715018a6146108525780637274e30d1461086757600080fd5b80635ffa61bd1461078257806361ba27da146107a25780636352211e146107c25780636da16afe146107e257600080fd5b80635598f8cc1161029b5780635598f8cc14610698578063559b24ba146106c55780635653bb29146106e55780635fc3ea0b1461076257600080fd5b80634912c6581461060d5780634efbf6b2146106435780635545db0d1461067857600080fd5b8063248a9ca31161033957806335dda05a1161030857806335dda05a1461057757806336568abe146105975780633cd24bfd146105b757806342842e0e146105ed57600080fd5b8063248a9ca3146104ad5780632a55205a146104eb5780632c270b751461052a5780632f2ff15d1461055757600080fd5b8063095ea7b311610375578063095ea7b31461042b578063144cc99e1461044d57806320bdf9aa1461046d57806323b872dd1461048d57600080fd5b806301ffc9a71461039c57806306fdde03146103d1578063081812fc146103f3575b600080fd5b3480156103a857600080fd5b506103bc6103b7366004614afe565b610cb6565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506103e6610d87565b6040516103c89190614b73565b3480156103ff57600080fd5b5061041361040e366004614b86565b610e19565b6040516001600160a01b0390911681526020016103c8565b34801561043757600080fd5b5061044b610446366004614bb4565b610ec4565b005b34801561045957600080fd5b5061044b610468366004614c25565b610ff6565b34801561047957600080fd5b5061044b610488366004614b86565b611074565b34801561049957600080fd5b5061044b6104a8366004614c91565b611159565b3480156104b957600080fd5b506104dd6104c8366004614b86565b60009081526007602052604090206001015490565b6040519081526020016103c8565b3480156104f757600080fd5b5061050b610506366004614cd2565b6111e0565b604080516001600160a01b0390931683526020830191909152016103c8565b34801561053657600080fd5b506104dd610545366004614b86565b60106020526000908152604090205481565b34801561056357600080fd5b5061044b610572366004614cf4565b611249565b34801561058357600080fd5b5061044b610592366004614b86565b61126f565b3480156105a357600080fd5b5061044b6105b2366004614cf4565b6113d9565b3480156105c357600080fd5b506104136105d2366004614b86565b6013602052600090815260409020546001600160a01b031681565b3480156105f957600080fd5b5061044b610608366004614c91565b611465565b34801561061957600080fd5b5061062d610628366004614b86565b611480565b6040516103c89a99989796959493929190614d5c565b34801561064f57600080fd5b5061066361065e366004614cd2565b611566565b604080519283529015156020830152016103c8565b34801561068457600080fd5b5061044b610693366004614b86565b6115e2565b3480156106a457600080fd5b506106b86106b3366004614b86565b6116eb565b6040516103c89190614dc8565b3480156106d157600080fd5b5061044b6106e0366004614ebd565b611890565b3480156106f157600080fd5b50610735610700366004614b86565b600f60205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909186565b604080519687526020870195909552938501929092526060840152608083015260a082015260c0016103c8565b34801561076e57600080fd5b5061044b61077d366004614f7b565b6119e9565b34801561078e57600080fd5b506104dd61079d3660046150b3565b611af7565b3480156107ae57600080fd5b5061044b6107bd366004614b86565b611d65565b3480156107ce57600080fd5b506104136107dd366004614b86565b611d84565b3480156107ee57600080fd5b506104dd6107fd366004614b86565b611e0f565b34801561080e57600080fd5b506103bc61081d366004614b86565b60146020526000908152604090205460ff1681565b34801561083e57600080fd5b506104dd61084d366004615154565b611fad565b34801561085e57600080fd5b5061044b612047565b34801561087357600080fd5b506104dd6120ad565b61044b61088a366004615171565b6120bd565b34801561089b57600080fd5b506104dd612255565b3480156108b057600080fd5b5061044b6108bf366004614cf4565b612260565b3480156108d057600080fd5b506104dd60165481565b3480156108e657600080fd5b506008546001600160a01b0316610413565b34801561090457600080fd5b506103bc610913366004614cf4565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561094a57600080fd5b506104dd610959366004614b86565b60116020526000908152604090205481565b34801561097757600080fd5b506103e661233f565b34801561098c57600080fd5b5061044b61099b366004614cf4565b61234e565b3480156109ac57600080fd5b5061044b6109bb366004614b86565b6123e2565b3480156109cc57600080fd5b5061044b6109db366004614cf4565b61253e565b3480156109ec57600080fd5b506104dd600081565b348015610a0157600080fd5b5061044b610a1036600461519f565b6125db565b348015610a2157600080fd5b5061044b610a3036600461520f565b6126a0565b348015610a4157600080fd5b5061044b610a5036600461525b565b612775565b348015610a6157600080fd5b506104dd6000805160206157bc83398151915281565b348015610a8357600080fd5b50610a97610a92366004614b86565b6127fd565b6040516103c89190600060c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015292915050565b348015610aef57600080fd5b506103e6610afe366004614b86565b61288f565b348015610b0f57600080fd5b5061044b610b1e366004614cf4565b612a22565b348015610b2f57600080fd5b506104dd60175481565b348015610b4557600080fd5b5061044b610b54366004614b86565b612a48565b348015610b6557600080fd5b506104dd7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286981565b348015610b9957600080fd5b506104dd610ba83660046152db565b612b51565b348015610bb957600080fd5b5061044b610bc8366004615385565b612c82565b61044b610bdb366004615171565b612fef565b348015610bec57600080fd5b506103bc610bfb3660046153ff565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610c3557600080fd5b5061044b610c4436600461542d565b61319a565b348015610c5557600080fd5b506104dd610c64366004614b86565b60126020526000908152604090205481565b348015610c8257600080fd5b5061044b610c91366004615154565b6132cc565b348015610ca257600080fd5b50601554610413906001600160a01b031681565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610d1957506001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000145b80610d4d57506001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000145b80610d8157506001600160e01b031982167fc87b56dd00000000000000000000000000000000000000000000000000000000145b92915050565b606060008054610d9690615469565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc290615469565b8015610e0f5780601f10610de457610100808354040283529160200191610e0f565b820191906000526020600020905b815481529060010190602001808311610df257829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610ea85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610ecf82611d84565b9050806001600160a01b0316836001600160a01b03161415610f595760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b336001600160a01b0382161480610f755750610f758133610bfb565b610fe75760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610e9f565b610ff183836133ae565b505050565b6000805160206157bc83398151915261100f8133613429565b60005b8481101561106c5761105a86868381811061102f5761102f61549e565b905060200201358585848181106110485761104861549e565b9050602002810190610a3091906154b4565b8061106481615511565b915050611012565b505050505050565b6000805160206157bc83398151915261108d8133613429565b6000828152600e602052604081205460ff1660058111156110b0576110b0614d24565b146110fd5760405162461bcd60e51b815260206004820152601b60248201527f43616d706169676e2073686f756c642062652070656e64696e672e00000000006044820152606401610e9f565b6000828152600e6020526040902080546001919060ff191682800217905550817f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d600160405161114d919061552c565b60405180910390a25050565b61116333826134a9565b6111d55760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610e9f565b610ff18383836135ad565b60008281526012602090815260408083205480845260139092528220548291906001600160a01b03168061121c57600080935093505050611242565b60006127106016548761122f919061553a565b611239919061556f565b91945090925050505b9250929050565b6000828152600760205260409020600101546112658133613429565b610ff18383613787565b6000805160206157bc8339815191526112888133613429565b60016000838152600e602052604090205460ff1660058111156112ad576112ad614d24565b14806112db575060046000838152600e602052604090205460ff1660058111156112d9576112d9614d24565b145b80611308575060026000838152600e602052604090205460ff16600581111561130657611306614d24565b145b61137a5760405162461bcd60e51b815260206004820152602360248201527f43616d706169676e2073686f756c64206265205245414459206f72205041555360448201527f45442e00000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b6000828152600e60209081526040808320805460ff19166003908117909155600f9092529182902043600590910155905183917f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d9161114d919061552c565b6001600160a01b03811633146114575760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610e9f565b6114618282613829565b5050565b610ff183838360405180602001604052806000815250612775565b600e60205260009081526040902080546001820154600283015460038401805460ff8516956101009095046001600160a01b03169491906114c090615469565b80601f01602080910402602001604051908101604052809291908181526020018280546114ec90615469565b80156115395780601f1061150e57610100808354040283529160200191611539565b820191906000526020600020905b81548152906001019060200180831161151c57829003601f168201915b5050506004840154600585015460068601546007870154600890970154959660ff9093169591945092508a565b6000828152600c602052604081208054829190849081106115895761158961549e565b906000526020600020906002020160000154600c600086815260200190815260200160002084815481106115bf576115bf61549e565b600091825260209091206001600290920201015490925060ff1690509250929050565b6000805160206157bc8339815191526115fb8133613429565b60046000838152600e602052604090205460ff16600581111561162057611620614d24565b148061164e575060036000838152600e602052604090205460ff16600581111561164c5761164c614d24565b145b61169a5760405162461bcd60e51b815260206004820152601b60248201527f43616d706169676e2073686f756c6420626520737461727465642e00000000006044820152606401610e9f565b6000828152600e6020526040902080546005919060ff19166001830217905550817f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d600560405161114d919061552c565b61174d604080516101408101909152806000815260200160006001600160a01b03168152602001600081526020016000815260200160608152602001600015158152602001600081526020016000815260200160008152602001600081525090565b6000828152600e602052604090819020815161014081019092528054829060ff16600581111561177f5761177f614d24565b600581111561179057611790614d24565b8152815461010090046001600160a01b0316602082015260018201546040820152600282015460608201526003820180546080909201916117d090615469565b80601f01602080910402602001604051908101604052809291908181526020018280546117fc90615469565b80156118495780601f1061181e57610100808354040283529160200191611849565b820191906000526020600020905b81548152906001019060200180831161182c57829003601f168201915b5050509183525050600482015460ff161515602082015260058201546040820152600682015460608201526007820154608082015260089091015460a09091015292915050565b6000805160206157bc8339815191526118a98133613429565b6000838152600e602052604081205460ff1660058111156118cc576118cc614d24565b141561191a5760405162461bcd60e51b815260206004820152601a60248201527f43616d706169676e206973206e6f74207265616479207965742e0000000000006044820152606401610e9f565b6000838152600e6020526040902060060154825111156119a25760405162461bcd60e51b815260206004820152602560248201527f43616d706169676e20646f6573206e6f74206861766520656e6f75676820686160448201527f736865732e0000000000000000000000000000000000000000000000000000006064820152608401610e9f565b60005b82518110156119e3576119d1848483815181106119c4576119c461549e565b60200260200101516138ac565b806119db81615511565b9150506119a5565b50505050565b7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e982869611a148133613429565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820185905285169063a9059cbb90604401602060405180830381600087803b158015611a7757600080fd5b505af1158015611a8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aaf9190615583565b50816001600160a01b031683856001600160a01b03167f15e848750ab66cd66f07bebaf8dab757d6d4af0895afc4ff867f35baf163ee2d60405160405180910390a450505050565b60006000805160206157bc833981519152611b128133613429565b611b20600a80546001019055565b6000611b2b600a5490565b6000818152600e602052604081208054929350909160ff191660018302179055508a600e600083815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555089600e60008381526020019081526020016000206001018190555088600e60008381526020019081526020016000206002018190555083600e600083815260200190815260200160002060040160006101000a81548160ff02191690831515021790555085600e60008381526020019081526020016000206007018190555084600e6000838152602001908152602001600020600801819055508760000151600f6000838152602001908152602001600020600001819055508760200151600f6000838152602001908152602001600020600101819055508760400151600f6000838152602001908152602001600020600201819055508760600151600f6000838152602001908152602001600020600301819055508760800151600f6000838152602001908152602001600020600401819055506000600e6000838152602001908152602001600020600501819055506000600e60008381526020019081526020016000206006018190555086600e60008381526020019081526020016000206003019080519060200190611d1e929190614a4f565b50807fa6afb3a5ab1f546b8412c26146095429ff8e45e24f585babc27f0b2b954ee63c88604051611d4f9190614b73565b60405180910390a29a9950505050505050505050565b6000805160206157bc833981519152611d7e8133613429565b50601655565b6000818152600260205260408120546001600160a01b031680610d815760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610e9f565b600060036000838152600e602052604090205460ff166005811115611e3657611e36614d24565b14611e835760405162461bcd60e51b815260206004820152601c60248201527f43616d706169676e206973206e6f742073746172746564207965742e000000006044820152606401610e9f565b6000828152600f6020526040812060050154611e9f90436155a0565b6000848152600f6020526040902060040154909150811115611ecf57506000828152600f60205260409020600401545b6000838152600f6020526040902060028101546003909101541115611f4e576000838152600f60205260409020600481015460028201546003909201548392611f17916155a0565b611f21919061556f565b611f2b919061553a565b6000848152600f6020526040902060020154611f4791906155b7565b9392505050565b6000838152600f60205260409020600481015460038201546002909201548392611f77916155a0565b611f81919061556f565b611f8b919061553a565b6000848152600f6020526040902060020154611f4791906155a0565b50919050565b60006001600160a01b03821661202b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610e9f565b506001600160a01b031660009081526003602052604090205490565b6008546001600160a01b031633146120a15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e9f565b6120ab6000613b72565b565b60006120b8600a5490565b905090565b6000838152600e602052604090206004015460ff166121445760405162461bcd60e51b815260206004820152603860248201527f4d696e74696e672066726f6d20616e20617274697374206973206e6f7420656e60448201527f61626c656420666f7220746869732063616d706169676e2e00000000000000006064820152608401610e9f565b600061214f84613bd1565b9050803410156121a15760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e64732e000000000000000000000000006044820152606401610e9f565b6000838152600260205260409020546001600160a01b03166122055760405162461bcd60e51b815260206004820152601c60248201527f41727469737420746f6b656e206973206e6f6e6578697374656e742e000000006044820152606401610e9f565b612210848484613ea5565b803411156119e357336108fc61222683346155a0565b6040518115909202916000818181858888f1935050505015801561224e573d6000803e3d6000fd5b5050505050565b60006120b860095490565b6000805160206157bc8339815191526122798133613429565b6000838152600260205260409020546001600160a01b03166123035760405162461bcd60e51b815260206004820152602860248201527f546f6b656e206d75737420626520657869737420746f2073657420726f79616c60448201527f747920696e666f2e0000000000000000000000000000000000000000000000006064820152608401610e9f565b50600091825260136020526040909120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b606060018054610d9690615469565b6000805160206157bc8339815191526123678133613429565b6000838152600e602052604081205460ff16600581111561238a5761238a614d24565b14156123d85760405162461bcd60e51b815260206004820152601a60248201527f43616d706169676e206973206e6f74207265616479207965742e0000000000006044820152606401610e9f565b610ff183836138ac565b6000805160206157bc8339815191526123fb8133613429565b60016000838152600e602052604090205460ff16600581111561242057612420614d24565b148061244e575060036000838152600e602052604090205460ff16600581111561244c5761244c614d24565b145b8061247b575060046000838152600e602052604090205460ff16600581111561247957612479614d24565b145b6124ed5760405162461bcd60e51b815260206004820152602c60248201527f43616d706169676e2073686f756c642062652052454144592c2050415553454460448201527f206f72204f4e474f494e472e00000000000000000000000000000000000000006064820152608401610e9f565b6000828152600e6020526040902080546002919060ff19166001830217905550817f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d600260405161114d919061552c565b7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e9828696125698133613429565b6040516001600160a01b0383169084156108fc029085906000818181858888f1935050505015801561259f573d6000803e3d6000fd5b506040516001600160a01b0383169084907fdb987c1c65c75a9e9046a3ca9bdc236b547e784f7077581105a193d618c2e3a590600090a3505050565b6001600160a01b0382163314156126345760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610e9f565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000805160206157bc8339815191526126b98133613429565b6000848152600260205260409020546001600160a01b031661271d5760405162461bcd60e51b815260206004820152601c60248201527f55524920736574206f66206e6f6e6578697374656e7420746f6b656e000000006044820152606401610e9f565b600084815260146020908152604091829020805460ff191660011790558151601f85018290048202810182019092528382526119e391869186908690819084018382808284376000920191909152506142b392505050565b61277f33836134a9565b6127f15760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610e9f565b6119e38484848461435c565b6128366040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b506000908152600f6020908152604091829020825160c08101845281548152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260059091015460a082015290565b6000818152600260205260409020546060906001600160a01b031661291c5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006064820152608401610e9f565b6000828152600660205260408120805461293590615469565b80601f016020809104026020016040519081016040528092919081815260200182805461296190615469565b80156129ae5780601f10612983576101008083540402835291602001916129ae565b820191906000526020600020905b81548152906001019060200180831161299157829003601f168201915b5050505050905060006129cc60408051602081019091526000815290565b90508051600014156129df575092915050565b815115612a115780826040516020016129f99291906155cf565b60405160208183030381529060405292505050919050565b612a1a846143e5565b949350505050565b600082815260076020526040902060010154612a3e8133613429565b610ff18383613829565b6000805160206157bc833981519152612a618133613429565b60036000838152600e602052604090205460ff166005811115612a8657612a86614d24565b1480612ab4575060026000838152600e602052604090205460ff166005811115612ab257612ab2614d24565b145b612b005760405162461bcd60e51b815260206004820152601b60248201527f43616d706169676e2073686f756c64206265204f4e474f494e472e00000000006044820152606401610e9f565b6000828152600e6020526040902080546004919060ff19166001830217905550817f85e51113d22045a974d683fcad05ec3f38ff416366e93c8156a135f09946554d600460405161114d919061552c565b60006000805160206157bc833981519152612b6c8133613429565b60008b8152600e6020908152604090912080547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038e1602178155600181018b9055600281018a90558751612bd492600390920191890190614a4f565b5060008b8152600e6020908152604080832060078101899055600881018890556004908101805460ff19168815151790558a51600f845293829020938455918a0151600184015589810151600284015560608a0151600384015560808a01519290910191909155518b907f0177b669f57c071a194a1b5dc964c464a844367a5851384ecf8329867757282890612c6b908990614b73565b60405180910390a250989998505050505050505050565b6000805160206157bc833981519152612c9b8133613429565b6000868152600e602052604081205460ff166005811115612cbe57612cbe614d24565b14612d305760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f7420616464206861736820746f20537461727465642063616d7060448201527f6169676e000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b838214612da55760405162461bcd60e51b815260206004820152603360248201527f686173684c69737420616e6420617274697374546f6b656e4c697374206d757360448201527f7420626520696e2073616d65206c656e677468000000000000000000000000006064820152608401610e9f565b6000868152600e602052604081206005018054869290612dc69084906155b7565b90915550506000868152600e602052604081206006018054869290612dec9084906155b7565b90915550600090505b84811015612fbb57600c60008881526020019081526020016000206040518060400160405280888885818110612e2d57612e2d61549e565b60209081029290920135835250600091810182905283546001818101865594835291819020835160029093020191825591909101519101805491151560ff19909216919091179055612e83600980546001019055565b6000612e8e60095490565b601754612e9b91906155b7565b90508060116000898986818110612eb457612eb461549e565b90506020020135815260200190815260200160002081905550868683818110612edf57612edf61549e565b905060200201356010600083815260200190815260200160002081905550848483818110612f0f57612f0f61549e565b600084815260126020908152604080832093820295909501359092558b8152600d909152918220919050868685818110612f4b57612f4b61549e565b905060200201358152602001908152602001600020546001612f6d91906155b7565b6000898152600d6020526040812090878786818110612f8e57612f8e61549e565b90506020020135815260200190815260200160002081905550508080612fb390615511565b915050612df5565b5060405186907f10186e690c23a168df268408652525dd4fc307fea5875f017ef9734b90dbc63b90600090a2505050505050565b60026000848152600e602052604090205460ff16600581111561301457613014614d24565b14156130a6576000838152600e60205260409020600701548211156130a15760405162461bcd60e51b815260206004820152602a60248201527f43616e206e6f74206d696e74206d6f7265207468616e20616c6c6f776564206960448201527f6e2070726573616c652e000000000000000000000000000000000000000000006064820152608401610e9f565b613107565b6000838152600e60205260409020600801548211156131075760405162461bcd60e51b815260206004820152601f60248201527f43616e206e6f74206d696e74206d6f7265207468616e20616c6c6f7765642e006044820152606401610e9f565b6000805b8381101561314957600061311e86613bd1565b905061312a81846155b7565b925061313686856138ac565b508061314181615511565b91505061310b565b50803410156122105760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e64732e000000000000000000000000006044820152606401610e9f565b6000805160206157bc8339815191526131b38133613429565b6131c1600b80546001019055565b60006131cc600b5490565b90506017548111156132465760405162461bcd60e51b815260206004820152602260248201527f41727469737420746f6b656e2069642072657365727665732066696e6973686560448201527f642e0000000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b61325085826144da565b601554600082815260136020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909416939093179092558051601f860183900483028101830190915284815261224e9183919087908790819084018382808284376000920191909152506142b392505050565b6008546001600160a01b031633146133265760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e9f565b6001600160a01b0381166133a25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610e9f565b6133ab81613b72565b50565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906133f082611d84565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff1661146157613467816001600160a01b03166014614629565b613472836020614629565b6040516020016134839291906155fe565b60408051601f198184030181529082905262461bcd60e51b8252610e9f91600401614b73565b6000818152600260205260408120546001600160a01b03166135335760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610e9f565b600061353e83611d84565b9050806001600160a01b0316846001600160a01b031614806135795750836001600160a01b031661356e84610e19565b6001600160a01b0316145b80612a1a57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16612a1a565b826001600160a01b03166135c082611d84565b6001600160a01b03161461363c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610e9f565b6001600160a01b0382166136b75760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610e9f565b6136c26000826133ae565b6001600160a01b03831660009081526003602052604081208054600192906136eb9084906155a0565b90915550506001600160a01b03821660009081526003602052604081208054600192906137199084906155b7565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166114615760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556137e53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156114615760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000828152600e602052604090206006015461390a5760405162461bcd60e51b815260206004820152601260248201527f416c6c204e4654732061726520736f6c642e00000000000000000000000000006044820152606401610e9f565b6000828152600e60205260408120600601546001101561397e576000838152600e60209081526040918290206006015482519182018190524340928201929092524460608201526080016040516020818303038152906040528051906020012060001c613977919061567f565b9050613982565b5060005b60008060005b6000868152600e6020526040902060050154811015613a0c576000868152600c602052604090208054829081106139c1576139c161549e565b600091825260209091206001600290920201015460ff166139fa57838214156139ec57809250613a0c565b6139f76001836155b7565b91505b80613a0481615511565b915050613988565b506000858152600c6020526040902080546001919084908110613a3157613a3161549e565b6000918252602080832060016002909302018201805494151560ff1990951694909417909355878252600e909252604081206006018054909190613a769084906155a0565b90915550506000858152600c602052604081208054601191839186908110613aa057613aa061549e565b9060005260206000209060020201600001548152602001908152602001600020549050613acd85826144da565b6000868152600e60205260409020600301805461106c918391613aef90615469565b80601f0160208091040260200160405190810160405280929190818152602001828054613b1b90615469565b8015613b685780601f10613b3d57610100808354040283529160200191613b68565b820191906000526020600020905b815481529060010190602001808311613b4b57829003601f168201915b50505050506142b3565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060026000838152600e602052604090205460ff166005811115613bf857613bf8614d24565b1415613e9c576000828152600e602052604080822080546002909101549151627eeac760e11b8152336004820152602481019290925261010090046001600160a01b03169190829062fdd58e9060440160206040518083038186803b158015613c6057600080fd5b505afa158015613c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c989190615693565b1115613d30576000838152600e602052604090819020600201549051637a94c56560e11b81523360048201526024810191909152600160448201526001600160a01b0382169063f5298aca90606401600060405180830381600087803b158015613d0157600080fd5b505af1158015613d15573d6000803e3d6000fd5b50505060009384525050600f60205250604090206001015490565b6000838152600e6020526040808220600101549051627eeac760e11b815233600482015260248101919091526001600160a01b0383169062fdd58e9060440160206040518083038186803b158015613d8757600080fd5b505afa158015613d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dbf9190615693565b1115613e54576000838152600e6020526040908190206001908101549151637a94c56560e11b8152336004820152602481019290925260448201526001600160a01b0382169063f5298aca90606401600060405180830381600087803b158015613e2857600080fd5b505af1158015613e3c573d6000803e3d6000fd5b50505060009384525050600f60205250604090205490565b60405162461bcd60e51b815260206004820152601060248201527f4e6f2041636365737320746f6b656e2e000000000000000000000000000000006044820152606401610e9f565b610d8182611e0f565b6000838152600d60209081526040808320858452909152902054613f0b5760405162461bcd60e51b815260206004820152601d60248201527f416c6c206e7466732061726520736f6c6420666f72206172746973742e0000006044820152606401610e9f565b6000838152600d6020908152604080832085845290915281205460011015613f8c576000848152600d602090815260408083208684528252918290205482519182018190524340928201929092524460608201526080016040516020818303038152906040528051906020012060001c613f85919061567f565b9050613f90565b5060005b60008060005b6000878152600e6020526040902060050154811015614082576000878152600c60205260409020805482908110613fcf57613fcf61549e565b600091825260209091206001600290920201015460ff1615801561404d57506012600060116000600c60008c8152602001908152602001600020858154811061401a5761401a61549e565b90600052602060002090600202016000015481526020019081526020016000205481526020019081526020016000205486145b15614070578382141561406257809250614082565b61406d6001836155b7565b91505b8061407a81615511565b915050613f96565b506000868152600c602052604090208054839081106140a3576140a361549e565b600091825260209091206001600290920201015460ff1615801561412157506012600060116000600c60008b815260200190815260200160002086815481106140ee576140ee61549e565b90600052602060002090600202016000015481526020019081526020016000205481526020019081526020016000205485145b61416d5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206d75737420626520666f756e642e0000000000000000000000006044820152606401610e9f565b6000868152600d60209081526040808320888452909152902054614193906001906155a0565b6000878152600d60209081526040808320898452825280832093909355888252600c905220805460019190849081106141ce576141ce61549e565b6000918252602080832060016002909302018201805494151560ff1990951694909417909355888252600e9092526040812060060180549091906142139084906155a0565b90915550506000868152600c60205260408120805460119183918690811061423d5761423d61549e565b906000526020600020906002020160000154815260200190815260200160002054905061426a85826144da565b6142aa81600e60008a8152602001908152602001600020600301836040516020016142969291906156ac565b6040516020818303038152906040526142b3565b50505050505050565b6000828152600260205260409020546001600160a01b031661433d5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610e9f565b60008281526006602090815260409091208251610ff192840190614a4f565b6143678484846135ad565b614373848484846147ee565b6119e35760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610e9f565b6000818152600260205260409020546060906001600160a01b03166144725760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610e9f565b600061448960408051602081019091526000815290565b905060008151116144a95760405180602001604052806000815250611f47565b806144b384614951565b6040516020016144c49291906155cf565b6040516020818303038152906040529392505050565b6001600160a01b0382166145305760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610e9f565b6000818152600260205260409020546001600160a01b0316156145955760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e9f565b6001600160a01b03821660009081526003602052604081208054600192906145be9084906155b7565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060600061463883600261553a565b6146439060026155b7565b67ffffffffffffffff81111561465b5761465b614e76565b6040519080825280601f01601f191660200182016040528015614685576020820181803683370190505b509050600360fc1b816000815181106146a0576146a061549e565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106146eb576146eb61549e565b60200101906001600160f81b031916908160001a905350600061470f84600261553a565b61471a9060016155b7565b90505b600181111561479f577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061475b5761475b61549e565b1a60f81b8282815181106147715761477161549e565b60200101906001600160f81b031916908160001a90535060049490941c936147988161574b565b905061471d565b508315611f475760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e9f565b60006001600160a01b0384163b1561494657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614832903390899088908890600401615762565b602060405180830381600087803b15801561484c57600080fd5b505af192505050801561487c575060408051601f3d908101601f191682019092526148799181019061579e565b60015b61492c573d8080156148aa576040519150601f19603f3d011682016040523d82523d6000602084013e6148af565b606091505b5080516149245760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610e9f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612a1a565b506001949350505050565b6060816149755750506040805180820190915260018152600360fc1b602082015290565b8160005b811561499f578061498981615511565b91506149989050600a8361556f565b9150614979565b60008167ffffffffffffffff8111156149ba576149ba614e76565b6040519080825280601f01601f1916602001820160405280156149e4576020820181803683370190505b5090505b8415612a1a576149f96001836155a0565b9150614a06600a8661567f565b614a119060306155b7565b60f81b818381518110614a2657614a2661549e565b60200101906001600160f81b031916908160001a905350614a48600a8661556f565b94506149e8565b828054614a5b90615469565b90600052602060002090601f016020900481019282614a7d5760008555614ac3565b82601f10614a9657805160ff1916838001178555614ac3565b82800160010185558215614ac3579182015b82811115614ac3578251825591602001919060010190614aa8565b50614acf929150614ad3565b5090565b5b80821115614acf5760008155600101614ad4565b6001600160e01b0319811681146133ab57600080fd5b600060208284031215614b1057600080fd5b8135611f4781614ae8565b60005b83811015614b36578181015183820152602001614b1e565b838111156119e35750506000910152565b60008151808452614b5f816020860160208601614b1b565b601f01601f19169290920160200192915050565b602081526000611f476020830184614b47565b600060208284031215614b9857600080fd5b5035919050565b6001600160a01b03811681146133ab57600080fd5b60008060408385031215614bc757600080fd5b8235614bd281614b9f565b946020939093013593505050565b60008083601f840112614bf257600080fd5b50813567ffffffffffffffff811115614c0a57600080fd5b6020830191508360208260051b850101111561124257600080fd5b60008060008060408587031215614c3b57600080fd5b843567ffffffffffffffff80821115614c5357600080fd5b614c5f88838901614be0565b90965094506020870135915080821115614c7857600080fd5b50614c8587828801614be0565b95989497509550505050565b600080600060608486031215614ca657600080fd5b8335614cb181614b9f565b92506020840135614cc181614b9f565b929592945050506040919091013590565b60008060408385031215614ce557600080fd5b50508035926020909101359150565b60008060408385031215614d0757600080fd5b823591506020830135614d1981614b9f565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b60068110614d5857634e487b7160e01b600052602160045260246000fd5b9052565b6000610140614d6b838e614d3a565b6001600160a01b038c1660208401528a6040840152896060840152806080840152614d988184018a614b47565b97151560a0840152505060c081019490945260e08401929092526101008301526101209091015295945050505050565b60208152614dda602082018351614d3a565b60006020830151614df660408401826001600160a01b03169052565b50604083015160608301526060830151608083015260808301516101408060a0850152614e27610160850183614b47565b915060a0850151614e3c60c086018215159052565b5060c085015160e0858101919091528501516101008086019190915285015161012080860191909152909401519390920192909252919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614eb557614eb5614e76565b604052919050565b60008060408385031215614ed057600080fd5b8235915060208084013567ffffffffffffffff80821115614ef057600080fd5b818601915086601f830112614f0457600080fd5b813581811115614f1657614f16614e76565b8060051b9150614f27848301614e8c565b8181529183018401918481019089841115614f4157600080fd5b938501935b83851015614f6b5784359250614f5b83614b9f565b8282529385019390850190614f46565b8096505050505050509250929050565b600080600060608486031215614f9057600080fd5b8335614f9b81614b9f565b9250602084013591506040840135614fb281614b9f565b809150509250925092565b600060a08284031215614fcf57600080fd5b60405160a0810181811067ffffffffffffffff82111715614ff257614ff2614e76565b806040525080915082358152602083013560208201526040830135604082015260608301356060820152608083013560808201525092915050565b600067ffffffffffffffff83111561504757615047614e76565b61505a601f8401601f1916602001614e8c565b905082815283838301111561506e57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261509657600080fd5b611f478383356020850161502d565b80151581146133ab57600080fd5b600080600080600080600080610180898b0312156150d057600080fd5b88356150db81614b9f565b975060208901359650604089013595506150f88a60608b01614fbd565b945061010089013567ffffffffffffffff81111561511557600080fd5b6151218b828c01615085565b94505061012089013592506101408901359150610160890135615143816150a5565b809150509295985092959890939650565b60006020828403121561516657600080fd5b8135611f4781614b9f565b60008060006060848603121561518657600080fd5b83359250602084013591506040840135614fb281614b9f565b600080604083850312156151b257600080fd5b82356151bd81614b9f565b91506020830135614d19816150a5565b60008083601f8401126151df57600080fd5b50813567ffffffffffffffff8111156151f757600080fd5b60208301915083602082850101111561124257600080fd5b60008060006040848603121561522457600080fd5b83359250602084013567ffffffffffffffff81111561524257600080fd5b61524e868287016151cd565b9497909650939450505050565b6000806000806080858703121561527157600080fd5b843561527c81614b9f565b9350602085013561528c81614b9f565b925060408501359150606085013567ffffffffffffffff8111156152af57600080fd5b8501601f810187136152c057600080fd5b6152cf8782356020840161502d565b91505092959194509250565b60008060008060008060008060006101a08a8c0312156152fa57600080fd5b8935985060208a013561530c81614b9f565b975060408a0135965060608a013595506153298b60808c01614fbd565b94506101208a013567ffffffffffffffff81111561534657600080fd5b6153528c828d01615085565b9450506101408a013592506101608a013591506101808a0135615374816150a5565b809150509295985092959850929598565b60008060008060006060868803121561539d57600080fd5b85359450602086013567ffffffffffffffff808211156153bc57600080fd5b6153c889838a01614be0565b909650945060408801359150808211156153e157600080fd5b506153ee88828901614be0565b969995985093965092949392505050565b6000806040838503121561541257600080fd5b823561541d81614b9f565b91506020830135614d1981614b9f565b60008060006040848603121561544257600080fd5b833561544d81614b9f565b9250602084013567ffffffffffffffff81111561524257600080fd5b600181811c9082168061547d57607f821691505b60208210811415611fa757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126154cb57600080fd5b83018035915067ffffffffffffffff8211156154e657600080fd5b60200191503681900382131561124257600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415615525576155256154fb565b5060010190565b60208101610d818284614d3a565b6000816000190483118215151615615554576155546154fb565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261557e5761557e615559565b500490565b60006020828403121561559557600080fd5b8151611f47816150a5565b6000828210156155b2576155b26154fb565b500390565b600082198211156155ca576155ca6154fb565b500190565b600083516155e1818460208801614b1b565b8351908301906155f5818360208801614b1b565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615636816017850160208801614b1b565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615673816028840160208801614b1b565b01602801949350505050565b60008261568e5761568e615559565b500690565b6000602082840312156156a557600080fd5b5051919050565b600080845481600182811c9150808316806156c857607f831692505b60208084108214156156e857634e487b7160e01b86526022600452602486fd5b8180156156fc576001811461570d5761573a565b60ff1986168952848901965061573a565b60008b81526020902060005b868110156157325781548b820152908501908301615719565b505084890196505b509785525050509301949350505050565b60008161575a5761575a6154fb565b506000190190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526157946080830184614b47565b9695505050505050565b6000602082840312156157b057600080fd5b8151611f4781614ae856fe1defd8ef915dc8ec87e9048048c7076484c6d2162021b65fd4a8c056057d9363a2646970667358221220ccc2346e017a0538e5e26b28b19c3d60bbd2927ecff399df520b2718dd9dfbc364736f6c63430008090033

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000003e80000000000000000000000009faa9c42be3e8e7908b96344fbb8d84f9517e42400000000000000000000000000000000000000000000000000000000000000094d6f6a6f4865616473000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034d4a480000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): MojoHeads
Arg [1] : symbol_ (string): MJH
Arg [2] : artistTokenReserve_ (uint256): 500
Arg [3] : royaltyPercentage_ (uint256): 1000
Arg [4] : defaultRoyaltyAddress_ (address): 0x9faA9C42BE3E8e7908B96344fbB8D84f9517E424

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [4] : 0000000000000000000000009faa9c42be3e8e7908b96344fbb8d84f9517e424
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [6] : 4d6f6a6f48656164730000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 4d4a480000000000000000000000000000000000000000000000000000000000


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

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