ETH Price: $3,271.38 (-1.81%)

Contract

0x14A374196006871D23ba1820318E1e2eFF9C7042
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Change Main Addr...159825012022-11-16 12:11:11797 days ago1668600671IN
0x14A37419...eFF9C7042
0 ETH0.0004048613.91178663

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
nftSplit

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 17 : NFTResolution.sol
// SPDX-License-Identifier: BSL
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

/**
 [BSL License]
 @title NFT Splitter
 @notice This contract transforms ERC721 NFTs into ERC1155 NFTs with 10 identical tokens. 
 @author Ismailov Altynbek <[email protected]>
*/

/* The sale of NFT using this contract results in royalty for CM */

abstract contract ERC1155Royalty is ERC2981, ERC1155 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC1155, ERC2981)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token.
     */
    function _burn(
        address from,
        uint256 tokenID,
        uint256 amount
    ) internal virtual override {
        super._burn(from, tokenID, amount);
        _resetTokenRoyalty(tokenID);
    }
}

/* If a partner collects two copies of the ERC721 NFT, a partner can retreive it from their proxy contract. */
abstract contract Instance {
    function sendNft(
        address nft_address,
        address receipent,
        uint256 nft_ID
    ) external virtual;
}

contract nftSplit is ERC1155Royalty, Ownable {
    using Counters for Counters.Counter; // Counting IDs
    Counters.Counter private _tokenIds; //Storing count IF
    address public mainAddress; //The address of the main contract
    mapping(address => mapping(uint256 => uint8)) public wasDistributed;
    mapping(address => uint8) internal authrizedAddresses; //Proxies have to authorized here to split NFTs
    mapping(address => mapping(uint256 => uint256)) public tokenTracker; //Tracking NFTs that were split

    /* NFTs that are to be splitted holds the following attrubutes*/
    struct NFTAttributes {
        address nft_address; //the address of the ERC721 NFT
        string image; //image of the NFT
        uint256 nft_ID; //the ID of the ERC721 token
        address implementationAddr; //The address that holds ERC721 NFT
    }

    mapping(uint256 => NFTAttributes) internal nftHolderAttributes; //Storage of the ERC1155 NFTs attributes

    /* The main address is passed to this NFT*/
    constructor(address _mainaddress) ERC1155("") {
        _tokenIds.increment();
        _setDefaultRoyalty(_mainaddress, 100); //Royalty is set to 1% of the sales price.
        mainAddress = _mainaddress;
    }

    /**
     * @notice Addresses of the proxy contracts needs to be added to authorize them to split NFTs held by the contract.
     * @param _addAddresses an Address of the proxy contract.
     */

    function addAddresses(address _addAddresses) external {
        if (mainAddress != msg.sender) {revert CONTRACT_NOT_AUTHORIZED(msg.sender);}
        authrizedAddresses[_addAddresses] = 1;
    }

    /**
     * @notice Changing the main address;
     * @param _mainAddress an Address of the main contract that mints NFTs
     */
    function changeMainAddress(address _mainAddress) external onlyOwner {
        mainAddress = _mainAddress;
    }

    /**
     * @notice Checks whether an account holds both copies of ERC721 tokens
     * @dev TokenID of the ERC1155 token.
     * @param _tokenID The ID of the NFT stored within this contract
     */
    function checkStatus(uint256 _tokenID) external view returns (bool) {
        return balanceOf(msg.sender, _tokenID) == 10;
    }

    /* Utility function that transforms address to trimmed string address */
    function addressToString(address addr)
        private
        pure
        returns (string memory)
    {
        // Cast address to byte array
        bytes memory addressBytes = abi.encodePacked(addr);
        // Byte array for the new string
        bytes memory stringBytes = new bytes(42);
        // Assign first two bytes to 'Ox'
        stringBytes[0] = "0";
        stringBytes[1] = "x";
        // Iterate over every byte in the array
        // Each byte contains two hex digits that gets individually converted
        // into their ASCII representation and added to the string
        for (uint256 i = 0; i < 20; i++) {
            // Convert hex to decimal values
            uint8 leftValue = uint8(addressBytes[i]) / 16;
            uint8 rightValue = uint8(addressBytes[i]) - 16 * leftValue;
            //Convert decimals to ASCII values
            bytes1 leftChar = leftValue < 10
                ? bytes1(leftValue + 48)
                : bytes1(leftValue + 87);
            bytes1 rightChar = rightValue < 10
                ? bytes1(rightValue + 48)
                : bytes1(rightValue + 87);
            // Add ASCII values to the string byte array
            stringBytes[2 * i + 3] = rightChar;
            stringBytes[2 * i + 2] = leftChar;
        }
        // Cast byte array to string and return
        bytes memory trimmedr = new bytes(8);
        bytes memory trimmedl = new bytes(8);
        for (uint256 k = 0; k < 8; k++) {
            trimmedr[k] = stringBytes[k];
            trimmedl[k] = stringBytes[34 + k];
        }
        string memory trimmed = string(
            abi.encodePacked(trimmedr, "...", trimmedl)
        );
        return trimmed;
    }


   error CONTRACT_NOT_AUTHORIZED(address contractAddress);
   error NFT_HAS_BEEN_SPLIT(address TokenAddress, uint TokenID);
   error NFT_NOT_OWNED_BY_YOU(address TokenAddress, uint TokenID);
    /**
     * @notice Once divorced, partners can split ERC721 tokens owned by the proxy contract. 
     * @dev Each partner/or other family member can call this function to split ERC721 token between partners.
     Two identical copies of ERC721 will be created by the NFT Splitter contract creating a new ERC1155 token.
      The token will be marked as "Copy". 
     To retreive the original copy, the owner needs to have both copies of the NFT.
     This function is called by the proxy contract.  

     * @param _tokenAddr the address of the ERC721 token that is being split. 
     * @param _tokenID the ID of the ERC721 token that is being split
     * @param image image of the NFT 
     * @param proposer A proposer
     * @param proposed A proposed
     * @param _implementationAddr An address of the proxy contract
     */

    function splitNFT(
        address _tokenAddr,
        uint256 _tokenID,
        string calldata image,
        address proposer,
        address proposed,
        address _implementationAddr,
        uint _shareDivide
    ) external {
        if (authrizedAddresses[msg.sender] != 1) {revert CONTRACT_NOT_AUTHORIZED (msg.sender);}
        if (wasDistributed[_tokenAddr][_tokenID] != 0) {revert NFT_HAS_BEEN_SPLIT(_tokenAddr,_tokenID);}//ERC721 Token should not be split before
        if (checkOwnership(_tokenAddr, _tokenID) == false) {revert NFT_NOT_OWNED_BY_YOU(_tokenAddr,_tokenID);} // Check whether the indicated token is owned by the proxy contract.

        wasDistributed[_tokenAddr][_tokenID] = 1; //Check and Effect
        uint256 newItemId = _tokenIds.current();


        _mint(proposer, newItemId, _shareDivide, "0x0");
        _mint(proposed, newItemId, 10 - _shareDivide, "0x0");

        nftHolderAttributes[newItemId] = NFTAttributes({
            nft_address: _tokenAddr,
            image: image,
            nft_ID: _tokenID,
            implementationAddr: _implementationAddr
        });

        tokenTracker[_tokenAddr][_tokenID] = newItemId;

        _tokenIds.increment();
    }

    error YOU_HAVE_NOT_COLLECTED_ALL_COPIES(uint balance);
    /**
     * @notice If partner acquires both copies of NFTs, the NFT can be retreived by that partner through this function.
     * @dev The contract checks whether an address has both copies. Tokens are burnt once retreived.
     * @param _tokenID the ID of the ERC721 token that is being sent
     */

    function joinNFT(uint256 _tokenID) external {
        if (balanceOf(msg.sender, _tokenID) != 10) {revert YOU_HAVE_NOT_COLLECTED_ALL_COPIES(balanceOf(msg.sender, _tokenID));}
        NFTAttributes storage nftAttributes = nftHolderAttributes[_tokenID];
        Instance instance = Instance(nftAttributes.implementationAddr);
         _burn(msg.sender, _tokenID, 10);
         wasDistributed[nftAttributes.nft_address][nftAttributes.nft_ID] == 0;
        instance.sendNft(
            nftAttributes.nft_address,
            msg.sender,
            nftAttributes.nft_ID
        );
    }

       /**
     * @notice Checks the ownership of the ERC721 token.
     * @param _tokenAddr the address of the ERC721 token that is being split.
     * @param _tokenID the ID of the ERC721 token that is being split
     */

    function checkOwnership(address _tokenAddr, uint256 _tokenID)
        internal
        view
        returns (bool)
    {
        address _owner;
        _owner = IERC721(_tokenAddr).ownerOf(_tokenID);
        return (msg.sender == _owner);
    }

    /* A view function to see URI of the ERC1155 token*/
    function uri(uint256 _tokenId)
        public
        view
        override
        returns (string memory)
    {
        NFTAttributes memory nftAttributes = nftHolderAttributes[_tokenId];

        string memory json = Base64.encode(
            abi.encodePacked(
                 '{"name": "',
                "CryptoMarry NFT Duplicate.",
                '", "description": "This NFT has been split between partners upon dissolution of the Family Account", "image": "',
                nftAttributes.image,
                '", "attributes":[',
                '{"trait_type": "CryptoMarry copies:", "value": "1 out of 10"},',
                '{"trait_type": "Original is owned by:", "value": "',
                addressToString(nftAttributes.implementationAddr),
                '"}',']}'
            )
        );
        string memory output = string(
            abi.encodePacked("data:application/json;base64,", json)
        );
        return output;
    }
}

