Mumbai Testnet

Token

ERC-1155

Overview

Max Total Supply

0

Holders

84

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
0xd7e1e3af961968269808765040d09399b839c74d
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x855C9EbA...e002c2F90
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
KresusNFT

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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: address zero is not a valid owner");
        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 token owner or 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: caller is not token owner or 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();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, 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);

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

        _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);

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

        _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();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

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

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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 _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);

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

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

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * 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();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * 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);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "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 `ids` and `amounts` 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 {}

    /**
     * @dev Hook that is called after 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 _afterTokenTransfer(
        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 2 of 13 : ERC1155URIStorage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol)

pragma solidity ^0.8.0;

import "../../../utils/Strings.sol";
import "../ERC1155.sol";

/**
 * @dev ERC1155 token with storage based token URI management.
 * Inspired by the ERC721URIStorage extension
 *
 * _Available since v4.6._
 */
abstract contract ERC1155URIStorage is ERC1155 {
    using Strings for uint256;

    // Optional base URI
    string private _baseURI = "";

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the concatenation of the `_baseURI`
     * and the token-specific uri if the latter is set
     *
     * This enables the following behaviors:
     *
     * - if `_tokenURIs[tokenId]` is set, then the result is the concatenation
     *   of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI`
     *   is empty per default);
     *
     * - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()`
     *   which in most cases will contain `ERC1155._uri`;
     *
     * - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a
     *   uri value set, then the result is empty.
     */
    function uri(uint256 tokenId) public view virtual override returns (string memory) {
        string memory tokenURI = _tokenURIs[tokenId];

        // If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked).
        return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId);
    }

    /**
     * @dev Sets `tokenURI` as the tokenURI of `tokenId`.
     */
    function _setURI(uint256 tokenId, string memory tokenURI) internal virtual {
        _tokenURIs[tokenId] = tokenURI;
        emit URI(uri(tokenId), tokenId);
    }

    /**
     * @dev Sets `baseURI` as the `_baseURI` for all tokens
     */
    function _setBaseURI(string memory baseURI) internal virtual {
        _baseURI = baseURI;
    }
}

File 3 of 13 : 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 4 of 13 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 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 5 of 13 : 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 6 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 7 of 13 : 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 8 of 13 : 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 9 of 13 : 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 10 of 13 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 12 of 13 : IKresusNFT.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

/**
 * @dev interface to be implemented by {KresusNFT}.
 */
interface IKresusNFT {
    /**
     * @dev Function which mints token Id `_assetId` of amount `_amount`, to `_to` address,
     * sets the token URI of `_assetId` as `_tokenURI`.
     *
     * @param _to - the address of the to which tokens are to be minted.
     * @param _amount - the number of tokens of `_assetsId` to be minted.
     * @param _data - extra data parameter.
     * @param _tokenURI - URL for token metadata.
     * @param _assetId - token Id to be minted.
     */
    function mint(
        address _to,
        uint256 _amount,
        bytes memory _data,
        string memory _tokenURI,
        uint256 _assetId
    ) external;

    /**
     * @dev Function which mints multiple tokenIds `_assetIds`.
     * [Batched] version of {mint}.
     *
     * @param _to - the address of the to which tokens are to be minted.
     * @param _amounts - array of uint256 amounts to be minted for each mint.
     * @param _data - extra data parameter.
     * @param _assetIds - array of tokenIds to be minted.
     * @param _tokenURIs - arrray of URLs consisting metata for each of `_assetIds`.
     */
    function bulkMint(
        address _to,
        uint256[] memory  _amounts,
        bytes memory _data,
        uint256[] memory _assetIds,
        string[] memory _tokenURIs
    ) external;

    /**
     * @dev Function which burns the tokens, destroys tokenId `_id`,
     * reduces tokenId `_id` balance from `_from` address.
     *
     * @param _from - address from which tokens are to be deducted.
     * @param _assetId - tokenId to be burnt.
     * @param _amount - number of tokens to be burnt.
     */
    function burnToken(
        address _from,
        uint256 _assetId,
        uint256 _amount
    ) external;

    /**
     * @dev Function which burns multiple tokenIds.
     * [Batched] version of {burnToken}.
     *
     * @param _from - address from which tokens are to be deducted.
     * @param _assetIds - array of tokenIds to be destroyed.
     * @param _amounts - number of tokens to be destroyed for each of `_assetIds`.
     */
    function burnBatchToken(
        address _from,
        uint256[] memory _assetIds,
        uint256[] memory _amounts
    ) external;

    /**
     * @dev Function which transfers tokenId `_assetId` to each of `_to` addresses, of amount `_amounts`.
     *
     * @param _to - array of addresses to which `_assetId` has to be transferred.
     * @param _assetId - token id to be transferred.
     * @param _amounts - array of uint256, number of tokens to be transferred for each of `_assetIds`.
     * @param _data - extra data parameter.
     */
    function batchTransfer(
        address[] memory _to,
        uint256 _assetId,
        uint256[] memory _amounts,
        bytes memory _data
    ) external;

    /**
     * @dev Function which changes proxy address. Transfers each of `_assetIds` to _proxyAddr of amount `_amounts`.
     * 
     * @param _proxyAddr - new proxy address to be updated.
     * @param _assetIds - array of token ids to be transferred.
     * @param _amounts - array of number of tokens to be transferred.
     * @param _data - extra data parameter.
     */
    function updateProxyAddress(
        address _proxyAddr,
        uint256[] memory _assetIds,
        uint256[] memory _amounts,
        bytes memory _data
    ) external;
}

File 13 of 13 : KresusNFT.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol";
import {IKresusNFT} from "./interfaces/IKresusNFT.sol";

/**
 * @dev contract complaint with {IKresusNFT} and extension of {ERC1155URIStorage}.
 * {ERC1155URIStorage} - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol
 */
