ETH Price: $3,298.53 (-0.32%)

Token

 

Overview

Max Total Supply

105

Holders

28

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

0xd1e83342aae00c04bb0e55011517d78988780dc1
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:
MoonChipsERC1155

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 18 : MoonChipsERC1155.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

// royalties standard
import "./libs/ERC2981ContractWideRoyalties.sol"; 

import "./interfaces/IMBytes.sol";
import "./interfaces/IMoonChipsRewards.sol";

import "./utils/EncodingUtils.sol";
import "./utils/StringUtils.sol";

struct GenesisDigitPath {
    uint256 tokenId;
    string svgPath;
}

struct TemplatePath {
    string colorIdx;
    string svgPath;
}

contract MoonChipsERC1155 is ERC1155, Ownable, ERC2981ContractWideRoyalties {

    using SafeMath for uint256;

    address mbytesAddress;
    address rewardsAddress;

    address royaltyRecipient;

    TemplatePath[] templatePaths;

    // map of Gen. Chip # to SVG Pixels
    mapping(uint256 => string) public genesisDigitVectors;
    // color palettes for each chip collection
    mapping(uint8 => string[]) public palettes;
    // supplies for each chip collection
    mapping(uint8 => uint256) public collectionCounts;

    uint256 constant GENESIS_MAX_TOKEN_ID = 88;
    uint256 constant BETA_MAX_TOKEN_ID = 444;
    uint256 constant T_MAX_TOKEN_ID = 4444;

    event WithdrawFunds(address _to, uint256 _amount);
    event ChipsMinted(address _to, uint256 _amount, uint256[] _tokenIds);

    constructor(address _mbytesAddress, address _royaltyRecipient) ERC1155("") {

        mbytesAddress = _mbytesAddress;
        royaltyRecipient = _royaltyRecipient;

        collectionCounts[1] = 0;
        collectionCounts[2] = 0;
        collectionCounts[3] = 0;

        // 8% royalties on all tokens
        _setRoyalties(royaltyRecipient, 800); 
    }
 
    /**
     * @dev batch mint
     * @param _collectionId which chip collection to mint
     * @param _amount amount of chips to mint
     * 0.1 ether / chip
     */
    function mintChips(uint8 _collectionId, uint256 _amount)
        public
        payable
    {
        require(_amount <= 8, "can only mint a maximum of 8 chips at a time");
        require(_collectionId > 0 && _collectionId <= 3, "invalid collection id");
        require(msg.value >= _amount.mul(100000000 gwei), "insufficient funds, 0.1 ether per chip needed");

        mintInternal(msg.sender, _collectionId, _amount);
    }

    function mintInternal(address _address, uint8 _collectionId, uint256 _amount)
        internal
    {
        require(rewardsAddress != address(0x0), "rewards address not set");

        uint256 collectionCount = collectionCounts[_collectionId];

        require(
            collectionCount.add(_amount) <= resolveMaxTokenId(_collectionId),
            "collection supply limit reached"
        );

        if (_collectionId > 1) {
            require(
                collectionFull(_collectionId - 1),
                "previous collection must be fully minted before minting this collection"
            );
        } else {
            // genesis collection is reserved for migrations
            require(
                msg.sender == owner(),
                "only owner can mint genesis collection"
            );
        }

        uint[] memory idsToMint = new uint[](_amount);
        uint[] memory amountsToMint = new uint[](_amount);

        for (uint256 i = 1; i <= _amount; i++) { 

            uint256 amountToAdd = 0;
            if (_collectionId > 1) {
                amountToAdd = amountToAdd.add(resolveMaxTokenId(_collectionId - 1));
            }

            uint256 tokenId = collectionCount.add(amountToAdd.add(i));

            idsToMint[i - 1] = tokenId;
            amountsToMint[i - 1] = 1;
            IMoonChipsRewards(rewardsAddress).updateBlockCount(tokenId, block.number);
        }

        _mintBatch(_address, idsToMint, amountsToMint, '');
        collectionCounts[_collectionId] = collectionCount.add(_amount);

        emit ChipsMinted(_address, _amount, idsToMint);
        
    }


    /**
     * @dev Return the On-Chain SVG Artwork for a given Chip #
     * @param _tokenId The trait type index
     */
    function uri(uint256 _tokenId)
        public
        view
        override
        returns (string memory)
    {
        require(_tokenId > 0 && _tokenId <= T_MAX_TOKEN_ID, "token is invalid");

        uint8 collectionId = resolveCollectionId(_tokenId);

        string memory collectionName;
        string memory baseReward;
        string memory description;
        string memory tokenIdStr = StringUtils.toString(_tokenId);


        if (collectionId == 1) {
            collectionName = 'Genesis';
            baseReward = '0.8 MBYTE';
            description = 'The first chip ever developed by Moon Chip Co., fully on-chain, making blockchains STRONGER.';
        } else if (collectionId == 2) {
            collectionName = 'Beta';
            baseReward = '0.4 MBYTE';
            description = 'On-Chain NFT, making blockchains STRONGER';
        } else if (collectionId == 3) {
            collectionName = 'T';
            baseReward = '0.2 MBYTE';
            description = 'On-Chain NFT, making blockchains STRONGER';
        }

        // Hack to get around the fact that we can't have a tokenId of zero
        // TokenID 66 will effectively be TokenID 00
        if (_tokenId == 66) {
            tokenIdStr = '00'; 
        }

        string memory tokenName = string (
            abi.encodePacked(
                collectionName,
                ' #',
                tokenIdStr
            )
        );

        return string(
            abi.encodePacked(
                "data:application/json;base64,",
                EncodingUtils.encode(
                    bytes(
                        string(
                            abi.encodePacked(
                                '{"name":"', tokenName,
                                '", "description":"', description,
                                '", "image": "data:image/svg+xml;base64,',
                                EncodingUtils.encode(
                                    bytes(generateSvg(_tokenId, collectionId))
                                ),
                                '","properties": {"baseReward": "', baseReward,
                                '"}}'
                            )
                        )
                    )
                )
            )
        );
    }

    /**
     * @dev OpenSea Collection metadata gen
     */
    function contractURI() public view returns (string memory) {
        return string(
            abi.encodePacked(
                "data:application/json;base64,",
                EncodingUtils.encode(
                    bytes(
                        string(
                            abi.encodePacked(
                                '{"name": "Moon Chip Co.",',
                                '"description": "NFT Chips that make blockchains STRONGER",',
                                '"image": "https://moonchip.co/wp-content/uploads/2021/09/moonchip.co-logo100x100.png",',
                                '"external_link": "https://moonchip.co",',
                                '"seller_fee_basis_points": 800,',
                                '"fee_recipient": "0x',
                                StringUtils.toAsciiString(royaltyRecipient),
                                '"}'
                            )
                        )
                    )
                )
            )
        );
    }

    /**
     * @dev Generates the SVG Artwork for a given Chip
     * @param _tokenId token id for the chip
     * @param _collectionId collection id for the chip
     */
    function generateSvg(uint256 _tokenId, uint8 _collectionId)
        public
        view
        returns (string memory)
    {
        require(_tokenId > 0); // check that it's a valid token ID
        
        string memory svgVectors = "";

        for(uint8 i = 0; i < templatePaths.length; i++) {

            string memory path = templatePaths[i].svgPath;
            uint8[2] memory substr = [0,0];
            if (_collectionId == 1) {
                substr = [0,2];
            } else if(_collectionId == 2) {
                substr = [2,4];
            } else if(_collectionId == 3) {
                substr = [5,6];
            }
            string memory color = palettes[_collectionId][StringUtils.parseInt(StringUtils.substring(templatePaths[i].colorIdx,substr[0],substr[1]))];

            svgVectors = string(
                abi.encodePacked(
                    svgVectors,
                    '<path d="',
                    path,
                    '" fill="',
                    color,
                    '"/>'
                )
            );
        }
        
        string memory svg = string(
            abi.encodePacked(
                '<?xml version="1.0" standalone="yes"?>',
                '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">',
                svgVectors
            )
        );

        // Genesis Chip Digit generation
        if (_collectionId == 1) {

            require(
                !StringUtils.isStringEmpty(genesisDigitVectors[_tokenId]),
                'Genesis Digit has not been initialized!'
            );
            
            string[] memory genesisPathArray = StringUtils.split(genesisDigitVectors[_tokenId], ",");
            for (uint8 o = 0; o < genesisPathArray.length; o++) {

                string memory digitColor = '#af01fa';
                string memory digitPath = genesisPathArray[o];


                if (keccak256(bytes(StringUtils.substring(digitPath, 0, 1))) == keccak256(bytes('%'))) {
                    digitColor = '#191818';
                    digitPath = StringUtils.substring(digitPath, 1, bytes(digitPath).length - 1);
                }

                svg = string(
                    abi.encodePacked(
                        svg,
                        '<path d="',
                        digitPath,
                        '" fill="',
                        digitColor,
                        '"/>'
                    )
                );
            }
            
        }

        return string(
            abi.encodePacked(
                svg,
                '</svg>'
            )
        );
    }

    function getOwnedTokens()
        public
        view
        returns (uint256[] memory)
    {
        uint256 ownedTokensCount = 0;

        for (uint256 i = 1; i <= T_MAX_TOKEN_ID; i++) {
            if (balanceOf(msg.sender, i) > 0) {
                ownedTokensCount = ownedTokensCount + 1;
            }
        }

        uint256[] memory ownedTokens = new uint256[](ownedTokensCount);
        uint256 ownedTokenIdx = 0;
        
        for (uint256 i = 1; i <= T_MAX_TOKEN_ID; i++) {
            if (balanceOf(msg.sender, i) > 0) {
                ownedTokens[ownedTokenIdx] = i;
                ownedTokenIdx = ownedTokenIdx + 1;
            }
        }

        return ownedTokens;
    }

    function collectionFull(uint8 _collectionId)
        public
        view
        returns (bool full)
    {
        require(_collectionId > 0 && _collectionId <= 3, "invalid collection id");

        if (_collectionId == 1) {
            full = collectionCounts[_collectionId] >= GENESIS_MAX_TOKEN_ID;
        } else if (_collectionId == 2) {
            full = collectionCounts[_collectionId] >= BETA_MAX_TOKEN_ID;
        } else if (_collectionId == 3) {
            full = collectionCounts[_collectionId] >= T_MAX_TOKEN_ID;
        }
    }

    function resolveCollectionId(uint256 _tokenId)
        internal
        pure
        returns (uint8 collectionId)
    {
        if (_tokenId > 0 && _tokenId <= GENESIS_MAX_TOKEN_ID) {
            collectionId = 1; // genesis
        } else if (_tokenId > GENESIS_MAX_TOKEN_ID && _tokenId <= BETA_MAX_TOKEN_ID) {
            collectionId = 2; // beta
        } else if (_tokenId > BETA_MAX_TOKEN_ID && _tokenId <= T_MAX_TOKEN_ID) { 
            collectionId = 3; // T
        }
    }

    function resolveMaxTokenId(uint256 _collectionId)
        internal
        pure
        returns (uint256 maxTokenId)
    {
        if (_collectionId == 1) {
            maxTokenId = GENESIS_MAX_TOKEN_ID;
        } else if (_collectionId == 2) {
            maxTokenId = BETA_MAX_TOKEN_ID;
        } else if (_collectionId == 3) {
            maxTokenId = T_MAX_TOKEN_ID;
        }
    }

     /**
     * @dev mints all genesis chips to the migration address
     * @param _to migration contract address
     */
    function mintAllCollection(address _to, uint8 _collectionId)
        public
        onlyOwner
    {
        uint256 maxTokenId = resolveMaxTokenId(_collectionId);
        mintInternal(_to, _collectionId, maxTokenId);
    }

    /**
     * @dev Sets colors for specific collection palette
     * @param _colors colors
     * @param _collectionId collection id (1, 2, 3)
     */
    function setPaletteColors(uint8 _collectionId, string[] memory _colors)
        public
        onlyOwner
    {
        for (uint256 i = 0; i < _colors.length; i++) {
            palettes[_collectionId].push(_colors[i]);
        }
    }

    /**
     * @dev Add a trait type
     * @param _genesisVectors The trait type index
     */
    function setGenesisDigitVectors(GenesisDigitPath[] memory _genesisVectors)
        public
        onlyOwner
    {
        for (uint256 i = 0; i < _genesisVectors.length; i++) {
            genesisDigitVectors[_genesisVectors[i].tokenId] = _genesisVectors[i].svgPath;
        }
    }

    /**
     * @dev Sets the genesis template SVG
     * @param _templatePaths The template SVG
     */
    function setTemplateVectors(TemplatePath[] memory _templatePaths)
        public
        onlyOwner
    {
        for (uint256 i = 0; i < _templatePaths.length; i++) {
            templatePaths.push(_templatePaths[i]);
        }
    }

    /**
     * @dev Sets the mbytes ERC20 address
     * @param _mbytesAddress The mbytes address
     */
    function setMBytesAddress(address _mbytesAddress) public onlyOwner {
        mbytesAddress = _mbytesAddress;
    }

    /**
     * @dev Sets the moonchip rewards address
     * @param _rewardsAddress The mbytes address
     */
    function setRewardsAddress(address _rewardsAddress) public onlyOwner {
        rewardsAddress = _rewardsAddress;
    }

    /**
     * @dev Sets royalty recipient address
     * @param _royaltyRecipient the royalty recipient address
     */
    function setRoyaltyRecipient(address _royaltyRecipient) public onlyOwner {
        royaltyRecipient = _royaltyRecipient;
         _setRoyalties(royaltyRecipient, 800); 
    }

    function withdrawFunds(address payable _to) 
        public
        onlyOwner
    {
        uint balance = address(this).balance;
        require(balance > 0, "Balance should be > 0.");
        _to.transfer(balance);
        emit WithdrawFunds(_to, balance);
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981Base) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

}