File 2 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 4 of 17 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)

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 {
        _setApprovalForAll(_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 `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

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

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

        _doSafeTransferAcceptanceCheck(operator, address(0), to, 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 `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

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

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

        emit TransferSingle(operator, from, 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 from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

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

        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: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @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 5 of 17 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 6 of 17 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64 {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

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

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

File 7 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev 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 {
        _transferOwnership(address(0));
    }

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

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

File 8 of 17 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
        external
        view
        virtual
        override
        returns (address, uint256)
    {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `tokenId` must be already minted.
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 9 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 10 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 11 of 17 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

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 12 of 17 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

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.
     *
     * NOTE: 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.
     *
     * NOTE: 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 13 of 17 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

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 14 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 16 of 17 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

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

pragma solidity ^0.8.0;

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100,
    "details": {
      "yul": false
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_mainaddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"CONTRACT_NOT_AUTHORIZED","type":"error"},{"inputs":[{"internalType":"address","name":"TokenAddress","type":"address"},{"internalType":"uint256","name":"TokenID","type":"uint256"}],"name":"NFT_HAS_BEEN_SPLIT","type":"error"},{"inputs":[{"internalType":"address","name":"TokenAddress","type":"address"},{"internalType":"uint256","name":"TokenID","type":"uint256"}],"name":"NFT_NOT_OWNED_BY_YOU","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"YOU_HAVE_NOT_COLLECTED_ALL_COPIES","type":"error"},{"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":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"},{"inputs":[{"internalType":"address","name":"_addAddresses","type":"address"}],"name":"addAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"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":"address","name":"_mainAddress","type":"address"}],"name":"changeMainAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"checkStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"uint256","name":"_tokenID","type":"uint256"}],"name":"joinNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mainAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[{"internalType":"address","name":"_tokenAddr","type":"address"},{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"string","name":"image","type":"string"},{"internalType":"address","name":"proposer","type":"address"},{"internalType":"address","name":"proposed","type":"address"},{"internalType":"address","name":"_implementationAddr","type":"address"},{"internalType":"uint256","name":"_shareDivide","type":"uint256"}],"name":"splitNFT","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":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenTracker","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"wasDistributed","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620031c0380380620031c08339810160408190526200003491620001e4565b6040805160208101909152600081526200004e81620000a4565b506200005a33620000b6565b6200007160066200010860201b62000bb21760201c565b6200007e81606462000111565b600780546001600160a01b0319166001600160a01b03929092169190911790556200047b565b6004620000b2828262000320565b5050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546001019055565b6127106001600160601b0382161115620001485760405162461bcd60e51b81526004016200013f90620003f0565b60405180910390fd5b6001600160a01b038216620001715760405162461bcd60e51b81526004016200013f906200043f565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b60006001600160a01b0382165b92915050565b620001c881620001aa565b8114620001d457600080fd5b50565b8051620001b781620001bd565b600060208284031215620001fb57620001fb600080fd5b6000620002098484620001d7565b949350505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200025257607f821691505b60208210810362000267576200026762000227565b50919050565b6000620001b76200027b8381565b90565b62000289836200026d565b81546008840282811b60001990911b908116901990911617825550505050565b6000620002b88184846200027e565b505050565b81811015620000b257620002d3600082620002a9565b600101620002bd565b601f821115620002b8576000818152602090206020601f85010481016020851015620003055750805b620003196020601f860104830182620002bd565b5050505050565b81516001600160401b038111156200033c576200033c62000211565b6200034882546200023d565b62000355828285620002dc565b6020601f8311600181146200038c5760008415620003735750858201515b600019600886021c1981166002860217865550620003e8565b600085815260208120601f198616915b82811015620003be57888501518255602094850194600190920191016200039c565b86831015620003db5784890151600019601f89166008021c191682555b6001600288020188555050505b505050505050565b60208082528101620001b781602a81527f455243323938313a20726f79616c7479206665652077696c6c206578636565646020820152692073616c65507269636560b01b604082015260600190565b60208082528101620001b781601981527f455243323938313a20696e76616c696420726563656976657200000000000000602082015260400190565b612d35806200048b6000396000f3fe608060405234801561001057600080fd5b506004361061012b5760003560e01c80637e71fc40116100ad578063d23c203211610071578063d23c2032146102c2578063d6704c0e146102ed578063e985e9c514610300578063f242432a1461033c578063f2fde38b1461034f57600080fd5b80637e71fc401461023d5780638da5cb5b1461027857806390085b1914610289578063a22cb4651461029c578063a73fcfca146102af57600080fd5b80632858c764116100f45780632858c764146101ce5780632a55205a146101e15780632eb2c2d6146102025780634e1273f414610215578063715018a61461023557600080fd5b8062fdd58e1461013057806301ffc9a71461015957806303777734146101795780630cdd42341461018e5780630e89341c146101ae575b600080fd5b61014361013e366004611911565b610362565b6040516101509190611956565b60405180910390f35b61016c61016736600461197f565b6103be565b60405161015091906119b0565b61018c6101873660046119be565b6103c9565b005b6007546101a1906001600160a01b031681565b60405161015091906119e8565b6101c16101bc3660046119f6565b610415565b6040516101509190611a79565b61016c6101dc3660046119f6565b610566565b6101f46101ef366004611a91565b61057b565b604051610150929190611ab3565b61018c610210366004611c63565b610629565b610228610223366004611d9e565b610675565b6040516101509190611e61565b61018c61075c565b61026b61024b366004611911565b600860209081526000928352604080842090915290825290205460ff1681565b6040516101509190611e7b565b6005546001600160a01b03166101a1565b61018c6102973660046119be565b610792565b61018c6102aa366004611e9c565b6107e3565b61018c6102bd366004611f19565b6107f2565b6101436102d0366004611911565b600a60209081526000928352604080842090915290825290205481565b61018c6102fb3660046119f6565b610a2e565b61016c61030e366004611fd6565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b61018c61034a366004612009565b610b11565b61018c61035d3660046119be565b610b56565b60006001600160a01b0383166103935760405162461bcd60e51b815260040161038a906120ae565b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b60006103b882610bbb565b6005546001600160a01b031633146103f35760405162461bcd60e51b815260040161038a906120be565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600b6020908152604080832081516080810190925280546001600160a01b0316825260018101805460609594840191906104539061210e565b80601f016020809104026020016040519081016040528092919081815260200182805461047f9061210e565b80156104cc5780601f106104a1576101008083540402835291602001916104cc565b820191906000526020600020905b8154815290600101906020018083116104af57829003601f168201915b505050918352505060028201546020808301919091526003909201546001600160a01b03166040909101528101516060820151919250600091610538919061051390610bfb565b60405160200161052492919061217d565b604051602081830303815290604052610f25565b905060008160405160200161054d9190612315565b60408051601f1981840301815291905295945050505050565b60006105723383610362565b600a1492915050565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916105f05750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061060f906001600160601b03168761235d565b6106199190612392565b91519350909150505b9250929050565b6001600160a01b0385163314806106455750610645853361030e565b6106615760405162461bcd60e51b815260040161038a906123f9565b61066e8585858585611077565b5050505050565b606081518351146106985760405162461bcd60e51b815260040161038a9061244f565b600083516001600160401b038111156106b3576106b3611ace565b6040519080825280602002602001820160405280156106dc578160200160208202803683370190505b50905060005b8451811015610754576107278582815181106107005761070061245f565b602002602001015185838151811061071a5761071a61245f565b6020026020010151610362565b8282815181106107395761073961245f565b602090810291909101015261074d81612475565b90506106e2565b509392505050565b6005546001600160a01b031633146107865760405162461bcd60e51b815260040161038a906120be565b6107906000611216565b565b6007546001600160a01b031633146107bf5733604051637b7d071760e11b815260040161038a91906119e8565b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6107ee338383611268565b5050565b3360009081526009602052604090205460ff166001146108275733604051637b7d071760e11b815260040161038a91906119e8565b6001600160a01b03881660009081526008602090815260408083208a845290915290205460ff16156108705787876040516331db52b560e11b815260040161038a929190611ab3565b61087a888861130a565b15156000036108a05787876040516379c448a760e01b815260040161038a929190611ab3565b6001600160a01b03881660009081526008602090815260408083208a84529091528120805460ff191660011790556108d760065490565b90506109008582846040518060400160405280600381526020016203078360ec1b81525061138d565b610931848261091085600a61248f565b6040518060400160405280600381526020016203078360ec1b81525061138d565b60405180608001604052808a6001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505060208083018c90526001600160a01b03878116604094850152858352600b825292909120835181546001600160a01b031916931692909217825582015160018201906109cf9082612567565b506040828101516002830155606090920151600390910180546001600160a01b0319166001600160a01b039283161790558a166000908152600a60209081528282208b8352905220819055600680546001019055505050505050505050565b610a383382610362565b600a14610a6257610a493382610362565b60405162b9661360e81b815260040161038a9190611956565b6000818152600b6020526040902060038101546001600160a01b0316610a8a3384600a61145b565b81546001600160a01b03908116600081815260086020908152604080832060028801549384905290915251634d81c77d60e01b815292841692634d81c77d92610ada929091339190600401612624565b600060405180830381600087803b158015610af457600080fd5b505af1158015610b08573d6000803e3d6000fd5b50505050505050565b6001600160a01b038516331480610b2d5750610b2d853361030e565b610b495760405162461bcd60e51b815260040161038a90612692565b61066e858585858561147e565b6005546001600160a01b03163314610b805760405162461bcd60e51b815260040161038a906120be565b6001600160a01b038116610ba65760405162461bcd60e51b815260040161038a906126e5565b610baf81611216565b50565b80546001019055565b60006001600160e01b03198216636cdb3d1360e11b1480610bec57506001600160e01b031982166303a24d0760e21b145b806103b857506103b882611590565b6060600082604051602001610c10919061271d565b60408051808303601f19018152602a80845260608401909252925060009190602082018180368337019050509050600360fc1b81600081518110610c5657610c5661245f565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610c8557610c8561245f565b60200101906001600160f81b031916908160001a90535060005b6014811015610dfc5760006010848381518110610cbe57610cbe61245f565b0160200151610cd0919060f81c612732565b90506000610cdf826010612743565b858481518110610cf157610cf161245f565b0160200151610d03919060f81c612763565b90506000600a8360ff1610610d2557610d1d836057612780565b60f81b610d34565b610d30836030612780565b60f81b5b90506000600a8360ff1610610d5657610d4e836057612780565b60f81b610d65565b610d61836030612780565b60f81b5b90508086610d7487600261235d565b610d7f90600361279d565b81518110610d8f57610d8f61245f565b60200101906001600160f81b031916908160001a9053508186610db387600261235d565b610dbe90600261279d565b81518110610dce57610dce61245f565b60200101906001600160f81b031916908160001a905350505050508080610df490612475565b915050610c9f565b506040805160088082528183019092526000916020820181803683375050604080516008808252818301909252929350600092915060208201818036833701905050905060005b6008811015610ef457838181518110610e5e57610e5e61245f565b602001015160f81c60f81b838281518110610e7b57610e7b61245f565b60200101906001600160f81b031916908160001a90535083610e9e82602261279d565b81518110610eae57610eae61245f565b602001015160f81c60f81b828281518110610ecb57610ecb61245f565b60200101906001600160f81b031916908160001a90535080610eec81612475565b915050610e43565b5060008282604051602001610f0a9291906127b0565b60408051601f19818403018152919052979650505050505050565b60608151600003610f4457505060408051602081019091526000815290565b6000604051806060016040528060408152602001612cc06040913990506000600384516002610f73919061279d565b610f7d9190612392565b610f8890600461235d565b6001600160401b03811115610f9f57610f9f611ace565b6040519080825280601f01601f191660200182016040528015610fc9576020820181803683370190505b509050600182016020820185865187015b80821015611035576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845360018401935050610fda565b505060038651066001811461105157600281146110645761106c565b603d6001830353603d600283035361106c565b603d60018303535b509195945050505050565b81518351146110985760405162461bcd60e51b815260040161038a90612819565b6001600160a01b0384166110be5760405162461bcd60e51b815260040161038a9061286b565b3360005b84518110156111a85760008582815181106110df576110df61245f565b6020026020010151905060008583815181106110fd576110fd61245f565b60209081029190910181015160008481526002835260408082206001600160a01b038e16835290935291909120549091508181101561114e5760405162461bcd60e51b815260040161038a906128c2565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061118d90849061279d565b92505081905550505050806111a190612475565b90506110c2565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516111f89291906128d2565b60405180910390a461120e8187878787876115c5565b505050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036112995760405162461bcd60e51b815260040161038a9061293d565b6001600160a01b0383811660008181526003602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906112fd9085906119b0565b60405180910390a3505050565b600080836001600160a01b0316636352211e846040518263ffffffff1660e01b81526004016113399190611956565b602060405180830381865afa158015611356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137a9190612958565b6001600160a01b03163314949350505050565b6001600160a01b0384166113b35760405162461bcd60e51b815260040161038a906129b7565b336113cd816000876113c4886116d3565b61066e886116d3565b60008481526002602090815260408083206001600160a01b0389168452909152812080548592906113ff90849061279d565b92505081905550846001600160a01b031660006001600160a01b0316826001600160a01b0316600080516020612ca083398151915287876040516114449291906129c7565b60405180910390a461066e8160008787878761171e565b6114668383836117d9565b5060009081526001602052604081205550565b505050565b6001600160a01b0384166114a45760405162461bcd60e51b815260040161038a9061286b565b336114b48187876113c4886116d3565b60008481526002602090815260408083206001600160a01b038a168452909152902054838110156114f75760405162461bcd60e51b815260040161038a906128c2565b60008581526002602090815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061153690849061279d565b92505081905550856001600160a01b0316876001600160a01b0316836001600160a01b0316600080516020612ca0833981519152888860405161157a9291906129c7565b60405180910390a4610b0882888888888861171e565b60006001600160e01b0319821663152a902d60e11b14806103b857506301ffc9a760e01b6001600160e01b03198316146103b8565b6001600160a01b0384163b1561120e5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061160990899089908890889088906004016129d5565b6020604051808303816000875af1925050508015611644575060408051601f3d908101601f1916820190925261164191810190612a40565b60015b6116a357611650612a61565b806308c379a0036116895750611664612a7c565b8061166f575061168b565b8060405162461bcd60e51b815260040161038a9190611a79565b505b60405162461bcd60e51b815260040161038a90612b52565b6001600160e01b0319811663bc197c8160e01b14610b085760405162461bcd60e51b815260040161038a90612ba7565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061170d5761170d61245f565b602090810291909101015292915050565b6001600160a01b0384163b1561120e5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906117629089908990889088908890600401612bb7565b6020604051808303816000875af192505050801561179d575060408051601f3d908101601f1916820190925261179a91810190612a40565b60015b6117a957611650612a61565b6001600160e01b0319811663f23a6e6160e01b14610b085760405162461bcd60e51b815260040161038a90612ba7565b6001600160a01b0383166117ff5760405162461bcd60e51b815260040161038a90612c3e565b3361182f81856000611810876116d3565b611819876116d3565b5050604080516020810190915260009052505050565b60008381526002602090815260408083206001600160a01b0388168452909152902054828110156118725760405162461bcd60e51b815260040161038a90612c8f565b60008481526002602090815260408083206001600160a01b03808a1680865291909352818420878603905590519091851690600080516020612ca0833981519152906118c190899089906129c7565b60405180910390a45050505050565b60006001600160a01b0382166103b8565b6118ea816118d0565b8114610baf57600080fd5b80356103b8816118e1565b806118ea565b80356103b881611900565b6000806040838503121561192757611927600080fd5b600061193385856118f5565b925050602061194485828601611906565b9150509250929050565b805b82525050565b602081016103b8828461194e565b6001600160e01b031981166118ea565b80356103b881611964565b60006020828403121561199457611994600080fd5b60006119a08484611974565b949350505050565b801515611950565b602081016103b882846119a8565b6000602082840312156119d3576119d3600080fd5b60006119a084846118f5565b611950816118d0565b602081016103b882846119df565b600060208284031215611a0b57611a0b600080fd5b60006119a08484611906565b60005b83811015611a32578181015183820152602001611a1a565b50506000910152565b601f01601f191690565b6000611a4f825190565b808452602084019350611a66818560208601611a17565b611a6f81611a3b565b9093019392505050565b60208082528101611a8a8184611a45565b9392505050565b60008060408385031215611aa757611aa7600080fd5b60006119338585611906565b60408101611ac182856119df565b611a8a602083018461194e565b634e487b7160e01b600052604160045260246000fd5b611aed82611a3b565b81018181106001600160401b0382111715611b0a57611b0a611ace565b6040525050565b6000611b1c60405190565b9050611b288282611ae4565b919050565b60006001600160401b03821115611b4657611b46611ace565b5060209081020190565b6000611b63611b5e84611b2d565b611b11565b83815290506020808201908402830185811115611b8257611b82600080fd5b835b81811015611ba65780611b978882611906565b84525060209283019201611b84565b5050509392505050565b600082601f830112611bc457611bc4600080fd5b81356119a0848260208601611b50565b60006001600160401b03821115611bed57611bed611ace565b611bf682611a3b565b60200192915050565b82818337506000910152565b6000611c19611b5e84611bd4565b905082815260208101848484011115611c3457611c34600080fd5b610754848285611bff565b600082601f830112611c5357611c53600080fd5b81356119a0848260208601611c0b565b600080600080600060a08688031215611c7e57611c7e600080fd5b6000611c8a88886118f5565b9550506020611c9b888289016118f5565b94505060408601356001600160401b03811115611cba57611cba600080fd5b611cc688828901611bb0565b93505060608601356001600160401b03811115611ce557611ce5600080fd5b611cf188828901611bb0565b92505060808601356001600160401b03811115611d1057611d10600080fd5b611d1c88828901611c3f565b9150509295509295909350565b6000611d37611b5e84611b2d565b83815290506020808201908402830185811115611d5657611d56600080fd5b835b81811015611ba65780611d6b88826118f5565b84525060209283019201611d58565b600082601f830112611d8e57611d8e600080fd5b81356119a0848260208601611d29565b60008060408385031215611db457611db4600080fd5b82356001600160401b03811115611dcd57611dcd600080fd5b611dd985828601611d7a565b92505060208301356001600160401b03811115611df857611df8600080fd5b61194485828601611bb0565b6000611e10838361194e565b505060200190565b6000611e22825190565b80845260209384019383018060005b83811015611e56578151611e458882611e04565b975060208301925050600101611e31565b509495945050505050565b60208082528101611a8a8184611e18565b60ff8116611950565b602081016103b88284611e72565b8015156118ea565b80356103b881611e89565b60008060408385031215611eb257611eb2600080fd5b6000611ebe85856118f5565b925050602061194485828601611e91565b60008083601f840112611ee457611ee4600080fd5b5081356001600160401b03811115611efe57611efe600080fd5b60208301915083600182028301111561062257610622600080fd5b60008060008060008060008060e0898b031215611f3857611f38600080fd5b6000611f448b8b6118f5565b9850506020611f558b828c01611906565b97505060408901356001600160401b03811115611f7457611f74600080fd5b611f808b828c01611ecf565b96509650506060611f938b828c016118f5565b9450506080611fa48b828c016118f5565b93505060a0611fb58b828c016118f5565b92505060c0611fc68b828c01611906565b9150509295985092959890939650565b60008060408385031215611fec57611fec600080fd5b6000611ff885856118f5565b9250506020611944858286016118f5565b600080600080600060a0868803121561202457612024600080fd5b600061203088886118f5565b9550506020612041888289016118f5565b945050604061205288828901611906565b9350506060611cf188828901611906565b602b81526000602082017f455243313135353a2062616c616e636520717565727920666f7220746865207a81526a65726f206164647265737360a81b602082015291505b5060400190565b602080825281016103b881612063565b60208082528181019081527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726040830152606082016103b8565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061212257607f821691505b602082108103612134576121346120f8565b50919050565b6000612144825190565b612152818560208601611a17565b9290920192915050565b61227d60f01b815260005b5060020190565b615d7d60f01b81526000612167565b693d913730b6b2911d101160b11b81527f43727970746f4d61727279204e4654204475706c69636174652e000000000000600a8201527f222c20226465736372697074696f6e223a202254686973204e4654206861732060248201527f6265656e2073706c6974206265747765656e20706172746e6572732075706f6e60448201527f20646973736f6c7574696f6e206f66207468652046616d696c79204163636f7560648201526e373a1116101134b6b0b3b2911d101160891b6084820152609301600061224c828561213a565b70222c202261747472696275746573223a5b60781b81527f7b2274726169745f74797065223a202243727970746f4d6172727920636f706960118201527f65733a222c202276616c7565223a202231206f7574206f66203130227d2c000060318201527f7b2274726169745f74797065223a20224f726967696e616c206973206f776e65604f820152713210313c9d111610113b30b63ab2911d101160711b606f82015260810191506122ff828461213a565b915061230a8261215c565b91506119a08261216e565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152601d016000611a8a828461213a565b634e487b7160e01b600052601160045260246000fd5b81810280821583820485141761237557612375612347565b5092915050565b634e487b7160e01b600052601260045260246000fd5b6000825b9250826123a5576123a561237c565b500490565b603281526000602082017f455243313135353a207472616e736665722063616c6c6572206973206e6f74208152711bdddb995c881b9bdc88185c1c1c9bdd995960721b602082015291506120a7565b602080825281016103b8816123aa565b602981526000602082017f455243313135353a206163636f756e747320616e6420696473206c656e677468815268040dad2e6dac2e8c6d60bb1b602082015291506120a7565b602080825281016103b881612409565b634e487b7160e01b600052603260045260246000fd5b6000600019820361248857612488612347565b5060010190565b818103818111156103b8576103b8612347565b60006103b86124ae8381565b90565b6124ba836124a2565b81546008840282811b60001990911b908116901990911617825550505050565b60006114798184846124b1565b818110156107ee576124fa6000826124da565b6001016124e7565b601f821115611479576000818152602090206020601f850104810160208510156125295750805b61066e6020601f8601048301826124e7565b6000196008929092029190911c191690565b6000612559838361253b565b600290930290921792915050565b81516001600160401b0381111561258057612580611ace565b61258a825461210e565b612595828285612502565b6020601f8311600181146125c357600084156125b15750858201515b6125bb858261254d565b86555061120e565b600085815260208120601f198616915b828110156125f357888501518255602094850194600190920191016125d3565b86831015612610578489015161260c601f89168261253b565b8355505b600160028802018855505050505050505050565b6060810161263282866119df565b61263f60208301856119df565b6119a0604083018461194e565b602981526000602082017f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7281526808185c1c1c9bdd995960ba1b602082015291506120a7565b602080825281016103b88161264c565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291506120a7565b602080825281016103b8816126a2565b60006103b88260601b90565b60006103b8826126f5565b611950612718826118d0565b612701565b6000612729828461270c565b50601401919050565b600060ff8216915060ff8316612396565b60ff91821691908116908282029081169081811461237557612375612347565b60ff9182169190811690828203908111156103b8576103b8612347565b60ff9182169190811690828201908111156103b8576103b8612347565b808201808211156103b8576103b8612347565b60006127bc828561213a565b6217171760e91b815260030191506119a0828461213a565b602881526000602082017f455243313135353a2069647320616e6420616d6f756e7473206c656e677468208152670dad2e6dac2e8c6d60c31b602082015291506120a7565b602080825281016103b8816127d4565b602581526000602082017f455243313135353a207472616e7366657220746f20746865207a65726f206164815264647265737360d81b602082015291506120a7565b602080825281016103b881612829565b602a81526000602082017f455243313135353a20696e73756666696369656e742062616c616e636520666f81526939103a3930b739b332b960b11b602082015291506120a7565b602080825281016103b88161287b565b604080825281016128e38185611e18565b905081810360208301526119a08184611e18565b602981526000602082017f455243313135353a2073657474696e6720617070726f76616c20737461747573815268103337b91039b2b63360b91b602082015291506120a7565b602080825281016103b8816128f7565b80516103b8816118e1565b60006020828403121561296d5761296d600080fd5b60006119a0848461294d565b602181526000602082017f455243313135353a206d696e7420746f20746865207a65726f206164647265738152607360f81b602082015291506120a7565b602080825281016103b881612979565b60408101611ac1828561194e565b60a081016129e382886119df565b6129f060208301876119df565b8181036040830152612a028186611e18565b90508181036060830152612a168185611e18565b90508181036080830152612a2a8184611a45565b979650505050505050565b80516103b881611964565b600060208284031215612a5557612a55600080fd5b60006119a08484612a35565b600060033d11156124ae5760046000803e5060005160e01c90565b600060443d1015612a8a5790565b60405160043d036004823e80513d60248201116001600160401b0382111715612ab257505090565b80820180516001600160401b03811115612acd575050505090565b80602083010160043d038501811115612ae857505050505090565b612af782602001850186611ae4565b5090949350505050565b603481526000602082017f455243313135353a207472616e7366657220746f206e6f6e20455243313135358152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b602082015291506120a7565b602080825281016103b881612b01565b602881526000602082017f455243313135353a204552433131353552656365697665722072656a656374658152676420746f6b656e7360c01b602082015291506120a7565b602080825281016103b881612b62565b60a08101612bc582886119df565b612bd260208301876119df565b612bdf604083018661194e565b612bec606083018561194e565b8181036080830152612a2a8184611a45565b602381526000602082017f455243313135353a206275726e2066726f6d20746865207a65726f206164647281526265737360e81b602082015291506120a7565b602080825281016103b881612bfe565b602481526000602082017f455243313135353a206275726e20616d6f756e7420657863656564732062616c815263616e636560e01b602082015291506120a7565b602080825281016103b881612c4e56fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f624142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa264697066735822122089f48c691bff4b140369ddf5b3ab79b248e210cb55980eb83b4c795405fc3b0d64736f6c63430008110033000000000000000000000000026c19cfe0f8230f635829be34161812ede408e5

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061012b5760003560e01c80637e71fc40116100ad578063d23c203211610071578063d23c2032146102c2578063d6704c0e146102ed578063e985e9c514610300578063f242432a1461033c578063f2fde38b1461034f57600080fd5b80637e71fc401461023d5780638da5cb5b1461027857806390085b1914610289578063a22cb4651461029c578063a73fcfca146102af57600080fd5b80632858c764116100f45780632858c764146101ce5780632a55205a146101e15780632eb2c2d6146102025780634e1273f414610215578063715018a61461023557600080fd5b8062fdd58e1461013057806301ffc9a71461015957806303777734146101795780630cdd42341461018e5780630e89341c146101ae575b600080fd5b61014361013e366004611911565b610362565b6040516101509190611956565b60405180910390f35b61016c61016736600461197f565b6103be565b60405161015091906119b0565b61018c6101873660046119be565b6103c9565b005b6007546101a1906001600160a01b031681565b60405161015091906119e8565b6101c16101bc3660046119f6565b610415565b6040516101509190611a79565b61016c6101dc3660046119f6565b610566565b6101f46101ef366004611a91565b61057b565b604051610150929190611ab3565b61018c610210366004611c63565b610629565b610228610223366004611d9e565b610675565b6040516101509190611e61565b61018c61075c565b61026b61024b366004611911565b600860209081526000928352604080842090915290825290205460ff1681565b6040516101509190611e7b565b6005546001600160a01b03166101a1565b61018c6102973660046119be565b610792565b61018c6102aa366004611e9c565b6107e3565b61018c6102bd366004611f19565b6107f2565b6101436102d0366004611911565b600a60209081526000928352604080842090915290825290205481565b61018c6102fb3660046119f6565b610a2e565b61016c61030e366004611fd6565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b61018c61034a366004612009565b610b11565b61018c61035d3660046119be565b610b56565b60006001600160a01b0383166103935760405162461bcd60e51b815260040161038a906120ae565b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b60006103b882610bbb565b6005546001600160a01b031633146103f35760405162461bcd60e51b815260040161038a906120be565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600b6020908152604080832081516080810190925280546001600160a01b0316825260018101805460609594840191906104539061210e565b80601f016020809104026020016040519081016040528092919081815260200182805461047f9061210e565b80156104cc5780601f106104a1576101008083540402835291602001916104cc565b820191906000526020600020905b8154815290600101906020018083116104af57829003601f168201915b505050918352505060028201546020808301919091526003909201546001600160a01b03166040909101528101516060820151919250600091610538919061051390610bfb565b60405160200161052492919061217d565b604051602081830303815290604052610f25565b905060008160405160200161054d9190612315565b60408051601f1981840301815291905295945050505050565b60006105723383610362565b600a1492915050565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916105f05750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061060f906001600160601b03168761235d565b6106199190612392565b91519350909150505b9250929050565b6001600160a01b0385163314806106455750610645853361030e565b6106615760405162461bcd60e51b815260040161038a906123f9565b61066e8585858585611077565b5050505050565b606081518351146106985760405162461bcd60e51b815260040161038a9061244f565b600083516001600160401b038111156106b3576106b3611ace565b6040519080825280602002602001820160405280156106dc578160200160208202803683370190505b50905060005b8451811015610754576107278582815181106107005761070061245f565b602002602001015185838151811061071a5761071a61245f565b6020026020010151610362565b8282815181106107395761073961245f565b602090810291909101015261074d81612475565b90506106e2565b509392505050565b6005546001600160a01b031633146107865760405162461bcd60e51b815260040161038a906120be565b6107906000611216565b565b6007546001600160a01b031633146107bf5733604051637b7d071760e11b815260040161038a91906119e8565b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6107ee338383611268565b5050565b3360009081526009602052604090205460ff166001146108275733604051637b7d071760e11b815260040161038a91906119e8565b6001600160a01b03881660009081526008602090815260408083208a845290915290205460ff16156108705787876040516331db52b560e11b815260040161038a929190611ab3565b61087a888861130a565b15156000036108a05787876040516379c448a760e01b815260040161038a929190611ab3565b6001600160a01b03881660009081526008602090815260408083208a84529091528120805460ff191660011790556108d760065490565b90506109008582846040518060400160405280600381526020016203078360ec1b81525061138d565b610931848261091085600a61248f565b6040518060400160405280600381526020016203078360ec1b81525061138d565b60405180608001604052808a6001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505060208083018c90526001600160a01b03878116604094850152858352600b825292909120835181546001600160a01b031916931692909217825582015160018201906109cf9082612567565b506040828101516002830155606090920151600390910180546001600160a01b0319166001600160a01b039283161790558a166000908152600a60209081528282208b8352905220819055600680546001019055505050505050505050565b610a383382610362565b600a14610a6257610a493382610362565b60405162b9661360e81b815260040161038a9190611956565b6000818152600b6020526040902060038101546001600160a01b0316610a8a3384600a61145b565b81546001600160a01b03908116600081815260086020908152604080832060028801549384905290915251634d81c77d60e01b815292841692634d81c77d92610ada929091339190600401612624565b600060405180830381600087803b158015610af457600080fd5b505af1158015610b08573d6000803e3d6000fd5b50505050505050565b6001600160a01b038516331480610b2d5750610b2d853361030e565b610b495760405162461bcd60e51b815260040161038a90612692565b61066e858585858561147e565b6005546001600160a01b03163314610b805760405162461bcd60e51b815260040161038a906120be565b6001600160a01b038116610ba65760405162461bcd60e51b815260040161038a906126e5565b610baf81611216565b50565b80546001019055565b60006001600160e01b03198216636cdb3d1360e11b1480610bec57506001600160e01b031982166303a24d0760e21b145b806103b857506103b882611590565b6060600082604051602001610c10919061271d565b60408051808303601f19018152602a80845260608401909252925060009190602082018180368337019050509050600360fc1b81600081518110610c5657610c5661245f565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610c8557610c8561245f565b60200101906001600160f81b031916908160001a90535060005b6014811015610dfc5760006010848381518110610cbe57610cbe61245f565b0160200151610cd0919060f81c612732565b90506000610cdf826010612743565b858481518110610cf157610cf161245f565b0160200151610d03919060f81c612763565b90506000600a8360ff1610610d2557610d1d836057612780565b60f81b610d34565b610d30836030612780565b60f81b5b90506000600a8360ff1610610d5657610d4e836057612780565b60f81b610d65565b610d61836030612780565b60f81b5b90508086610d7487600261235d565b610d7f90600361279d565b81518110610d8f57610d8f61245f565b60200101906001600160f81b031916908160001a9053508186610db387600261235d565b610dbe90600261279d565b81518110610dce57610dce61245f565b60200101906001600160f81b031916908160001a905350505050508080610df490612475565b915050610c9f565b506040805160088082528183019092526000916020820181803683375050604080516008808252818301909252929350600092915060208201818036833701905050905060005b6008811015610ef457838181518110610e5e57610e5e61245f565b602001015160f81c60f81b838281518110610e7b57610e7b61245f565b60200101906001600160f81b031916908160001a90535083610e9e82602261279d565b81518110610eae57610eae61245f565b602001015160f81c60f81b828281518110610ecb57610ecb61245f565b60200101906001600160f81b031916908160001a90535080610eec81612475565b915050610e43565b5060008282604051602001610f0a9291906127b0565b60408051601f19818403018152919052979650505050505050565b60608151600003610f4457505060408051602081019091526000815290565b6000604051806060016040528060408152602001612cc06040913990506000600384516002610f73919061279d565b610f7d9190612392565b610f8890600461235d565b6001600160401b03811115610f9f57610f9f611ace565b6040519080825280601f01601f191660200182016040528015610fc9576020820181803683370190505b509050600182016020820185865187015b80821015611035576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845360018401935050610fda565b505060038651066001811461105157600281146110645761106c565b603d6001830353603d600283035361106c565b603d60018303535b509195945050505050565b81518351146110985760405162461bcd60e51b815260040161038a90612819565b6001600160a01b0384166110be5760405162461bcd60e51b815260040161038a9061286b565b3360005b84518110156111a85760008582815181106110df576110df61245f565b6020026020010151905060008583815181106110fd576110fd61245f565b60209081029190910181015160008481526002835260408082206001600160a01b038e16835290935291909120549091508181101561114e5760405162461bcd60e51b815260040161038a906128c2565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061118d90849061279d565b92505081905550505050806111a190612475565b90506110c2565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516111f89291906128d2565b60405180910390a461120e8187878787876115c5565b505050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036112995760405162461bcd60e51b815260040161038a9061293d565b6001600160a01b0383811660008181526003602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906112fd9085906119b0565b60405180910390a3505050565b600080836001600160a01b0316636352211e846040518263ffffffff1660e01b81526004016113399190611956565b602060405180830381865afa158015611356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137a9190612958565b6001600160a01b03163314949350505050565b6001600160a01b0384166113b35760405162461bcd60e51b815260040161038a906129b7565b336113cd816000876113c4886116d3565b61066e886116d3565b60008481526002602090815260408083206001600160a01b0389168452909152812080548592906113ff90849061279d565b92505081905550846001600160a01b031660006001600160a01b0316826001600160a01b0316600080516020612ca083398151915287876040516114449291906129c7565b60405180910390a461066e8160008787878761171e565b6114668383836117d9565b5060009081526001602052604081205550565b505050565b6001600160a01b0384166114a45760405162461bcd60e51b815260040161038a9061286b565b336114b48187876113c4886116d3565b60008481526002602090815260408083206001600160a01b038a168452909152902054838110156114f75760405162461bcd60e51b815260040161038a906128c2565b60008581526002602090815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061153690849061279d565b92505081905550856001600160a01b0316876001600160a01b0316836001600160a01b0316600080516020612ca0833981519152888860405161157a9291906129c7565b60405180910390a4610b0882888888888861171e565b60006001600160e01b0319821663152a902d60e11b14806103b857506301ffc9a760e01b6001600160e01b03198316146103b8565b6001600160a01b0384163b1561120e5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061160990899089908890889088906004016129d5565b6020604051808303816000875af1925050508015611644575060408051601f3d908101601f1916820190925261164191810190612a40565b60015b6116a357611650612a61565b806308c379a0036116895750611664612a7c565b8061166f575061168b565b8060405162461bcd60e51b815260040161038a9190611a79565b505b60405162461bcd60e51b815260040161038a90612b52565b6001600160e01b0319811663bc197c8160e01b14610b085760405162461bcd60e51b815260040161038a90612ba7565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061170d5761170d61245f565b602090810291909101015292915050565b6001600160a01b0384163b1561120e5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906117629089908990889088908890600401612bb7565b6020604051808303816000875af192505050801561179d575060408051601f3d908101601f1916820190925261179a91810190612a40565b60015b6117a957611650612a61565b6001600160e01b0319811663f23a6e6160e01b14610b085760405162461bcd60e51b815260040161038a90612ba7565b6001600160a01b0383166117ff5760405162461bcd60e51b815260040161038a90612c3e565b3361182f81856000611810876116d3565b611819876116d3565b5050604080516020810190915260009052505050565b60008381526002602090815260408083206001600160a01b0388168452909152902054828110156118725760405162461bcd60e51b815260040161038a90612c8f565b60008481526002602090815260408083206001600160a01b03808a1680865291909352818420878603905590519091851690600080516020612ca0833981519152906118c190899089906129c7565b60405180910390a45050505050565b60006001600160a01b0382166103b8565b6118ea816118d0565b8114610baf57600080fd5b80356103b8816118e1565b806118ea565b80356103b881611900565b6000806040838503121561192757611927600080fd5b600061193385856118f5565b925050602061194485828601611906565b9150509250929050565b805b82525050565b602081016103b8828461194e565b6001600160e01b031981166118ea565b80356103b881611964565b60006020828403121561199457611994600080fd5b60006119a08484611974565b949350505050565b801515611950565b602081016103b882846119a8565b6000602082840312156119d3576119d3600080fd5b60006119a084846118f5565b611950816118d0565b602081016103b882846119df565b600060208284031215611a0b57611a0b600080fd5b60006119a08484611906565b60005b83811015611a32578181015183820152602001611a1a565b50506000910152565b601f01601f191690565b6000611a4f825190565b808452602084019350611a66818560208601611a17565b611a6f81611a3b565b9093019392505050565b60208082528101611a8a8184611a45565b9392505050565b60008060408385031215611aa757611aa7600080fd5b60006119338585611906565b60408101611ac182856119df565b611a8a602083018461194e565b634e487b7160e01b600052604160045260246000fd5b611aed82611a3b565b81018181106001600160401b0382111715611b0a57611b0a611ace565b6040525050565b6000611b1c60405190565b9050611b288282611ae4565b919050565b60006001600160401b03821115611b4657611b46611ace565b5060209081020190565b6000611b63611b5e84611b2d565b611b11565b83815290506020808201908402830185811115611b8257611b82600080fd5b835b81811015611ba65780611b978882611906565b84525060209283019201611b84565b5050509392505050565b600082601f830112611bc457611bc4600080fd5b81356119a0848260208601611b50565b60006001600160401b03821115611bed57611bed611ace565b611bf682611a3b565b60200192915050565b82818337506000910152565b6000611c19611b5e84611bd4565b905082815260208101848484011115611c3457611c34600080fd5b610754848285611bff565b600082601f830112611c5357611c53600080fd5b81356119a0848260208601611c0b565b600080600080600060a08688031215611c7e57611c7e600080fd5b6000611c8a88886118f5565b9550506020611c9b888289016118f5565b94505060408601356001600160401b03811115611cba57611cba600080fd5b611cc688828901611bb0565b93505060608601356001600160401b03811115611ce557611ce5600080fd5b611cf188828901611bb0565b92505060808601356001600160401b03811115611d1057611d10600080fd5b611d1c88828901611c3f565b9150509295509295909350565b6000611d37611b5e84611b2d565b83815290506020808201908402830185811115611d5657611d56600080fd5b835b81811015611ba65780611d6b88826118f5565b84525060209283019201611d58565b600082601f830112611d8e57611d8e600080fd5b81356119a0848260208601611d29565b60008060408385031215611db457611db4600080fd5b82356001600160401b03811115611dcd57611dcd600080fd5b611dd985828601611d7a565b92505060208301356001600160401b03811115611df857611df8600080fd5b61194485828601611bb0565b6000611e10838361194e565b505060200190565b6000611e22825190565b80845260209384019383018060005b83811015611e56578151611e458882611e04565b975060208301925050600101611e31565b509495945050505050565b60208082528101611a8a8184611e18565b60ff8116611950565b602081016103b88284611e72565b8015156118ea565b80356103b881611e89565b60008060408385031215611eb257611eb2600080fd5b6000611ebe85856118f5565b925050602061194485828601611e91565b60008083601f840112611ee457611ee4600080fd5b5081356001600160401b03811115611efe57611efe600080fd5b60208301915083600182028301111561062257610622600080fd5b60008060008060008060008060e0898b031215611f3857611f38600080fd5b6000611f448b8b6118f5565b9850506020611f558b828c01611906565b97505060408901356001600160401b03811115611f7457611f74600080fd5b611f808b828c01611ecf565b96509650506060611f938b828c016118f5565b9450506080611fa48b828c016118f5565b93505060a0611fb58b828c016118f5565b92505060c0611fc68b828c01611906565b9150509295985092959890939650565b60008060408385031215611fec57611fec600080fd5b6000611ff885856118f5565b9250506020611944858286016118f5565b600080600080600060a0868803121561202457612024600080fd5b600061203088886118f5565b9550506020612041888289016118f5565b945050604061205288828901611906565b9350506060611cf188828901611906565b602b81526000602082017f455243313135353a2062616c616e636520717565727920666f7220746865207a81526a65726f206164647265737360a81b602082015291505b5060400190565b602080825281016103b881612063565b60208082528181019081527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726040830152606082016103b8565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061212257607f821691505b602082108103612134576121346120f8565b50919050565b6000612144825190565b612152818560208601611a17565b9290920192915050565b61227d60f01b815260005b5060020190565b615d7d60f01b81526000612167565b693d913730b6b2911d101160b11b81527f43727970746f4d61727279204e4654204475706c69636174652e000000000000600a8201527f222c20226465736372697074696f6e223a202254686973204e4654206861732060248201527f6265656e2073706c6974206265747765656e20706172746e6572732075706f6e60448201527f20646973736f6c7574696f6e206f66207468652046616d696c79204163636f7560648201526e373a1116101134b6b0b3b2911d101160891b6084820152609301600061224c828561213a565b70222c202261747472696275746573223a5b60781b81527f7b2274726169745f74797065223a202243727970746f4d6172727920636f706960118201527f65733a222c202276616c7565223a202231206f7574206f66203130227d2c000060318201527f7b2274726169745f74797065223a20224f726967696e616c206973206f776e65604f820152713210313c9d111610113b30b63ab2911d101160711b606f82015260810191506122ff828461213a565b915061230a8261215c565b91506119a08261216e565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152601d016000611a8a828461213a565b634e487b7160e01b600052601160045260246000fd5b81810280821583820485141761237557612375612347565b5092915050565b634e487b7160e01b600052601260045260246000fd5b6000825b9250826123a5576123a561237c565b500490565b603281526000602082017f455243313135353a207472616e736665722063616c6c6572206973206e6f74208152711bdddb995c881b9bdc88185c1c1c9bdd995960721b602082015291506120a7565b602080825281016103b8816123aa565b602981526000602082017f455243313135353a206163636f756e747320616e6420696473206c656e677468815268040dad2e6dac2e8c6d60bb1b602082015291506120a7565b602080825281016103b881612409565b634e487b7160e01b600052603260045260246000fd5b6000600019820361248857612488612347565b5060010190565b818103818111156103b8576103b8612347565b60006103b86124ae8381565b90565b6124ba836124a2565b81546008840282811b60001990911b908116901990911617825550505050565b60006114798184846124b1565b818110156107ee576124fa6000826124da565b6001016124e7565b601f821115611479576000818152602090206020601f850104810160208510156125295750805b61066e6020601f8601048301826124e7565b6000196008929092029190911c191690565b6000612559838361253b565b600290930290921792915050565b81516001600160401b0381111561258057612580611ace565b61258a825461210e565b612595828285612502565b6020601f8311600181146125c357600084156125b15750858201515b6125bb858261254d565b86555061120e565b600085815260208120601f198616915b828110156125f357888501518255602094850194600190920191016125d3565b86831015612610578489015161260c601f89168261253b565b8355505b600160028802018855505050505050505050565b6060810161263282866119df565b61263f60208301856119df565b6119a0604083018461194e565b602981526000602082017f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7281526808185c1c1c9bdd995960ba1b602082015291506120a7565b602080825281016103b88161264c565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291506120a7565b602080825281016103b8816126a2565b60006103b88260601b90565b60006103b8826126f5565b611950612718826118d0565b612701565b6000612729828461270c565b50601401919050565b600060ff8216915060ff8316612396565b60ff91821691908116908282029081169081811461237557612375612347565b60ff9182169190811690828203908111156103b8576103b8612347565b60ff9182169190811690828201908111156103b8576103b8612347565b808201808211156103b8576103b8612347565b60006127bc828561213a565b6217171760e91b815260030191506119a0828461213a565b602881526000602082017f455243313135353a2069647320616e6420616d6f756e7473206c656e677468208152670dad2e6dac2e8c6d60c31b602082015291506120a7565b602080825281016103b8816127d4565b602581526000602082017f455243313135353a207472616e7366657220746f20746865207a65726f206164815264647265737360d81b602082015291506120a7565b602080825281016103b881612829565b602a81526000602082017f455243313135353a20696e73756666696369656e742062616c616e636520666f81526939103a3930b739b332b960b11b602082015291506120a7565b602080825281016103b88161287b565b604080825281016128e38185611e18565b905081810360208301526119a08184611e18565b602981526000602082017f455243313135353a2073657474696e6720617070726f76616c20737461747573815268103337b91039b2b63360b91b602082015291506120a7565b602080825281016103b8816128f7565b80516103b8816118e1565b60006020828403121561296d5761296d600080fd5b60006119a0848461294d565b602181526000602082017f455243313135353a206d696e7420746f20746865207a65726f206164647265738152607360f81b602082015291506120a7565b602080825281016103b881612979565b60408101611ac1828561194e565b60a081016129e382886119df565b6129f060208301876119df565b8181036040830152612a028186611e18565b90508181036060830152612a168185611e18565b90508181036080830152612a2a8184611a45565b979650505050505050565b80516103b881611964565b600060208284031215612a5557612a55600080fd5b60006119a08484612a35565b600060033d11156124ae5760046000803e5060005160e01c90565b600060443d1015612a8a5790565b60405160043d036004823e80513d60248201116001600160401b0382111715612ab257505090565b80820180516001600160401b03811115612acd575050505090565b80602083010160043d038501811115612ae857505050505090565b612af782602001850186611ae4565b5090949350505050565b603481526000602082017f455243313135353a207472616e7366657220746f206e6f6e20455243313135358152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b602082015291506120a7565b602080825281016103b881612b01565b602881526000602082017f455243313135353a204552433131353552656365697665722072656a656374658152676420746f6b656e7360c01b602082015291506120a7565b602080825281016103b881612b62565b60a08101612bc582886119df565b612bd260208301876119df565b612bdf604083018661194e565b612bec606083018561194e565b8181036080830152612a2a8184611a45565b602381526000602082017f455243313135353a206275726e2066726f6d20746865207a65726f206164647281526265737360e81b602082015291506120a7565b602080825281016103b881612bfe565b602481526000602082017f455243313135353a206275726e20616d6f756e7420657863656564732062616c815263616e636560e01b602082015291506120a7565b602080825281016103b881612c4e56fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f624142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa264697066735822122089f48c691bff4b140369ddf5b3ab79b248e210cb55980eb83b4c795405fc3b0d64736f6c63430008110033

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

000000000000000000000000026c19cfe0f8230f635829be34161812ede408e5

-----Decoded View---------------
Arg [0] : _mainaddress (address): 0x026C19CFE0f8230F635829BE34161812eDe408E5

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000026c19cfe0f8230f635829be34161812ede408e5


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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