contract KresusNFT is ERC1155URIStorage, IKresusNFT{

    // proxy contract address, deployed instance of {KresusProxy}.
    address private proxyAddress;

    // mapping from token ids to token minted or not.
    mapping(uint256 => bool) private mintedAssetIds;

    /**
     * @dev emitted when `assetId` is minted successfully to `to` address
     * and uri is set using `tokenURI`.
     */
    event mintSuccessful(
        address to,
        uint256 amount,
        bytes data,
        string tokenURI,
        uint256 assetId
    );

    /**
     * @dev emitted when `assetIds` are minted successfully to `to` addresses
     * and uri is set for each of `assetIds` using `tokenURIs`.
     */
    event bulkMintSuccessful(
        address to,
        uint256[] amounts,
        bytes data,
        string[] tokenURIs,
        uint256[] assetIds
    );

    /**
     * @dev emitted when a `tokenId` is successfully transferred to `to` addresses 
     * of amount `amounts`.
     */
    event batchTransferSuccessful(
        address[] to,
        uint256 assetId,
        uint256[] amounts,
        bytes data
    );

    /**
     * @dev Calls constructor of {ERC1155} with empty base URI and sets proxyAddress.
     * 
     * @param _proxyAddr - deployed contract address of {KresusProxy}.
     */
    constructor(address _proxyAddr)ERC1155(""){
        proxyAddress = _proxyAddr;
    }

    /**
     * @dev supports interface implementation.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC1155)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IKresusNFT}.
     *
     * emits an {mintSuccessful} event.
     *
     * Requirements:
     * - Only `proxyAddress` can call this function.
     * - `_assetId` should not be minted before.
     */
    function mint(
        address _to,
        uint256 _amount,
        bytes memory _data,
        string memory _tokenURI,
        uint256 _assetId
    )
        external
        override
    {
        require(msg.sender == proxyAddress, "Kresus NFT: Caller not Proxy");
        require(!mintedAssetIds[_assetId], "Kresus NFT: Already Minted");
        mintedAssetIds[_assetId] = true;
        _mint(_to, _assetId, _amount, _data);
        _setURI(_assetId, _tokenURI);
        emit mintSuccessful(
            _to,
            _amount,
            _data,
            _tokenURI,
            _assetId
        );
    }

    /**
     * @dev See {IKresusNFT}
     *
     * emits an {bulkSuccessful} event.
     *
     * Requirements:
     * - Only `proxyAddress` can call this function.
     * - Lengths of `_assetIds`, `_tokenURIs` and `_amounts` must be equal.
     * - All ids in `_assetIds` should not be minted before.
     */
    function bulkMint(
        address _to,
        uint256[] memory  _amounts,
        bytes memory _data,
        uint256[] memory _assetIds,
        string[] memory _tokenURIs
    )
        external
        override
    {
        require(msg.sender == proxyAddress, "Kresus NFT: Caller not Proxy");
        require(_amounts.length == _tokenURIs.length, "Kresus NFT: Inconsistent lengths");
        for(uint256 i=0;i<_assetIds.length; i++){
            require(!mintedAssetIds[_assetIds[i]], "Kresus NFT: Already minted!");
            mintedAssetIds[_assetIds[i]] = true;
            _setURI(_assetIds[i], _tokenURIs[i]);
        }
        _mintBatch(_to, _assetIds, _amounts, _data);
        emit bulkMintSuccessful(
            _to,
            _amounts,
            _data,
            _tokenURIs,
            _assetIds
        );
    }

    /**
     * @dev See {IKresusNFT}.
     */
    function burnToken(
        address _from,
        uint256 _assetId,
        uint256 _amount
    )
        external
        override
    {
        _burn(_from, _assetId, _amount);
    }

    /**
     * @dev See {IKresusNFT}.
     */
    function burnBatchToken(
        address _from,
        uint256[] memory _assetIds,
        uint256[] memory _amounts
    )
        external
        override
    {
        _burnBatch(_from, _assetIds, _amounts);
    }

    /**
     * @dev See {IKresusNFT}.
     *
     * emits an {batchTransferSuccessful} event.
     *
     * Requirements:
     * - Lengths of `_to` and `_amounts` must be same length.
     */
    function batchTransfer(
        address[] memory _to,
        uint256 _assetId,
        uint256[] memory _amounts,
        bytes memory _data
    )
        external
        override
    {
        uint256 len = _to.length;
        require(len == _amounts.length, "Kresus NFT: Inconsistent lengths");
        for(uint256 i=0;i<len;i++) {
            _safeTransferFrom(msg.sender, _to[i], _assetId, _amounts[i], _data);
        }
        emit batchTransferSuccessful(_to, _assetId, _amounts, _data);
    }

    /**
     * @dev Function to change the proxy contract address.
     * @param _proxyAddr - new proxy address to be changed.
     * @param _assetIds - token ids of all the tokens owned by the proxy contract.
     * @param _amounts - number of tokens to be transferred to the new proxy contract.
     * @param _data - extra data parameter.
     *
     * Requirements:
     * - Only `proxyAddress` can call this function.
     */
    function updateProxyAddress(
        address _proxyAddr,
        uint256[] memory _assetIds,
        uint256[] memory _amounts,
        bytes memory _data
    ) 
        external
        override
    {
        require(msg.sender == proxyAddress, "Kresus NFT: Caller not Proxy");
        proxyAddress = _proxyAddr;
        _safeBatchTransferFrom(msg.sender, _proxyAddr, _assetIds, _amounts, _data);
    }

    /**
     * @dev Function to get the address of proxy contract.
     */
    function getProxyAddress() external view returns(address) {
        return proxyAddress;
    }

    /**
     * @dev Function to check if `_assetId` is already minted.
     */
    function isMinted(uint256 _assetId) external view returns(bool) {
        return mintedAssetIds[_assetId];
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_proxyAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"to","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"assetId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"batchTransferSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"string[]","name":"tokenURIs","type":"string[]"},{"indexed":false,"internalType":"uint256[]","name":"assetIds","type":"uint256[]"}],"name":"bulkMintSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"string","name":"tokenURI","type":"string"},{"indexed":false,"internalType":"uint256","name":"assetId","type":"uint256"}],"name":"mintSuccessful","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256","name":"_assetId","type":"uint256"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"batchTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint256[]","name":"_assetIds","type":"uint256[]"},{"internalType":"string[]","name":"_tokenURIs","type":"string[]"}],"name":"bulkMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256[]","name":"_assetIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"burnBatchToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_assetId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burnToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getProxyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"_assetId","type":"uint256"}],"name":"isMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"string","name":"_tokenURI","type":"string"},{"internalType":"uint256","name":"_assetId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_proxyAddr","type":"address"},{"internalType":"uint256[]","name":"_assetIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"updateProxyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