File 2 of 18 : StringUtils.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library StringUtils {
    
    function toString(uint256 value) internal pure returns (string memory) {
        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);
    }

    function parseInt(string memory _a)
        internal
        pure
        returns (uint8 _parsedInt)
    {
        bytes memory bresult = bytes(_a);
        uint8 mint = 0;
        for (uint8 i = 0; i < bresult.length; i++) {
            if (
                (uint8(uint8(bresult[i])) >= 48) &&
                (uint8(uint8(bresult[i])) <= 57)
            ) {
                mint *= 10;
                mint += uint8(bresult[i]) - 48;
            }
        }
        return mint;
    }

    function substring(
        string memory str,
        uint256 startIndex,
        uint256 endIndex
    ) internal pure returns (string memory) {
        bytes memory strBytes = bytes(str);
        bytes memory result = new bytes(endIndex - startIndex);
        for (uint256 i = startIndex; i < endIndex; i++) {
            result[i - startIndex] = strBytes[i];
        }
        return string(result);
    }

    function isStringEmpty(string memory _a)
        internal
        pure
        returns(bool)
    {
        bytes memory bresult = bytes(_a);
        return bresult.length == 0;
    }

    function _indexOf(string memory _base, string memory _value, uint _offset)
        internal
        pure
        returns (int) {
        bytes memory _baseBytes = bytes(_base);
        bytes memory _valueBytes = bytes(_value);

        assert(_valueBytes.length == 1);

        for (uint i = _offset; i < _baseBytes.length; i++) {
            if (_baseBytes[i] == _valueBytes[0]) {
                return int(i);
            }
        }

        return -1;
    }
    
    function split(string memory _base, string memory _value)
        internal
        pure
        returns (string[] memory splitArr) {
        bytes memory _baseBytes = bytes(_base);

        uint _offset = 0;
        uint _splitsCount = 1;
        while (_offset < _baseBytes.length - 1) {
            int _limit = _indexOf(_base, _value, _offset);
            if (_limit == -1)
                break;
            else {
                _splitsCount++;
                _offset = uint(_limit) + 1;
            }
        }

        splitArr = new string[](_splitsCount);

        _offset = 0;
        _splitsCount = 0;
        while (_offset < _baseBytes.length - 1) {

            int _limit = _indexOf(_base, _value, _offset);
            if (_limit == - 1) {
                _limit = int(_baseBytes.length);
            }

            string memory _tmp = new string(uint(_limit) - _offset);
            bytes memory _tmpBytes = bytes(_tmp);

            uint j = 0;
            for (uint i = _offset; i < uint(_limit); i++) {
                _tmpBytes[j++] = _baseBytes[i];
            }
            _offset = uint(_limit) + 1;
            splitArr[_splitsCount++] = string(_tmpBytes);
        }
        return splitArr;
    }

    function toAsciiString(address x) internal pure returns (string memory) {
        bytes memory s = new bytes(40);
        for (uint i = 0; i < 20; i++) {
            bytes1 b = bytes1(uint8(uint(uint160(x)) / (2**(8*(19 - i)))));
            bytes1 hi = bytes1(uint8(b) / 16);
            bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));
            s[2*i] = char(hi);
            s[2*i+1] = char(lo);            
        }
        return string(s);
    }

    function char(bytes1 b) internal pure returns (bytes1 c) {
        if (uint8(b) < 10) return bytes1(uint8(b) + 0x30);
        else return bytes1(uint8(b) + 0x57);
    }

}

File 3 of 18 : EncodingUtils.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library EncodingUtils {
    string internal constant TABLE =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return "";

        // load the table into memory
        string memory table = TABLE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {

            } lt(dataPtr, endPtr) {

            } {
                dataPtr := add(dataPtr, 3)

                // read 3 bytes
                let input := mload(dataPtr)

                // write 4 characters
                mstore(
                    resultPtr,
                    shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                )
                resultPtr := add(resultPtr, 1)
                mstore(
                    resultPtr,
                    shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                )
                resultPtr := add(resultPtr, 1)
                mstore(
                    resultPtr,
                    shl(248, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                )
                resultPtr := add(resultPtr, 1)
                mstore(
                    resultPtr,
                    shl(248, mload(add(tablePtr, and(input, 0x3F))))
                )
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 {
                mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
            }
            case 2 {
                mstore(sub(resultPtr, 1), shl(248, 0x3d))
            }
        }

        return result;
    }

    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;
    }
}

File 4 of 18 : ERC2981ContractWideRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

import './ERC2981Base.sol';

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
/// @dev This implementation has the same royalties for each and every tokens
abstract contract ERC2981ContractWideRoyalties is ERC2981Base {
    RoyaltyInfo private _royalties;

    /// @dev Sets token royalties
    /// @param recipient recipient of the royalties
    /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0)
    function _setRoyalties(address recipient, uint256 value) internal {
        require(value <= 10000, 'ERC2981Royalties: Too high');
        _royalties = RoyaltyInfo(recipient, uint24(value));
    }

    /// @inheritdoc	IERC2981Royalties
    function royaltyInfo(uint256, uint256 value)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        RoyaltyInfo memory royalties = _royalties;
        receiver = royalties.recipient;
        royaltyAmount = (value * royalties.amount) / 10000;
    }
}

File 5 of 18 : ERC2981Base.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';


interface IERC2981Royalties {
    
    function royaltyInfo(uint256 _tokenId, uint256 _value)
        external
        view
        returns (address _receiver, uint256 _royaltyAmount);
}

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
abstract contract ERC2981Base is ERC165, IERC2981Royalties {
    struct RoyaltyInfo {
        address recipient;
        uint24 amount;
    }

    /// @inheritdoc ERC165
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC2981Royalties).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 6 of 18 : IMoonChipsRewards.sol
// contracts/IMBytes.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IMoonChipsRewards {
    function updateBlockCount(uint256 _tokenId, uint256 _blockCount)
        external;
}

File 7 of 18 : IMBytes.sol
// contracts/IMBytes.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

interface IMBytes is IERC20 {
    function rewardMbytes(address _to, uint256 _amount) external;
}

