ETH Price: $3,400.87 (+2.13%)

Token

( (WEB3MKT))
 

Overview

Max Total Supply

396 WEB3MKT

Holders

393

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

0x9a2a0e1f8020fc4be939b0e084d0dee863f9d662
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
BookNFT

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : ERC1155.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import { ERC1155 } from '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';
import { Pausable } from '@openzeppelin/contracts/security/Pausable.sol';
import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { ReentrancyGuard } from '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import { SignatureChecker } from '@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol';
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { DefaultOperatorFilterer } from "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import { Strings } from '@openzeppelin/contracts/utils/Strings.sol';

contract BookNFT is DefaultOperatorFilterer, ERC1155, Ownable, Pausable, ReentrancyGuard { 
    using ECDSA for bytes32;
    address public ecdsaSigner;

    mapping (string => bool) public usedBookCodes;
  
    constructor(address ecdsaSigner_, string memory uri_) ERC1155(uri_) {
        ecdsaSigner = ecdsaSigner_;
    }

    function bookCodeMint(string calldata bookCode, bytes calldata signature) external whenNotPaused nonReentrant {
        bytes32 signedHash = keccak256(abi.encodePacked(msg.sender, bookCode)).toEthSignedMessageHash();
        require(SignatureChecker.isValidSignatureNow(ecdsaSigner, signedHash, signature), "Invalid book code");

        require(!usedBookCodes[bookCode], "An NFT has already been claimed with this code.");

        _mint(msg.sender, 1, 1, "");

        usedBookCodes[bookCode] = true;
    }

    function withdraw(address toAddress) external onlyOwner nonReentrant {
        // Call returns a boolean value indicating success or failure.
        // This is the current recommended method to use.
        (bool sent, bytes memory data) = toAddress.call{value: address(this).balance}("");

        require(sent, "Failed to send Ether");
    }

    function uri(uint256 tokenId) public view override returns (string memory) {
        return string.concat(super.uri(tokenId), Strings.toString(tokenId));
    }

    function setURI(string memory newUri) external onlyOwner {
        _setURI(newUri);
    }

    function symbol() public pure returns (string memory) {
        return "WEB3MKT";
    }   

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }

    function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data)
        public
        override
        onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId, amount, data);
    }

    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override onlyAllowedOperator(from) {
        super.safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    receive() external payable {}
}

File 2 of 21 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC1271 standard signature validation method for
 * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
 *
 * _Available since v4.1._
 */
interface IERC1271 {
    /**
     * @dev Should return whether the signature provided is valid for the provided data
     * @param hash      Hash of the data to be signed
     * @param signature Signature byte array associated with _data
     */
    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}

File 4 of 21 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 5 of 21 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

File 6 of 21 : 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 7 of 21 : 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 8 of 21 : 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 9 of 21 : 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 10 of 21 : 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 11 of 21 : 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 12 of 21 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

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

pragma solidity ^0.8.0;

import "./ECDSA.sol";
import "../Address.sol";
import "../../interfaces/IERC1271.sol";

/**
 * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
 * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like
 * Argent and Gnosis Safe.
 *
 * _Available since v4.1._
 */
library SignatureChecker {
    /**
     * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
     * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.
     *
     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
     * change through time. It could return true at block N and false at block N+1 (or the opposite).
     */
    function isValidSignatureNow(
        address signer,
        bytes32 hash,
        bytes memory signature
    ) internal view returns (bool) {
        (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);
        if (error == ECDSA.RecoverError.NoError && recovered == signer) {
            return true;
        }

        (bool success, bytes memory result) = signer.staticcall(
            abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)
        );
        return (success &&
            result.length == 32 &&
            abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));
    }
}

File 14 of 21 : 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 15 of 21 : 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 16 of 21 : 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 17 of 21 : 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 18 of 21 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFilterer} from "./OperatorFilterer.sol";
import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol";
/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 * @dev    Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract DefaultOperatorFilterer is OperatorFilterer {
    /// @dev The constructor that is called when the contract is being deployed.
    constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {}
}

File 19 of 21 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}

File 20 of 21 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