6080604052604051806020016040528060008152506003908162000024919062000351565b503480156200003257600080fd5b5060405162004ae238038062004ae28339818101604052810190620000589190620004a2565b604051806020016040528060008152506200007981620000c260201b60201c565b5080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620004d4565b8060029081620000d3919062000351565b5050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200015957607f821691505b6020821081036200016f576200016e62000111565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620001d97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200019a565b620001e586836200019a565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620002326200022c6200022684620001fd565b62000207565b620001fd565b9050919050565b6000819050919050565b6200024e8362000211565b620002666200025d8262000239565b848454620001a7565b825550505050565b600090565b6200027d6200026e565b6200028a81848462000243565b505050565b5b81811015620002b257620002a660008262000273565b60018101905062000290565b5050565b601f8211156200030157620002cb8162000175565b620002d6846200018a565b81016020851015620002e6578190505b620002fe620002f5856200018a565b8301826200028f565b50505b505050565b600082821c905092915050565b6000620003266000198460080262000306565b1980831691505092915050565b600062000341838362000313565b9150826002028217905092915050565b6200035c82620000d7565b67ffffffffffffffff811115620003785762000377620000e2565b5b62000384825462000140565b62000391828285620002b6565b600060209050601f831160018114620003c95760008415620003b4578287015190505b620003c0858262000333565b86555062000430565b601f198416620003d98662000175565b60005b828110156200040357848901518255600182019150602085019450602081019050620003dc565b868310156200042357848901516200041f601f89168262000313565b8355505b6001600288020188555050505b505050505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200046a826200043d565b9050919050565b6200047c816200045d565b81146200048857600080fd5b50565b6000815190506200049c8162000471565b92915050565b600060208284031215620004bb57620004ba62000438565b5b6000620004cb848285016200048b565b91505092915050565b6145fe80620004e46000396000f3fe608060405234801561001057600080fd5b50600436106100ff5760003560e01c80636a3842e211610097578063abb2fbcb11610066578063abb2fbcb146102ba578063e985e9c5146102d6578063ed8c593814610306578063f242432a14610322576100ff565b80636a3842e21461024a578063974afd531461026657806398a34f2414610282578063a22cb4651461029e576100ff565b806333c41a90116100d357806333c41a90146101b057806343a73d9a146101e05780634e1273f4146101fe5780635d0a29511461022e576100ff565b8062fdd58e1461010457806301ffc9a7146101345780630e89341c146101645780632eb2c2d614610194575b600080fd5b61011e6004803603810190610119919061256d565b61033e565b60405161012b91906125bc565b60405180910390f35b61014e6004803603810190610149919061262f565b610406565b60405161015b9190612677565b60405180910390f35b61017e60048036038101906101799190612692565b610418565b60405161018b919061274f565b60405180910390f35b6101ae60048036038101906101a9919061296e565b6104fd565b005b6101ca60048036038101906101c59190612692565b61059e565b6040516101d79190612677565b60405180910390f35b6101e86105c8565b6040516101f59190612a4c565b60405180910390f35b61021860048036038101906102139190612b2a565b6105f2565b6040516102259190612c60565b60405180910390f35b61024860048036038101906102439190612c82565b61070b565b005b610264600480360381019061025f9190612d0d565b61071b565b005b610280600480360381019061027b9190612dc8565b6107ff565b005b61029c60048036038101906102979190612f24565b6108ec565b005b6102b860048036038101906102b39190613003565b610a65565b005b6102d460048036038101906102cf9190613124565b610a7b565b005b6102f060048036038101906102eb919061320f565b610cc0565b6040516102fd9190612677565b60405180910390f35b610320600480360381019061031b919061324f565b610d54565b005b61033c600480360381019061033791906132a2565b610d64565b005b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036103ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a5906133ab565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600061041182610e05565b9050919050565b6060600060046000848152602001908152602001600020805461043a906133fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610466906133fa565b80156104b35780601f10610488576101008083540402835291602001916104b3565b820191906000526020600020905b81548152906001019060200180831161049657829003601f168201915b5050505050905060008151116104d1576104cc83610ee7565b6104f5565b6003816040516020016104e59291906134ff565b6040516020818303038152906040525b915050919050565b610505610f7b565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061054b575061054a85610545610f7b565b610cc0565b5b61058a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058190613595565b60405180910390fd5b6105978585858585610f83565b5050505050565b60006006600083815260200190815260200160002060009054906101000a900460ff169050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60608151835114610638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062f90613627565b60405180910390fd5b6000835167ffffffffffffffff81111561065557610654612776565b5b6040519080825280602002602001820160405280156106835781602001602082028036833780820191505090505b50905060005b8451811015610700576106d08582815181106106a8576106a7613647565b5b60200260200101518583815181106106c3576106c2613647565b5b602002602001015161033e565b8282815181106106e3576106e2613647565b5b602002602001018181525050806106f9906136a5565b9050610689565b508091505092915050565b6107168383836112a4565b505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a290613739565b60405180910390fd5b83600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506107f93385858585610f83565b50505050565b60008451905082518114610848576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083f906137a5565b60405180910390fd5b60005b818110156108a7576108943387838151811061086a57610869613647565b5b60200260200101518787858151811061088657610885613647565b5b602002602001015187611572565b808061089f906136a5565b91505061084b565b507f27602d0e3fdf05b687ca9ccf287ee05cec339d40805d67c26774630a00080573858585856040516108dd94939291906138d8565b60405180910390a15050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461097c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097390613739565b60405180910390fd5b6006600082815260200190815260200160002060009054906101000a900460ff16156109dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d49061397e565b60405180910390fd5b60016006600083815260200190815260200160002060006101000a81548160ff021916908315150217905550610a158582868661180d565b610a1f81836119bd565b7ff3b1a66ec1ea821a967972c6822340c38ad0bc0b34fb387d05cda894767e9b448585858585604051610a5695949392919061399e565b60405180910390a15050505050565b610a77610a70610f7b565b8383611a22565b5050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0290613739565b60405180910390fd5b8051845114610b4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b46906137a5565b60405180910390fd5b60005b8251811015610c6d5760066000848381518110610b7257610b71613647565b5b6020026020010151815260200190815260200160002060009054906101000a900460ff1615610bd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bcd90613a4b565b60405180910390fd5b600160066000858481518110610bef57610bee613647565b5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550610c5a838281518110610c3257610c31613647565b5b6020026020010151838381518110610c4d57610c4c613647565b5b60200260200101516119bd565b8080610c65906136a5565b915050610b52565b50610c7a85838686611b8e565b7f06698a596007dd0da004057be5d697600667d70894aee20c5fe73b49408937478585858486604051610cb1959493929190613b77565b60405180910390a15050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610d5f838383611dba565b505050565b610d6c610f7b565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610db25750610db185610dac610f7b565b610cc0565b5b610df1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de890613595565b60405180910390fd5b610dfe8585858585611572565b5050505050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ed057507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ee05750610edf82612000565b5b9050919050565b606060028054610ef6906133fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610f22906133fa565b8015610f6f5780601f10610f4457610100808354040283529160200191610f6f565b820191906000526020600020905b815481529060010190602001808311610f5257829003601f168201915b50505050509050919050565b600033905090565b8151835114610fc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbe90613c58565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611036576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102d90613cea565b60405180910390fd5b6000611040610f7b565b905061105081878787878761206a565b60005b845181101561120157600085828151811061107157611070613647565b5b6020026020010151905060008583815181106110905761108f613647565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611131576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112890613d7c565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111e69190613d9c565b92505081905550505050806111fa906136a5565b9050611053565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611278929190613dd0565b60405180910390a461128e818787878787612072565b61129c81878787878761207a565b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611313576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130a90613e79565b60405180910390fd5b8051825114611357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134e90613c58565b60405180910390fd5b6000611361610f7b565b90506113818185600086866040518060200160405280600081525061206a565b60005b83518110156114ce5760008482815181106113a2576113a1613647565b5b6020026020010151905060008483815181106113c1576113c0613647565b5b60200260200101519050600080600084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145990613f0b565b60405180910390fd5b81810360008085815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505080806114c6906136a5565b915050611384565b50600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611546929190613dd0565b60405180910390a461156c81856000868660405180602001604052806000815250612072565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036115e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d890613cea565b60405180910390fd5b60006115eb610f7b565b905060006115f885612251565b9050600061160585612251565b905061161583898985858961206a565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050858110156116ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a390613d7c565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117619190613d9c565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a6040516117de929190613f2b565b60405180910390a46117f4848a8a86868a612072565b611802848a8a8a8a8a6122cb565b505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361187c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187390613fc6565b60405180910390fd5b6000611886610f7b565b9050600061189385612251565b905060006118a085612251565b90506118b18360008985858961206a565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119109190613d9c565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62898960405161198e929190613f2b565b60405180910390a46119a583600089858589612072565b6119b4836000898989896122cb565b50505050505050565b806004600084815260200190815260200160002090816119dd919061417d565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b611a0984610418565b604051611a16919061274f565b60405180910390a25050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611a90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a87906142c1565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b819190612677565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611bfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf490613fc6565b60405180910390fd5b8151835114611c41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3890613c58565b60405180910390fd5b6000611c4b610f7b565b9050611c5c8160008787878761206a565b60005b8451811015611d1557838181518110611c7b57611c7a613647565b5b6020026020010151600080878481518110611c9957611c98613647565b5b6020026020010151815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611cfb9190613d9c565b925050819055508080611d0d906136a5565b915050611c5f565b508473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d8d929190613dd0565b60405180910390a4611da481600087878787612072565b611db38160008787878761207a565b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611e29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2090613e79565b60405180910390fd5b6000611e33610f7b565b90506000611e4084612251565b90506000611e4d84612251565b9050611e6d8387600085856040518060200160405280600081525061206a565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905084811015611f04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611efb90613f0b565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611fd1929190613f2b565b60405180910390a4611ff784886000868660405180602001604052806000815250612072565b50505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050505050565b505050505050565b6120998473ffffffffffffffffffffffffffffffffffffffff166124a2565b15612249578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016120df9594939291906142e1565b6020604051808303816000875af192505050801561211b57506040513d601f19601f82011682018060405250810190612118919061435e565b60015b6121c057612127614398565b806308c379a003612183575061213b6143ba565b806121465750612185565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217a919061274f565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121b7906144bc565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223e9061454e565b60405180910390fd5b505b505050505050565b60606000600167ffffffffffffffff8111156122705761226f612776565b5b60405190808252806020026020018201604052801561229e5781602001602082028036833780820191505090505b50905082816000815181106122b6576122b5613647565b5b60200260200101818152505080915050919050565b6122ea8473ffffffffffffffffffffffffffffffffffffffff166124a2565b1561249a578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161233095949392919061456e565b6020604051808303816000875af192505050801561236c57506040513d601f19601f82011682018060405250810190612369919061435e565b60015b61241157612378614398565b806308c379a0036123d4575061238c6143ba565b8061239757506123d6565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123cb919061274f565b60405180910390fd5b505b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612408906144bc565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248f9061454e565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612504826124d9565b9050919050565b612514816124f9565b811461251f57600080fd5b50565b6000813590506125318161250b565b92915050565b6000819050919050565b61254a81612537565b811461255557600080fd5b50565b60008135905061256781612541565b92915050565b60008060408385031215612584576125836124cf565b5b600061259285828601612522565b92505060206125a385828601612558565b9150509250929050565b6125b681612537565b82525050565b60006020820190506125d160008301846125ad565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61260c816125d7565b811461261757600080fd5b50565b60008135905061262981612603565b92915050565b600060208284031215612645576126446124cf565b5b60006126538482850161261a565b91505092915050565b60008115159050919050565b6126718161265c565b82525050565b600060208201905061268c6000830184612668565b92915050565b6000602082840312156126a8576126a76124cf565b5b60006126b684828501612558565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156126f95780820151818401526020810190506126de565b60008484015250505050565b6000601f19601f8301169050919050565b6000612721826126bf565b61272b81856126ca565b935061273b8185602086016126db565b61274481612705565b840191505092915050565b600060208201905081810360008301526127698184612716565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6127ae82612705565b810181811067ffffffffffffffff821117156127cd576127cc612776565b5b80604052505050565b60006127e06124c5565b90506127ec82826127a5565b919050565b600067ffffffffffffffff82111561280c5761280b612776565b5b602082029050602081019050919050565b600080fd5b6000612835612830846127f1565b6127d6565b905080838252602082019050602084028301858111156128585761285761281d565b5b835b81811015612881578061286d8882612558565b84526020840193505060208101905061285a565b5050509392505050565b600082601f8301126128a05761289f612771565b5b81356128b0848260208601612822565b91505092915050565b600080fd5b600067ffffffffffffffff8211156128d9576128d8612776565b5b6128e282612705565b9050602081019050919050565b82818337600083830152505050565b600061291161290c846128be565b6127d6565b90508281526020810184848401111561292d5761292c6128b9565b5b6129388482856128ef565b509392505050565b600082601f83011261295557612954612771565b5b81356129658482602086016128fe565b91505092915050565b600080600080600060a0868803121561298a576129896124cf565b5b600061299888828901612522565b95505060206129a988828901612522565b945050604086013567ffffffffffffffff8111156129ca576129c96124d4565b5b6129d68882890161288b565b935050606086013567ffffffffffffffff8111156129f7576129f66124d4565b5b612a038882890161288b565b925050608086013567ffffffffffffffff811115612a2457612a236124d4565b5b612a3088828901612940565b9150509295509295909350565b612a46816124f9565b82525050565b6000602082019050612a616000830184612a3d565b92915050565b600067ffffffffffffffff821115612a8257612a81612776565b5b602082029050602081019050919050565b6000612aa6612aa184612a67565b6127d6565b90508083825260208201905060208402830185811115612ac957612ac861281d565b5b835b81811015612af25780612ade8882612522565b845260208401935050602081019050612acb565b5050509392505050565b600082601f830112612b1157612b10612771565b5b8135612b21848260208601612a93565b91505092915050565b60008060408385031215612b4157612b406124cf565b5b600083013567ffffffffffffffff811115612b5f57612b5e6124d4565b5b612b6b85828601612afc565b925050602083013567ffffffffffffffff811115612b8c57612b8b6124d4565b5b612b988582860161288b565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612bd781612537565b82525050565b6000612be98383612bce565b60208301905092915050565b6000602082019050919050565b6000612c0d82612ba2565b612c178185612bad565b9350612c2283612bbe565b8060005b83811015612c53578151612c3a8882612bdd565b9750612c4583612bf5565b925050600181019050612c26565b5085935050505092915050565b60006020820190508181036000830152612c7a8184612c02565b905092915050565b600080600060608486031215612c9b57612c9a6124cf565b5b6000612ca986828701612522565b935050602084013567ffffffffffffffff811115612cca57612cc96124d4565b5b612cd68682870161288b565b925050604084013567ffffffffffffffff811115612cf757612cf66124d4565b5b612d038682870161288b565b9150509250925092565b60008060008060808587031215612d2757612d266124cf565b5b6000612d3587828801612522565b945050602085013567ffffffffffffffff811115612d5657612d556124d4565b5b612d628782880161288b565b935050604085013567ffffffffffffffff811115612d8357612d826124d4565b5b612d8f8782880161288b565b925050606085013567ffffffffffffffff811115612db057612daf6124d4565b5b612dbc87828801612940565b91505092959194509250565b60008060008060808587031215612de257612de16124cf565b5b600085013567ffffffffffffffff811115612e0057612dff6124d4565b5b612e0c87828801612afc565b9450506020612e1d87828801612558565b935050604085013567ffffffffffffffff811115612e3e57612e3d6124d4565b5b612e4a8782880161288b565b925050606085013567ffffffffffffffff811115612e6b57612e6a6124d4565b5b612e7787828801612940565b91505092959194509250565b600067ffffffffffffffff821115612e9e57612e9d612776565b5b612ea782612705565b9050602081019050919050565b6000612ec7612ec284612e83565b6127d6565b905082815260208101848484011115612ee357612ee26128b9565b5b612eee8482856128ef565b509392505050565b600082601f830112612f0b57612f0a612771565b5b8135612f1b848260208601612eb4565b91505092915050565b600080600080600060a08688031215612f4057612f3f6124cf565b5b6000612f4e88828901612522565b9550506020612f5f88828901612558565b945050604086013567ffffffffffffffff811115612f8057612f7f6124d4565b5b612f8c88828901612940565b935050606086013567ffffffffffffffff811115612fad57612fac6124d4565b5b612fb988828901612ef6565b9250506080612fca88828901612558565b9150509295509295909350565b612fe08161265c565b8114612feb57600080fd5b50565b600081359050612ffd81612fd7565b92915050565b6000806040838503121561301a576130196124cf565b5b600061302885828601612522565b925050602061303985828601612fee565b9150509250929050565b600067ffffffffffffffff82111561305e5761305d612776565b5b602082029050602081019050919050565b600061308261307d84613043565b6127d6565b905080838252602082019050602084028301858111156130a5576130a461281d565b5b835b818110156130ec57803567ffffffffffffffff8111156130ca576130c9612771565b5b8086016130d78982612ef6565b855260208501945050506020810190506130a7565b5050509392505050565b600082601f83011261310b5761310a612771565b5b813561311b84826020860161306f565b91505092915050565b600080600080600060a086880312156131405761313f6124cf565b5b600061314e88828901612522565b955050602086013567ffffffffffffffff81111561316f5761316e6124d4565b5b61317b8882890161288b565b945050604086013567ffffffffffffffff81111561319c5761319b6124d4565b5b6131a888828901612940565b935050606086013567ffffffffffffffff8111156131c9576131c86124d4565b5b6131d58882890161288b565b925050608086013567ffffffffffffffff8111156131f6576131f56124d4565b5b613202888289016130f6565b9150509295509295909350565b60008060408385031215613226576132256124cf565b5b600061323485828601612522565b925050602061324585828601612522565b9150509250929050565b600080600060608486031215613268576132676124cf565b5b600061327686828701612522565b935050602061328786828701612558565b925050604061329886828701612558565b9150509250925092565b600080600080600060a086880312156132be576132bd6124cf565b5b60006132cc88828901612522565b95505060206132dd88828901612522565b94505060406132ee88828901612558565b93505060606132ff88828901612558565b925050608086013567ffffffffffffffff8111156133205761331f6124d4565b5b61332c88828901612940565b9150509295509295909350565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000613395602a836126ca565b91506133a082613339565b604082019050919050565b600060208201905081810360008301526133c481613388565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061341257607f821691505b602082108103613425576134246133cb565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b60008154613458816133fa565b613462818661342b565b9450600182166000811461347d5760018114613492576134c5565b60ff19831686528115158202860193506134c5565b61349b85613436565b60005b838110156134bd5781548189015260018201915060208101905061349e565b838801955050505b50505092915050565b60006134d9826126bf565b6134e3818561342b565b93506134f38185602086016126db565b80840191505092915050565b600061350b828561344b565b915061351782846134ce565b91508190509392505050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b600061357f602e836126ca565b915061358a82613523565b604082019050919050565b600060208201905081810360008301526135ae81613572565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006136116029836126ca565b915061361c826135b5565b604082019050919050565b6000602082019050818103600083015261364081613604565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006136b082612537565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036136e2576136e1613676565b5b600182019050919050565b7f4b7265737573204e46543a2043616c6c6572206e6f742050726f787900000000600082015250565b6000613723601c836126ca565b915061372e826136ed565b602082019050919050565b6000602082019050818103600083015261375281613716565b9050919050565b7f4b7265737573204e46543a20496e636f6e73697374656e74206c656e67746873600082015250565b600061378f6020836126ca565b915061379a82613759565b602082019050919050565b600060208201905081810360008301526137be81613782565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6137fa816124f9565b82525050565b600061380c83836137f1565b60208301905092915050565b6000602082019050919050565b6000613830826137c5565b61383a81856137d0565b9350613845836137e1565b8060005b8381101561387657815161385d8882613800565b975061386883613818565b925050600181019050613849565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b60006138aa82613883565b6138b4818561388e565b93506138c48185602086016126db565b6138cd81612705565b840191505092915050565b600060808201905081810360008301526138f28187613825565b905061390160208301866125ad565b81810360408301526139138185612c02565b90508181036060830152613927818461389f565b905095945050505050565b7f4b7265737573204e46543a20416c7265616479204d696e746564000000000000600082015250565b6000613968601a836126ca565b915061397382613932565b602082019050919050565b600060208201905081810360008301526139978161395b565b9050919050565b600060a0820190506139b36000830188612a3d565b6139c060208301876125ad565b81810360408301526139d2818661389f565b905081810360608301526139e68185612716565b90506139f560808301846125ad565b9695505050505050565b7f4b7265737573204e46543a20416c7265616479206d696e746564210000000000600082015250565b6000613a35601b836126ca565b9150613a40826139ff565b602082019050919050565b60006020820190508181036000830152613a6481613a28565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ab3826126bf565b613abd8185613a97565b9350613acd8185602086016126db565b613ad681612705565b840191505092915050565b6000613aed8383613aa8565b905092915050565b6000602082019050919050565b6000613b0d82613a6b565b613b178185613a76565b935083602082028501613b2985613a87565b8060005b85811015613b655784840389528151613b468582613ae1565b9450613b5183613af5565b925060208a01995050600181019050613b2d565b50829750879550505050505092915050565b600060a082019050613b8c6000830188612a3d565b8181036020830152613b9e8187612c02565b90508181036040830152613bb2818661389f565b90508181036060830152613bc68185613b02565b90508181036080830152613bda8184612c02565b90509695505050505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000613c426028836126ca565b9150613c4d82613be6565b604082019050919050565b60006020820190508181036000830152613c7181613c35565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613cd46025836126ca565b9150613cdf82613c78565b604082019050919050565b60006020820190508181036000830152613d0381613cc7565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000613d66602a836126ca565b9150613d7182613d0a565b604082019050919050565b60006020820190508181036000830152613d9581613d59565b9050919050565b6000613da782612537565b9150613db283612537565b9250828201905080821115613dca57613dc9613676565b5b92915050565b60006040820190508181036000830152613dea8185612c02565b90508181036020830152613dfe8184612c02565b90509392505050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613e636023836126ca565b9150613e6e82613e07565b604082019050919050565b60006020820190508181036000830152613e9281613e56565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613ef56024836126ca565b9150613f0082613e99565b604082019050919050565b60006020820190508181036000830152613f2481613ee8565b9050919050565b6000604082019050613f4060008301856125ad565b613f4d60208301846125ad565b9392505050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613fb06021836126ca565b9150613fbb82613f54565b604082019050919050565b60006020820190508181036000830152613fdf81613fa3565b9050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026140337fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613ff6565b61403d8683613ff6565b95508019841693508086168417925050509392505050565b6000819050919050565b600061407a61407561407084612537565b614055565b612537565b9050919050565b6000819050919050565b6140948361405f565b6140a86140a082614081565b848454614003565b825550505050565b600090565b6140bd6140b0565b6140c881848461408b565b505050565b5b818110156140ec576140e16000826140b5565b6001810190506140ce565b5050565b601f8211156141315761410281613436565b61410b84613fe6565b8101602085101561411a578190505b61412e61412685613fe6565b8301826140cd565b50505b505050565b600082821c905092915050565b600061415460001984600802614136565b1980831691505092915050565b600061416d8383614143565b9150826002028217905092915050565b614186826126bf565b67ffffffffffffffff81111561419f5761419e612776565b5b6141a982546133fa565b6141b48282856140f0565b600060209050601f8311600181146141e757600084156141d5578287015190505b6141df8582614161565b865550614247565b601f1984166141f586613436565b60005b8281101561421d578489015182556001820191506020850194506020810190506141f8565b8683101561423a5784890151614236601f891682614143565b8355505b6001600288020188555050505b505050505050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b60006142ab6029836126ca565b91506142b68261424f565b604082019050919050565b600060208201905081810360008301526142da8161429e565b9050919050565b600060a0820190506142f66000830188612a3d565b6143036020830187612a3d565b81810360408301526143158186612c02565b905081810360608301526143298185612c02565b9050818103608083015261433d818461389f565b90509695505050505050565b60008151905061435881612603565b92915050565b600060208284031215614374576143736124cf565b5b600061438284828501614349565b91505092915050565b60008160e01c9050919050565b600060033d11156143b75760046000803e6143b460005161438b565b90505b90565b600060443d10614447576143cc6124c5565b60043d036004823e80513d602482011167ffffffffffffffff821117156143f4575050614447565b808201805167ffffffffffffffff8111156144125750505050614447565b80602083010160043d03850181111561442f575050505050614447565b61443e826020018501866127a5565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b60006144a66034836126ca565b91506144b18261444a565b604082019050919050565b600060208201905081810360008301526144d581614499565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006145386028836126ca565b9150614543826144dc565b604082019050919050565b600060208201905081810360008301526145678161452b565b9050919050565b600060a0820190506145836000830188612a3d565b6145906020830187612a3d565b61459d60408301866125ad565b6145aa60608301856125ad565b81810360808301526145bc818461389f565b9050969550505050505056fea2646970667358221220e73fe440f6fbeb30e3c82f065062dabdf797c68e562825f1c259ea2bf9fb8b9f64736f6c634300081100330000000000000000000000006d6b71cfbfc0330fcbac529baf39788d5c7841d1

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ff5760003560e01c80636a3842e211610097578063abb2fbcb11610066578063abb2fbcb146102ba578063e985e9c5146102d6578063ed8c593814610306578063f242432a14610322576100ff565b80636a3842e21461024a578063974afd531461026657806398a34f2414610282578063a22cb4651461029e576100ff565b806333c41a90116100d357806333c41a90146101b057806343a73d9a146101e05780634e1273f4146101fe5780635d0a29511461022e576100ff565b8062fdd58e1461010457806301ffc9a7146101345780630e89341c146101645780632eb2c2d614610194575b600080fd5b61011e6004803603810190610119919061256d565b61033e565b60405161012b91906125bc565b60405180910390f35b61014e6004803603810190610149919061262f565b610406565b60405161015b9190612677565b60405180910390f35b61017e60048036038101906101799190612692565b610418565b60405161018b919061274f565b60405180910390f35b6101ae60048036038101906101a9919061296e565b6104fd565b005b6101ca60048036038101906101c59190612692565b61059e565b6040516101d79190612677565b60405180910390f35b6101e86105c8565b6040516101f59190612a4c565b60405180910390f35b61021860048036038101906102139190612b2a565b6105f2565b6040516102259190612c60565b60405180910390f35b61024860048036038101906102439190612c82565b61070b565b005b610264600480360381019061025f9190612d0d565b61071b565b005b610280600480360381019061027b9190612dc8565b6107ff565b005b61029c60048036038101906102979190612f24565b6108ec565b005b6102b860048036038101906102b39190613003565b610a65565b005b6102d460048036038101906102cf9190613124565b610a7b565b005b6102f060048036038101906102eb919061320f565b610cc0565b6040516102fd9190612677565b60405180910390f35b610320600480360381019061031b919061324f565b610d54565b005b61033c600480360381019061033791906132a2565b610d64565b005b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036103ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a5906133ab565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600061041182610e05565b9050919050565b6060600060046000848152602001908152602001600020805461043a906133fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610466906133fa565b80156104b35780601f10610488576101008083540402835291602001916104b3565b820191906000526020600020905b81548152906001019060200180831161049657829003601f168201915b5050505050905060008151116104d1576104cc83610ee7565b6104f5565b6003816040516020016104e59291906134ff565b6040516020818303038152906040525b915050919050565b610505610f7b565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061054b575061054a85610545610f7b565b610cc0565b5b61058a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058190613595565b60405180910390fd5b6105978585858585610f83565b5050505050565b60006006600083815260200190815260200160002060009054906101000a900460ff169050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60608151835114610638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062f90613627565b60405180910390fd5b6000835167ffffffffffffffff81111561065557610654612776565b5b6040519080825280602002602001820160405280156106835781602001602082028036833780820191505090505b50905060005b8451811015610700576106d08582815181106106a8576106a7613647565b5b60200260200101518583815181106106c3576106c2613647565b5b602002602001015161033e565b8282815181106106e3576106e2613647565b5b602002602001018181525050806106f9906136a5565b9050610689565b508091505092915050565b6107168383836112a4565b505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a290613739565b60405180910390fd5b83600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506107f93385858585610f83565b50505050565b60008451905082518114610848576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083f906137a5565b60405180910390fd5b60005b818110156108a7576108943387838151811061086a57610869613647565b5b60200260200101518787858151811061088657610885613647565b5b602002602001015187611572565b808061089f906136a5565b91505061084b565b507f27602d0e3fdf05b687ca9ccf287ee05cec339d40805d67c26774630a00080573858585856040516108dd94939291906138d8565b60405180910390a15050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461097c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097390613739565b60405180910390fd5b6006600082815260200190815260200160002060009054906101000a900460ff16156109dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d49061397e565b60405180910390fd5b60016006600083815260200190815260200160002060006101000a81548160ff021916908315150217905550610a158582868661180d565b610a1f81836119bd565b7ff3b1a66ec1ea821a967972c6822340c38ad0bc0b34fb387d05cda894767e9b448585858585604051610a5695949392919061399e565b60405180910390a15050505050565b610a77610a70610f7b565b8383611a22565b5050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0290613739565b60405180910390fd5b8051845114610b4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b46906137a5565b60405180910390fd5b60005b8251811015610c6d5760066000848381518110610b7257610b71613647565b5b6020026020010151815260200190815260200160002060009054906101000a900460ff1615610bd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bcd90613a4b565b60405180910390fd5b600160066000858481518110610bef57610bee613647565b5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550610c5a838281518110610c3257610c31613647565b5b6020026020010151838381518110610c4d57610c4c613647565b5b60200260200101516119bd565b8080610c65906136a5565b915050610b52565b50610c7a85838686611b8e565b7f06698a596007dd0da004057be5d697600667d70894aee20c5fe73b49408937478585858486604051610cb1959493929190613b77565b60405180910390a15050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610d5f838383611dba565b505050565b610d6c610f7b565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610db25750610db185610dac610f7b565b610cc0565b5b610df1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de890613595565b60405180910390fd5b610dfe8585858585611572565b5050505050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ed057507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ee05750610edf82612000565b5b9050919050565b606060028054610ef6906133fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610f22906133fa565b8015610f6f5780601f10610f4457610100808354040283529160200191610f6f565b820191906000526020600020905b815481529060010190602001808311610f5257829003601f168201915b50505050509050919050565b600033905090565b8151835114610fc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbe90613c58565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611036576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102d90613cea565b60405180910390fd5b6000611040610f7b565b905061105081878787878761206a565b60005b845181101561120157600085828151811061107157611070613647565b5b6020026020010151905060008583815181106110905761108f613647565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611131576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112890613d7c565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111e69190613d9c565b92505081905550505050806111fa906136a5565b9050611053565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611278929190613dd0565b60405180910390a461128e818787878787612072565b61129c81878787878761207a565b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611313576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130a90613e79565b60405180910390fd5b8051825114611357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134e90613c58565b60405180910390fd5b6000611361610f7b565b90506113818185600086866040518060200160405280600081525061206a565b60005b83518110156114ce5760008482815181106113a2576113a1613647565b5b6020026020010151905060008483815181106113c1576113c0613647565b5b60200260200101519050600080600084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145990613f0b565b60405180910390fd5b81810360008085815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505080806114c6906136a5565b915050611384565b50600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611546929190613dd0565b60405180910390a461156c81856000868660405180602001604052806000815250612072565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036115e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d890613cea565b60405180910390fd5b60006115eb610f7b565b905060006115f885612251565b9050600061160585612251565b905061161583898985858961206a565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050858110156116ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a390613d7c565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117619190613d9c565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a6040516117de929190613f2b565b60405180910390a46117f4848a8a86868a612072565b611802848a8a8a8a8a6122cb565b505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361187c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187390613fc6565b60405180910390fd5b6000611886610f7b565b9050600061189385612251565b905060006118a085612251565b90506118b18360008985858961206a565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119109190613d9c565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62898960405161198e929190613f2b565b60405180910390a46119a583600089858589612072565b6119b4836000898989896122cb565b50505050505050565b806004600084815260200190815260200160002090816119dd919061417d565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b611a0984610418565b604051611a16919061274f565b60405180910390a25050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611a90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a87906142c1565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b819190612677565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611bfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf490613fc6565b60405180910390fd5b8151835114611c41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3890613c58565b60405180910390fd5b6000611c4b610f7b565b9050611c5c8160008787878761206a565b60005b8451811015611d1557838181518110611c7b57611c7a613647565b5b6020026020010151600080878481518110611c9957611c98613647565b5b6020026020010151815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611cfb9190613d9c565b925050819055508080611d0d906136a5565b915050611c5f565b508473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d8d929190613dd0565b60405180910390a4611da481600087878787612072565b611db38160008787878761207a565b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611e29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2090613e79565b60405180910390fd5b6000611e33610f7b565b90506000611e4084612251565b90506000611e4d84612251565b9050611e6d8387600085856040518060200160405280600081525061206a565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905084811015611f04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611efb90613f0b565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611fd1929190613f2b565b60405180910390a4611ff784886000868660405180602001604052806000815250612072565b50505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050505050565b505050505050565b6120998473ffffffffffffffffffffffffffffffffffffffff166124a2565b15612249578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016120df9594939291906142e1565b6020604051808303816000875af192505050801561211b57506040513d601f19601f82011682018060405250810190612118919061435e565b60015b6121c057612127614398565b806308c379a003612183575061213b6143ba565b806121465750612185565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217a919061274f565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121b7906144bc565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223e9061454e565b60405180910390fd5b505b505050505050565b60606000600167ffffffffffffffff8111156122705761226f612776565b5b60405190808252806020026020018201604052801561229e5781602001602082028036833780820191505090505b50905082816000815181106122b6576122b5613647565b5b60200260200101818152505080915050919050565b6122ea8473ffffffffffffffffffffffffffffffffffffffff166124a2565b1561249a578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161233095949392919061456e565b6020604051808303816000875af192505050801561236c57506040513d601f19601f82011682018060405250810190612369919061435e565b60015b61241157612378614398565b806308c379a0036123d4575061238c6143ba565b8061239757506123d6565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123cb919061274f565b60405180910390fd5b505b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612408906144bc565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248f9061454e565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612504826124d9565b9050919050565b612514816124f9565b811461251f57600080fd5b50565b6000813590506125318161250b565b92915050565b6000819050919050565b61254a81612537565b811461255557600080fd5b50565b60008135905061256781612541565b92915050565b60008060408385031215612584576125836124cf565b5b600061259285828601612522565b92505060206125a385828601612558565b9150509250929050565b6125b681612537565b82525050565b60006020820190506125d160008301846125ad565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61260c816125d7565b811461261757600080fd5b50565b60008135905061262981612603565b92915050565b600060208284031215612645576126446124cf565b5b60006126538482850161261a565b91505092915050565b60008115159050919050565b6126718161265c565b82525050565b600060208201905061268c6000830184612668565b92915050565b6000602082840312156126a8576126a76124cf565b5b60006126b684828501612558565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156126f95780820151818401526020810190506126de565b60008484015250505050565b6000601f19601f8301169050919050565b6000612721826126bf565b61272b81856126ca565b935061273b8185602086016126db565b61274481612705565b840191505092915050565b600060208201905081810360008301526127698184612716565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6127ae82612705565b810181811067ffffffffffffffff821117156127cd576127cc612776565b5b80604052505050565b60006127e06124c5565b90506127ec82826127a5565b919050565b600067ffffffffffffffff82111561280c5761280b612776565b5b602082029050602081019050919050565b600080fd5b6000612835612830846127f1565b6127d6565b905080838252602082019050602084028301858111156128585761285761281d565b5b835b81811015612881578061286d8882612558565b84526020840193505060208101905061285a565b5050509392505050565b600082601f8301126128a05761289f612771565b5b81356128b0848260208601612822565b91505092915050565b600080fd5b600067ffffffffffffffff8211156128d9576128d8612776565b5b6128e282612705565b9050602081019050919050565b82818337600083830152505050565b600061291161290c846128be565b6127d6565b90508281526020810184848401111561292d5761292c6128b9565b5b6129388482856128ef565b509392505050565b600082601f83011261295557612954612771565b5b81356129658482602086016128fe565b91505092915050565b600080600080600060a0868803121561298a576129896124cf565b5b600061299888828901612522565b95505060206129a988828901612522565b945050604086013567ffffffffffffffff8111156129ca576129c96124d4565b5b6129d68882890161288b565b935050606086013567ffffffffffffffff8111156129f7576129f66124d4565b5b612a038882890161288b565b925050608086013567ffffffffffffffff811115612a2457612a236124d4565b5b612a3088828901612940565b9150509295509295909350565b612a46816124f9565b82525050565b6000602082019050612a616000830184612a3d565b92915050565b600067ffffffffffffffff821115612a8257612a81612776565b5b602082029050602081019050919050565b6000612aa6612aa184612a67565b6127d6565b90508083825260208201905060208402830185811115612ac957612ac861281d565b5b835b81811015612af25780612ade8882612522565b845260208401935050602081019050612acb565b5050509392505050565b600082601f830112612b1157612b10612771565b5b8135612b21848260208601612a93565b91505092915050565b60008060408385031215612b4157612b406124cf565b5b600083013567ffffffffffffffff811115612b5f57612b5e6124d4565b5b612b6b85828601612afc565b925050602083013567ffffffffffffffff811115612b8c57612b8b6124d4565b5b612b988582860161288b565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612bd781612537565b82525050565b6000612be98383612bce565b60208301905092915050565b6000602082019050919050565b6000612c0d82612ba2565b612c178185612bad565b9350612c2283612bbe565b8060005b83811015612c53578151612c3a8882612bdd565b9750612c4583612bf5565b925050600181019050612c26565b5085935050505092915050565b60006020820190508181036000830152612c7a8184612c02565b905092915050565b600080600060608486031215612c9b57612c9a6124cf565b5b6000612ca986828701612522565b935050602084013567ffffffffffffffff811115612cca57612cc96124d4565b5b612cd68682870161288b565b925050604084013567ffffffffffffffff811115612cf757612cf66124d4565b5b612d038682870161288b565b9150509250925092565b60008060008060808587031215612d2757612d266124cf565b5b6000612d3587828801612522565b945050602085013567ffffffffffffffff811115612d5657612d556124d4565b5b612d628782880161288b565b935050604085013567ffffffffffffffff811115612d8357612d826124d4565b5b612d8f8782880161288b565b925050606085013567ffffffffffffffff811115612db057612daf6124d4565b5b612dbc87828801612940565b91505092959194509250565b60008060008060808587031215612de257612de16124cf565b5b600085013567ffffffffffffffff811115612e0057612dff6124d4565b5b612e0c87828801612afc565b9450506020612e1d87828801612558565b935050604085013567ffffffffffffffff811115612e3e57612e3d6124d4565b5b612e4a8782880161288b565b925050606085013567ffffffffffffffff811115612e6b57612e6a6124d4565b5b612e7787828801612940565b91505092959194509250565b600067ffffffffffffffff821115612e9e57612e9d612776565b5b612ea782612705565b9050602081019050919050565b6000612ec7612ec284612e83565b6127d6565b905082815260208101848484011115612ee357612ee26128b9565b5b612eee8482856128ef565b509392505050565b600082601f830112612f0b57612f0a612771565b5b8135612f1b848260208601612eb4565b91505092915050565b600080600080600060a08688031215612f4057612f3f6124cf565b5b6000612f4e88828901612522565b9550506020612f5f88828901612558565b945050604086013567ffffffffffffffff811115612f8057612f7f6124d4565b5b612f8c88828901612940565b935050606086013567ffffffffffffffff811115612fad57612fac6124d4565b5b612fb988828901612ef6565b9250506080612fca88828901612558565b9150509295509295909350565b612fe08161265c565b8114612feb57600080fd5b50565b600081359050612ffd81612fd7565b92915050565b6000806040838503121561301a576130196124cf565b5b600061302885828601612522565b925050602061303985828601612fee565b9150509250929050565b600067ffffffffffffffff82111561305e5761305d612776565b5b602082029050602081019050919050565b600061308261307d84613043565b6127d6565b905080838252602082019050602084028301858111156130a5576130a461281d565b5b835b818110156130ec57803567ffffffffffffffff8111156130ca576130c9612771565b5b8086016130d78982612ef6565b855260208501945050506020810190506130a7565b5050509392505050565b600082601f83011261310b5761310a612771565b5b813561311b84826020860161306f565b91505092915050565b600080600080600060a086880312156131405761313f6124cf565b5b600061314e88828901612522565b955050602086013567ffffffffffffffff81111561316f5761316e6124d4565b5b61317b8882890161288b565b945050604086013567ffffffffffffffff81111561319c5761319b6124d4565b5b6131a888828901612940565b935050606086013567ffffffffffffffff8111156131c9576131c86124d4565b5b6131d58882890161288b565b925050608086013567ffffffffffffffff8111156131f6576131f56124d4565b5b613202888289016130f6565b9150509295509295909350565b60008060408385031215613226576132256124cf565b5b600061323485828601612522565b925050602061324585828601612522565b9150509250929050565b600080600060608486031215613268576132676124cf565b5b600061327686828701612522565b935050602061328786828701612558565b925050604061329886828701612558565b9150509250925092565b600080600080600060a086880312156132be576132bd6124cf565b5b60006132cc88828901612522565b95505060206132dd88828901612522565b94505060406132ee88828901612558565b93505060606132ff88828901612558565b925050608086013567ffffffffffffffff8111156133205761331f6124d4565b5b61332c88828901612940565b9150509295509295909350565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000613395602a836126ca565b91506133a082613339565b604082019050919050565b600060208201905081810360008301526133c481613388565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061341257607f821691505b602082108103613425576134246133cb565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b60008154613458816133fa565b613462818661342b565b9450600182166000811461347d5760018114613492576134c5565b60ff19831686528115158202860193506134c5565b61349b85613436565b60005b838110156134bd5781548189015260018201915060208101905061349e565b838801955050505b50505092915050565b60006134d9826126bf565b6134e3818561342b565b93506134f38185602086016126db565b80840191505092915050565b600061350b828561344b565b915061351782846134ce565b91508190509392505050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b600061357f602e836126ca565b915061358a82613523565b604082019050919050565b600060208201905081810360008301526135ae81613572565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006136116029836126ca565b915061361c826135b5565b604082019050919050565b6000602082019050818103600083015261364081613604565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006136b082612537565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036136e2576136e1613676565b5b600182019050919050565b7f4b7265737573204e46543a2043616c6c6572206e6f742050726f787900000000600082015250565b6000613723601c836126ca565b915061372e826136ed565b602082019050919050565b6000602082019050818103600083015261375281613716565b9050919050565b7f4b7265737573204e46543a20496e636f6e73697374656e74206c656e67746873600082015250565b600061378f6020836126ca565b915061379a82613759565b602082019050919050565b600060208201905081810360008301526137be81613782565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6137fa816124f9565b82525050565b600061380c83836137f1565b60208301905092915050565b6000602082019050919050565b6000613830826137c5565b61383a81856137d0565b9350613845836137e1565b8060005b8381101561387657815161385d8882613800565b975061386883613818565b925050600181019050613849565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b60006138aa82613883565b6138b4818561388e565b93506138c48185602086016126db565b6138cd81612705565b840191505092915050565b600060808201905081810360008301526138f28187613825565b905061390160208301866125ad565b81810360408301526139138185612c02565b90508181036060830152613927818461389f565b905095945050505050565b7f4b7265737573204e46543a20416c7265616479204d696e746564000000000000600082015250565b6000613968601a836126ca565b915061397382613932565b602082019050919050565b600060208201905081810360008301526139978161395b565b9050919050565b600060a0820190506139b36000830188612a3d565b6139c060208301876125ad565b81810360408301526139d2818661389f565b905081810360608301526139e68185612716565b90506139f560808301846125ad565b9695505050505050565b7f4b7265737573204e46543a20416c7265616479206d696e746564210000000000600082015250565b6000613a35601b836126ca565b9150613a40826139ff565b602082019050919050565b60006020820190508181036000830152613a6481613a28565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ab3826126bf565b613abd8185613a97565b9350613acd8185602086016126db565b613ad681612705565b840191505092915050565b6000613aed8383613aa8565b905092915050565b6000602082019050919050565b6000613b0d82613a6b565b613b178185613a76565b935083602082028501613b2985613a87565b8060005b85811015613b655784840389528151613b468582613ae1565b9450613b5183613af5565b925060208a01995050600181019050613b2d565b50829750879550505050505092915050565b600060a082019050613b8c6000830188612a3d565b8181036020830152613b9e8187612c02565b90508181036040830152613bb2818661389f565b90508181036060830152613bc68185613b02565b90508181036080830152613bda8184612c02565b90509695505050505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000613c426028836126ca565b9150613c4d82613be6565b604082019050919050565b60006020820190508181036000830152613c7181613c35565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613cd46025836126ca565b9150613cdf82613c78565b604082019050919050565b60006020820190508181036000830152613d0381613cc7565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000613d66602a836126ca565b9150613d7182613d0a565b604082019050919050565b60006020820190508181036000830152613d9581613d59565b9050919050565b6000613da782612537565b9150613db283612537565b9250828201905080821115613dca57613dc9613676565b5b92915050565b60006040820190508181036000830152613dea8185612c02565b90508181036020830152613dfe8184612c02565b90509392505050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613e636023836126ca565b9150613e6e82613e07565b604082019050919050565b60006020820190508181036000830152613e9281613e56565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613ef56024836126ca565b9150613f0082613e99565b604082019050919050565b60006020820190508181036000830152613f2481613ee8565b9050919050565b6000604082019050613f4060008301856125ad565b613f4d60208301846125ad565b9392505050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613fb06021836126ca565b9150613fbb82613f54565b604082019050919050565b60006020820190508181036000830152613fdf81613fa3565b9050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026140337fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613ff6565b61403d8683613ff6565b95508019841693508086168417925050509392505050565b6000819050919050565b600061407a61407561407084612537565b614055565b612537565b9050919050565b6000819050919050565b6140948361405f565b6140a86140a082614081565b848454614003565b825550505050565b600090565b6140bd6140b0565b6140c881848461408b565b505050565b5b818110156140ec576140e16000826140b5565b6001810190506140ce565b5050565b601f8211156141315761410281613436565b61410b84613fe6565b8101602085101561411a578190505b61412e61412685613fe6565b8301826140cd565b50505b505050565b600082821c905092915050565b600061415460001984600802614136565b1980831691505092915050565b600061416d8383614143565b9150826002028217905092915050565b614186826126bf565b67ffffffffffffffff81111561419f5761419e612776565b5b6141a982546133fa565b6141b48282856140f0565b600060209050601f8311600181146141e757600084156141d5578287015190505b6141df8582614161565b865550614247565b601f1984166141f586613436565b60005b8281101561421d578489015182556001820191506020850194506020810190506141f8565b8683101561423a5784890151614236601f891682614143565b8355505b6001600288020188555050505b505050505050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b60006142ab6029836126ca565b91506142b68261424f565b604082019050919050565b600060208201905081810360008301526142da8161429e565b9050919050565b600060a0820190506142f66000830188612a3d565b6143036020830187612a3d565b81810360408301526143158186612c02565b905081810360608301526143298185612c02565b9050818103608083015261433d818461389f565b90509695505050505050565b60008151905061435881612603565b92915050565b600060208284031215614374576143736124cf565b5b600061438284828501614349565b91505092915050565b60008160e01c9050919050565b600060033d11156143b75760046000803e6143b460005161438b565b90505b90565b600060443d10614447576143cc6124c5565b60043d036004823e80513d602482011167ffffffffffffffff821117156143f4575050614447565b808201805167ffffffffffffffff8111156144125750505050614447565b80602083010160043d03850181111561442f575050505050614447565b61443e826020018501866127a5565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b60006144a66034836126ca565b91506144b18261444a565b604082019050919050565b600060208201905081810360008301526144d581614499565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006145386028836126ca565b9150614543826144dc565b604082019050919050565b600060208201905081810360008301526145678161452b565b9050919050565b600060a0820190506145836000830188612a3d565b6145906020830187612a3d565b61459d60408301866125ad565b6145aa60608301856125ad565b81810360808301526145bc818461389f565b9050969550505050505056fea2646970667358221220e73fe440f6fbeb30e3c82f065062dabdf797c68e562825f1c259ea2bf9fb8b9f64736f6c63430008110033

[ Download: CSV Export  ]
[ Download: CSV Export  ]

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