File 8 of 18 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 18 : 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 10 of 18 : 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 11 of 18 : 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 12 of 18 : 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 13 of 18 : 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 18 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 15 of 18 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 16 of 18 : 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 17 of 18 : ERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(_msgSender() != operator, "ERC1155: setting approval status for self");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `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 memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - 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[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(account != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][account] += amount;
        emit TransferSingle(operator, address(0), account, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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 _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `account`
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address account,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 accountBalance = _balances[id][account];
        require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][account] = accountBalance - amount;
        }

        emit TransferSingle(operator, account, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 accountBalance = _balances[id][account];
            require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][account] = accountBalance - amount;
            }
        }

        emit TransferBatch(operator, account, address(0), ids, amounts);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 18 of 18 : 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);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_mbytesAddress","type":"address"},{"internalType":"address","name":"_royaltyRecipient","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"ChipsMinted","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":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"WithdrawFunds","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"collectionCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_collectionId","type":"uint8"}],"name":"collectionFull","outputs":[{"internalType":"bool","name":"full","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint8","name":"_collectionId","type":"uint8"}],"name":"generateSvg","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"genesisDigitVectors","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwnedTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint8","name":"_collectionId","type":"uint8"}],"name":"mintAllCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_collectionId","type":"uint8"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintChips","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"palettes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","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":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"svgPath","type":"string"}],"internalType":"struct GenesisDigitPath[]","name":"_genesisVectors","type":"tuple[]"}],"name":"setGenesisDigitVectors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mbytesAddress","type":"address"}],"name":"setMBytesAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_collectionId","type":"uint8"},{"internalType":"string[]","name":"_colors","type":"string[]"}],"name":"setPaletteColors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsAddress","type":"address"}],"name":"setRewardsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyRecipient","type":"address"}],"name":"setRoyaltyRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"colorIdx","type":"string"},{"internalType":"string","name":"svgPath","type":"string"}],"internalType":"struct TemplatePath[]","name":"_templatePaths","type":"tuple[]"}],"name":"setTemplateVectors","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162004851380380620048518339810160408190526200003491620002e2565b6040805160208101909152600081526200004e8162000113565b506200005a336200012c565b600580546001600160a01b038085166001600160a01b031992831617909255600780549284169290911682179055600b60205260007f72c6bfb7988af3a1efa6568f02a999bc52252641c659d85961ca3d372b57d5cf8190557fa50eece07c7db1631545c0069bd8f5f54d5935e215d59097edf258a44ba91634819055600381527f64c15cc42be7899b001f818cf4433057002112c418d1d3a67cd5cb453051d33e556200010b906103206200017e565b505062000357565b8051620001289060029060208401906200021f565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612710811115620001d55760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f2068696768000000000000604482015260640160405180910390fd5b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260048054600160a01b9093026001600160b81b0319909316909117919091179055565b8280546200022d906200031a565b90600052602060002090601f0160209004810192826200025157600085556200029c565b82601f106200026c57805160ff19168380011785556200029c565b828001600101855582156200029c579182015b828111156200029c5782518255916020019190600101906200027f565b50620002aa929150620002ae565b5090565b5b80821115620002aa5760008155600101620002af565b80516001600160a01b0381168114620002dd57600080fd5b919050565b60008060408385031215620002f657600080fd5b6200030183620002c5565b91506200031160208401620002c5565b90509250929050565b600181811c908216806200032f57607f821691505b602082108114156200035157634e487b7160e01b600052602260045260246000fd5b50919050565b6144ea80620003676000396000f3fe6080604052600436106101b65760003560e01c806368742da6116100ec578063bdff68131161008a578063e985e9c511610064578063e985e9c514610500578063f242432a14610549578063f2fde38b14610569578063feafe1821461058957600080fd5b8063bdff6813146104ab578063d750da13146104cb578063e8a3d485146104eb57600080fd5b8063715018a6116100c6578063715018a61461042e5780638906758d146104435780638da5cb5b14610463578063a22cb4651461048b57600080fd5b806368742da6146103ce5780636a835a1e146103ee5780636b1518f81461040e57600080fd5b8063498685ce11610159578063598fa9da11610133578063598fa9da1461035957806360820d801461037957806362f3e9c51461038e57806365cfaa6d146103ae57600080fd5b8063498685ce146102ec5780634a65cf69146102ff5780634e1273f41461032c57600080fd5b80630e89341c116101955780630e89341c146102405780632a55205a1461026d5780632eb2c2d6146102ac57806341e42f30146102cc57600080fd5b8062fdd58e146101bb57806301ffc9a7146101ee57806309db94331461021e575b600080fd5b3480156101c757600080fd5b506101db6101d636600461313d565b6105a9565b6040519081526020015b60405180910390f35b3480156101fa57600080fd5b5061020e61020936600461317f565b610643565b60405190151581526020016101e5565b34801561022a57600080fd5b5061023e6102393660046131ad565b61064e565b005b34801561024c57600080fd5b5061026061025b3660046131e2565b610698565b6040516101e59190613257565b34801561027957600080fd5b5061028d61028836600461326a565b610908565b604080516001600160a01b0390931683526020830191909152016101e5565b3480156102b857600080fd5b5061023e6102c73660046133fa565b61095d565b3480156102d857600080fd5b5061023e6102e73660046134a7565b6109f4565b61023e6102fa3660046134c4565b610a4b565b34801561030b57600080fd5b506101db61031a3660046134e0565b600b6020526000908152604090205481565b34801561033857600080fd5b5061034c6103473660046134fb565b610b92565b6040516101e591906135f8565b34801561036557600080fd5b506102606103743660046134c4565b610cbb565b34801561038557600080fd5b5061034c610d74565b34801561039a57600080fd5b5061020e6103a93660046134e0565b610e64565b3480156103ba57600080fd5b5061023e6103c936600461360b565b610f38565b3480156103da57600080fd5b5061023e6103e93660046134a7565b610fe2565b3480156103fa57600080fd5b506102606104093660046131e2565b6110d0565b34801561041a57600080fd5b5061023e610429366004613706565b6110e9565b34801561043a57600080fd5b5061023e61119b565b34801561044f57600080fd5b5061023e61045e3660046134a7565b6111d1565b34801561046f57600080fd5b506003546040516001600160a01b0390911681526020016101e5565b34801561049757600080fd5b5061023e6104a6366004613810565b61121d565b3480156104b757600080fd5b5061023e6104c636600461384e565b6112f4565b3480156104d757600080fd5b506102606104e636600461391c565b611395565b3480156104f757600080fd5b50610260611a01565b34801561050c57600080fd5b5061020e61051b36600461393f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561055557600080fd5b5061023e61056436600461396d565b611a51565b34801561057557600080fd5b5061023e6105843660046134a7565b611ad8565b34801561059557600080fd5b5061023e6105a43660046134a7565b611b70565b60006001600160a01b03831661061a5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061063d82611bbc565b6003546001600160a01b031633146106785760405162461bcd60e51b8152600401610611906139d5565b60006106868260ff16611be1565b9050610693838383611c18565b505050565b60606000821180156106ac575061115c8211155b6106eb5760405162461bcd60e51b815260206004820152601060248201526f1d1bdad95b881a5cc81a5b9d985b1a5960821b6044820152606401610611565b60006106f683612017565b90506060806060600061070887612075565b90508460ff166001141561077c576040518060400160405280600781526020016647656e6573697360c81b815250935060405180604001604052806009815260200168302e38204d4259544560b81b81525092506040518060800160405280605c8152602001614459605c91399150610853565b8460ff16600214156107eb57604051806040016040528060048152602001634265746160e01b815250935060405180604001604052806009815260200168302e34204d4259544560b81b81525092506040518060600160405280602981526020016143f0602991399150610853565b8460ff166003141561085357604051806040016040528060018152602001601560fa1b815250935060405180604001604052806009815260200168302e32204d4259544560b81b81525092506040518060600160405280602981526020016143f06029913991505b86604214156108775750604080518082019091526002815261030360f41b60208201525b6000848260405160200161088c929190613a0a565b60405160208183030381529060405290506108dc81846108b46108af8c8b611395565b61217a565b876040516020016108c89493929190613a47565b60405160208183030381529060405261217a565b6040516020016108ec9190613b48565b6040516020818303038152906040529650505050505050919050565b604080518082019091526004546001600160a01b038116808352600160a01b90910462ffffff16602083018190529091600091612710906109499086613ba3565b6109539190613bd8565b9150509250929050565b6001600160a01b0385163314806109795750610979853361051b565b6109e05760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610611565b6109ed85858585856122e1565b5050505050565b6003546001600160a01b03163314610a1e5760405162461bcd60e51b8152600401610611906139d5565b600780546001600160a01b0319166001600160a01b038316908117909155610a489061032061247d565b50565b6008811115610ab15760405162461bcd60e51b815260206004820152602c60248201527f63616e206f6e6c79206d696e742061206d6178696d756d206f6620382063686960448201526b707320617420612074696d6560a01b6064820152608401610611565b60008260ff16118015610ac8575060038260ff1611155b610b0c5760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a590818dbdb1b1958dd1a5bdb881a59605a1b6044820152606401610611565b610b1e8167016345785d8a0000612519565b341015610b835760405162461bcd60e51b815260206004820152602d60248201527f696e73756666696369656e742066756e64732c20302e3120657468657220706560448201526c1c8818da1a5c081b9959591959609a1b6064820152608401610611565b610b8e338383611c18565b5050565b60608151835114610bf75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610611565b600083516001600160401b03811115610c1257610c1261328c565b604051908082528060200260200182016040528015610c3b578160200160208202803683370190505b50905060005b8451811015610cb357610c86858281518110610c5f57610c5f613bec565b6020026020010151858381518110610c7957610c79613bec565b60200260200101516105a9565b828281518110610c9857610c98613bec565b6020908102919091010152610cac81613c02565b9050610c41565b509392505050565b600a6020528160005260406000208181548110610cd757600080fd5b90600052602060002001600091509150508054610cf390613c1d565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1f90613c1d565b8015610d6c5780601f10610d4157610100808354040283529160200191610d6c565b820191906000526020600020905b815481529060010190602001808311610d4f57829003601f168201915b505050505081565b6060600060015b61115c8111610db6576000610d9033836105a9565b1115610da457610da1826001613c58565b91505b80610dae81613c02565b915050610d7b565b506000816001600160401b03811115610dd157610dd161328c565b604051908082528060200260200182016040528015610dfa578160200160208202803683370190505b509050600060015b61115c8111610e5b576000610e1733836105a9565b1115610e495780838381518110610e3057610e30613bec565b6020908102919091010152610e46826001613c58565b91505b80610e5381613c02565b915050610e02565b50909392505050565b6000808260ff16118015610e7c575060038260ff1611155b610ec05760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a590818dbdb1b1958dd1a5bdb881a59605a1b6044820152606401610611565b8160ff1660011415610ee6575060ff166000908152600b60205260409020546058111590565b8160ff1660021415610f0d575060ff166000908152600b60205260409020546101bc111590565b8160ff1660031415610f33575060ff81166000908152600b602052604090205461115c11155b919050565b6003546001600160a01b03163314610f625760405162461bcd60e51b8152600401610611906139d5565b60005b8151811015610b8e57818181518110610f8057610f80613bec565b60200260200101516020015160096000848481518110610fa257610fa2613bec565b60200260200101516000015181526020019081526020016000209080519060200190610fcf92919061308f565b5080610fda81613c02565b915050610f65565b6003546001600160a01b0316331461100c5760405162461bcd60e51b8152600401610611906139d5565b47806110535760405162461bcd60e51b81526020600482015260166024820152752130b630b731b29039b437bab632103132901f10181760511b6044820152606401610611565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015611089573d6000803e3d6000fd5b50604080516001600160a01b0384168152602081018390527f21901fa892c430ea8bd38b9390225ac8e67eac75ee10ffba16feefc539a288f9910160405180910390a15050565b60096020526000908152604090208054610cf390613c1d565b6003546001600160a01b031633146111135760405162461bcd60e51b8152600401610611906139d5565b60005b8151811015610b8e57600882828151811061113357611133613bec565b60209081029190910181015182546001810184556000938452928290208151805192946002029091019261116c9284929091019061308f565b506020828101518051611185926001850192019061308f565b505050808061119390613c02565b915050611116565b6003546001600160a01b031633146111c55760405162461bcd60e51b8152600401610611906139d5565b6111cf600061252c565b565b6003546001600160a01b031633146111fb5760405162461bcd60e51b8152600401610611906139d5565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b336001600160a01b03831614156112885760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610611565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6003546001600160a01b0316331461131e5760405162461bcd60e51b8152600401610611906139d5565b60005b81518110156106935760ff83166000908152600a60205260409020825183908390811061135057611350613bec565b60209081029190910181015182546001810184556000938452928290208151611382949190910192919091019061308f565b508061138d81613c02565b915050611321565b6060600083116113a457600080fd5b604080516020810190915260008082525b60085460ff821610156116e157600060088260ff16815481106113da576113da613bec565b906000526020600020906002020160010180546113f690613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461142290613c1d565b801561146f5780601f106114445761010080835404028352916020019161146f565b820191906000526020600020905b81548152906001019060200180831161145257829003601f168201915b5050604080518082019091526000808252602082015293945050505060ff8616600114156114b257506040805180820190915260008152600260208201526114fc565b8560ff16600214156114d957506040805180820190915260028152600460208201526114fc565b8560ff16600314156114fc57506040805180820190915260058152600660208201525b6000600a60008860ff1660ff1681526020019081526020016000206115fd6115f860088760ff168154811061153357611533613bec565b9060005260206000209060020201600001805461154f90613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461157b90613c1d565b80156115c85780601f1061159d576101008083540402835291602001916115c8565b820191906000526020600020905b8154815290600101906020018083116115ab57829003601f168201915b5050505050856000600281106115e0576115e0613bec565b602002015160ff16866001602002015160ff1661257e565b61264a565b60ff168154811061161057611610613bec565b90600052602060002001805461162590613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461165190613c1d565b801561169e5780601f106116735761010080835404028352916020019161169e565b820191906000526020600020905b81548152906001019060200180831161168157829003601f168201915b505050505090508483826040516020016116ba93929190613c70565b604051602081830303815290604052945050505080806116d990613cee565b9150506113b5565b506000816040516020016116f59190613d0e565b60405160208183030381529060405290508360ff16600114156119d757600085815260096020526040902080546117b3919061173090613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461175c90613c1d565b80156117a95780601f1061177e576101008083540402835291602001916117a9565b820191906000526020600020905b81548152906001019060200180831161178c57829003601f168201915b5050505050511590565b156118105760405162461bcd60e51b815260206004820152602760248201527f47656e6573697320446967697420686173206e6f74206265656e20696e697469604482015266616c697a65642160c81b6064820152608401610611565b600085815260096020526040812080546118cb919061182e90613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461185a90613c1d565b80156118a75780601f1061187c576101008083540402835291602001916118a7565b820191906000526020600020905b81548152906001019060200180831161188a57829003601f168201915b5050505050604051806040016040528060018152602001600b60fa1b815250612700565b905060005b81518160ff1610156119d4576000604051806040016040528060078152602001662361663031666160c81b81525090506000838360ff168151811061191757611917613bec565b60200260200101519050604051806040016040528060018152602001602560f81b8152508051906020012061194f826000600161257e565b80519060200120141561199957604051806040016040528060078152602001660466272627062760cb1b81525091506119968160018084516119919190613dae565b61257e565b90505b8481836040516020016119ae93929190613c70565b6040516020818303038152906040529450505080806119cc90613cee565b9150506118d0565b50505b806040516020016119e89190613dc5565b6040516020818303038152906040529250505092915050565b600754606090611a2d90611a1d906001600160a01b03166128f3565b6040516020016108c89190613def565b604051602001611a3d9190613b48565b604051602081830303815290604052905090565b6001600160a01b038516331480611a6d5750611a6d853361051b565b611acb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610611565b6109ed8585858585612a3a565b6003546001600160a01b03163314611b025760405162461bcd60e51b8152600401610611906139d5565b6001600160a01b038116611b675760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610611565b610a488161252c565b6003546001600160a01b03163314611b9a5760405162461bcd60e51b8152600401610611906139d5565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663152a902d60e11b148061063d575061063d82612b60565b60008160011415611bf457506058919050565b8160021415611c0657506101bc919050565b8160031415610f33575061115c919050565b6006546001600160a01b0316611c705760405162461bcd60e51b815260206004820152601760248201527f726577617264732061646472657373206e6f74207365740000000000000000006044820152606401610611565b60ff82166000818152600b602052604090205490611c8d90611be1565b611c978284612bb0565b1115611ce55760405162461bcd60e51b815260206004820152601f60248201527f636f6c6c656374696f6e20737570706c79206c696d69742072656163686564006044820152606401610611565b60018360ff161115611d8657611cff6103a9600185613f7a565b611d815760405162461bcd60e51b815260206004820152604760248201527f70726576696f757320636f6c6c656374696f6e206d7573742062652066756c6c60448201527f79206d696e746564206265666f7265206d696e74696e67207468697320636f6c6064820152663632b1ba34b7b760c91b608482015260a401610611565b611def565b6003546001600160a01b03163314611def5760405162461bcd60e51b815260206004820152602660248201527f6f6e6c79206f776e65722063616e206d696e742067656e6573697320636f6c6c60448201526532b1ba34b7b760d11b6064820152608401610611565b6000826001600160401b03811115611e0957611e0961328c565b604051908082528060200260200182016040528015611e32578160200160208202803683370190505b5090506000836001600160401b03811115611e4f57611e4f61328c565b604051908082528060200260200182016040528015611e78578160200160208202803683370190505b50905060015b848111611f9757600060018760ff161115611eb657611eb3611eac611ea460018a613f7a565b60ff16611be1565b8290612bb0565b90505b6000611ecc611ec58385612bb0565b8790612bb0565b90508085611edb600186613dae565b81518110611eeb57611eeb613bec565b6020908102919091010152600184611f038286613dae565b81518110611f1357611f13613bec565b6020908102919091010152600654604051634dfa026560e11b8152600481018390524360248201526001600160a01b0390911690639bf404ca90604401600060405180830381600087803b158015611f6a57600080fd5b505af1158015611f7e573d6000803e3d6000fd5b5050505050508080611f8f90613c02565b915050611e7e565b50611fb386838360405180602001604052806000815250612bbc565b611fbd8385612bb0565b60ff86166000908152600b60205260409081902091909155517f8bd62f134fc52d0b048c34ef36965eee0691b4887247cb1f1837ffa67ac4a2ab9061200790889087908690613f9d565b60405180910390a1505050505050565b60008082118015612029575060588211155b1561203657506001919050565b60588211801561204857506101bc8211155b1561205557506002919050565b6101bc82118015612068575061115c8211155b15610f3357506003919050565b6060816120995750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120c357806120ad81613c02565b91506120bc9050600a83613bd8565b915061209d565b6000816001600160401b038111156120dd576120dd61328c565b6040519080825280601f01601f191660200182016040528015612107576020820181803683370190505b5090505b84156121725761211c600183613dae565b9150612129600a86613fc4565b612134906030613c58565b60f81b81838151811061214957612149613bec565b60200101906001600160f81b031916908160001a90535061216b600a86613bd8565b945061210b565b949350505050565b606081516000141561219a57505060408051602081019091526000815290565b600060405180606001604052806040815260200161441960409139905060006003845160026121c99190613c58565b6121d39190613bd8565b6121de906004613ba3565b905060006121ed826020613c58565b6001600160401b038111156122045761220461328c565b6040519080825280601f01601f19166020018201604052801561222e576020820181803683370190505b509050818152600183018586518101602084015b8183101561229c5760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401612242565b6003895106600181146122b657600281146122c7576122d3565b613d3d60f01b6001198301526122d3565b603d60f81b6000198301525b509398975050505050505050565b81518351146123025760405162461bcd60e51b815260040161061190613fd8565b6001600160a01b0384166123285760405162461bcd60e51b815260040161061190614020565b3360005b845181101561240f57600085828151811061234957612349613bec565b60200260200101519050600085838151811061236757612367613bec565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156123b75760405162461bcd60e51b815260040161061190614065565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906123f4908490613c58565b925050819055505050508061240890613c02565b905061232c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161245f9291906140af565b60405180910390a4612475818787878787612d3d565b505050505050565b6127108111156124cf5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610611565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260048054600160a01b9093026001600160b81b0319909316909117919091179055565b60006125258284613ba3565b9392505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606083600061258d8585613dae565b6001600160401b038111156125a4576125a461328c565b6040519080825280601f01601f1916602001820160405280156125ce576020820181803683370190505b509050845b84811015612640578281815181106125ed576125ed613bec565b01602001516001600160f81b031916826126078884613dae565b8151811061261757612617613bec565b60200101906001600160f81b031916908160001a9053508061263881613c02565b9150506125d3565b5095945050505050565b60008181805b82518160ff161015610cb3576030838260ff168151811061267357612673613bec565b016020015160f81c108015906126a657506039838260ff168151811061269b5761269b613bec565b016020015160f81c11155b156126ee576126b6600a836140d4565b91506030838260ff16815181106126cf576126cf613bec565b01602001516126e1919060f81c613f7a565b6126eb90836140fd565b91505b806126f881613cee565b915050612650565b606082600060015b600183516127169190613dae565b82101561275d57600061272a878785612ea8565b905080600019141561273c575061275d565b8161274681613c02565b92506127559050816001613c58565b925050612708565b806001600160401b038111156127755761277561328c565b6040519080825280602002602001820160405280156127a857816020015b60608152602001906001900390816127935790505b50935060009150600090505b600183516127c29190613dae565b8210156128ea5760006127d6878785612ea8565b90508060001914156127e6575082515b60006127f28483613dae565b6001600160401b038111156128095761280961328c565b6040519080825280601f01601f191660200182016040528015612833576020820181803683370190505b509050806000855b848110156128aa5787818151811061285557612855613bec565b01602001516001600160f81b031916838361286f81613c02565b94508151811061288157612881613bec565b60200101906001600160f81b031916908160001a905350806128a281613c02565b91505061283b565b506128b6846001613c58565b95508188866128c481613c02565b9750815181106128d6576128d6613bec565b6020026020010181905250505050506127b4565b50505092915050565b60408051602880825260608281019093526000919060208201818036833701905050905060005b6014811015612a33576000612930826013613dae565b61293b906008613ba3565b6129469060026141fe565b612959906001600160a01b038716613bd8565b60f81b9050600060108260f81c612970919061420a565b60f81b905060008160f81c601061298791906140d4565b8360f81c6129959190613f7a565b60f81b90506129a382612f44565b856129af866002613ba3565b815181106129bf576129bf613bec565b60200101906001600160f81b031916908160001a9053506129df81612f44565b856129eb866002613ba3565b6129f6906001613c58565b81518110612a0657612a06613bec565b60200101906001600160f81b031916908160001a9053505050508080612a2b90613c02565b91505061291a565b5092915050565b6001600160a01b038416612a605760405162461bcd60e51b815260040161061190614020565b33612a79818787612a7088612f7a565b6109ed88612f7a565b6000848152602081815260408083206001600160a01b038a16845290915290205483811015612aba5760405162461bcd60e51b815260040161061190614065565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612af7908490613c58565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612b57828888888888612fc5565b50505050505050565b60006001600160e01b03198216636cdb3d1360e11b1480612b9157506001600160e01b031982166303a24d0760e21b145b8061063d57506301ffc9a760e01b6001600160e01b031983161461063d565b60006125258284613c58565b6001600160a01b038416612c1c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610611565b8151835114612c3d5760405162461bcd60e51b815260040161061190613fd8565b3360005b8451811015612cd957838181518110612c5c57612c5c613bec565b6020026020010151600080878481518110612c7957612c79613bec565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612cc19190613c58565b90915550819050612cd181613c02565b915050612c41565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612d2a9291906140af565b60405180910390a46109ed816000878787875b6001600160a01b0384163b156124755760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612d81908990899088908890889060040161422c565b602060405180830381600087803b158015612d9b57600080fd5b505af1925050508015612dcb575060408051601f3d908101601f19168201909252612dc89181019061428a565b60015b612e7857612dd76142a7565b806308c379a01415612e115750612dec6142c3565b80612df75750612e13565b8060405162461bcd60e51b81526004016106119190613257565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610611565b6001600160e01b0319811663bc197c8160e01b14612b575760405162461bcd60e51b81526004016106119061434c565b815160009084908490600114612ec057612ec0614394565b835b8251811015612f365781600081518110612ede57612ede613bec565b602001015160f81c60f81b6001600160f81b031916838281518110612f0557612f05613bec565b01602001516001600160f81b0319161415612f24579250612525915050565b80612f2e81613c02565b915050612ec2565b506000199695505050505050565b6000600a60f883901c1015612f6b57612f6260f883901c60306140fd565b60f81b92915050565b612f6260f883901c60576140fd565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612fb457612fb4613bec565b602090810291909101015292915050565b6001600160a01b0384163b156124755760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061300990899089908890889088906004016143aa565b602060405180830381600087803b15801561302357600080fd5b505af1925050508015613053575060408051601f3d908101601f191682019092526130509181019061428a565b60015b61305f57612dd76142a7565b6001600160e01b0319811663f23a6e6160e01b14612b575760405162461bcd60e51b81526004016106119061434c565b82805461309b90613c1d565b90600052602060002090601f0160209004810192826130bd5760008555613103565b82601f106130d657805160ff1916838001178555613103565b82800160010185558215613103579182015b828111156131035782518255916020019190600101906130e8565b5061310f929150613113565b5090565b5b8082111561310f5760008155600101613114565b6001600160a01b0381168114610a4857600080fd5b6000806040838503121561315057600080fd5b823561315b81613128565b946020939093013593505050565b6001600160e01b031981168114610a4857600080fd5b60006020828403121561319157600080fd5b813561252581613169565b803560ff81168114610f3357600080fd5b600080604083850312156131c057600080fd5b82356131cb81613128565b91506131d96020840161319c565b90509250929050565b6000602082840312156131f457600080fd5b5035919050565b60005b838110156132165781810151838201526020016131fe565b83811115613225576000848401525b50505050565b600081518084526132438160208601602086016131fb565b601f01601f19169290920160200192915050565b602081526000612525602083018461322b565b6000806040838503121561327d57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156132c1576132c161328c565b60405250565b601f8201601f191681016001600160401b03811182821017156132ec576132ec61328c565b6040525050565b60006001600160401b0382111561330c5761330c61328c565b5060051b60200190565b600082601f83011261332757600080fd5b81356020613334826132f3565b60405161334182826132c7565b83815260059390931b850182019282810191508684111561336157600080fd5b8286015b8481101561337c5780358352918301918301613365565b509695505050505050565b600082601f83011261339857600080fd5b81356001600160401b038111156133b1576133b161328c565b6040516133c8601f8301601f1916602001826132c7565b8181528460208386010111156133dd57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561341257600080fd5b853561341d81613128565b9450602086013561342d81613128565b935060408601356001600160401b038082111561344957600080fd5b61345589838a01613316565b9450606088013591508082111561346b57600080fd5b61347789838a01613316565b9350608088013591508082111561348d57600080fd5b5061349a88828901613387565b9150509295509295909350565b6000602082840312156134b957600080fd5b813561252581613128565b600080604083850312156134d757600080fd5b61315b8361319c565b6000602082840312156134f257600080fd5b6125258261319c565b6000806040838503121561350e57600080fd5b82356001600160401b038082111561352557600080fd5b818501915085601f83011261353957600080fd5b81356020613546826132f3565b60405161355382826132c7565b83815260059390931b850182019282810191508984111561357357600080fd5b948201945b8386101561359a57853561358b81613128565b82529482019490820190613578565b965050860135925050808211156135b057600080fd5b5061095385828601613316565b600081518084526020808501945080840160005b838110156135ed578151875295820195908201906001016135d1565b509495945050505050565b60208152600061252560208301846135bd565b6000602080838503121561361e57600080fd5b82356001600160401b038082111561363557600080fd5b818501915085601f83011261364957600080fd5b8135613654816132f3565b6040805161366283826132c7565b83815260059390931b850186019286810192508984111561368257600080fd5b8686015b848110156136f85780358681111561369e5760008081fd5b8701808c03601f19018413156136b45760008081fd5b83516136bf816132a2565b89820135815284820135888111156136d75760008081fd5b6136e58e8c83860101613387565b828c015250855250928701928701613686565b509998505050505050505050565b6000602080838503121561371957600080fd5b82356001600160401b038082111561373057600080fd5b818501915085601f83011261374457600080fd5b813561374f816132f3565b6040805161375d83826132c7565b83815260059390931b850186019286810192508984111561377d57600080fd5b8686015b848110156136f8578035868111156137995760008081fd5b8701808c03601f19018413156137af5760008081fd5b83516137ba816132a2565b89820135888111156137cc5760008081fd5b6137da8e8c83860101613387565b82525084820135888111156137ef5760008081fd5b6137fd8e8c83860101613387565b828c015250855250928701928701613781565b6000806040838503121561382357600080fd5b823561382e81613128565b91506020830135801515811461384357600080fd5b809150509250929050565b6000806040838503121561386157600080fd5b61386a8361319c565b91506020808401356001600160401b038082111561388757600080fd5b818601915086601f83011261389b57600080fd5b81356138a6816132f3565b6040516138b382826132c7565b82815260059290921b84018501918581019150898311156138d357600080fd5b8585015b8381101561390b578035858111156138ef5760008081fd5b6138fd8c89838a0101613387565b8452509186019186016138d7565b508096505050505050509250929050565b6000806040838503121561392f57600080fd5b823591506131d96020840161319c565b6000806040838503121561395257600080fd5b823561395d81613128565b9150602083013561384381613128565b600080600080600060a0868803121561398557600080fd5b853561399081613128565b945060208601356139a081613128565b9350604086013592506060860135915060808601356001600160401b038111156139c957600080fd5b61349a88828901613387565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008351613a1c8184602088016131fb565b61202360f01b9083019081528351613a3b8160028401602088016131fb565b01600201949350505050565b683d913730b6b2911d1160b91b81528451600090613a6c816009850160208a016131fb565b71111610113232b9b1b934b83a34b7b7111d1160711b6009918401918201528551613a9e81601b840160208a016131fb565b7f222c2022696d616765223a2022646174613a696d6167652f7376672b786d6c3b601b92909101918201526618985cd94d8d0b60ca1b603b8201528451613aec8160428401602089016131fb565b7f222c2270726f70657274696573223a207b2262617365526577617264223a2022604292909101918201528351613b2a8160628401602088016131fb565b62227d7d60e81b606292909101918201526065019695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613b8081601d8501602087016131fb565b91909101601d0192915050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613bbd57613bbd613b8d565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613be757613be7613bc2565b500490565b634e487b7160e01b600052603260045260246000fd5b6000600019821415613c1657613c16613b8d565b5060010190565b600181811c90821680613c3157607f821691505b60208210811415613c5257634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115613c6b57613c6b613b8d565b500190565b60008451613c828184602089016131fb565b681e3830ba3410321e9160b91b9083019081528451613ca88160098401602089016131fb565b6711103334b6361e9160c11b600992909101918201528351613cd18160118401602088016131fb565b6211179f60e91b6011929091019182015260140195945050505050565b600060ff821660ff811415613d0557613d05613b8d565b60010192915050565b7f3c3f786d6c2076657273696f6e3d22312e3022207374616e64616c6f6e653d228152653cb2b9911f9f60d11b60208201527f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323060268201527f30302f737667222076696577426f783d22302030203230203230223e00000000604682015260008251613da18160628501602087016131fb565b9190910160620192915050565b600082821015613dc057613dc0613b8d565b500390565b60008251613dd78184602087016131fb565b651e17b9bb339f60d11b920191825250600601919050565b7f7b226e616d65223a20224d6f6f6e204368697020436f2e222c0000000000000081527f226465736372697074696f6e223a20224e46542043686970732074686174206d60198201527f616b6520626c6f636b636861696e73205354524f4e474552222c00000000000060398201527f22696d616765223a202268747470733a2f2f6d6f6f6e636869702e636f2f777060538201527f2d636f6e74656e742f75706c6f6164732f323032312f30392f6d6f6f6e6368696073820152751c0b98dbcb5b1bd9dbcc4c0c1e0c4c0c0b9c1b99c88b60521b60938201527f2265787465726e616c5f6c696e6b223a202268747470733a2f2f6d6f6f6e636860a9820152661a5c0b98dbc88b60ca1b60c98201527f2273656c6c65725f6665655f62617369735f706f696e7473223a203830302c0060d082015273044cccacabee4cac6d2e0d2cadce84474404460f60631b60ef820152815160009061010390613f5b81838601602088016131fb565b613f71828286010161227d60f01b815260020190565b95945050505050565b600060ff821660ff841680821015613f9457613f94613b8d565b90039392505050565b60018060a01b0384168152826020820152606060408201526000613f7160608301846135bd565b600082613fd357613fd3613bc2565b500690565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006140c260408301856135bd565b8281036020840152613f7181856135bd565b600060ff821660ff84168160ff04811182151516156140f5576140f5613b8d565b029392505050565b600060ff821660ff84168060ff0382111561411a5761411a613b8d565b019392505050565b600181815b8085111561415d57816000190482111561414357614143613b8d565b8085161561415057918102915b93841c9390800290614127565b509250929050565b6000826141745750600161063d565b816141815750600061063d565b816001811461419757600281146141a1576141bd565b600191505061063d565b60ff8411156141b2576141b2613b8d565b50506001821b61063d565b5060208310610133831016604e8410600b84101617156141e0575081810a61063d565b6141ea8383614122565b80600019048211156140f5576140f5613b8d565b60006125258383614165565b600060ff83168061421d5761421d613bc2565b8060ff84160491505092915050565b6001600160a01b0386811682528516602082015260a060408201819052600090614258908301866135bd565b828103606084015261426a81866135bd565b9050828103608084015261427e818561322b565b98975050505050505050565b60006020828403121561429c57600080fd5b815161252581613169565b600060033d11156142c05760046000803e5060005160e01c5b90565b600060443d10156142d15790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561430057505050505090565b82850191508151818111156143185750505050505090565b843d87010160208285010111156143325750505050505090565b614341602082860101876132c7565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b634e487b7160e01b600052600160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906143e49083018461322b565b97965050505050505056fe4f6e2d436861696e204e46542c206d616b696e6720626c6f636b636861696e73205354524f4e4745524142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f5468652066697273742063686970206576657220646576656c6f706564206279204d6f6f6e204368697020436f2e2c2066756c6c79206f6e2d636861696e2c206d616b696e6720626c6f636b636861696e73205354524f4e4745522ea2646970667358221220a8b564e40904c09ecb97b27bc69270aef4343895cf2642a46cd9f033bb6277c864736f6c63430008090033000000000000000000000000804e34a51b8dab794ab0c566211250c575e445ae000000000000000000000000ba5680103cd7c5ec6029051e8a29e0499e5ef7f0

Deployed Bytecode

0x6080604052600436106101b65760003560e01c806368742da6116100ec578063bdff68131161008a578063e985e9c511610064578063e985e9c514610500578063f242432a14610549578063f2fde38b14610569578063feafe1821461058957600080fd5b8063bdff6813146104ab578063d750da13146104cb578063e8a3d485146104eb57600080fd5b8063715018a6116100c6578063715018a61461042e5780638906758d146104435780638da5cb5b14610463578063a22cb4651461048b57600080fd5b806368742da6146103ce5780636a835a1e146103ee5780636b1518f81461040e57600080fd5b8063498685ce11610159578063598fa9da11610133578063598fa9da1461035957806360820d801461037957806362f3e9c51461038e57806365cfaa6d146103ae57600080fd5b8063498685ce146102ec5780634a65cf69146102ff5780634e1273f41461032c57600080fd5b80630e89341c116101955780630e89341c146102405780632a55205a1461026d5780632eb2c2d6146102ac57806341e42f30146102cc57600080fd5b8062fdd58e146101bb57806301ffc9a7146101ee57806309db94331461021e575b600080fd5b3480156101c757600080fd5b506101db6101d636600461313d565b6105a9565b6040519081526020015b60405180910390f35b3480156101fa57600080fd5b5061020e61020936600461317f565b610643565b60405190151581526020016101e5565b34801561022a57600080fd5b5061023e6102393660046131ad565b61064e565b005b34801561024c57600080fd5b5061026061025b3660046131e2565b610698565b6040516101e59190613257565b34801561027957600080fd5b5061028d61028836600461326a565b610908565b604080516001600160a01b0390931683526020830191909152016101e5565b3480156102b857600080fd5b5061023e6102c73660046133fa565b61095d565b3480156102d857600080fd5b5061023e6102e73660046134a7565b6109f4565b61023e6102fa3660046134c4565b610a4b565b34801561030b57600080fd5b506101db61031a3660046134e0565b600b6020526000908152604090205481565b34801561033857600080fd5b5061034c6103473660046134fb565b610b92565b6040516101e591906135f8565b34801561036557600080fd5b506102606103743660046134c4565b610cbb565b34801561038557600080fd5b5061034c610d74565b34801561039a57600080fd5b5061020e6103a93660046134e0565b610e64565b3480156103ba57600080fd5b5061023e6103c936600461360b565b610f38565b3480156103da57600080fd5b5061023e6103e93660046134a7565b610fe2565b3480156103fa57600080fd5b506102606104093660046131e2565b6110d0565b34801561041a57600080fd5b5061023e610429366004613706565b6110e9565b34801561043a57600080fd5b5061023e61119b565b34801561044f57600080fd5b5061023e61045e3660046134a7565b6111d1565b34801561046f57600080fd5b506003546040516001600160a01b0390911681526020016101e5565b34801561049757600080fd5b5061023e6104a6366004613810565b61121d565b3480156104b757600080fd5b5061023e6104c636600461384e565b6112f4565b3480156104d757600080fd5b506102606104e636600461391c565b611395565b3480156104f757600080fd5b50610260611a01565b34801561050c57600080fd5b5061020e61051b36600461393f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561055557600080fd5b5061023e61056436600461396d565b611a51565b34801561057557600080fd5b5061023e6105843660046134a7565b611ad8565b34801561059557600080fd5b5061023e6105a43660046134a7565b611b70565b60006001600160a01b03831661061a5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061063d82611bbc565b6003546001600160a01b031633146106785760405162461bcd60e51b8152600401610611906139d5565b60006106868260ff16611be1565b9050610693838383611c18565b505050565b60606000821180156106ac575061115c8211155b6106eb5760405162461bcd60e51b815260206004820152601060248201526f1d1bdad95b881a5cc81a5b9d985b1a5960821b6044820152606401610611565b60006106f683612017565b90506060806060600061070887612075565b90508460ff166001141561077c576040518060400160405280600781526020016647656e6573697360c81b815250935060405180604001604052806009815260200168302e38204d4259544560b81b81525092506040518060800160405280605c8152602001614459605c91399150610853565b8460ff16600214156107eb57604051806040016040528060048152602001634265746160e01b815250935060405180604001604052806009815260200168302e34204d4259544560b81b81525092506040518060600160405280602981526020016143f0602991399150610853565b8460ff166003141561085357604051806040016040528060018152602001601560fa1b815250935060405180604001604052806009815260200168302e32204d4259544560b81b81525092506040518060600160405280602981526020016143f06029913991505b86604214156108775750604080518082019091526002815261030360f41b60208201525b6000848260405160200161088c929190613a0a565b60405160208183030381529060405290506108dc81846108b46108af8c8b611395565b61217a565b876040516020016108c89493929190613a47565b60405160208183030381529060405261217a565b6040516020016108ec9190613b48565b6040516020818303038152906040529650505050505050919050565b604080518082019091526004546001600160a01b038116808352600160a01b90910462ffffff16602083018190529091600091612710906109499086613ba3565b6109539190613bd8565b9150509250929050565b6001600160a01b0385163314806109795750610979853361051b565b6109e05760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610611565b6109ed85858585856122e1565b5050505050565b6003546001600160a01b03163314610a1e5760405162461bcd60e51b8152600401610611906139d5565b600780546001600160a01b0319166001600160a01b038316908117909155610a489061032061247d565b50565b6008811115610ab15760405162461bcd60e51b815260206004820152602c60248201527f63616e206f6e6c79206d696e742061206d6178696d756d206f6620382063686960448201526b707320617420612074696d6560a01b6064820152608401610611565b60008260ff16118015610ac8575060038260ff1611155b610b0c5760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a590818dbdb1b1958dd1a5bdb881a59605a1b6044820152606401610611565b610b1e8167016345785d8a0000612519565b341015610b835760405162461bcd60e51b815260206004820152602d60248201527f696e73756666696369656e742066756e64732c20302e3120657468657220706560448201526c1c8818da1a5c081b9959591959609a1b6064820152608401610611565b610b8e338383611c18565b5050565b60608151835114610bf75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610611565b600083516001600160401b03811115610c1257610c1261328c565b604051908082528060200260200182016040528015610c3b578160200160208202803683370190505b50905060005b8451811015610cb357610c86858281518110610c5f57610c5f613bec565b6020026020010151858381518110610c7957610c79613bec565b60200260200101516105a9565b828281518110610c9857610c98613bec565b6020908102919091010152610cac81613c02565b9050610c41565b509392505050565b600a6020528160005260406000208181548110610cd757600080fd5b90600052602060002001600091509150508054610cf390613c1d565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1f90613c1d565b8015610d6c5780601f10610d4157610100808354040283529160200191610d6c565b820191906000526020600020905b815481529060010190602001808311610d4f57829003601f168201915b505050505081565b6060600060015b61115c8111610db6576000610d9033836105a9565b1115610da457610da1826001613c58565b91505b80610dae81613c02565b915050610d7b565b506000816001600160401b03811115610dd157610dd161328c565b604051908082528060200260200182016040528015610dfa578160200160208202803683370190505b509050600060015b61115c8111610e5b576000610e1733836105a9565b1115610e495780838381518110610e3057610e30613bec565b6020908102919091010152610e46826001613c58565b91505b80610e5381613c02565b915050610e02565b50909392505050565b6000808260ff16118015610e7c575060038260ff1611155b610ec05760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a590818dbdb1b1958dd1a5bdb881a59605a1b6044820152606401610611565b8160ff1660011415610ee6575060ff166000908152600b60205260409020546058111590565b8160ff1660021415610f0d575060ff166000908152600b60205260409020546101bc111590565b8160ff1660031415610f33575060ff81166000908152600b602052604090205461115c11155b919050565b6003546001600160a01b03163314610f625760405162461bcd60e51b8152600401610611906139d5565b60005b8151811015610b8e57818181518110610f8057610f80613bec565b60200260200101516020015160096000848481518110610fa257610fa2613bec565b60200260200101516000015181526020019081526020016000209080519060200190610fcf92919061308f565b5080610fda81613c02565b915050610f65565b6003546001600160a01b0316331461100c5760405162461bcd60e51b8152600401610611906139d5565b47806110535760405162461bcd60e51b81526020600482015260166024820152752130b630b731b29039b437bab632103132901f10181760511b6044820152606401610611565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015611089573d6000803e3d6000fd5b50604080516001600160a01b0384168152602081018390527f21901fa892c430ea8bd38b9390225ac8e67eac75ee10ffba16feefc539a288f9910160405180910390a15050565b60096020526000908152604090208054610cf390613c1d565b6003546001600160a01b031633146111135760405162461bcd60e51b8152600401610611906139d5565b60005b8151811015610b8e57600882828151811061113357611133613bec565b60209081029190910181015182546001810184556000938452928290208151805192946002029091019261116c9284929091019061308f565b506020828101518051611185926001850192019061308f565b505050808061119390613c02565b915050611116565b6003546001600160a01b031633146111c55760405162461bcd60e51b8152600401610611906139d5565b6111cf600061252c565b565b6003546001600160a01b031633146111fb5760405162461bcd60e51b8152600401610611906139d5565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b336001600160a01b03831614156112885760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610611565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6003546001600160a01b0316331461131e5760405162461bcd60e51b8152600401610611906139d5565b60005b81518110156106935760ff83166000908152600a60205260409020825183908390811061135057611350613bec565b60209081029190910181015182546001810184556000938452928290208151611382949190910192919091019061308f565b508061138d81613c02565b915050611321565b6060600083116113a457600080fd5b604080516020810190915260008082525b60085460ff821610156116e157600060088260ff16815481106113da576113da613bec565b906000526020600020906002020160010180546113f690613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461142290613c1d565b801561146f5780601f106114445761010080835404028352916020019161146f565b820191906000526020600020905b81548152906001019060200180831161145257829003601f168201915b5050604080518082019091526000808252602082015293945050505060ff8616600114156114b257506040805180820190915260008152600260208201526114fc565b8560ff16600214156114d957506040805180820190915260028152600460208201526114fc565b8560ff16600314156114fc57506040805180820190915260058152600660208201525b6000600a60008860ff1660ff1681526020019081526020016000206115fd6115f860088760ff168154811061153357611533613bec565b9060005260206000209060020201600001805461154f90613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461157b90613c1d565b80156115c85780601f1061159d576101008083540402835291602001916115c8565b820191906000526020600020905b8154815290600101906020018083116115ab57829003601f168201915b5050505050856000600281106115e0576115e0613bec565b602002015160ff16866001602002015160ff1661257e565b61264a565b60ff168154811061161057611610613bec565b90600052602060002001805461162590613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461165190613c1d565b801561169e5780601f106116735761010080835404028352916020019161169e565b820191906000526020600020905b81548152906001019060200180831161168157829003601f168201915b505050505090508483826040516020016116ba93929190613c70565b604051602081830303815290604052945050505080806116d990613cee565b9150506113b5565b506000816040516020016116f59190613d0e565b60405160208183030381529060405290508360ff16600114156119d757600085815260096020526040902080546117b3919061173090613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461175c90613c1d565b80156117a95780601f1061177e576101008083540402835291602001916117a9565b820191906000526020600020905b81548152906001019060200180831161178c57829003601f168201915b5050505050511590565b156118105760405162461bcd60e51b815260206004820152602760248201527f47656e6573697320446967697420686173206e6f74206265656e20696e697469604482015266616c697a65642160c81b6064820152608401610611565b600085815260096020526040812080546118cb919061182e90613c1d565b80601f016020809104026020016040519081016040528092919081815260200182805461185a90613c1d565b80156118a75780601f1061187c576101008083540402835291602001916118a7565b820191906000526020600020905b81548152906001019060200180831161188a57829003601f168201915b5050505050604051806040016040528060018152602001600b60fa1b815250612700565b905060005b81518160ff1610156119d4576000604051806040016040528060078152602001662361663031666160c81b81525090506000838360ff168151811061191757611917613bec565b60200260200101519050604051806040016040528060018152602001602560f81b8152508051906020012061194f826000600161257e565b80519060200120141561199957604051806040016040528060078152602001660466272627062760cb1b81525091506119968160018084516119919190613dae565b61257e565b90505b8481836040516020016119ae93929190613c70565b6040516020818303038152906040529450505080806119cc90613cee565b9150506118d0565b50505b806040516020016119e89190613dc5565b6040516020818303038152906040529250505092915050565b600754606090611a2d90611a1d906001600160a01b03166128f3565b6040516020016108c89190613def565b604051602001611a3d9190613b48565b604051602081830303815290604052905090565b6001600160a01b038516331480611a6d5750611a6d853361051b565b611acb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610611565b6109ed8585858585612a3a565b6003546001600160a01b03163314611b025760405162461bcd60e51b8152600401610611906139d5565b6001600160a01b038116611b675760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610611565b610a488161252c565b6003546001600160a01b03163314611b9a5760405162461bcd60e51b8152600401610611906139d5565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663152a902d60e11b148061063d575061063d82612b60565b60008160011415611bf457506058919050565b8160021415611c0657506101bc919050565b8160031415610f33575061115c919050565b6006546001600160a01b0316611c705760405162461bcd60e51b815260206004820152601760248201527f726577617264732061646472657373206e6f74207365740000000000000000006044820152606401610611565b60ff82166000818152600b602052604090205490611c8d90611be1565b611c978284612bb0565b1115611ce55760405162461bcd60e51b815260206004820152601f60248201527f636f6c6c656374696f6e20737570706c79206c696d69742072656163686564006044820152606401610611565b60018360ff161115611d8657611cff6103a9600185613f7a565b611d815760405162461bcd60e51b815260206004820152604760248201527f70726576696f757320636f6c6c656374696f6e206d7573742062652066756c6c60448201527f79206d696e746564206265666f7265206d696e74696e67207468697320636f6c6064820152663632b1ba34b7b760c91b608482015260a401610611565b611def565b6003546001600160a01b03163314611def5760405162461bcd60e51b815260206004820152602660248201527f6f6e6c79206f776e65722063616e206d696e742067656e6573697320636f6c6c60448201526532b1ba34b7b760d11b6064820152608401610611565b6000826001600160401b03811115611e0957611e0961328c565b604051908082528060200260200182016040528015611e32578160200160208202803683370190505b5090506000836001600160401b03811115611e4f57611e4f61328c565b604051908082528060200260200182016040528015611e78578160200160208202803683370190505b50905060015b848111611f9757600060018760ff161115611eb657611eb3611eac611ea460018a613f7a565b60ff16611be1565b8290612bb0565b90505b6000611ecc611ec58385612bb0565b8790612bb0565b90508085611edb600186613dae565b81518110611eeb57611eeb613bec565b6020908102919091010152600184611f038286613dae565b81518110611f1357611f13613bec565b6020908102919091010152600654604051634dfa026560e11b8152600481018390524360248201526001600160a01b0390911690639bf404ca90604401600060405180830381600087803b158015611f6a57600080fd5b505af1158015611f7e573d6000803e3d6000fd5b5050505050508080611f8f90613c02565b915050611e7e565b50611fb386838360405180602001604052806000815250612bbc565b611fbd8385612bb0565b60ff86166000908152600b60205260409081902091909155517f8bd62f134fc52d0b048c34ef36965eee0691b4887247cb1f1837ffa67ac4a2ab9061200790889087908690613f9d565b60405180910390a1505050505050565b60008082118015612029575060588211155b1561203657506001919050565b60588211801561204857506101bc8211155b1561205557506002919050565b6101bc82118015612068575061115c8211155b15610f3357506003919050565b6060816120995750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120c357806120ad81613c02565b91506120bc9050600a83613bd8565b915061209d565b6000816001600160401b038111156120dd576120dd61328c565b6040519080825280601f01601f191660200182016040528015612107576020820181803683370190505b5090505b84156121725761211c600183613dae565b9150612129600a86613fc4565b612134906030613c58565b60f81b81838151811061214957612149613bec565b60200101906001600160f81b031916908160001a90535061216b600a86613bd8565b945061210b565b949350505050565b606081516000141561219a57505060408051602081019091526000815290565b600060405180606001604052806040815260200161441960409139905060006003845160026121c99190613c58565b6121d39190613bd8565b6121de906004613ba3565b905060006121ed826020613c58565b6001600160401b038111156122045761220461328c565b6040519080825280601f01601f19166020018201604052801561222e576020820181803683370190505b509050818152600183018586518101602084015b8183101561229c5760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401612242565b6003895106600181146122b657600281146122c7576122d3565b613d3d60f01b6001198301526122d3565b603d60f81b6000198301525b509398975050505050505050565b81518351146123025760405162461bcd60e51b815260040161061190613fd8565b6001600160a01b0384166123285760405162461bcd60e51b815260040161061190614020565b3360005b845181101561240f57600085828151811061234957612349613bec565b60200260200101519050600085838151811061236757612367613bec565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156123b75760405162461bcd60e51b815260040161061190614065565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906123f4908490613c58565b925050819055505050508061240890613c02565b905061232c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161245f9291906140af565b60405180910390a4612475818787878787612d3d565b505050505050565b6127108111156124cf5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610611565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260048054600160a01b9093026001600160b81b0319909316909117919091179055565b60006125258284613ba3565b9392505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606083600061258d8585613dae565b6001600160401b038111156125a4576125a461328c565b6040519080825280601f01601f1916602001820160405280156125ce576020820181803683370190505b509050845b84811015612640578281815181106125ed576125ed613bec565b01602001516001600160f81b031916826126078884613dae565b8151811061261757612617613bec565b60200101906001600160f81b031916908160001a9053508061263881613c02565b9150506125d3565b5095945050505050565b60008181805b82518160ff161015610cb3576030838260ff168151811061267357612673613bec565b016020015160f81c108015906126a657506039838260ff168151811061269b5761269b613bec565b016020015160f81c11155b156126ee576126b6600a836140d4565b91506030838260ff16815181106126cf576126cf613bec565b01602001516126e1919060f81c613f7a565b6126eb90836140fd565b91505b806126f881613cee565b915050612650565b606082600060015b600183516127169190613dae565b82101561275d57600061272a878785612ea8565b905080600019141561273c575061275d565b8161274681613c02565b92506127559050816001613c58565b925050612708565b806001600160401b038111156127755761277561328c565b6040519080825280602002602001820160405280156127a857816020015b60608152602001906001900390816127935790505b50935060009150600090505b600183516127c29190613dae565b8210156128ea5760006127d6878785612ea8565b90508060001914156127e6575082515b60006127f28483613dae565b6001600160401b038111156128095761280961328c565b6040519080825280601f01601f191660200182016040528015612833576020820181803683370190505b509050806000855b848110156128aa5787818151811061285557612855613bec565b01602001516001600160f81b031916838361286f81613c02565b94508151811061288157612881613bec565b60200101906001600160f81b031916908160001a905350806128a281613c02565b91505061283b565b506128b6846001613c58565b95508188866128c481613c02565b9750815181106128d6576128d6613bec565b6020026020010181905250505050506127b4565b50505092915050565b60408051602880825260608281019093526000919060208201818036833701905050905060005b6014811015612a33576000612930826013613dae565b61293b906008613ba3565b6129469060026141fe565b612959906001600160a01b038716613bd8565b60f81b9050600060108260f81c612970919061420a565b60f81b905060008160f81c601061298791906140d4565b8360f81c6129959190613f7a565b60f81b90506129a382612f44565b856129af866002613ba3565b815181106129bf576129bf613bec565b60200101906001600160f81b031916908160001a9053506129df81612f44565b856129eb866002613ba3565b6129f6906001613c58565b81518110612a0657612a06613bec565b60200101906001600160f81b031916908160001a9053505050508080612a2b90613c02565b91505061291a565b5092915050565b6001600160a01b038416612a605760405162461bcd60e51b815260040161061190614020565b33612a79818787612a7088612f7a565b6109ed88612f7a565b6000848152602081815260408083206001600160a01b038a16845290915290205483811015612aba5760405162461bcd60e51b815260040161061190614065565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612af7908490613c58565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612b57828888888888612fc5565b50505050505050565b60006001600160e01b03198216636cdb3d1360e11b1480612b9157506001600160e01b031982166303a24d0760e21b145b8061063d57506301ffc9a760e01b6001600160e01b031983161461063d565b60006125258284613c58565b6001600160a01b038416612c1c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610611565b8151835114612c3d5760405162461bcd60e51b815260040161061190613fd8565b3360005b8451811015612cd957838181518110612c5c57612c5c613bec565b6020026020010151600080878481518110612c7957612c79613bec565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612cc19190613c58565b90915550819050612cd181613c02565b915050612c41565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612d2a9291906140af565b60405180910390a46109ed816000878787875b6001600160a01b0384163b156124755760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612d81908990899088908890889060040161422c565b602060405180830381600087803b158015612d9b57600080fd5b505af1925050508015612dcb575060408051601f3d908101601f19168201909252612dc89181019061428a565b60015b612e7857612dd76142a7565b806308c379a01415612e115750612dec6142c3565b80612df75750612e13565b8060405162461bcd60e51b81526004016106119190613257565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610611565b6001600160e01b0319811663bc197c8160e01b14612b575760405162461bcd60e51b81526004016106119061434c565b815160009084908490600114612ec057612ec0614394565b835b8251811015612f365781600081518110612ede57612ede613bec565b602001015160f81c60f81b6001600160f81b031916838281518110612f0557612f05613bec565b01602001516001600160f81b0319161415612f24579250612525915050565b80612f2e81613c02565b915050612ec2565b506000199695505050505050565b6000600a60f883901c1015612f6b57612f6260f883901c60306140fd565b60f81b92915050565b612f6260f883901c60576140fd565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612fb457612fb4613bec565b602090810291909101015292915050565b6001600160a01b0384163b156124755760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061300990899089908890889088906004016143aa565b602060405180830381600087803b15801561302357600080fd5b505af1925050508015613053575060408051601f3d908101601f191682019092526130509181019061428a565b60015b61305f57612dd76142a7565b6001600160e01b0319811663f23a6e6160e01b14612b575760405162461bcd60e51b81526004016106119061434c565b82805461309b90613c1d565b90600052602060002090601f0160209004810192826130bd5760008555613103565b82601f106130d657805160ff1916838001178555613103565b82800160010185558215613103579182015b828111156131035782518255916020019190600101906130e8565b5061310f929150613113565b5090565b5b8082111561310f5760008155600101613114565b6001600160a01b0381168114610a4857600080fd5b6000806040838503121561315057600080fd5b823561315b81613128565b946020939093013593505050565b6001600160e01b031981168114610a4857600080fd5b60006020828403121561319157600080fd5b813561252581613169565b803560ff81168114610f3357600080fd5b600080604083850312156131c057600080fd5b82356131cb81613128565b91506131d96020840161319c565b90509250929050565b6000602082840312156131f457600080fd5b5035919050565b60005b838110156132165781810151838201526020016131fe565b83811115613225576000848401525b50505050565b600081518084526132438160208601602086016131fb565b601f01601f19169290920160200192915050565b602081526000612525602083018461322b565b6000806040838503121561327d57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156132c1576132c161328c565b60405250565b601f8201601f191681016001600160401b03811182821017156132ec576132ec61328c565b6040525050565b60006001600160401b0382111561330c5761330c61328c565b5060051b60200190565b600082601f83011261332757600080fd5b81356020613334826132f3565b60405161334182826132c7565b83815260059390931b850182019282810191508684111561336157600080fd5b8286015b8481101561337c5780358352918301918301613365565b509695505050505050565b600082601f83011261339857600080fd5b81356001600160401b038111156133b1576133b161328c565b6040516133c8601f8301601f1916602001826132c7565b8181528460208386010111156133dd57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561341257600080fd5b853561341d81613128565b9450602086013561342d81613128565b935060408601356001600160401b038082111561344957600080fd5b61345589838a01613316565b9450606088013591508082111561346b57600080fd5b61347789838a01613316565b9350608088013591508082111561348d57600080fd5b5061349a88828901613387565b9150509295509295909350565b6000602082840312156134b957600080fd5b813561252581613128565b600080604083850312156134d757600080fd5b61315b8361319c565b6000602082840312156134f257600080fd5b6125258261319c565b6000806040838503121561350e57600080fd5b82356001600160401b038082111561352557600080fd5b818501915085601f83011261353957600080fd5b81356020613546826132f3565b60405161355382826132c7565b83815260059390931b850182019282810191508984111561357357600080fd5b948201945b8386101561359a57853561358b81613128565b82529482019490820190613578565b965050860135925050808211156135b057600080fd5b5061095385828601613316565b600081518084526020808501945080840160005b838110156135ed578151875295820195908201906001016135d1565b509495945050505050565b60208152600061252560208301846135bd565b6000602080838503121561361e57600080fd5b82356001600160401b038082111561363557600080fd5b818501915085601f83011261364957600080fd5b8135613654816132f3565b6040805161366283826132c7565b83815260059390931b850186019286810192508984111561368257600080fd5b8686015b848110156136f85780358681111561369e5760008081fd5b8701808c03601f19018413156136b45760008081fd5b83516136bf816132a2565b89820135815284820135888111156136d75760008081fd5b6136e58e8c83860101613387565b828c015250855250928701928701613686565b509998505050505050505050565b6000602080838503121561371957600080fd5b82356001600160401b038082111561373057600080fd5b818501915085601f83011261374457600080fd5b813561374f816132f3565b6040805161375d83826132c7565b83815260059390931b850186019286810192508984111561377d57600080fd5b8686015b848110156136f8578035868111156137995760008081fd5b8701808c03601f19018413156137af5760008081fd5b83516137ba816132a2565b89820135888111156137cc5760008081fd5b6137da8e8c83860101613387565b82525084820135888111156137ef5760008081fd5b6137fd8e8c83860101613387565b828c015250855250928701928701613781565b6000806040838503121561382357600080fd5b823561382e81613128565b91506020830135801515811461384357600080fd5b809150509250929050565b6000806040838503121561386157600080fd5b61386a8361319c565b91506020808401356001600160401b038082111561388757600080fd5b818601915086601f83011261389b57600080fd5b81356138a6816132f3565b6040516138b382826132c7565b82815260059290921b84018501918581019150898311156138d357600080fd5b8585015b8381101561390b578035858111156138ef5760008081fd5b6138fd8c89838a0101613387565b8452509186019186016138d7565b508096505050505050509250929050565b6000806040838503121561392f57600080fd5b823591506131d96020840161319c565b6000806040838503121561395257600080fd5b823561395d81613128565b9150602083013561384381613128565b600080600080600060a0868803121561398557600080fd5b853561399081613128565b945060208601356139a081613128565b9350604086013592506060860135915060808601356001600160401b038111156139c957600080fd5b61349a88828901613387565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008351613a1c8184602088016131fb565b61202360f01b9083019081528351613a3b8160028401602088016131fb565b01600201949350505050565b683d913730b6b2911d1160b91b81528451600090613a6c816009850160208a016131fb565b71111610113232b9b1b934b83a34b7b7111d1160711b6009918401918201528551613a9e81601b840160208a016131fb565b7f222c2022696d616765223a2022646174613a696d6167652f7376672b786d6c3b601b92909101918201526618985cd94d8d0b60ca1b603b8201528451613aec8160428401602089016131fb565b7f222c2270726f70657274696573223a207b2262617365526577617264223a2022604292909101918201528351613b2a8160628401602088016131fb565b62227d7d60e81b606292909101918201526065019695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613b8081601d8501602087016131fb565b91909101601d0192915050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613bbd57613bbd613b8d565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613be757613be7613bc2565b500490565b634e487b7160e01b600052603260045260246000fd5b6000600019821415613c1657613c16613b8d565b5060010190565b600181811c90821680613c3157607f821691505b60208210811415613c5257634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115613c6b57613c6b613b8d565b500190565b60008451613c828184602089016131fb565b681e3830ba3410321e9160b91b9083019081528451613ca88160098401602089016131fb565b6711103334b6361e9160c11b600992909101918201528351613cd18160118401602088016131fb565b6211179f60e91b6011929091019182015260140195945050505050565b600060ff821660ff811415613d0557613d05613b8d565b60010192915050565b7f3c3f786d6c2076657273696f6e3d22312e3022207374616e64616c6f6e653d228152653cb2b9911f9f60d11b60208201527f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323060268201527f30302f737667222076696577426f783d22302030203230203230223e00000000604682015260008251613da18160628501602087016131fb565b9190910160620192915050565b600082821015613dc057613dc0613b8d565b500390565b60008251613dd78184602087016131fb565b651e17b9bb339f60d11b920191825250600601919050565b7f7b226e616d65223a20224d6f6f6e204368697020436f2e222c0000000000000081527f226465736372697074696f6e223a20224e46542043686970732074686174206d60198201527f616b6520626c6f636b636861696e73205354524f4e474552222c00000000000060398201527f22696d616765223a202268747470733a2f2f6d6f6f6e636869702e636f2f777060538201527f2d636f6e74656e742f75706c6f6164732f323032312f30392f6d6f6f6e6368696073820152751c0b98dbcb5b1bd9dbcc4c0c1e0c4c0c0b9c1b99c88b60521b60938201527f2265787465726e616c5f6c696e6b223a202268747470733a2f2f6d6f6f6e636860a9820152661a5c0b98dbc88b60ca1b60c98201527f2273656c6c65725f6665655f62617369735f706f696e7473223a203830302c0060d082015273044cccacabee4cac6d2e0d2cadce84474404460f60631b60ef820152815160009061010390613f5b81838601602088016131fb565b613f71828286010161227d60f01b815260020190565b95945050505050565b600060ff821660ff841680821015613f9457613f94613b8d565b90039392505050565b60018060a01b0384168152826020820152606060408201526000613f7160608301846135bd565b600082613fd357613fd3613bc2565b500690565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006140c260408301856135bd565b8281036020840152613f7181856135bd565b600060ff821660ff84168160ff04811182151516156140f5576140f5613b8d565b029392505050565b600060ff821660ff84168060ff0382111561411a5761411a613b8d565b019392505050565b600181815b8085111561415d57816000190482111561414357614143613b8d565b8085161561415057918102915b93841c9390800290614127565b509250929050565b6000826141745750600161063d565b816141815750600061063d565b816001811461419757600281146141a1576141bd565b600191505061063d565b60ff8411156141b2576141b2613b8d565b50506001821b61063d565b5060208310610133831016604e8410600b84101617156141e0575081810a61063d565b6141ea8383614122565b80600019048211156140f5576140f5613b8d565b60006125258383614165565b600060ff83168061421d5761421d613bc2565b8060ff84160491505092915050565b6001600160a01b0386811682528516602082015260a060408201819052600090614258908301866135bd565b828103606084015261426a81866135bd565b9050828103608084015261427e818561322b565b98975050505050505050565b60006020828403121561429c57600080fd5b815161252581613169565b600060033d11156142c05760046000803e5060005160e01c5b90565b600060443d10156142d15790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561430057505050505090565b82850191508151818111156143185750505050505090565b843d87010160208285010111156143325750505050505090565b614341602082860101876132c7565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b634e487b7160e01b600052600160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906143e49083018461322b565b97965050505050505056fe4f6e2d436861696e204e46542c206d616b696e6720626c6f636b636861696e73205354524f4e4745524142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f5468652066697273742063686970206576657220646576656c6f706564206279204d6f6f6e204368697020436f2e2c2066756c6c79206f6e2d636861696e2c206d616b696e6720626c6f636b636861696e73205354524f4e4745522ea2646970667358221220a8b564e40904c09ecb97b27bc69270aef4343895cf2642a46cd9f033bb6277c864736f6c63430008090033

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

000000000000000000000000804e34a51b8dab794ab0c566211250c575e445ae000000000000000000000000ba5680103cd7c5ec6029051e8a29e0499e5ef7f0

-----Decoded View---------------
Arg [0] : _mbytesAddress (address): 0x804e34A51B8DaB794AB0c566211250C575e445ae
Arg [1] : _royaltyRecipient (address): 0xBa5680103cd7C5Ec6029051E8A29E0499E5EF7f0

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000804e34a51b8dab794ab0c566211250c575e445ae
Arg [1] : 000000000000000000000000ba5680103cd7c5ec6029051e8a29e0499e5ef7f0


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.