File 21 of 21 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol";
/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 *         Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract OperatorFilterer {
    /// @dev Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);

    /// @dev The constructor that is called when the contract is being deployed.
    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    /**
     * @dev A helper function to check if an operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // under normal circumstances, this function will revert rather than return false, but inheriting contracts
            // may specify their own OperatorFilterRegistry implementations, which may behave differently
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"ecdsaSigner_","type":"address"},{"internalType":"string","name":"uri_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"bookCode","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"bookCodeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ecdsaSigner","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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"tokenId","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":"string","name":"newUri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"usedBookCodes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"toAddress","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162004fa138038062004fa18339818101604052810190620000379190620005bf565b80733cc6cdda760b79bafa08df41ecfa224f810dceb6600160006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115620002445780156200010a576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16637d3e3dbe30846040518363ffffffff1660e01b8152600401620000d092919062000636565b600060405180830381600087803b158015620000eb57600080fd5b505af115801562000100573d6000803e3d6000fd5b5050505062000243565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620001c4576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663a0af290330846040518363ffffffff1660e01b81526004016200018a92919062000636565b600060405180830381600087803b158015620001a557600080fd5b505af1158015620001ba573d6000803e3d6000fd5b5050505062000242565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16634420e486306040518263ffffffff1660e01b81526004016200020d919062000663565b600060405180830381600087803b1580156200022857600080fd5b505af11580156200023d573d6000803e3d6000fd5b505050505b5b5b50506200025781620002e460201b60201c565b50620002786200026c620002f960201b60201c565b6200030160201b60201c565b6000600360146101000a81548160ff021916908315150217905550600160048190555081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620009b2565b8060029081620002f59190620008cb565b5050565b600033905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200040882620003db565b9050919050565b6200041a81620003fb565b81146200042657600080fd5b50565b6000815190506200043a816200040f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000495826200044a565b810181811067ffffffffffffffff82111715620004b757620004b66200045b565b5b80604052505050565b6000620004cc620003c7565b9050620004da82826200048a565b919050565b600067ffffffffffffffff821115620004fd57620004fc6200045b565b5b62000508826200044a565b9050602081019050919050565b60005b838110156200053557808201518184015260208101905062000518565b60008484015250505050565b6000620005586200055284620004df565b620004c0565b90508281526020810184848401111562000577576200057662000445565b5b6200058484828562000515565b509392505050565b600082601f830112620005a457620005a362000440565b5b8151620005b684826020860162000541565b91505092915050565b60008060408385031215620005d957620005d8620003d1565b5b6000620005e98582860162000429565b925050602083015167ffffffffffffffff8111156200060d576200060c620003d6565b5b6200061b858286016200058c565b9150509250929050565b6200063081620003fb565b82525050565b60006040820190506200064d600083018562000625565b6200065c602083018462000625565b9392505050565b60006020820190506200067a600083018462000625565b92915050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620006d357607f821691505b602082108103620006e957620006e86200068b565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620007537fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000714565b6200075f868362000714565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620007ac620007a6620007a08462000777565b62000781565b62000777565b9050919050565b6000819050919050565b620007c8836200078b565b620007e0620007d782620007b3565b84845462000721565b825550505050565b600090565b620007f7620007e8565b62000804818484620007bd565b505050565b5b818110156200082c5762000820600082620007ed565b6001810190506200080a565b5050565b601f8211156200087b576200084581620006ef565b620008508462000704565b8101602085101562000860578190505b620008786200086f8562000704565b83018262000809565b50505b505050565b600082821c905092915050565b6000620008a06000198460080262000880565b1980831691505092915050565b6000620008bb83836200088d565b9150826002028217905092915050565b620008d68262000680565b67ffffffffffffffff811115620008f257620008f16200045b565b5b620008fe8254620006ba565b6200090b82828562000830565b600060209050601f8311600181146200094357600084156200092e578287015190505b6200093a8582620008ad565b865550620009aa565b601f1984166200095386620006ef565b60005b828110156200097d5784890151825560018201915060208501945060208101905062000956565b868310156200099d578489015162000999601f8916826200088d565b8355505b6001600288020188555050505b505050505050565b6145df80620009c26000396000f3fe60806040526004361061012d5760003560e01c8063715018a6116100ab578063a22cb4651161006f578063a22cb465146103c4578063a2d4d835146103ed578063d66f5c7214610416578063e985e9c514610453578063f242432a14610490578063f2fde38b146104b957610134565b8063715018a6146103155780637854c9f71461032c5780638456cb59146103575780638da5cb5b1461036e57806395d89b411461039957610134565b80633f4ba83a116100f25780633f4ba83a1461024257806341f43434146102595780634e1273f41461028457806351cff8d9146102c15780635c975abb146102ea57610134565b8062fdd58e1461013957806301ffc9a71461017657806302fe5305146101b35780630e89341c146101dc5780632eb2c2d61461021957610134565b3661013457005b600080fd5b34801561014557600080fd5b50610160600480360381019061015b919061270b565b6104e2565b60405161016d919061275a565b60405180910390f35b34801561018257600080fd5b5061019d600480360381019061019891906127cd565b6105aa565b6040516101aa9190612815565b60405180910390f35b3480156101bf57600080fd5b506101da60048036038101906101d59190612976565b61068c565b005b3480156101e857600080fd5b5061020360048036038101906101fe91906129bf565b6106a0565b6040516102109190612a6b565b60405180910390f35b34801561022557600080fd5b50610240600480360381019061023b9190612bf6565b6106db565b005b34801561024e57600080fd5b5061025761072e565b005b34801561026557600080fd5b5061026e610740565b60405161027b9190612d24565b60405180910390f35b34801561029057600080fd5b506102ab60048036038101906102a69190612e02565b610752565b6040516102b89190612f38565b60405180910390f35b3480156102cd57600080fd5b506102e860048036038101906102e39190612f5a565b61086b565b005b3480156102f657600080fd5b506102ff610936565b60405161030c9190612815565b60405180910390f35b34801561032157600080fd5b5061032a61094d565b005b34801561033857600080fd5b50610341610961565b60405161034e9190612f96565b60405180910390f35b34801561036357600080fd5b5061036c610987565b005b34801561037a57600080fd5b50610383610999565b6040516103909190612f96565b60405180910390f35b3480156103a557600080fd5b506103ae6109c3565b6040516103bb9190612a6b565b60405180910390f35b3480156103d057600080fd5b506103eb60048036038101906103e69190612fdd565b610a00565b005b3480156103f957600080fd5b50610414600480360381019061040f91906130ce565b610a19565b005b34801561042257600080fd5b5061043d60048036038101906104389190612976565b610be2565b60405161044a9190612815565b60405180910390f35b34801561045f57600080fd5b5061047a6004803603810190610475919061314f565b610c18565b6040516104879190612815565b60405180910390f35b34801561049c57600080fd5b506104b760048036038101906104b2919061318f565b610cac565b005b3480156104c557600080fd5b506104e060048036038101906104db9190612f5a565b610cff565b005b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610552576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054990613298565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061067557507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610685575061068482610d82565b5b9050919050565b610694610dec565b61069d81610e6a565b50565b60606106ab82610e7d565b6106b483610f11565b6040516020016106c59291906132f4565b6040516020818303038152906040529050919050565b843373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107195761071833610fdf565b5b61072686868686866110dc565b505050505050565b610736610dec565b61073e61117d565b565b6daaeb6d7670e522a718067333cd4e81565b60608151835114610798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078f9061338a565b60405180910390fd5b6000835167ffffffffffffffff8111156107b5576107b461284b565b5b6040519080825280602002602001820160405280156107e35781602001602082028036833780820191505090505b50905060005b845181101561086057610830858281518110610808576108076133aa565b5b6020026020010151858381518110610823576108226133aa565b5b60200260200101516104e2565b828281518110610843576108426133aa565b5b6020026020010181815250508061085990613408565b90506107e9565b508091505092915050565b610873610dec565b61087b6111e0565b6000808273ffffffffffffffffffffffffffffffffffffffff16476040516108a290613481565b60006040518083038185875af1925050503d80600081146108df576040519150601f19603f3d011682016040523d82523d6000602084013e6108e4565b606091505b509150915081610929576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610920906134e2565b60405180910390fd5b505061093361122f565b50565b6000600360149054906101000a900460ff16905090565b610955610dec565b61095f6000611239565b565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61098f610dec565b6109976112ff565b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f574542334d4b5400000000000000000000000000000000000000000000000000815250905090565b81610a0a81610fdf565b610a148383611362565b505050565b610a21611378565b610a296111e0565b6000610a5e338686604051602001610a439392919061356f565b604051602081830303815290604052805190602001206113c2565b9050610ad1600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168285858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506113f2565b610b10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b07906135e5565b60405180910390fd5b60068585604051610b22929190613605565b908152602001604051809103902060009054906101000a900460ff1615610b7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7590613690565b60405180910390fd5b610b9a33600180604051806020016040528060008152506115b8565b600160068686604051610bae929190613605565b908152602001604051809103902060006101000a81548160ff02191690831515021790555050610bdc61122f565b50505050565b6006818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900460ff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b843373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610cea57610ce933610fdf565b5b610cf78686868686611768565b505050505050565b610d07610dec565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6d90613722565b60405180910390fd5b610d7f81611239565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610df4611809565b73ffffffffffffffffffffffffffffffffffffffff16610e12610999565b73ffffffffffffffffffffffffffffffffffffffff1614610e68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5f9061378e565b60405180910390fd5b565b8060029081610e7991906139b0565b5050565b606060028054610e8c906137dd565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb8906137dd565b8015610f055780601f10610eda57610100808354040283529160200191610f05565b820191906000526020600020905b815481529060010190602001808311610ee857829003601f168201915b50505050509050919050565b606060006001610f2084611811565b01905060008167ffffffffffffffff811115610f3f57610f3e61284b565b5b6040519080825280601f01601f191660200182016040528015610f715781602001600182028036833780820191505090505b509050600082602001820190505b600115610fd4578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610fc857610fc7613a82565b5b04945060008503610f7f575b819350505050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156110d9576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611056929190613ab1565b602060405180830381865afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190613aef565b6110d857806040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016110cf9190612f96565b60405180910390fd5b5b50565b6110e4611809565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061112a575061112985611124611809565b610c18565b5b611169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116090613b8e565b60405180910390fd5b6111768585858585611964565b5050505050565b611185611c85565b6000600360146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6111c9611809565b6040516111d69190612f96565b60405180910390a1565b600260045403611225576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121c90613bfa565b60405180910390fd5b6002600481905550565b6001600481905550565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611307611378565b6001600360146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861134b611809565b6040516113589190612f96565b60405180910390a1565b61137461136d611809565b8383611cce565b5050565b611380610936565b156113c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b790613c66565b60405180910390fd5b565b6000816040516020016113d59190613cfd565b604051602081830303815290604052805190602001209050919050565b60008060006114018585611e3a565b915091506000600481111561141957611418613d23565b5b81600481111561142c5761142b613d23565b5b14801561146457508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611474576001925050506115b1565b6000808773ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b88886040516024016114a9929190613db6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516115139190613e17565b600060405180830381855afa9150503d806000811461154e576040519150601f19603f3d011682016040523d82523d6000602084013e611553565b606091505b5091509150818015611566575060208151145b80156115aa5750631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916818060200190518101906115a89190613e5a565b145b9450505050505b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611627576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161e90613ef9565b60405180910390fd5b6000611631611809565b9050600061163e85611e8b565b9050600061164b85611e8b565b905061165c83600089858589611f05565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546116bb9190613f19565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611739929190613f4d565b60405180910390a461175083600089858589611f0d565b61175f83600089898989611f15565b50505050505050565b611770611809565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806117b657506117b5856117b0611809565b610c18565b5b6117f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ec90613b8e565b60405180910390fd5b61180285858585856120ec565b5050505050565b600033905090565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061186f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161186557611864613a82565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106118ac576d04ee2d6d415b85acef810000000083816118a2576118a1613a82565b5b0492506020810190505b662386f26fc1000083106118db57662386f26fc1000083816118d1576118d0613a82565b5b0492506010810190505b6305f5e1008310611904576305f5e10083816118fa576118f9613a82565b5b0492506008810190505b612710831061192957612710838161191f5761191e613a82565b5b0492506004810190505b6064831061194c576064838161194257611941613a82565b5b0492506002810190505b600a831061195b576001810190505b80915050919050565b81518351146119a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199f90613fe8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611a17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0e9061407a565b60405180910390fd5b6000611a21611809565b9050611a31818787878787611f05565b60005b8451811015611be2576000858281518110611a5257611a516133aa565b5b602002602001015190506000858381518110611a7157611a706133aa565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611b12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b099061410c565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611bc79190613f19565b9250508190555050505080611bdb90613408565b9050611a34565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611c5992919061412c565b60405180910390a4611c6f818787878787611f0d565b611c7d818787878787612387565b505050505050565b611c8d610936565b611ccc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc3906141af565b60405180910390fd5b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3390614241565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611e2d9190612815565b60405180910390a3505050565b6000806041835103611e7b5760008060006020860151925060408601519150606086015160001a9050611e6f8782858561255e565b94509450505050611e84565b60006002915091505b9250929050565b60606000600167ffffffffffffffff811115611eaa57611ea961284b565b5b604051908082528060200260200182016040528015611ed85781602001602082028036833780820191505090505b5090508281600081518110611ef057611eef6133aa565b5b60200260200101818152505080915050919050565b505050505050565b505050505050565b611f348473ffffffffffffffffffffffffffffffffffffffff16612640565b156120e4578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611f7a959493929190614261565b6020604051808303816000875af1925050508015611fb657506040513d601f19601f82011682018060405250810190611fb391906142d0565b60015b61205b57611fc261430a565b806308c379a00361201e5750611fd661432c565b80611fe15750612020565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120159190612a6b565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120529061442e565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146120e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d9906144c0565b60405180910390fd5b505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361215b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121529061407a565b60405180910390fd5b6000612165611809565b9050600061217285611e8b565b9050600061217f85611e8b565b905061218f838989858589611f05565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015612226576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221d9061410c565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122db9190613f19565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051612358929190613f4d565b60405180910390a461236e848a8a86868a611f0d565b61237c848a8a8a8a8a611f15565b505050505050505050565b6123a68473ffffffffffffffffffffffffffffffffffffffff16612640565b15612556578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016123ec9594939291906144e0565b6020604051808303816000875af192505050801561242857506040513d601f19601f8201168201806040525081019061242591906142d0565b60015b6124cd5761243461430a565b806308c379a003612490575061244861432c565b806124535750612492565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124879190612a6b565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c49061442e565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254b906144c0565b60405180910390fd5b505b505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115612599576000600391509150612637565b6000600187878787604051600081526020016040526040516125be9493929190614564565b6020604051602081039080840390855afa1580156125e0573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361262e57600060019250925050612637565b80600092509250505b94509492505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126a282612677565b9050919050565b6126b281612697565b81146126bd57600080fd5b50565b6000813590506126cf816126a9565b92915050565b6000819050919050565b6126e8816126d5565b81146126f357600080fd5b50565b600081359050612705816126df565b92915050565b600080604083850312156127225761272161266d565b5b6000612730858286016126c0565b9250506020612741858286016126f6565b9150509250929050565b612754816126d5565b82525050565b600060208201905061276f600083018461274b565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6127aa81612775565b81146127b557600080fd5b50565b6000813590506127c7816127a1565b92915050565b6000602082840312156127e3576127e261266d565b5b60006127f1848285016127b8565b91505092915050565b60008115159050919050565b61280f816127fa565b82525050565b600060208201905061282a6000830184612806565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128838261283a565b810181811067ffffffffffffffff821117156128a2576128a161284b565b5b80604052505050565b60006128b5612663565b90506128c1828261287a565b919050565b600067ffffffffffffffff8211156128e1576128e061284b565b5b6128ea8261283a565b9050602081019050919050565b82818337600083830152505050565b6000612919612914846128c6565b6128ab565b90508281526020810184848401111561293557612934612835565b5b6129408482856128f7565b509392505050565b600082601f83011261295d5761295c612830565b5b813561296d848260208601612906565b91505092915050565b60006020828403121561298c5761298b61266d565b5b600082013567ffffffffffffffff8111156129aa576129a9612672565b5b6129b684828501612948565b91505092915050565b6000602082840312156129d5576129d461266d565b5b60006129e3848285016126f6565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612a26578082015181840152602081019050612a0b565b60008484015250505050565b6000612a3d826129ec565b612a4781856129f7565b9350612a57818560208601612a08565b612a608161283a565b840191505092915050565b60006020820190508181036000830152612a858184612a32565b905092915050565b600067ffffffffffffffff821115612aa857612aa761284b565b5b602082029050602081019050919050565b600080fd5b6000612ad1612acc84612a8d565b6128ab565b90508083825260208201905060208402830185811115612af457612af3612ab9565b5b835b81811015612b1d5780612b0988826126f6565b845260208401935050602081019050612af6565b5050509392505050565b600082601f830112612b3c57612b3b612830565b5b8135612b4c848260208601612abe565b91505092915050565b600067ffffffffffffffff821115612b7057612b6f61284b565b5b612b798261283a565b9050602081019050919050565b6000612b99612b9484612b55565b6128ab565b905082815260208101848484011115612bb557612bb4612835565b5b612bc08482856128f7565b509392505050565b600082601f830112612bdd57612bdc612830565b5b8135612bed848260208601612b86565b91505092915050565b600080600080600060a08688031215612c1257612c1161266d565b5b6000612c20888289016126c0565b9550506020612c31888289016126c0565b945050604086013567ffffffffffffffff811115612c5257612c51612672565b5b612c5e88828901612b27565b935050606086013567ffffffffffffffff811115612c7f57612c7e612672565b5b612c8b88828901612b27565b925050608086013567ffffffffffffffff811115612cac57612cab612672565b5b612cb888828901612bc8565b9150509295509295909350565b6000819050919050565b6000612cea612ce5612ce084612677565b612cc5565b612677565b9050919050565b6000612cfc82612ccf565b9050919050565b6000612d0e82612cf1565b9050919050565b612d1e81612d03565b82525050565b6000602082019050612d396000830184612d15565b92915050565b600067ffffffffffffffff821115612d5a57612d5961284b565b5b602082029050602081019050919050565b6000612d7e612d7984612d3f565b6128ab565b90508083825260208201905060208402830185811115612da157612da0612ab9565b5b835b81811015612dca5780612db688826126c0565b845260208401935050602081019050612da3565b5050509392505050565b600082601f830112612de957612de8612830565b5b8135612df9848260208601612d6b565b91505092915050565b60008060408385031215612e1957612e1861266d565b5b600083013567ffffffffffffffff811115612e3757612e36612672565b5b612e4385828601612dd4565b925050602083013567ffffffffffffffff811115612e6457612e63612672565b5b612e7085828601612b27565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612eaf816126d5565b82525050565b6000612ec18383612ea6565b60208301905092915050565b6000602082019050919050565b6000612ee582612e7a565b612eef8185612e85565b9350612efa83612e96565b8060005b83811015612f2b578151612f128882612eb5565b9750612f1d83612ecd565b925050600181019050612efe565b5085935050505092915050565b60006020820190508181036000830152612f528184612eda565b905092915050565b600060208284031215612f7057612f6f61266d565b5b6000612f7e848285016126c0565b91505092915050565b612f9081612697565b82525050565b6000602082019050612fab6000830184612f87565b92915050565b612fba816127fa565b8114612fc557600080fd5b50565b600081359050612fd781612fb1565b92915050565b60008060408385031215612ff457612ff361266d565b5b6000613002858286016126c0565b925050602061301385828601612fc8565b9150509250929050565b600080fd5b60008083601f84011261303857613037612830565b5b8235905067ffffffffffffffff8111156130555761305461301d565b5b60208301915083600182028301111561307157613070612ab9565b5b9250929050565b60008083601f84011261308e5761308d612830565b5b8235905067ffffffffffffffff8111156130ab576130aa61301d565b5b6020830191508360018202830111156130c7576130c6612ab9565b5b9250929050565b600080600080604085870312156130e8576130e761266d565b5b600085013567ffffffffffffffff81111561310657613105612672565b5b61311287828801613022565b9450945050602085013567ffffffffffffffff81111561313557613134612672565b5b61314187828801613078565b925092505092959194509250565b600080604083850312156131665761316561266d565b5b6000613174858286016126c0565b9250506020613185858286016126c0565b9150509250929050565b600080600080600060a086880312156131ab576131aa61266d565b5b60006131b9888289016126c0565b95505060206131ca888289016126c0565b94505060406131db888289016126f6565b93505060606131ec888289016126f6565b925050608086013567ffffffffffffffff81111561320d5761320c612672565b5b61321988828901612bc8565b9150509295509295909350565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000613282602a836129f7565b915061328d82613226565b604082019050919050565b600060208201905081810360008301526132b181613275565b9050919050565b600081905092915050565b60006132ce826129ec565b6132d881856132b8565b93506132e8818560208601612a08565b80840191505092915050565b600061330082856132c3565b915061330c82846132c3565b91508190509392505050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006133746029836129f7565b915061337f82613318565b604082019050919050565b600060208201905081810360008301526133a381613367565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613413826126d5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613445576134446133d9565b5b600182019050919050565b600081905092915050565b50565b600061346b600083613450565b91506134768261345b565b600082019050919050565b600061348c8261345e565b9150819050919050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b60006134cc6014836129f7565b91506134d782613496565b602082019050919050565b600060208201905081810360008301526134fb816134bf565b9050919050565b60008160601b9050919050565b600061351a82613502565b9050919050565b600061352c8261350f565b9050919050565b61354461353f82612697565b613521565b82525050565b600061355683856132b8565b93506135638385846128f7565b82840190509392505050565b600061357b8286613533565b60148201915061358c82848661354a565b9150819050949350505050565b7f496e76616c696420626f6f6b20636f6465000000000000000000000000000000600082015250565b60006135cf6011836129f7565b91506135da82613599565b602082019050919050565b600060208201905081810360008301526135fe816135c2565b9050919050565b600061361282848661354a565b91508190509392505050565b7f416e204e46542068617320616c7265616479206265656e20636c61696d65642060008201527f77697468207468697320636f64652e0000000000000000000000000000000000602082015250565b600061367a602f836129f7565b91506136858261361e565b604082019050919050565b600060208201905081810360008301526136a98161366d565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061370c6026836129f7565b9150613717826136b0565b604082019050919050565b6000602082019050818103600083015261373b816136ff565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006137786020836129f7565b915061378382613742565b602082019050919050565b600060208201905081810360008301526137a78161376b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806137f557607f821691505b602082108103613808576138076137ae565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026138707fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613833565b61387a8683613833565b95508019841693508086168417925050509392505050565b60006138ad6138a86138a3846126d5565b612cc5565b6126d5565b9050919050565b6000819050919050565b6138c783613892565b6138db6138d3826138b4565b848454613840565b825550505050565b600090565b6138f06138e3565b6138fb8184846138be565b505050565b5b8181101561391f576139146000826138e8565b600181019050613901565b5050565b601f821115613964576139358161380e565b61393e84613823565b8101602085101561394d578190505b61396161395985613823565b830182613900565b50505b505050565b600082821c905092915050565b600061398760001984600802613969565b1980831691505092915050565b60006139a08383613976565b9150826002028217905092915050565b6139b9826129ec565b67ffffffffffffffff8111156139d2576139d161284b565b5b6139dc82546137dd565b6139e7828285613923565b600060209050601f831160018114613a1a5760008415613a08578287015190505b613a128582613994565b865550613a7a565b601f198416613a288661380e565b60005b82811015613a5057848901518255600182019150602085019450602081019050613a2b565b86831015613a6d5784890151613a69601f891682613976565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000604082019050613ac66000830185612f87565b613ad36020830184612f87565b9392505050565b600081519050613ae981612fb1565b92915050565b600060208284031215613b0557613b0461266d565b5b6000613b1384828501613ada565b91505092915050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b6000613b78602e836129f7565b9150613b8382613b1c565b604082019050919050565b60006020820190508181036000830152613ba781613b6b565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613be4601f836129f7565b9150613bef82613bae565b602082019050919050565b60006020820190508181036000830152613c1381613bd7565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000613c506010836129f7565b9150613c5b82613c1a565b602082019050919050565b60006020820190508181036000830152613c7f81613c43565b9050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000613cbc601c836132b8565b9150613cc782613c86565b601c82019050919050565b6000819050919050565b6000819050919050565b613cf7613cf282613cd2565b613cdc565b82525050565b6000613d0882613caf565b9150613d148284613ce6565b60208201915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b613d5b81613cd2565b82525050565b600081519050919050565b600082825260208201905092915050565b6000613d8882613d61565b613d928185613d6c565b9350613da2818560208601612a08565b613dab8161283a565b840191505092915050565b6000604082019050613dcb6000830185613d52565b8181036020830152613ddd8184613d7d565b90509392505050565b6000613df182613d61565b613dfb8185613450565b9350613e0b818560208601612a08565b80840191505092915050565b6000613e238284613de6565b915081905092915050565b613e3781613cd2565b8114613e4257600080fd5b50565b600081519050613e5481613e2e565b92915050565b600060208284031215613e7057613e6f61266d565b5b6000613e7e84828501613e45565b91505092915050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613ee36021836129f7565b9150613eee82613e87565b604082019050919050565b60006020820190508181036000830152613f1281613ed6565b9050919050565b6000613f24826126d5565b9150613f2f836126d5565b9250828201905080821115613f4757613f466133d9565b5b92915050565b6000604082019050613f62600083018561274b565b613f6f602083018461274b565b9392505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000613fd26028836129f7565b9150613fdd82613f76565b604082019050919050565b6000602082019050818103600083015261400181613fc5565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006140646025836129f7565b915061406f82614008565b604082019050919050565b6000602082019050818103600083015261409381614057565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b60006140f6602a836129f7565b91506141018261409a565b604082019050919050565b60006020820190508181036000830152614125816140e9565b9050919050565b600060408201905081810360008301526141468185612eda565b9050818103602083015261415a8184612eda565b90509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b60006141996014836129f7565b91506141a482614163565b602082019050919050565b600060208201905081810360008301526141c88161418c565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b600061422b6029836129f7565b9150614236826141cf565b604082019050919050565b6000602082019050818103600083015261425a8161421e565b9050919050565b600060a0820190506142766000830188612f87565b6142836020830187612f87565b614290604083018661274b565b61429d606083018561274b565b81810360808301526142af8184613d7d565b90509695505050505050565b6000815190506142ca816127a1565b92915050565b6000602082840312156142e6576142e561266d565b5b60006142f4848285016142bb565b91505092915050565b60008160e01c9050919050565b600060033d11156143295760046000803e6143266000516142fd565b90505b90565b600060443d106143b95761433e612663565b60043d036004823e80513d602482011167ffffffffffffffff821117156143665750506143b9565b808201805167ffffffffffffffff81111561438457505050506143b9565b80602083010160043d0385018111156143a15750505050506143b9565b6143b08260200185018661287a565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b60006144186034836129f7565b9150614423826143bc565b604082019050919050565b600060208201905081810360008301526144478161440b565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006144aa6028836129f7565b91506144b58261444e565b604082019050919050565b600060208201905081810360008301526144d98161449d565b9050919050565b600060a0820190506144f56000830188612f87565b6145026020830187612f87565b81810360408301526145148186612eda565b905081810360608301526145288185612eda565b9050818103608083015261453c8184613d7d565b90509695505050505050565b600060ff82169050919050565b61455e81614548565b82525050565b60006080820190506145796000830187613d52565b6145866020830186614555565b6145936040830185613d52565b6145a06060830184613d52565b9594505050505056fea2646970667358221220d312449fdb34f60393b514b90462011bdd281b7eefe3c128f0fcba3103488af264736f6c6343000811003300000000000000000000000072ced146dc6ea5cc742833731197e45e045460140000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e68747470733a2f2f6170692e616d616e6461636173736174742e636f6d2f0000

Deployed Bytecode

0x60806040526004361061012d5760003560e01c8063715018a6116100ab578063a22cb4651161006f578063a22cb465146103c4578063a2d4d835146103ed578063d66f5c7214610416578063e985e9c514610453578063f242432a14610490578063f2fde38b146104b957610134565b8063715018a6146103155780637854c9f71461032c5780638456cb59146103575780638da5cb5b1461036e57806395d89b411461039957610134565b80633f4ba83a116100f25780633f4ba83a1461024257806341f43434146102595780634e1273f41461028457806351cff8d9146102c15780635c975abb146102ea57610134565b8062fdd58e1461013957806301ffc9a71461017657806302fe5305146101b35780630e89341c146101dc5780632eb2c2d61461021957610134565b3661013457005b600080fd5b34801561014557600080fd5b50610160600480360381019061015b919061270b565b6104e2565b60405161016d919061275a565b60405180910390f35b34801561018257600080fd5b5061019d600480360381019061019891906127cd565b6105aa565b6040516101aa9190612815565b60405180910390f35b3480156101bf57600080fd5b506101da60048036038101906101d59190612976565b61068c565b005b3480156101e857600080fd5b5061020360048036038101906101fe91906129bf565b6106a0565b6040516102109190612a6b565b60405180910390f35b34801561022557600080fd5b50610240600480360381019061023b9190612bf6565b6106db565b005b34801561024e57600080fd5b5061025761072e565b005b34801561026557600080fd5b5061026e610740565b60405161027b9190612d24565b60405180910390f35b34801561029057600080fd5b506102ab60048036038101906102a69190612e02565b610752565b6040516102b89190612f38565b60405180910390f35b3480156102cd57600080fd5b506102e860048036038101906102e39190612f5a565b61086b565b005b3480156102f657600080fd5b506102ff610936565b60405161030c9190612815565b60405180910390f35b34801561032157600080fd5b5061032a61094d565b005b34801561033857600080fd5b50610341610961565b60405161034e9190612f96565b60405180910390f35b34801561036357600080fd5b5061036c610987565b005b34801561037a57600080fd5b50610383610999565b6040516103909190612f96565b60405180910390f35b3480156103a557600080fd5b506103ae6109c3565b6040516103bb9190612a6b565b60405180910390f35b3480156103d057600080fd5b506103eb60048036038101906103e69190612fdd565b610a00565b005b3480156103f957600080fd5b50610414600480360381019061040f91906130ce565b610a19565b005b34801561042257600080fd5b5061043d60048036038101906104389190612976565b610be2565b60405161044a9190612815565b60405180910390f35b34801561045f57600080fd5b5061047a6004803603810190610475919061314f565b610c18565b6040516104879190612815565b60405180910390f35b34801561049c57600080fd5b506104b760048036038101906104b2919061318f565b610cac565b005b3480156104c557600080fd5b506104e060048036038101906104db9190612f5a565b610cff565b005b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610552576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054990613298565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061067557507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610685575061068482610d82565b5b9050919050565b610694610dec565b61069d81610e6a565b50565b60606106ab82610e7d565b6106b483610f11565b6040516020016106c59291906132f4565b6040516020818303038152906040529050919050565b843373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107195761071833610fdf565b5b61072686868686866110dc565b505050505050565b610736610dec565b61073e61117d565b565b6daaeb6d7670e522a718067333cd4e81565b60608151835114610798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078f9061338a565b60405180910390fd5b6000835167ffffffffffffffff8111156107b5576107b461284b565b5b6040519080825280602002602001820160405280156107e35781602001602082028036833780820191505090505b50905060005b845181101561086057610830858281518110610808576108076133aa565b5b6020026020010151858381518110610823576108226133aa565b5b60200260200101516104e2565b828281518110610843576108426133aa565b5b6020026020010181815250508061085990613408565b90506107e9565b508091505092915050565b610873610dec565b61087b6111e0565b6000808273ffffffffffffffffffffffffffffffffffffffff16476040516108a290613481565b60006040518083038185875af1925050503d80600081146108df576040519150601f19603f3d011682016040523d82523d6000602084013e6108e4565b606091505b509150915081610929576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610920906134e2565b60405180910390fd5b505061093361122f565b50565b6000600360149054906101000a900460ff16905090565b610955610dec565b61095f6000611239565b565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61098f610dec565b6109976112ff565b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f574542334d4b5400000000000000000000000000000000000000000000000000815250905090565b81610a0a81610fdf565b610a148383611362565b505050565b610a21611378565b610a296111e0565b6000610a5e338686604051602001610a439392919061356f565b604051602081830303815290604052805190602001206113c2565b9050610ad1600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168285858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506113f2565b610b10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b07906135e5565b60405180910390fd5b60068585604051610b22929190613605565b908152602001604051809103902060009054906101000a900460ff1615610b7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7590613690565b60405180910390fd5b610b9a33600180604051806020016040528060008152506115b8565b600160068686604051610bae929190613605565b908152602001604051809103902060006101000a81548160ff02191690831515021790555050610bdc61122f565b50505050565b6006818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900460ff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b843373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610cea57610ce933610fdf565b5b610cf78686868686611768565b505050505050565b610d07610dec565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6d90613722565b60405180910390fd5b610d7f81611239565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610df4611809565b73ffffffffffffffffffffffffffffffffffffffff16610e12610999565b73ffffffffffffffffffffffffffffffffffffffff1614610e68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5f9061378e565b60405180910390fd5b565b8060029081610e7991906139b0565b5050565b606060028054610e8c906137dd565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb8906137dd565b8015610f055780601f10610eda57610100808354040283529160200191610f05565b820191906000526020600020905b815481529060010190602001808311610ee857829003601f168201915b50505050509050919050565b606060006001610f2084611811565b01905060008167ffffffffffffffff811115610f3f57610f3e61284b565b5b6040519080825280601f01601f191660200182016040528015610f715781602001600182028036833780820191505090505b509050600082602001820190505b600115610fd4578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610fc857610fc7613a82565b5b04945060008503610f7f575b819350505050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156110d9576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611056929190613ab1565b602060405180830381865afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190613aef565b6110d857806040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016110cf9190612f96565b60405180910390fd5b5b50565b6110e4611809565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061112a575061112985611124611809565b610c18565b5b611169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116090613b8e565b60405180910390fd5b6111768585858585611964565b5050505050565b611185611c85565b6000600360146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6111c9611809565b6040516111d69190612f96565b60405180910390a1565b600260045403611225576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121c90613bfa565b60405180910390fd5b6002600481905550565b6001600481905550565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611307611378565b6001600360146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861134b611809565b6040516113589190612f96565b60405180910390a1565b61137461136d611809565b8383611cce565b5050565b611380610936565b156113c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b790613c66565b60405180910390fd5b565b6000816040516020016113d59190613cfd565b604051602081830303815290604052805190602001209050919050565b60008060006114018585611e3a565b915091506000600481111561141957611418613d23565b5b81600481111561142c5761142b613d23565b5b14801561146457508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611474576001925050506115b1565b6000808773ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b88886040516024016114a9929190613db6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516115139190613e17565b600060405180830381855afa9150503d806000811461154e576040519150601f19603f3d011682016040523d82523d6000602084013e611553565b606091505b5091509150818015611566575060208151145b80156115aa5750631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916818060200190518101906115a89190613e5a565b145b9450505050505b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611627576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161e90613ef9565b60405180910390fd5b6000611631611809565b9050600061163e85611e8b565b9050600061164b85611e8b565b905061165c83600089858589611f05565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546116bb9190613f19565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611739929190613f4d565b60405180910390a461175083600089858589611f0d565b61175f83600089898989611f15565b50505050505050565b611770611809565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806117b657506117b5856117b0611809565b610c18565b5b6117f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ec90613b8e565b60405180910390fd5b61180285858585856120ec565b5050505050565b600033905090565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061186f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161186557611864613a82565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106118ac576d04ee2d6d415b85acef810000000083816118a2576118a1613a82565b5b0492506020810190505b662386f26fc1000083106118db57662386f26fc1000083816118d1576118d0613a82565b5b0492506010810190505b6305f5e1008310611904576305f5e10083816118fa576118f9613a82565b5b0492506008810190505b612710831061192957612710838161191f5761191e613a82565b5b0492506004810190505b6064831061194c576064838161194257611941613a82565b5b0492506002810190505b600a831061195b576001810190505b80915050919050565b81518351146119a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199f90613fe8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611a17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0e9061407a565b60405180910390fd5b6000611a21611809565b9050611a31818787878787611f05565b60005b8451811015611be2576000858281518110611a5257611a516133aa565b5b602002602001015190506000858381518110611a7157611a706133aa565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611b12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b099061410c565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611bc79190613f19565b9250508190555050505080611bdb90613408565b9050611a34565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611c5992919061412c565b60405180910390a4611c6f818787878787611f0d565b611c7d818787878787612387565b505050505050565b611c8d610936565b611ccc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc3906141af565b60405180910390fd5b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3390614241565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611e2d9190612815565b60405180910390a3505050565b6000806041835103611e7b5760008060006020860151925060408601519150606086015160001a9050611e6f8782858561255e565b94509450505050611e84565b60006002915091505b9250929050565b60606000600167ffffffffffffffff811115611eaa57611ea961284b565b5b604051908082528060200260200182016040528015611ed85781602001602082028036833780820191505090505b5090508281600081518110611ef057611eef6133aa565b5b60200260200101818152505080915050919050565b505050505050565b505050505050565b611f348473ffffffffffffffffffffffffffffffffffffffff16612640565b156120e4578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611f7a959493929190614261565b6020604051808303816000875af1925050508015611fb657506040513d601f19601f82011682018060405250810190611fb391906142d0565b60015b61205b57611fc261430a565b806308c379a00361201e5750611fd661432c565b80611fe15750612020565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120159190612a6b565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120529061442e565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146120e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d9906144c0565b60405180910390fd5b505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361215b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121529061407a565b60405180910390fd5b6000612165611809565b9050600061217285611e8b565b9050600061217f85611e8b565b905061218f838989858589611f05565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015612226576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221d9061410c565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122db9190613f19565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051612358929190613f4d565b60405180910390a461236e848a8a86868a611f0d565b61237c848a8a8a8a8a611f15565b505050505050505050565b6123a68473ffffffffffffffffffffffffffffffffffffffff16612640565b15612556578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016123ec9594939291906144e0565b6020604051808303816000875af192505050801561242857506040513d601f19601f8201168201806040525081019061242591906142d0565b60015b6124cd5761243461430a565b806308c379a003612490575061244861432c565b806124535750612492565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124879190612a6b565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c49061442e565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254b906144c0565b60405180910390fd5b505b505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115612599576000600391509150612637565b6000600187878787604051600081526020016040526040516125be9493929190614564565b6020604051602081039080840390855afa1580156125e0573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361262e57600060019250925050612637565b80600092509250505b94509492505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126a282612677565b9050919050565b6126b281612697565b81146126bd57600080fd5b50565b6000813590506126cf816126a9565b92915050565b6000819050919050565b6126e8816126d5565b81146126f357600080fd5b50565b600081359050612705816126df565b92915050565b600080604083850312156127225761272161266d565b5b6000612730858286016126c0565b9250506020612741858286016126f6565b9150509250929050565b612754816126d5565b82525050565b600060208201905061276f600083018461274b565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6127aa81612775565b81146127b557600080fd5b50565b6000813590506127c7816127a1565b92915050565b6000602082840312156127e3576127e261266d565b5b60006127f1848285016127b8565b91505092915050565b60008115159050919050565b61280f816127fa565b82525050565b600060208201905061282a6000830184612806565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128838261283a565b810181811067ffffffffffffffff821117156128a2576128a161284b565b5b80604052505050565b60006128b5612663565b90506128c1828261287a565b919050565b600067ffffffffffffffff8211156128e1576128e061284b565b5b6128ea8261283a565b9050602081019050919050565b82818337600083830152505050565b6000612919612914846128c6565b6128ab565b90508281526020810184848401111561293557612934612835565b5b6129408482856128f7565b509392505050565b600082601f83011261295d5761295c612830565b5b813561296d848260208601612906565b91505092915050565b60006020828403121561298c5761298b61266d565b5b600082013567ffffffffffffffff8111156129aa576129a9612672565b5b6129b684828501612948565b91505092915050565b6000602082840312156129d5576129d461266d565b5b60006129e3848285016126f6565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612a26578082015181840152602081019050612a0b565b60008484015250505050565b6000612a3d826129ec565b612a4781856129f7565b9350612a57818560208601612a08565b612a608161283a565b840191505092915050565b60006020820190508181036000830152612a858184612a32565b905092915050565b600067ffffffffffffffff821115612aa857612aa761284b565b5b602082029050602081019050919050565b600080fd5b6000612ad1612acc84612a8d565b6128ab565b90508083825260208201905060208402830185811115612af457612af3612ab9565b5b835b81811015612b1d5780612b0988826126f6565b845260208401935050602081019050612af6565b5050509392505050565b600082601f830112612b3c57612b3b612830565b5b8135612b4c848260208601612abe565b91505092915050565b600067ffffffffffffffff821115612b7057612b6f61284b565b5b612b798261283a565b9050602081019050919050565b6000612b99612b9484612b55565b6128ab565b905082815260208101848484011115612bb557612bb4612835565b5b612bc08482856128f7565b509392505050565b600082601f830112612bdd57612bdc612830565b5b8135612bed848260208601612b86565b91505092915050565b600080600080600060a08688031215612c1257612c1161266d565b5b6000612c20888289016126c0565b9550506020612c31888289016126c0565b945050604086013567ffffffffffffffff811115612c5257612c51612672565b5b612c5e88828901612b27565b935050606086013567ffffffffffffffff811115612c7f57612c7e612672565b5b612c8b88828901612b27565b925050608086013567ffffffffffffffff811115612cac57612cab612672565b5b612cb888828901612bc8565b9150509295509295909350565b6000819050919050565b6000612cea612ce5612ce084612677565b612cc5565b612677565b9050919050565b6000612cfc82612ccf565b9050919050565b6000612d0e82612cf1565b9050919050565b612d1e81612d03565b82525050565b6000602082019050612d396000830184612d15565b92915050565b600067ffffffffffffffff821115612d5a57612d5961284b565b5b602082029050602081019050919050565b6000612d7e612d7984612d3f565b6128ab565b90508083825260208201905060208402830185811115612da157612da0612ab9565b5b835b81811015612dca5780612db688826126c0565b845260208401935050602081019050612da3565b5050509392505050565b600082601f830112612de957612de8612830565b5b8135612df9848260208601612d6b565b91505092915050565b60008060408385031215612e1957612e1861266d565b5b600083013567ffffffffffffffff811115612e3757612e36612672565b5b612e4385828601612dd4565b925050602083013567ffffffffffffffff811115612e6457612e63612672565b5b612e7085828601612b27565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612eaf816126d5565b82525050565b6000612ec18383612ea6565b60208301905092915050565b6000602082019050919050565b6000612ee582612e7a565b612eef8185612e85565b9350612efa83612e96565b8060005b83811015612f2b578151612f128882612eb5565b9750612f1d83612ecd565b925050600181019050612efe565b5085935050505092915050565b60006020820190508181036000830152612f528184612eda565b905092915050565b600060208284031215612f7057612f6f61266d565b5b6000612f7e848285016126c0565b91505092915050565b612f9081612697565b82525050565b6000602082019050612fab6000830184612f87565b92915050565b612fba816127fa565b8114612fc557600080fd5b50565b600081359050612fd781612fb1565b92915050565b60008060408385031215612ff457612ff361266d565b5b6000613002858286016126c0565b925050602061301385828601612fc8565b9150509250929050565b600080fd5b60008083601f84011261303857613037612830565b5b8235905067ffffffffffffffff8111156130555761305461301d565b5b60208301915083600182028301111561307157613070612ab9565b5b9250929050565b60008083601f84011261308e5761308d612830565b5b8235905067ffffffffffffffff8111156130ab576130aa61301d565b5b6020830191508360018202830111156130c7576130c6612ab9565b5b9250929050565b600080600080604085870312156130e8576130e761266d565b5b600085013567ffffffffffffffff81111561310657613105612672565b5b61311287828801613022565b9450945050602085013567ffffffffffffffff81111561313557613134612672565b5b61314187828801613078565b925092505092959194509250565b600080604083850312156131665761316561266d565b5b6000613174858286016126c0565b9250506020613185858286016126c0565b9150509250929050565b600080600080600060a086880312156131ab576131aa61266d565b5b60006131b9888289016126c0565b95505060206131ca888289016126c0565b94505060406131db888289016126f6565b93505060606131ec888289016126f6565b925050608086013567ffffffffffffffff81111561320d5761320c612672565b5b61321988828901612bc8565b9150509295509295909350565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000613282602a836129f7565b915061328d82613226565b604082019050919050565b600060208201905081810360008301526132b181613275565b9050919050565b600081905092915050565b60006132ce826129ec565b6132d881856132b8565b93506132e8818560208601612a08565b80840191505092915050565b600061330082856132c3565b915061330c82846132c3565b91508190509392505050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006133746029836129f7565b915061337f82613318565b604082019050919050565b600060208201905081810360008301526133a381613367565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613413826126d5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613445576134446133d9565b5b600182019050919050565b600081905092915050565b50565b600061346b600083613450565b91506134768261345b565b600082019050919050565b600061348c8261345e565b9150819050919050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b60006134cc6014836129f7565b91506134d782613496565b602082019050919050565b600060208201905081810360008301526134fb816134bf565b9050919050565b60008160601b9050919050565b600061351a82613502565b9050919050565b600061352c8261350f565b9050919050565b61354461353f82612697565b613521565b82525050565b600061355683856132b8565b93506135638385846128f7565b82840190509392505050565b600061357b8286613533565b60148201915061358c82848661354a565b9150819050949350505050565b7f496e76616c696420626f6f6b20636f6465000000000000000000000000000000600082015250565b60006135cf6011836129f7565b91506135da82613599565b602082019050919050565b600060208201905081810360008301526135fe816135c2565b9050919050565b600061361282848661354a565b91508190509392505050565b7f416e204e46542068617320616c7265616479206265656e20636c61696d65642060008201527f77697468207468697320636f64652e0000000000000000000000000000000000602082015250565b600061367a602f836129f7565b91506136858261361e565b604082019050919050565b600060208201905081810360008301526136a98161366d565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061370c6026836129f7565b9150613717826136b0565b604082019050919050565b6000602082019050818103600083015261373b816136ff565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006137786020836129f7565b915061378382613742565b602082019050919050565b600060208201905081810360008301526137a78161376b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806137f557607f821691505b602082108103613808576138076137ae565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026138707fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613833565b61387a8683613833565b95508019841693508086168417925050509392505050565b60006138ad6138a86138a3846126d5565b612cc5565b6126d5565b9050919050565b6000819050919050565b6138c783613892565b6138db6138d3826138b4565b848454613840565b825550505050565b600090565b6138f06138e3565b6138fb8184846138be565b505050565b5b8181101561391f576139146000826138e8565b600181019050613901565b5050565b601f821115613964576139358161380e565b61393e84613823565b8101602085101561394d578190505b61396161395985613823565b830182613900565b50505b505050565b600082821c905092915050565b600061398760001984600802613969565b1980831691505092915050565b60006139a08383613976565b9150826002028217905092915050565b6139b9826129ec565b67ffffffffffffffff8111156139d2576139d161284b565b5b6139dc82546137dd565b6139e7828285613923565b600060209050601f831160018114613a1a5760008415613a08578287015190505b613a128582613994565b865550613a7a565b601f198416613a288661380e565b60005b82811015613a5057848901518255600182019150602085019450602081019050613a2b565b86831015613a6d5784890151613a69601f891682613976565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000604082019050613ac66000830185612f87565b613ad36020830184612f87565b9392505050565b600081519050613ae981612fb1565b92915050565b600060208284031215613b0557613b0461266d565b5b6000613b1384828501613ada565b91505092915050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b6000613b78602e836129f7565b9150613b8382613b1c565b604082019050919050565b60006020820190508181036000830152613ba781613b6b565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613be4601f836129f7565b9150613bef82613bae565b602082019050919050565b60006020820190508181036000830152613c1381613bd7565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000613c506010836129f7565b9150613c5b82613c1a565b602082019050919050565b60006020820190508181036000830152613c7f81613c43565b9050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000613cbc601c836132b8565b9150613cc782613c86565b601c82019050919050565b6000819050919050565b6000819050919050565b613cf7613cf282613cd2565b613cdc565b82525050565b6000613d0882613caf565b9150613d148284613ce6565b60208201915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b613d5b81613cd2565b82525050565b600081519050919050565b600082825260208201905092915050565b6000613d8882613d61565b613d928185613d6c565b9350613da2818560208601612a08565b613dab8161283a565b840191505092915050565b6000604082019050613dcb6000830185613d52565b8181036020830152613ddd8184613d7d565b90509392505050565b6000613df182613d61565b613dfb8185613450565b9350613e0b818560208601612a08565b80840191505092915050565b6000613e238284613de6565b915081905092915050565b613e3781613cd2565b8114613e4257600080fd5b50565b600081519050613e5481613e2e565b92915050565b600060208284031215613e7057613e6f61266d565b5b6000613e7e84828501613e45565b91505092915050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613ee36021836129f7565b9150613eee82613e87565b604082019050919050565b60006020820190508181036000830152613f1281613ed6565b9050919050565b6000613f24826126d5565b9150613f2f836126d5565b9250828201905080821115613f4757613f466133d9565b5b92915050565b6000604082019050613f62600083018561274b565b613f6f602083018461274b565b9392505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000613fd26028836129f7565b9150613fdd82613f76565b604082019050919050565b6000602082019050818103600083015261400181613fc5565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006140646025836129f7565b915061406f82614008565b604082019050919050565b6000602082019050818103600083015261409381614057565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b60006140f6602a836129f7565b91506141018261409a565b604082019050919050565b60006020820190508181036000830152614125816140e9565b9050919050565b600060408201905081810360008301526141468185612eda565b9050818103602083015261415a8184612eda565b90509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b60006141996014836129f7565b91506141a482614163565b602082019050919050565b600060208201905081810360008301526141c88161418c565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b600061422b6029836129f7565b9150614236826141cf565b604082019050919050565b6000602082019050818103600083015261425a8161421e565b9050919050565b600060a0820190506142766000830188612f87565b6142836020830187612f87565b614290604083018661274b565b61429d606083018561274b565b81810360808301526142af8184613d7d565b90509695505050505050565b6000815190506142ca816127a1565b92915050565b6000602082840312156142e6576142e561266d565b5b60006142f4848285016142bb565b91505092915050565b60008160e01c9050919050565b600060033d11156143295760046000803e6143266000516142fd565b90505b90565b600060443d106143b95761433e612663565b60043d036004823e80513d602482011167ffffffffffffffff821117156143665750506143b9565b808201805167ffffffffffffffff81111561438457505050506143b9565b80602083010160043d0385018111156143a15750505050506143b9565b6143b08260200185018661287a565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b60006144186034836129f7565b9150614423826143bc565b604082019050919050565b600060208201905081810360008301526144478161440b565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006144aa6028836129f7565b91506144b58261444e565b604082019050919050565b600060208201905081810360008301526144d98161449d565b9050919050565b600060a0820190506144f56000830188612f87565b6145026020830187612f87565b81810360408301526145148186612eda565b905081810360608301526145288185612eda565b9050818103608083015261453c8184613d7d565b90509695505050505050565b600060ff82169050919050565b61455e81614548565b82525050565b60006080820190506145796000830187613d52565b6145866020830186614555565b6145936040830185613d52565b6145a06060830184613d52565b9594505050505056fea2646970667358221220d312449fdb34f60393b514b90462011bdd281b7eefe3c128f0fcba3103488af264736f6c63430008110033

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

00000000000000000000000072ced146dc6ea5cc742833731197e45e045460140000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e68747470733a2f2f6170692e616d616e6461636173736174742e636f6d2f0000

-----Decoded View---------------
Arg [0] : ecdsaSigner_ (address): 0x72cEd146dc6Ea5cC742833731197e45E04546014
Arg [1] : uri_ (string): https://api.amandacassatt.com/

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000072ced146dc6ea5cc742833731197e45e04546014
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [3] : 68747470733a2f2f6170692e616d616e6461636173736174742e636f6d2f0000


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

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