ETH Price: $2,098.21 (-0.16%)

Token

Wildpass (WP)
 

Overview

Max Total Supply

0 WP

Holders

660

Transfers

-
20 ( 100.00%)

Market

Volume (24H)

0.1802 ETH

Min Price (24H)

$19.51 @ 0.009299 ETH

Max Price (24H)

$39.45 @ 0.018800 ETH

Other Info

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:
Wildpass

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
No with 200 runs

Other Settings:
shanghai EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import {Ownable2Step} from "openzeppelin-contracts/access/Ownable2Step.sol";
import {Context} from "openzeppelin-contracts/utils/Context.sol";
import {Context as LBContext} from "@openzeppelin/contracts/utils/Context.sol";
import {ERC721C} from "limitbreak/erc721c/ERC721C.sol";
import {ERC721OpenZeppelin} from "limitbreak/token/erc721/ERC721OpenZeppelin.sol";
import {MetadataURI} from "limitbreak/token/erc721/MetadataURI.sol";
import {EIP712} from "openzeppelin-contracts/utils/cryptography/EIP712.sol";
import "limitbreak/programmable-royalties/BasicRoyalties.sol";
import {ECDSA} from "openzeppelin-contracts/utils/cryptography/ECDSA.sol";
import {Strings} from "openzeppelin-contracts/utils/Strings.sol";

contract Wildpass is Ownable2Step, ERC721C, MetadataURI, BasicRoyalties, EIP712 {
    using Strings for uint256;

    event ExpectedSignerChanged(address newSigner);

    error InvalidSigner();
    error InvalidTokenId();
    error InvalidReceiver();
    error InvalidArrays();

    struct MintParams {
        address to;
        uint256 tokenId;
    }

    string public constant SIGNING_DOMAIN = "WildcardWildpass";
    string public constant SIGNATURE_VERSION = "1";
    address public expectedSigner;

    constructor(
        address royaltyReceiver_,
        uint96 royaltyFeeNumerator_,
        string memory name_,
        string memory symbol_,
        address expectedSigner_
    )
        ERC721OpenZeppelin(name_, symbol_)
        BasicRoyalties(royaltyReceiver_, royaltyFeeNumerator_)
        EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION)
    {
        expectedSigner = expectedSigner_;
    }

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

    function mint(MintParams calldata mintParams, bytes calldata signature) public {
        // Wildpass tokenIds start at 1 and go to 4444
        if (mintParams.tokenId == 0 || mintParams.tokenId > 4444) {
            revert InvalidTokenId();
        }

        if (mintParams.to == address(0)) {
            revert InvalidReceiver();
        }

        bytes32 digest = hashMintParams(mintParams);
        address signer = ECDSA.recover(digest, signature);
        if (signer != expectedSigner) {
            revert InvalidSigner();
        }

        _mint(mintParams.to, mintParams.tokenId);
    }

    function bulkMint(MintParams[] calldata mintParams, bytes[] calldata signatures) public {
        if (mintParams.length != signatures.length) {
            revert InvalidArrays();
        }

        for (uint256 i = 0; i < mintParams.length; ++i) {
            mint(mintParams[i], signatures[i]);
        }
    }

    function hashMintParams(MintParams calldata mintParams) public view returns (bytes32) {
        return _hashTypedDataV4(
            keccak256(
                abi.encode(keccak256("MintParams(address to,uint256 tokenId)"), mintParams.to, mintParams.tokenId)
            )
        );
    }

    function exists(uint256 tokenId) public view returns (bool) {
        return _exists(tokenId);
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), suffixURI)) : "";
    }

    /// @dev Required to return baseTokenURI for tokenURI
    function _baseURI() internal view virtual override returns (string memory) {
        return baseTokenURI;
    }

    function setDefaultRoyalty(address receiver, uint96 feeNumerator) public {
        _requireCallerIsContractOwner();
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) public {
        _requireCallerIsContractOwner();
        _setTokenRoyalty(tokenId, receiver, feeNumerator);
    }

    function resetTokenRoyalty(uint256 tokenId) public {
        _requireCallerIsContractOwner();
        _resetTokenRoyalty(tokenId);
    }

    function setExpectedSigner(address newSigner) public {
        _requireCallerIsContractOwner();
        expectedSigner = newSigner;
        emit ExpectedSignerChanged(newSigner);
    }

    function _msgData() internal view override(Context, LBContext) returns (bytes calldata) {
        return super._msgData();
    }

    function _msgSender() internal view override(Context, LBContext) returns (address) {
        return super._msgSender();
    }

    function _requireCallerIsContractOwner() internal view virtual override {
        _checkOwner();
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides 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} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

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

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() external {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

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

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../utils/AutomaticValidatorTransferApproval.sol";
import "../utils/CreatorTokenBase.sol";
import "../token/erc721/ERC721OpenZeppelin.sol";
import "../interfaces/ITransferValidatorSetTokenType.sol";
import {TOKEN_TYPE_ERC721} from "@limitbreak/permit-c/Constants.sol";

/**
 * @title ERC721C
 * @author Limit Break, Inc.
 * @notice Extends OpenZeppelin's ERC721 implementation with Creator Token functionality, which
 *         allows the contract owner to update the transfer validation logic by managing a security policy in
 *         an external transfer validation security policy registry.  See {CreatorTokenTransferValidator}.
 */
abstract contract ERC721C is ERC721OpenZeppelin, CreatorTokenBase, AutomaticValidatorTransferApproval {

    /**
     * @notice Overrides behavior of isApprovedFor all such that if an operator is not explicitly approved
     *         for all, the contract owner can optionally auto-approve the 721-C transfer validator for transfers.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool isApproved) {
        isApproved = super.isApprovedForAll(owner, operator);

        if (!isApproved) {
            if (autoApproveTransfersFromValidator) {
                isApproved = operator == address(getTransferValidator());
            }
        }
    }

    /**
     * @notice Indicates whether the contract implements the specified interface.
     * @dev Overrides supportsInterface in ERC165.
     * @param interfaceId The interface id
     * @return true if the contract implements the specified interface, false otherwise
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return 
        interfaceId == type(ICreatorToken).interfaceId || 
        interfaceId == type(ICreatorTokenLegacy).interfaceId || 
        super.supportsInterface(interfaceId);
    }

    /**
     * @notice Returns the function selector for the transfer validator's validation function to be called 
     * @notice for transaction simulation. 
     */
    function getTransferValidationFunction() external pure returns (bytes4 functionSignature, bool isViewFunction) {
        functionSignature = bytes4(keccak256("validateTransfer(address,address,address,uint256)"));
        isViewFunction = true;
    }

    /// @dev Ties the open-zeppelin _beforeTokenTransfer hook to more granular transfer validation logic
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize) internal virtual override {
        for (uint256 i = 0; i < batchSize;) {
            _validateBeforeTransfer(from, to, firstTokenId + i);
            unchecked {
                ++i;
            }
        }
    }

    /// @dev Ties the open-zeppelin _afterTokenTransfer hook to more granular transfer validation logic
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize) internal virtual override {
        for (uint256 i = 0; i < batchSize;) {
            _validateAfterTransfer(from, to, firstTokenId + i);
            unchecked {
                ++i;
            }
        }
    }

    function _tokenType() internal pure override returns(uint16) {
        return uint16(TOKEN_TYPE_ERC721);
    }
}

/**
 * @title ERC721CInitializable
 * @author Limit Break, Inc.
 * @notice Initializable implementation of ERC721C to allow for EIP-1167 proxy clones.
 */
abstract contract ERC721CInitializable is ERC721OpenZeppelinInitializable, CreatorTokenBase, AutomaticValidatorTransferApproval {

    function initializeERC721(string memory name_, string memory symbol_) public override {
        super.initializeERC721(name_, symbol_);

        _emitDefaultTransferValidator();
        _registerTokenType(getTransferValidator());
    }

    /**
     * @notice Overrides behavior of isApprovedFor all such that if an operator is not explicitly approved
     *         for all, the contract owner can optionally auto-approve the 721-C transfer validator for transfers.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool isApproved) {
        isApproved = super.isApprovedForAll(owner, operator);

        if (!isApproved) {
            if (autoApproveTransfersFromValidator) {
                isApproved = operator == address(getTransferValidator());
            }
        }
    }

    /**
     * @notice Indicates whether the contract implements the specified interface.
     * @dev Overrides supportsInterface in ERC165.
     * @param interfaceId The interface id
     * @return true if the contract implements the specified interface, false otherwise
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return 
        interfaceId == type(ICreatorToken).interfaceId || 
        interfaceId == type(ICreatorTokenLegacy).interfaceId || 
        super.supportsInterface(interfaceId);
    }

    /**
     * @notice Returns the function selector for the transfer validator's validation function to be called 
     * @notice for transaction simulation. 
     */
    function getTransferValidationFunction() external pure returns (bytes4 functionSignature, bool isViewFunction) {
        functionSignature = bytes4(keccak256("validateTransfer(address,address,address,uint256)"));
        isViewFunction = true;
    }

    /// @dev Ties the open-zeppelin _beforeTokenTransfer hook to more granular transfer validation logic
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize) internal virtual override {
        for (uint256 i = 0; i < batchSize;) {
            _validateBeforeTransfer(from, to, firstTokenId + i);
            unchecked {
                ++i;
            }
        }
    }

    /// @dev Ties the open-zeppelin _afterTokenTransfer hook to more granular transfer validation logic
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize) internal virtual override {
        for (uint256 i = 0; i < batchSize;) {
            _validateAfterTransfer(from, to, firstTokenId + i);
            unchecked {
                ++i;
            }
        }
    }

    function _tokenType() internal pure override returns(uint16) {
        return uint16(TOKEN_TYPE_ERC721);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "../../access/OwnablePermissions.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";

abstract contract ERC721OpenZeppelinBase is ERC721 {

    // Token name
    string internal _contractName;

    // Token symbol
    string internal _contractSymbol;

    function name() public view virtual override returns (string memory) {
        return _contractName;
    }

    function symbol() public view virtual override returns (string memory) {
        return _contractSymbol;
    }

    function _setNameAndSymbol(string memory name_, string memory symbol_) internal {
        _contractName = name_;
        _contractSymbol = symbol_;
    }
}

abstract contract ERC721OpenZeppelin is ERC721OpenZeppelinBase {
    constructor(string memory name_, string memory symbol_) ERC721("", "") {
        _setNameAndSymbol(name_, symbol_);
    }
}

abstract contract ERC721OpenZeppelinInitializable is OwnablePermissions, ERC721OpenZeppelinBase {

    error ERC721OpenZeppelinInitializable__AlreadyInitializedERC721();

    /// @notice Specifies whether or not the contract is initialized
    bool private _erc721Initialized;

    /// @dev Initializes parameters of ERC721 tokens.
    /// These cannot be set in the constructor because this contract is optionally compatible with EIP-1167.
    function initializeERC721(string memory name_, string memory symbol_) public virtual {
        _requireCallerIsContractOwner();

        if(_erc721Initialized) {
            revert ERC721OpenZeppelinInitializable__AlreadyInitializedERC721();
        }

        _erc721Initialized = true;

        _setNameAndSymbol(name_, symbol_);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../../access/OwnablePermissions.sol";

abstract contract MetadataURI is OwnablePermissions {

    /// @dev Base token uri
    string public baseTokenURI;

    /// @dev Token uri suffix/extension
    string public suffixURI;

    /// @dev Emitted when base URI is set.
    event BaseURISet(string baseTokenURI);

    /// @dev Emitted when suffix URI is set.
    event SuffixURISet(string suffixURI);

    /// @notice Sets base URI
    function setBaseURI(string memory baseTokenURI_) public {
        _requireCallerIsContractOwner();
        baseTokenURI = baseTokenURI_;
        emit BaseURISet(baseTokenURI_);
    }

    /// @notice Sets suffix URI
    function setSuffixURI(string memory suffixURI_) public {
        _requireCallerIsContractOwner();
        suffixURI = suffixURI_;
        emit SuffixURISet(suffixURI_);
    }
}

abstract contract MetadataURIInitializable is MetadataURI {
    error MetadataURIInitializable__URIAlreadyInitialized();

    bool private _uriInitialized;

    /// @dev Initializes parameters of tokens with uri values.
    /// These cannot be set in the constructor because this contract is optionally compatible with EIP-1167.
    function initializeURI(string memory baseURI_, string memory suffixURI_) public {
        _requireCallerIsContractOwner();

        if(_uriInitialized) {
            revert MetadataURIInitializable__URIAlreadyInitialized();
        }

        _uriInitialized = true;

        baseTokenURI = baseURI_;
        emit BaseURISet(baseURI_);

        suffixURI = suffixURI_;
        emit SuffixURISet(suffixURI_);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/common/ERC2981.sol";

/**
 * @title BasicRoyaltiesBase
 * @author Limit Break, Inc.
 * @dev Base functionality of an NFT mix-in contract implementing the most basic form of programmable royalties.
 */
abstract contract BasicRoyaltiesBase is ERC2981 {

    event DefaultRoyaltySet(address indexed receiver, uint96 feeNumerator);
    event TokenRoyaltySet(uint256 indexed tokenId, address indexed receiver, uint96 feeNumerator);

    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual override {
        super._setDefaultRoyalty(receiver, feeNumerator);
        emit DefaultRoyaltySet(receiver, feeNumerator);
    }

    function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual override {
        super._setTokenRoyalty(tokenId, receiver, feeNumerator);
        emit TokenRoyaltySet(tokenId, receiver, feeNumerator);
    }
}

/**
 * @title BasicRoyalties
 * @author Limit Break, Inc.
 * @notice Constructable BasicRoyalties Contract implementation.
 */
abstract contract BasicRoyalties is BasicRoyaltiesBase {
    constructor(address receiver, uint96 feeNumerator) {
        _setDefaultRoyalty(receiver, feeNumerator);
    }
}

/**
 * @title BasicRoyaltiesInitializable
 * @author Limit Break, Inc.
 * @notice Initializable BasicRoyalties Contract implementation to allow for EIP-1167 clones. 
 */
abstract contract BasicRoyaltiesInitializable is BasicRoyaltiesBase {}

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

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

// 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 13 of 33 : AutomaticValidatorTransferApproval.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../access/OwnablePermissions.sol";

/**
 * @title AutomaticValidatorTransferApproval
 * @author Limit Break, Inc.
 * @notice Base contract mix-in that provides boilerplate code giving the contract owner the
 *         option to automatically approve a 721-C transfer validator implementation for transfers.
 */
abstract contract AutomaticValidatorTransferApproval is OwnablePermissions {

    /// @dev Emitted when the automatic approval flag is modified by the creator.
    event AutomaticApprovalOfTransferValidatorSet(bool autoApproved);

    /// @dev If true, the collection's transfer validator is automatically approved to transfer holder's tokens.
    bool public autoApproveTransfersFromValidator;

    /**
     * @notice Sets if the transfer validator is automatically approved as an operator for all token owners.
     * 
     * @dev    Throws when the caller is not the contract owner.
     * 
     * @param autoApprove If true, the collection's transfer validator will be automatically approved to
     *                    transfer holder's tokens.
     */
    function setAutomaticApprovalOfTransfersFromValidator(bool autoApprove) external {
        _requireCallerIsContractOwner();
        autoApproveTransfersFromValidator = autoApprove;
        emit AutomaticApprovalOfTransferValidatorSet(autoApprove);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../access/OwnablePermissions.sol";
import "../interfaces/ICreatorToken.sol";
import "../interfaces/ICreatorTokenLegacy.sol";
import "../interfaces/ITransferValidator.sol";
import "./TransferValidation.sol";
import "../interfaces/ITransferValidatorSetTokenType.sol";

/**
 * @title CreatorTokenBase
 * @author Limit Break, Inc.
 * @notice CreatorTokenBaseV3 is an abstract contract that provides basic functionality for managing token 
 * transfer policies through an implementation of ICreatorTokenTransferValidator/ICreatorTokenTransferValidatorV2/ICreatorTokenTransferValidatorV3. 
 * This contract is intended to be used as a base for creator-specific token contracts, enabling customizable transfer 
 * restrictions and security policies.
 *
 * <h4>Features:</h4>
 * <ul>Ownable: This contract can have an owner who can set and update the transfer validator.</ul>
 * <ul>TransferValidation: Implements the basic token transfer validation interface.</ul>
 *
 * <h4>Benefits:</h4>
 * <ul>Provides a flexible and modular way to implement custom token transfer restrictions and security policies.</ul>
 * <ul>Allows creators to enforce policies such as account and codehash blacklists, whitelists, and graylists.</ul>
 * <ul>Can be easily integrated into other token contracts as a base contract.</ul>
 *
 * <h4>Intended Usage:</h4>
 * <ul>Use as a base contract for creator token implementations that require advanced transfer restrictions and 
 *   security policies.</ul>
 * <ul>Set and update the ICreatorTokenTransferValidator implementation contract to enforce desired policies for the 
 *   creator token.</ul>
 *
 * <h4>Compatibility:</h4>
 * <ul>Backward and Forward Compatible - V1/V2/V3 Creator Token Base will work with V1/V2/V3 Transfer Validators.</ul>
 */
abstract contract CreatorTokenBase is OwnablePermissions, TransferValidation, ICreatorToken {

    /// @dev Thrown when setting a transfer validator address that has no deployed code.
    error CreatorTokenBase__InvalidTransferValidatorContract();

    /// @dev The default transfer validator that will be used if no transfer validator has been set by the creator.
    address public constant DEFAULT_TRANSFER_VALIDATOR = address(0x721C0078c2328597Ca70F5451ffF5A7B38D4E947);

    /// @dev Used to determine if the default transfer validator is applied.
    /// @dev Set to true when the creator sets a transfer validator address.
    bool private isValidatorInitialized;
    /// @dev Address of the transfer validator to apply to transactions.
    address private transferValidator;

    constructor() {
        _emitDefaultTransferValidator();
        _registerTokenType(DEFAULT_TRANSFER_VALIDATOR);
    }

    /**
     * @notice Sets the transfer validator for the token contract.
     *
     * @dev    Throws when provided validator contract is not the zero address and does not have code.
     * @dev    Throws when the caller is not the contract owner.
     *
     * @dev    <h4>Postconditions:</h4>
     *         1. The transferValidator address is updated.
     *         2. The `TransferValidatorUpdated` event is emitted.
     *
     * @param transferValidator_ The address of the transfer validator contract.
     */
    function setTransferValidator(address transferValidator_) public {
        _requireCallerIsContractOwner();

        bool isValidTransferValidator = transferValidator_.code.length > 0;

        if(transferValidator_ != address(0) && !isValidTransferValidator) {
            revert CreatorTokenBase__InvalidTransferValidatorContract();
        }

        emit TransferValidatorUpdated(address(getTransferValidator()), transferValidator_);

        isValidatorInitialized = true;
        transferValidator = transferValidator_;

        _registerTokenType(transferValidator_);
    }

    /**
     * @notice Returns the transfer validator contract address for this token contract.
     */
    function getTransferValidator() public view override returns (address validator) {
        validator = transferValidator;

        if (validator == address(0)) {
            if (!isValidatorInitialized) {
                validator = DEFAULT_TRANSFER_VALIDATOR;
            }
        }
    }

    /**
     * @dev Pre-validates a token transfer, reverting if the transfer is not allowed by this token's security policy.
     *      Inheriting contracts are responsible for overriding the _beforeTokenTransfer function, or its equivalent
     *      and calling _validateBeforeTransfer so that checks can be properly applied during token transfers.
     *
     * @dev Be aware that if the msg.sender is the transfer validator, the transfer is automatically permitted, as the
     *      transfer validator is expected to pre-validate the transfer.
     *
     * @dev Throws when the transfer doesn't comply with the collection's transfer policy, if the transferValidator is
     *      set to a non-zero address.
     *
     * @param caller  The address of the caller.
     * @param from    The address of the sender.
     * @param to      The address of the receiver.
     * @param tokenId The token id being transferred.
     */
    function _preValidateTransfer(
        address caller, 
        address from, 
        address to, 
        uint256 tokenId, 
        uint256 /*value*/) internal virtual override {
        address validator = getTransferValidator();

        if (validator != address(0)) {
            if (msg.sender == validator) {
                return;
            }

            ITransferValidator(validator).validateTransfer(caller, from, to, tokenId);
        }
    }

    /**
     * @dev Pre-validates a token transfer, reverting if the transfer is not allowed by this token's security policy.
     *      Inheriting contracts are responsible for overriding the _beforeTokenTransfer function, or its equivalent
     *      and calling _validateBeforeTransfer so that checks can be properly applied during token transfers.
     *
     * @dev Be aware that if the msg.sender is the transfer validator, the transfer is automatically permitted, as the
     *      transfer validator is expected to pre-validate the transfer.
     * 
     * @dev Used for ERC20 and ERC1155 token transfers which have an amount value to validate in the transfer validator.
     * @dev The `tokenId` for ERC20 tokens should be set to `0`.
     *
     * @dev Throws when the transfer doesn't comply with the collection's transfer policy, if the transferValidator is
     *      set to a non-zero address.
     *
     * @param caller  The address of the caller.
     * @param from    The address of the sender.
     * @param to      The address of the receiver.
     * @param tokenId The token id being transferred.
     * @param amount  The amount of token being transferred.
     */
    function _preValidateTransfer(
        address caller, 
        address from, 
        address to, 
        uint256 tokenId, 
        uint256 amount,
        uint256 /*value*/) internal virtual override {
        address validator = getTransferValidator();

        if (validator != address(0)) {
            if (msg.sender == validator) {
                return;
            }

            ITransferValidator(validator).validateTransfer(caller, from, to, tokenId, amount);
        }
    }

    function _tokenType() internal virtual pure returns(uint16);

    function _registerTokenType(address validator) internal {
        if (validator != address(0)) {
            uint256 validatorCodeSize;
            assembly {
                validatorCodeSize := extcodesize(validator)
            }
            if(validatorCodeSize > 0) {
                try ITransferValidatorSetTokenType(validator).setTokenTypeOfCollection(address(this), _tokenType()) {
                } catch { }
            }
        }
    }

    /**
     * @dev  Used during contract deployment for constructable and cloneable creator tokens
     * @dev  to emit the `TransferValidatorUpdated` event signaling the validator for the contract
     * @dev  is the default transfer validator.
     */
    function _emitDefaultTransferValidator() internal {
        emit TransferValidatorUpdated(address(0), DEFAULT_TRANSFER_VALIDATOR);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface ITransferValidatorSetTokenType {
    function setTokenTypeOfCollection(address collection, uint16 tokenType) external;
}

File 16 of 33 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @dev Constant bytes32 value of 0x000...000
bytes32 constant ZERO_BYTES32 = bytes32(0);

/// @dev Constant value of 0
uint256 constant ZERO = 0;
/// @dev Constant value of 1
uint256 constant ONE = 1;

/// @dev Constant value representing an open order in storage
uint8 constant ORDER_STATE_OPEN = 0;
/// @dev Constant value representing a filled order in storage
uint8 constant ORDER_STATE_FILLED = 1;
/// @dev Constant value representing a cancelled order in storage
uint8 constant ORDER_STATE_CANCELLED = 2;

/// @dev Constant value representing the ERC721 token type for signatures and transfer hooks
uint256 constant TOKEN_TYPE_ERC721 = 721;
/// @dev Constant value representing the ERC1155 token type for signatures and transfer hooks
uint256 constant TOKEN_TYPE_ERC1155 = 1155;
/// @dev Constant value representing the ERC20 token type for signatures and transfer hooks
uint256 constant TOKEN_TYPE_ERC20 = 20;

/// @dev Constant value to mask the upper bits of a signature that uses a packed `vs` value to extract `s`
bytes32 constant UPPER_BIT_MASK = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

/// @dev EIP-712 typehash used for validating signature based stored approvals
bytes32 constant UPDATE_APPROVAL_TYPEHASH =
    keccak256("UpdateApprovalBySignature(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 approvalExpiration,uint256 sigDeadline,uint256 masterNonce)");

/// @dev EIP-712 typehash used for validating a single use permit without additional data
bytes32 constant SINGLE_USE_PERMIT_TYPEHASH =
    keccak256("PermitTransferFrom(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 expiration,uint256 masterNonce)");

/// @dev EIP-712 typehash used for validating a single use permit with additional data
string constant SINGLE_USE_PERMIT_TRANSFER_ADVANCED_TYPEHASH_STUB =
    "PermitTransferFromWithAdditionalData(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 expiration,uint256 masterNonce,";

/// @dev EIP-712 typehash used for validating an order permit that updates storage as it fills
string constant PERMIT_ORDER_ADVANCED_TYPEHASH_STUB =
    "PermitOrderWithAdditionalData(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 salt,address operator,uint256 expiration,uint256 masterNonce,";

/// @dev Pausable flag for stored approval transfers of ERC721 assets
uint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC721 = 1 << 0;
/// @dev Pausable flag for stored approval transfers of ERC1155 assets
uint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC1155 = 1 << 1;
/// @dev Pausable flag for stored approval transfers of ERC20 assets
uint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC20 = 1 << 2;

/// @dev Pausable flag for single use permit transfers of ERC721 assets
uint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC721 = 1 << 3;
/// @dev Pausable flag for single use permit transfers of ERC1155 assets
uint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC1155 = 1 << 4;
/// @dev Pausable flag for single use permit transfers of ERC20 assets
uint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC20 = 1 << 5;

/// @dev Pausable flag for order fill transfers of ERC1155 assets
uint256 constant PAUSABLE_ORDER_TRANSFER_FROM_ERC1155 = 1 << 6;
/// @dev Pausable flag for order fill transfers of ERC20 assets
uint256 constant PAUSABLE_ORDER_TRANSFER_FROM_ERC20 = 1 << 7;

File 17 of 33 : OwnablePermissions.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/Context.sol";

abstract contract OwnablePermissions is Context {
    function _requireCallerIsContractOwner() internal view virtual;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner or approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _ownerOf(tokenId) != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId, 1);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId, 1);

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId, 1);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

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

    /**
     * @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, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
     * that `ownerOf(tokenId)` is `a`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface ICreatorToken {
    event TransferValidatorUpdated(address oldValidator, address newValidator);
    function getTransferValidator() external view returns (address validator);
    function setTransferValidator(address validator) external;
    function getTransferValidationFunction() external view returns (bytes4 functionSignature, bool isViewFunction);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface ICreatorTokenLegacy {
    event TransferValidatorUpdated(address oldValidator, address newValidator);
    function getTransferValidator() external view returns (address validator);
    function setTransferValidator(address validator) external;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface ITransferValidator {
    function applyCollectionTransferPolicy(address caller, address from, address to) external view;
    function validateTransfer(address caller, address from, address to) external view;
    function validateTransfer(address caller, address from, address to, uint256 tokenId) external view;
    function validateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount) external;

    function beforeAuthorizedTransfer(address operator, address token, uint256 tokenId) external;
    function afterAuthorizedTransfer(address token, uint256 tokenId) external;
    function beforeAuthorizedTransfer(address operator, address token) external;
    function afterAuthorizedTransfer(address token) external;
    function beforeAuthorizedTransfer(address token, uint256 tokenId) external;
    function beforeAuthorizedTransferWithAmount(address token, uint256 tokenId, uint256 amount) external;
    function afterAuthorizedTransferWithAmount(address token, uint256 tokenId) external;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/Context.sol";

/**
 * @title TransferValidation
 * @author Limit Break, Inc.
 * @notice A mix-in that can be combined with ERC-721 contracts to provide more granular hooks.
 * Openzeppelin's ERC721 contract only provides hooks for before and after transfer.  This allows
 * developers to validate or customize transfers within the context of a mint, a burn, or a transfer.
 */
abstract contract TransferValidation is Context {
    
    /// @dev Thrown when the from and to address are both the zero address.
    error ShouldNotMintToBurnAddress();

    /*************************************************************************/
    /*                      Transfers Without Amounts                        */
    /*************************************************************************/

    /// @dev Inheriting contracts should call this function in the _beforeTokenTransfer function to get more granular hooks.
    function _validateBeforeTransfer(address from, address to, uint256 tokenId) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _preValidateMint(_msgSender(), to, tokenId, msg.value);
        } else if(toZeroAddress) {
            _preValidateBurn(_msgSender(), from, tokenId, msg.value);
        } else {
            _preValidateTransfer(_msgSender(), from, to, tokenId, msg.value);
        }
    }

    /// @dev Inheriting contracts should call this function in the _afterTokenTransfer function to get more granular hooks.
    function _validateAfterTransfer(address from, address to, uint256 tokenId) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _postValidateMint(_msgSender(), to, tokenId, msg.value);
        } else if(toZeroAddress) {
            _postValidateBurn(_msgSender(), from, tokenId, msg.value);
        } else {
            _postValidateTransfer(_msgSender(), from, to, tokenId, msg.value);
        }
    }

    /// @dev Optional validation hook that fires before a mint
    function _preValidateMint(address caller, address to, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a mint
    function _postValidateMint(address caller, address to, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a burn
    function _preValidateBurn(address caller, address from, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a burn
    function _postValidateBurn(address caller, address from, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a transfer
    function _preValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a transfer
    function _postValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 value) internal virtual {}

    /*************************************************************************/
    /*                         Transfers With Amounts                        */
    /*************************************************************************/

    /// @dev Inheriting contracts should call this function in the _beforeTokenTransfer function to get more granular hooks.
    function _validateBeforeTransfer(address from, address to, uint256 tokenId, uint256 amount) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _preValidateMint(_msgSender(), to, tokenId, amount, msg.value);
        } else if(toZeroAddress) {
            _preValidateBurn(_msgSender(), from, tokenId, amount, msg.value);
        } else {
            _preValidateTransfer(_msgSender(), from, to, tokenId, amount, msg.value);
        }
    }

    /// @dev Inheriting contracts should call this function in the _afterTokenTransfer function to get more granular hooks.
    function _validateAfterTransfer(address from, address to, uint256 tokenId, uint256 amount) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _postValidateMint(_msgSender(), to, tokenId, amount, msg.value);
        } else if(toZeroAddress) {
            _postValidateBurn(_msgSender(), from, tokenId, amount, msg.value);
        } else {
            _postValidateTransfer(_msgSender(), from, to, tokenId, amount, msg.value);
        }
    }

    /// @dev Optional validation hook that fires before a mint
    function _preValidateMint(address caller, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a mint
    function _postValidateMint(address caller, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a burn
    function _preValidateBurn(address caller, address from, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a burn
    function _postValidateBurn(address caller, address from, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a transfer
    function _preValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a transfer
    function _postValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

File 26 of 33 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

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

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "erc721m/=lib/erc721m/contracts/",
    "erc721a/=lib/ERC721A/",
    "limitbreak/=lib/creator-token-standards/src/",
    "@limitbreak/permit-c/=lib/creator-token-standards/lib/PermitC/src/",
    "@opensea/tstorish/=lib/creator-token-standards/lib/tstorish/src/",
    "@openzeppelin/=lib/creator-token-standards/lib/openzeppelin-contracts/",
    "@rari-capital/solmate/=lib/creator-token-standards/lib/PermitC/lib/solmate/",
    "ERC721A/=lib/ERC721A/contracts/",
    "PermitC/=lib/creator-token-standards/lib/PermitC/",
    "creator-token-standards/=lib/creator-token-standards/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/creator-token-standards/lib/PermitC/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-gas-metering/=lib/creator-token-standards/lib/PermitC/lib/forge-gas-metering/",
    "murky/=lib/creator-token-standards/lib/murky/",
    "openzeppelin/=lib/creator-token-standards/lib/PermitC/lib/openzeppelin-contracts/contracts/",
    "solady/=lib/creator-token-standards/lib/PermitC/lib/forge-gas-metering/lib/solady/",
    "solmate/=lib/creator-token-standards/lib/PermitC/lib/solmate/src/",
    "tstorish/=lib/creator-token-standards/lib/tstorish/src/"
  ],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"royaltyReceiver_","type":"address"},{"internalType":"uint96","name":"royaltyFeeNumerator_","type":"uint96"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"expectedSigner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CreatorTokenBase__InvalidTransferValidatorContract","type":"error"},{"inputs":[],"name":"InvalidArrays","type":"error"},{"inputs":[],"name":"InvalidReceiver","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidTokenId","type":"error"},{"inputs":[],"name":"ShouldNotMintToBurnAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"autoApproved","type":"bool"}],"name":"AutomaticApprovalOfTransferValidatorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseTokenURI","type":"string"}],"name":"BaseURISet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"DefaultRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newSigner","type":"address"}],"name":"ExpectedSignerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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":"string","name":"suffixURI","type":"string"}],"name":"SuffixURISet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"TokenRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldValidator","type":"address"},{"indexed":false,"internalType":"address","name":"newValidator","type":"address"}],"name":"TransferValidatorUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_TRANSFER_VALIDATOR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNATURE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNING_DOMAIN","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoApproveTransfersFromValidator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct Wildpass.MintParams[]","name":"mintParams","type":"tuple[]"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"name":"bulkMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expectedSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransferValidationFunction","outputs":[{"internalType":"bytes4","name":"functionSignature","type":"bytes4"},{"internalType":"bool","name":"isViewFunction","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTransferValidator","outputs":[{"internalType":"address","name":"validator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct Wildpass.MintParams","name":"mintParams","type":"tuple"}],"name":"hashMintParams","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"isApproved","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct Wildpass.MintParams","name":"mintParams","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"autoApprove","type":"bool"}],"name":"setAutomaticApprovalOfTransfersFromValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseTokenURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigner","type":"address"}],"name":"setExpectedSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"suffixURI_","type":"string"}],"name":"setSuffixURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transferValidator_","type":"address"}],"name":"setTransferValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"suffixURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610140604052348015610010575f5ffd5b506040516162af3803806162af833981810160405281019061003291906108cb565b6040518060400160405280601081526020017f57696c646361726457696c6470617373000000000000000000000000000000008152506040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152508686868660405180602001604052805f81525060405180602001604052805f8152506100dc6100d161024a60201b60201c565b61025e60201b60201c565b81600290816100eb9190610b8a565b5080600390816100fb9190610b8a565b50505061010e828261029460201b60201c565b505061011e6102b860201b60201c565b61014173721c0078c2328597ca70f5451fff5a7b38d4e94761030760201b60201c565b61015182826103be60201b60201c565b50505f828051906020012090505f828051906020012090505f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90508260e081815250508161010081815250504660a081815250506101b781848461042060201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1681525050806101208181525050505050505080600f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050610e78565b5f61025961045960201b60201c565b905090565b60015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556102918161046060201b60201c565b50565b81600890816102a39190610b8a565b5080600990816102b39190610b8a565b505050565b7fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac5f73721c0078c2328597ca70f5451fff5a7b38d4e9476040516102fd929190610c68565b60405180910390a1565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103bb575f813b90505f8111156103b9578173ffffffffffffffffffffffffffffffffffffffff1663fb2de5d73061037261052160201b60201c565b6040518363ffffffff1660e01b815260040161038f929190610cab565b5f604051808303815f87803b1580156103a6575f5ffd5b505af19250505080156103b7575060015b505b505b50565b6103ce828261052a60201b60201c565b8173ffffffffffffffffffffffffffffffffffffffff167f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef826040516104149190610ce1565b60405180910390a25050565b5f838383463060405160200161043a959493929190610d21565b6040516020818303038152906040528051906020012090509392505050565b5f33905090565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f6102d1905090565b6105386106c060201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115610596576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058d90610df2565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610604576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fb90610e5a565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600d5f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151815f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b5f612710905090565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610703826106da565b9050919050565b610713816106f9565b811461071d575f5ffd5b50565b5f8151905061072e8161070a565b92915050565b5f6bffffffffffffffffffffffff82169050919050565b61075481610734565b811461075e575f5ffd5b50565b5f8151905061076f8161074b565b92915050565b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6107c38261077d565b810181811067ffffffffffffffff821117156107e2576107e161078d565b5b80604052505050565b5f6107f46106c9565b905061080082826107ba565b919050565b5f67ffffffffffffffff82111561081f5761081e61078d565b5b6108288261077d565b9050602081019050919050565b5f5b83811015610852578082015181840152602081019050610837565b5f8484015250505050565b5f61086f61086a84610805565b6107eb565b90508281526020810184848401111561088b5761088a610779565b5b610896848285610835565b509392505050565b5f82601f8301126108b2576108b1610775565b5b81516108c284826020860161085d565b91505092915050565b5f5f5f5f5f60a086880312156108e4576108e36106d2565b5b5f6108f188828901610720565b955050602061090288828901610761565b945050604086015167ffffffffffffffff811115610923576109226106d6565b5b61092f8882890161089e565b935050606086015167ffffffffffffffff8111156109505761094f6106d6565b5b61095c8882890161089e565b925050608061096d88828901610720565b9150509295509295909350565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806109c857607f821691505b6020821081036109db576109da610984565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302610a3d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610a02565b610a478683610a02565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f610a8b610a86610a8184610a5f565b610a68565b610a5f565b9050919050565b5f819050919050565b610aa483610a71565b610ab8610ab082610a92565b848454610a0e565b825550505050565b5f5f905090565b610acf610ac0565b610ada818484610a9b565b505050565b5b81811015610afd57610af25f82610ac7565b600181019050610ae0565b5050565b601f821115610b4257610b13816109e1565b610b1c846109f3565b81016020851015610b2b578190505b610b3f610b37856109f3565b830182610adf565b50505b505050565b5f82821c905092915050565b5f610b625f1984600802610b47565b1980831691505092915050565b5f610b7a8383610b53565b9150826002028217905092915050565b610b938261097a565b67ffffffffffffffff811115610bac57610bab61078d565b5b610bb682546109b1565b610bc1828285610b01565b5f60209050601f831160018114610bf2575f8415610be0578287015190505b610bea8582610b6f565b865550610c51565b601f198416610c00866109e1565b5f5b82811015610c2757848901518255600182019150602085019450602081019050610c02565b86831015610c445784890151610c40601f891682610b53565b8355505b6001600288020188555050505b505050505050565b610c62816106f9565b82525050565b5f604082019050610c7b5f830185610c59565b610c886020830184610c59565b9392505050565b5f61ffff82169050919050565b610ca581610c8f565b82525050565b5f604082019050610cbe5f830185610c59565b610ccb6020830184610c9c565b9392505050565b610cdb81610734565b82525050565b5f602082019050610cf45f830184610cd2565b92915050565b5f819050919050565b610d0c81610cfa565b82525050565b610d1b81610a5f565b82525050565b5f60a082019050610d345f830188610d03565b610d416020830187610d03565b610d4e6040830186610d03565b610d5b6060830185610d12565b610d686080830184610c59565b9695505050505050565b5f82825260208201905092915050565b7f455243323938313a20726f79616c7479206665652077696c6c206578636565645f8201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b5f610ddc602a83610d72565b9150610de782610d82565b604082019050919050565b5f6020820190508181035f830152610e0981610dd0565b9050919050565b7f455243323938313a20696e76616c6964207265636569766572000000000000005f82015250565b5f610e44601983610d72565b9150610e4f82610e10565b602082019050919050565b5f6020820190508181035f830152610e7181610e38565b9050919050565b60805160a05160c05160e05161010051610120516153f0610ebf5f395f612e7d01525f612ebf01525f612e9e01525f612dd301525f612e2901525f612e5201526153f05ff3fe608060405234801561000f575f5ffd5b5060043610610246575f3560e01c8063715018a611610139578063a4157296116100b6578063d547cfb71161007a578063d547cfb7146106b0578063e30c3978146106ce578063e3faad94146106ec578063e985e9c51461070a578063f2fde38b1461073a57610246565b8063a41572961461060c578063a9fc664e1461062a578063b3bcea4814610646578063b88d4fde14610664578063c87b56dd1461068057610246565b80638da5cb5b116100fd5780638da5cb5b1461057c57806395d89b411461059a5780639b7995e8146105b85780639e05d240146105d4578063a22cb465146105f057610246565b8063715018a61461050057806379ba50971461050a57806380f91296146105145780638a616bc0146105445780638be18e571461056057610246565b80632a55205a116101c757806355f804b31161018b57806355f804b31461044a5780635944c753146104665780636221d13c146104825780636352211e146104a057806370a08231146104d057610246565b80632a55205a146103935780632cb3e494146103c457806340414ef1146103e257806342842e0e146103fe5780634f558e791461041a57610246565b8063090ca3d91161020e578063090ca3d914610302578063095ea7b31461031e578063098144d41461033a5780630d705df61461035857806323b872dd1461037757610246565b8063014635461461024a57806301ffc9a71461026857806304634d8d1461029857806306fdde03146102b4578063081812fc146102d2575b5f5ffd5b610252610756565b60405161025f91906137ba565b60405180910390f35b610282600480360381019061027d9190613839565b61076e565b60405161028f919061387e565b60405180910390f35b6102b260048036038101906102ad9190613902565b61077f565b005b6102bc610795565b6040516102c991906139ca565b60405180910390f35b6102ec60048036038101906102e79190613a1d565b610825565b6040516102f991906137ba565b60405180910390f35b61031c60048036038101906103179190613acb565b610867565b005b61033860048036038101906103339190613b28565b610a33565b005b610342610b49565b60405161034f91906137ba565b60405180910390f35b610360610bd1565b60405161036e929190613b75565b60405180910390f35b610391600480360381019061038c9190613b9c565b610bfe565b005b6103ad60048036038101906103a89190613bec565b610c5e565b6040516103bb929190613c39565b60405180910390f35b6103cc610e3a565b6040516103d991906137ba565b60405180910390f35b6103fc60048036038101906103f79190613d0a565b610e5f565b005b61041860048036038101906104139190613b9c565b610f06565b005b610434600480360381019061042f9190613a1d565b610f25565b604051610441919061387e565b60405180910390f35b610464600480360381019061045f9190613eb0565b610f36565b005b610480600480360381019061047b9190613ef7565b610f88565b005b61048a610fa0565b604051610497919061387e565b60405180910390f35b6104ba60048036038101906104b59190613a1d565b610fb3565b6040516104c791906137ba565b60405180910390f35b6104ea60048036038101906104e59190613f47565b611037565b6040516104f79190613f72565b60405180910390f35b6105086110eb565b005b6105126110fe565b005b61052e60048036038101906105299190613f8b565b61118a565b60405161053b9190613fce565b60405180910390f35b61055e60048036038101906105599190613a1d565b6111fa565b005b61057a60048036038101906105759190613eb0565b61120e565b005b610584611260565b60405161059191906137ba565b60405180910390f35b6105a2611287565b6040516105af91906139ca565b60405180910390f35b6105d260048036038101906105cd9190613f47565b611317565b005b6105ee60048036038101906105e99190614011565b611399565b005b61060a6004803603810190610605919061403c565b6113f5565b005b61061461140b565b60405161062191906139ca565b60405180910390f35b610644600480360381019061063f9190613f47565b611444565b005b61064e611582565b60405161065b91906139ca565b60405180910390f35b61067e60048036038101906106799190614118565b61160e565b005b61069a60048036038101906106959190613a1d565b611670565b6040516106a791906139ca565b60405180910390f35b6106b86116d8565b6040516106c591906139ca565b60405180910390f35b6106d6611764565b6040516106e391906137ba565b60405180910390f35b6106f461178c565b60405161070191906139ca565b60405180910390f35b610724600480360381019061071f9190614198565b6117c5565b604051610731919061387e565b60405180910390f35b610754600480360381019061074f9190613f47565b61182c565b005b73721c0078c2328597ca70f5451fff5a7b38d4e94781565b5f610778826118d8565b9050919050565b610787611951565b610791828261195b565b5050565b6060600880546107a490614203565b80601f01602080910402602001604051908101604052809291908181526020018280546107d090614203565b801561081b5780601f106107f25761010080835404028352916020019161081b565b820191905f5260205f20905b8154815290600101906020018083116107fe57829003601f168201915b5050505050905090565b5f61082f826119b7565b60065f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f8360200135148061087e575061115c8360200135115b156108b5576040517f3f6cc76800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16835f0160208101906108de9190613f47565b73ffffffffffffffffffffffffffffffffffffffff160361092b576040517f1e4ec46b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6109358461118a565b90505f6109858285858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050611a02565b9050600f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a0d576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a2c855f016020810190610a229190613f47565b8660200135611a27565b5050505050565b5f610a3d82610fb3565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610aad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa4906142a3565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610acc611c3a565b73ffffffffffffffffffffffffffffffffffffffff161480610afb5750610afa81610af5611c3a565b6117c5565b5b610b3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3190614331565b60405180910390fd5b610b448383611c48565b505050565b5f600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610bce57600a5f9054906101000a900460ff16610bcd5773721c0078c2328597ca70f5451fff5a7b38d4e94790505b5b90565b5f5f7fcaee23ea077851ee825819a64124f89235283956b811450bfef78adb3ab8b8d89150600190509091565b610c0f610c09611c3a565b82611cfe565b610c4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c45906143bf565b60405180910390fd5b610c59838383611d92565b505050565b5f5f5f600e5f8681526020019081526020015f206040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020015f820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505f73ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1603610de757600d6040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020015f820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b5f610df061207e565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610e1c919061440a565b610e269190614478565b9050815f0151819350935050509250929050565b600f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b818190508484905014610e9e576040517fa182dff800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f90505b84849050811015610eff57610ef4858583818110610ec457610ec36144a8565b5b905060400201848484818110610edd57610edc6144a8565b5b9050602002810190610eef91906144e1565b610867565b806001019050610ea3565b5050505050565b610f2083838360405180602001604052805f81525061160e565b505050565b5f610f2f82612087565b9050919050565b610f3e611951565b80600b9081610f4d91906146e3565b507ff9c7803e94e0d3c02900d8a90893a6d5e90dd04d32a4cfe825520f82bf9f32f681604051610f7d91906139ca565b60405180910390a150565b610f90611951565b610f9b8383836120c7565b505050565b600a60159054906101000a900460ff1681565b5f5f610fbe83612126565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361102e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611025906147fc565b60405180910390fd5b80915050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036110a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109d9061488a565b60405180910390fd5b60055f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6110f361215f565b6110fc5f6121dd565b565b5f611107611c3a565b90508073ffffffffffffffffffffffffffffffffffffffff16611128611764565b73ffffffffffffffffffffffffffffffffffffffff161461117e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117590614918565b60405180910390fd5b611187816121dd565b50565b5f6111f37f76b855a5e753bf331f36772b15008ccc2218aa5caad55130d399ab87a94e35e2835f0160208101906111c19190613f47565b84602001356040516020016111d893929190614936565b6040516020818303038152906040528051906020012061220d565b9050919050565b611202611951565b61120b81612226565b50565b611216611951565b80600c908161122591906146e3565b507f65ccd57f8a46e7a6cfc4d214d84094e8ba5561ab50fd328f26e4c44052ffeba08160405161125591906139ca565b60405180910390a150565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606009805461129690614203565b80601f01602080910402602001604051908101604052809291908181526020018280546112c290614203565b801561130d5780601f106112e45761010080835404028352916020019161130d565b820191905f5260205f20905b8154815290600101906020018083116112f057829003601f168201915b5050505050905090565b61131f611951565b80600f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe3deb566bdf0470483574006ccdfebff5a4e5affaf1c494024c52abe0fe2fa848160405161138e91906137ba565b60405180910390a150565b6113a1611951565b80600a60156101000a81548160ff0219169083151502179055507f6787c7f9a80aa0f5ceddab2c54f1f5169c0b88e75dd5e19d5e858a64144c7dbc816040516113ea919061387e565b60405180910390a150565b611407611400611c3a565b8383612280565b5050565b6040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b61144c611951565b5f5f8273ffffffffffffffffffffffffffffffffffffffff163b1190505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156114a3575080155b156114da576040517f32483afb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac611503610b49565b8360405161151292919061496b565b60405180910390a16001600a5f6101000a81548160ff02191690831515021790555081600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061157e826123e7565b5050565b600c805461158f90614203565b80601f01602080910402602001604051908101604052809291908181526020018280546115bb90614203565b80156116065780601f106115dd57610100808354040283529160200191611606565b820191905f5260205f20905b8154815290600101906020018083116115e957829003601f168201915b505050505081565b61161f611619611c3a565b83611cfe565b61165e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611655906143bf565b60405180910390fd5b61166a84848484612498565b50505050565b606061167b826119b7565b5f6116846124f4565b90505f8151116116a25760405180602001604052805f8152506116d0565b806116ac84612584565b600c6040516020016116c093929190614a4c565b6040516020818303038152906040525b915050919050565b600b80546116e590614203565b80601f016020809104026020016040519081016040528092919081815260200182805461171190614203565b801561175c5780601f106117335761010080835404028352916020019161175c565b820191905f5260205f20905b81548152906001019060200180831161173f57829003601f168201915b505050505081565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040518060400160405280601081526020017f57696c646361726457696c64706173730000000000000000000000000000000081525081565b5f6117d0838361264e565b90508061182657600a60159054906101000a900460ff1615611825576117f4610b49565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161490505b5b92915050565b61183461215f565b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16611893611260565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f7f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061194a5750611949826126dc565b5b9050919050565b61195961215f565b565b61196582826127bd565b8173ffffffffffffffffffffffffffffffffffffffff167f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef826040516119ab9190614a8b565b60405180910390a25050565b6119c081612087565b6119ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f6906147fc565b60405180910390fd5b50565b5f5f5f611a0f858561294d565b91509150611a1c81612999565b819250505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611a95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8c90614aee565b60405180910390fd5b611a9e81612087565b15611ade576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad590614b56565b60405180910390fd5b611aeb5f83836001612afe565b611af481612087565b15611b34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2b90614b56565b60405180910390fd5b600160055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508160045f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611c365f83836001612b33565b5050565b5f611c43612b68565b905090565b8160065f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611cb883610fb3565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b5f5f611d0983610fb3565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611d4b5750611d4a81856117c5565b5b80611d8957508373ffffffffffffffffffffffffffffffffffffffff16611d7184610825565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611db282610fb3565b73ffffffffffffffffffffffffffffffffffffffff1614611e08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dff90614be4565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611e76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e6d90614c72565b60405180910390fd5b611e838383836001612afe565b8273ffffffffffffffffffffffffffffffffffffffff16611ea382610fb3565b73ffffffffffffffffffffffffffffffffffffffff1614611ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef090614be4565b60405180910390fd5b60065f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600160055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282540392505081905550600160055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508160045f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46120798383836001612b33565b505050565b5f612710905090565b5f5f73ffffffffffffffffffffffffffffffffffffffff166120a883612126565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6120d2838383612b6f565b8173ffffffffffffffffffffffffffffffffffffffff16837f7f5b076c952c0ec86e5425963c1326dd0f03a3595c19f81d765e8ff559a6e33c836040516121199190614a8b565b60405180910390a3505050565b5f60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b612167611c3a565b73ffffffffffffffffffffffffffffffffffffffff16612185611260565b73ffffffffffffffffffffffffffffffffffffffff16146121db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d290614cda565b60405180910390fd5b565b60015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905561220a81612d0f565b50565b5f61221f612219612dd0565b83612ee9565b9050919050565b600e5f8281526020019081526020015f205f5f82015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555f820160146101000a8154906bffffffffffffffffffffffff0219169055505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036122ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e590614d42565b60405180910390fd5b8060075f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516123da919061387e565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612495575f813b90505f811115612493578173ffffffffffffffffffffffffffffffffffffffff1663fb2de5d73061244c612f1b565b6040518363ffffffff1660e01b8152600401612469929190614d7c565b5f604051808303815f87803b158015612480575f5ffd5b505af1925050508015612491575060015b505b505b50565b6124a3848484611d92565b6124af84848484612f24565b6124ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e590614e13565b60405180910390fd5b50505050565b6060600b805461250390614203565b80601f016020809104026020016040519081016040528092919081815260200182805461252f90614203565b801561257a5780601f106125515761010080835404028352916020019161257a565b820191905f5260205f20905b81548152906001019060200180831161255d57829003601f168201915b5050505050905090565b60605f6001612592846130a6565b0190505f8167ffffffffffffffff8111156125b0576125af613d8c565b5b6040519080825280601f01601f1916602001820160405280156125e25781602001600182028036833780820191505090505b5090505f82602001820190505b600115612643578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816126385761263761444b565b5b0494505f85036125ef575b819350505050919050565b5f60075f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f7fad0d7f6c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806127a657507fa07d229a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806127b657506127b5826131f7565b5b9050919050565b6127c561207e565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161281a90614ea1565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161288890614f09565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600d5f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151815f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b5f5f604183510361298a575f5f5f602086015192506040860151915060608601515f1a905061297e878285856132d8565b94509450505050612992565b5f6002915091505b9250929050565b5f60048111156129ac576129ab614f27565b5b8160048111156129bf576129be614f27565b5b0315612afb57600160048111156129d9576129d8614f27565b5b8160048111156129ec576129eb614f27565b5b03612a2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2390614f9e565b60405180910390fd5b60026004811115612a4057612a3f614f27565b5b816004811115612a5357612a52614f27565b5b03612a93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a8a90615006565b60405180910390fd5b60036004811115612aa757612aa6614f27565b5b816004811115612aba57612ab9614f27565b5b03612afa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612af190615094565b60405180910390fd5b5b50565b5f5f90505b81811015612b2c57612b2185858386612b1c91906150b2565b6133b0565b806001019050612b03565b5050505050565b5f5f90505b81811015612b6157612b5685858386612b5191906150b2565b6134ae565b806001019050612b38565b5050505050565b5f33905090565b612b7761207e565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612bd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bcc90614ea1565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612c43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c3a9061512f565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600e5f8581526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151815f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550905050505050565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015612e4b57507f000000000000000000000000000000000000000000000000000000000000000046145b15612e78577f00000000000000000000000000000000000000000000000000000000000000009050612ee6565b612ee37f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006135ac565b90505b90565b5f8282604051602001612efd9291906151b7565b60405160208183030381529060405280519060200120905092915050565b5f6102d1905090565b5f612f448473ffffffffffffffffffffffffffffffffffffffff166135e5565b15613099578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612f6d611c3a565b8786866040518563ffffffff1660e01b8152600401612f8f949392919061523f565b6020604051808303815f875af1925050508015612fca57506040513d601f19601f82011682018060405250810190612fc7919061529d565b60015b613049573d805f8114612ff8576040519150601f19603f3d011682016040523d82523d5f602084013e612ffd565b606091505b505f815103613041576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161303890614e13565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061309e565b600190505b949350505050565b5f5f5f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613102577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816130f8576130f761444b565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061313f576d04ee2d6d415b85acef810000000083816131355761313461444b565b5b0492506020810190505b662386f26fc10000831061316e57662386f26fc1000083816131645761316361444b565b5b0492506010810190505b6305f5e1008310613197576305f5e100838161318d5761318c61444b565b5b0492506008810190505b61271083106131bc5761271083816131b2576131b161444b565b5b0492506004810190505b606483106131df57606483816131d5576131d461444b565b5b0492506002810190505b600a83106131ee576001810190505b80915050919050565b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806132c157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806132d157506132d082613607565b5b9050919050565b5f5f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0835f1c1115613310575f6003915091506133a7565b5f6001878787876040515f815260200160405260405161333394939291906152e3565b6020604051602081039080840390855afa158015613353573d5f5f3e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361339f575f600192509250506133a7565b805f92509250505b94509492505050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161490505f5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614905081801561341e5750805b15613455576040517f5cbd944100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156134735761346e613466611c3a565b858534613670565b6134a7565b80156134915761348c613484611c3a565b868534613676565b6134a6565b6134a561349c611c3a565b8686863461367c565b5b5b5050505050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161490505f5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614905081801561351c5750805b15613553576040517f5cbd944100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156135715761356c613564611c3a565b858534613768565b6135a5565b801561358f5761358a613582611c3a565b86853461376e565b6135a4565b6135a361359a611c3a565b86868634613774565b5b5b5050505050565b5f83838346306040516020016135c6959493929190615326565b6040516020818303038152906040528051906020012090509392505050565b5f5f8273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b50505050565b50505050565b5f613685610b49565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461375f578073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16036136f35750613761565b8073ffffffffffffffffffffffffffffffffffffffff1663caee23ea878787876040518563ffffffff1660e01b81526004016137329493929190615377565b5f6040518083038186803b158015613748575f5ffd5b505afa15801561375a573d5f5f3e3d5ffd5b505050505b505b5050505050565b50505050565b50505050565b5050505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6137a48261377b565b9050919050565b6137b48161379a565b82525050565b5f6020820190506137cd5f8301846137ab565b92915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613818816137e4565b8114613822575f5ffd5b50565b5f813590506138338161380f565b92915050565b5f6020828403121561384e5761384d6137dc565b5b5f61385b84828501613825565b91505092915050565b5f8115159050919050565b61387881613864565b82525050565b5f6020820190506138915f83018461386f565b92915050565b6138a08161379a565b81146138aa575f5ffd5b50565b5f813590506138bb81613897565b92915050565b5f6bffffffffffffffffffffffff82169050919050565b6138e1816138c1565b81146138eb575f5ffd5b50565b5f813590506138fc816138d8565b92915050565b5f5f60408385031215613918576139176137dc565b5b5f613925858286016138ad565b9250506020613936858286016138ee565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561397757808201518184015260208101905061395c565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61399c82613940565b6139a6818561394a565b93506139b681856020860161395a565b6139bf81613982565b840191505092915050565b5f6020820190508181035f8301526139e28184613992565b905092915050565b5f819050919050565b6139fc816139ea565b8114613a06575f5ffd5b50565b5f81359050613a17816139f3565b92915050565b5f60208284031215613a3257613a316137dc565b5b5f613a3f84828501613a09565b91505092915050565b5f5ffd5b5f60408284031215613a6157613a60613a48565b5b81905092915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f840112613a8b57613a8a613a6a565b5b8235905067ffffffffffffffff811115613aa857613aa7613a6e565b5b602083019150836001820283011115613ac457613ac3613a72565b5b9250929050565b5f5f5f60608486031215613ae257613ae16137dc565b5b5f613aef86828701613a4c565b935050604084013567ffffffffffffffff811115613b1057613b0f6137e0565b5b613b1c86828701613a76565b92509250509250925092565b5f5f60408385031215613b3e57613b3d6137dc565b5b5f613b4b858286016138ad565b9250506020613b5c85828601613a09565b9150509250929050565b613b6f816137e4565b82525050565b5f604082019050613b885f830185613b66565b613b95602083018461386f565b9392505050565b5f5f5f60608486031215613bb357613bb26137dc565b5b5f613bc0868287016138ad565b9350506020613bd1868287016138ad565b9250506040613be286828701613a09565b9150509250925092565b5f5f60408385031215613c0257613c016137dc565b5b5f613c0f85828601613a09565b9250506020613c2085828601613a09565b9150509250929050565b613c33816139ea565b82525050565b5f604082019050613c4c5f8301856137ab565b613c596020830184613c2a565b9392505050565b5f5f83601f840112613c7557613c74613a6a565b5b8235905067ffffffffffffffff811115613c9257613c91613a6e565b5b602083019150836040820283011115613cae57613cad613a72565b5b9250929050565b5f5f83601f840112613cca57613cc9613a6a565b5b8235905067ffffffffffffffff811115613ce757613ce6613a6e565b5b602083019150836020820283011115613d0357613d02613a72565b5b9250929050565b5f5f5f5f60408587031215613d2257613d216137dc565b5b5f85013567ffffffffffffffff811115613d3f57613d3e6137e0565b5b613d4b87828801613c60565b9450945050602085013567ffffffffffffffff811115613d6e57613d6d6137e0565b5b613d7a87828801613cb5565b925092505092959194509250565b5f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b613dc282613982565b810181811067ffffffffffffffff82111715613de157613de0613d8c565b5b80604052505050565b5f613df36137d3565b9050613dff8282613db9565b919050565b5f67ffffffffffffffff821115613e1e57613e1d613d8c565b5b613e2782613982565b9050602081019050919050565b828183375f83830152505050565b5f613e54613e4f84613e04565b613dea565b905082815260208101848484011115613e7057613e6f613d88565b5b613e7b848285613e34565b509392505050565b5f82601f830112613e9757613e96613a6a565b5b8135613ea7848260208601613e42565b91505092915050565b5f60208284031215613ec557613ec46137dc565b5b5f82013567ffffffffffffffff811115613ee257613ee16137e0565b5b613eee84828501613e83565b91505092915050565b5f5f5f60608486031215613f0e57613f0d6137dc565b5b5f613f1b86828701613a09565b9350506020613f2c868287016138ad565b9250506040613f3d868287016138ee565b9150509250925092565b5f60208284031215613f5c57613f5b6137dc565b5b5f613f69848285016138ad565b91505092915050565b5f602082019050613f855f830184613c2a565b92915050565b5f60408284031215613fa057613f9f6137dc565b5b5f613fad84828501613a4c565b91505092915050565b5f819050919050565b613fc881613fb6565b82525050565b5f602082019050613fe15f830184613fbf565b92915050565b613ff081613864565b8114613ffa575f5ffd5b50565b5f8135905061400b81613fe7565b92915050565b5f60208284031215614026576140256137dc565b5b5f61403384828501613ffd565b91505092915050565b5f5f60408385031215614052576140516137dc565b5b5f61405f858286016138ad565b925050602061407085828601613ffd565b9150509250929050565b5f67ffffffffffffffff82111561409457614093613d8c565b5b61409d82613982565b9050602081019050919050565b5f6140bc6140b78461407a565b613dea565b9050828152602081018484840111156140d8576140d7613d88565b5b6140e3848285613e34565b509392505050565b5f82601f8301126140ff576140fe613a6a565b5b813561410f8482602086016140aa565b91505092915050565b5f5f5f5f608085870312156141305761412f6137dc565b5b5f61413d878288016138ad565b945050602061414e878288016138ad565b935050604061415f87828801613a09565b925050606085013567ffffffffffffffff8111156141805761417f6137e0565b5b61418c878288016140eb565b91505092959194509250565b5f5f604083850312156141ae576141ad6137dc565b5b5f6141bb858286016138ad565b92505060206141cc858286016138ad565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061421a57607f821691505b60208210810361422d5761422c6141d6565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e655f8201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b5f61428d60218361394a565b915061429882614233565b604082019050919050565b5f6020820190508181035f8301526142ba81614281565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f5f8201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b5f61431b603d8361394a565b9150614326826142c1565b604082019050919050565b5f6020820190508181035f8301526143488161430f565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e655f8201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b5f6143a9602d8361394a565b91506143b48261434f565b604082019050919050565b5f6020820190508181035f8301526143d68161439d565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f614414826139ea565b915061441f836139ea565b925082820261442d816139ea565b91508282048414831517614444576144436143dd565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f614482826139ea565b915061448d836139ea565b92508261449d5761449c61444b565b5b828204905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f833560016020038436030381126144fd576144fc6144d5565b5b80840192508235915067ffffffffffffffff82111561451f5761451e6144d9565b5b60208301925060018202360383131561453b5761453a6144dd565b5b509250929050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261459f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614564565b6145a98683614564565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6145e46145df6145da846139ea565b6145c1565b6139ea565b9050919050565b5f819050919050565b6145fd836145ca565b614611614609826145eb565b848454614570565b825550505050565b5f5f905090565b614628614619565b6146338184846145f4565b505050565b5b818110156146565761464b5f82614620565b600181019050614639565b5050565b601f82111561469b5761466c81614543565b61467584614555565b81016020851015614684578190505b61469861469085614555565b830182614638565b50505b505050565b5f82821c905092915050565b5f6146bb5f19846008026146a0565b1980831691505092915050565b5f6146d383836146ac565b9150826002028217905092915050565b6146ec82613940565b67ffffffffffffffff81111561470557614704613d8c565b5b61470f8254614203565b61471a82828561465a565b5f60209050601f83116001811461474b575f8415614739578287015190505b61474385826146c8565b8655506147aa565b601f19841661475986614543565b5f5b828110156147805784890151825560018201915060208501945060208101905061475b565b8683101561479d5784890151614799601f8916826146ac565b8355505b6001600288020188555050505b505050505050565b7f4552433732313a20696e76616c696420746f6b656e20494400000000000000005f82015250565b5f6147e660188361394a565b91506147f1826147b2565b602082019050919050565b5f6020820190508181035f830152614813816147da565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f7420612076615f8201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b5f61487460298361394a565b915061487f8261481a565b604082019050919050565b5f6020820190508181035f8301526148a181614868565b9050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865205f8201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b5f61490260298361394a565b915061490d826148a8565b604082019050919050565b5f6020820190508181035f83015261492f816148f6565b9050919050565b5f6060820190506149495f830186613fbf565b61495660208301856137ab565b6149636040830184613c2a565b949350505050565b5f60408201905061497e5f8301856137ab565b61498b60208301846137ab565b9392505050565b5f81905092915050565b5f6149a682613940565b6149b08185614992565b93506149c081856020860161395a565b80840191505092915050565b5f81546149d881614203565b6149e28186614992565b9450600182165f81146149fc5760018114614a1157614a43565b60ff1983168652811515820286019350614a43565b614a1a85614543565b5f5b83811015614a3b57815481890152600182019150602081019050614a1c565b838801955050505b50505092915050565b5f614a57828661499c565b9150614a63828561499c565b9150614a6f82846149cc565b9150819050949350505050565b614a85816138c1565b82525050565b5f602082019050614a9e5f830184614a7c565b92915050565b7f4552433732313a206d696e7420746f20746865207a65726f20616464726573735f82015250565b5f614ad860208361394a565b9150614ae382614aa4565b602082019050919050565b5f6020820190508181035f830152614b0581614acc565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e746564000000005f82015250565b5f614b40601c8361394a565b9150614b4b82614b0c565b602082019050919050565b5f6020820190508181035f830152614b6d81614b34565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f7272656374205f8201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b5f614bce60258361394a565b9150614bd982614b74565b604082019050919050565b5f6020820190508181035f830152614bfb81614bc2565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f614c5c60248361394a565b9150614c6782614c02565b604082019050919050565b5f6020820190508181035f830152614c8981614c50565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f614cc460208361394a565b9150614ccf82614c90565b602082019050919050565b5f6020820190508181035f830152614cf181614cb8565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c6572000000000000005f82015250565b5f614d2c60198361394a565b9150614d3782614cf8565b602082019050919050565b5f6020820190508181035f830152614d5981614d20565b9050919050565b5f61ffff82169050919050565b614d7681614d60565b82525050565b5f604082019050614d8f5f8301856137ab565b614d9c6020830184614d6d565b9392505050565b7f4552433732313a207472616e7366657220746f206e6f6e2045524337323152655f8201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b5f614dfd60328361394a565b9150614e0882614da3565b604082019050919050565b5f6020820190508181035f830152614e2a81614df1565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c206578636565645f8201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b5f614e8b602a8361394a565b9150614e9682614e31565b604082019050919050565b5f6020820190508181035f830152614eb881614e7f565b9050919050565b7f455243323938313a20696e76616c6964207265636569766572000000000000005f82015250565b5f614ef360198361394a565b9150614efe82614ebf565b602082019050919050565b5f6020820190508181035f830152614f2081614ee7565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f45434453413a20696e76616c6964207369676e617475726500000000000000005f82015250565b5f614f8860188361394a565b9150614f9382614f54565b602082019050919050565b5f6020820190508181035f830152614fb581614f7c565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e677468005f82015250565b5f614ff0601f8361394a565b9150614ffb82614fbc565b602082019050919050565b5f6020820190508181035f83015261501d81614fe4565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c5f8201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b5f61507e60228361394a565b915061508982615024565b604082019050919050565b5f6020820190508181035f8301526150ab81615072565b9050919050565b5f6150bc826139ea565b91506150c7836139ea565b92508282019050808211156150df576150de6143dd565b5b92915050565b7f455243323938313a20496e76616c696420706172616d657465727300000000005f82015250565b5f615119601b8361394a565b9150615124826150e5565b602082019050919050565b5f6020820190508181035f8301526151468161510d565b9050919050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f615181600283614992565b915061518c8261514d565b600282019050919050565b5f819050919050565b6151b16151ac82613fb6565b615197565b82525050565b5f6151c182615175565b91506151cd82856151a0565b6020820191506151dd82846151a0565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f615211826151ed565b61521b81856151f7565b935061522b81856020860161395a565b61523481613982565b840191505092915050565b5f6080820190506152525f8301876137ab565b61525f60208301866137ab565b61526c6040830185613c2a565b818103606083015261527e8184615207565b905095945050505050565b5f815190506152978161380f565b92915050565b5f602082840312156152b2576152b16137dc565b5b5f6152bf84828501615289565b91505092915050565b5f60ff82169050919050565b6152dd816152c8565b82525050565b5f6080820190506152f65f830187613fbf565b61530360208301866152d4565b6153106040830185613fbf565b61531d6060830184613fbf565b95945050505050565b5f60a0820190506153395f830188613fbf565b6153466020830187613fbf565b6153536040830186613fbf565b6153606060830185613c2a565b61536d60808301846137ab565b9695505050505050565b5f60808201905061538a5f8301876137ab565b61539760208301866137ab565b6153a460408301856137ab565b6153b16060830184613c2a565b9594505050505056fea2646970667358221220206ed326b7b7b17bd9ce4eb628771ee0da9de547ba147302f23b93476895d15264736f6c634300081c0033000000000000000000000000f3bddeb9a132ac2f56a0f024186247dbb9a67d2f00000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000b40ef71fe43e8aa1ea536e2c3ed93c9db8fb2059000000000000000000000000000000000000000000000000000000000000000857696c647061737300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025750000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561000f575f5ffd5b5060043610610246575f3560e01c8063715018a611610139578063a4157296116100b6578063d547cfb71161007a578063d547cfb7146106b0578063e30c3978146106ce578063e3faad94146106ec578063e985e9c51461070a578063f2fde38b1461073a57610246565b8063a41572961461060c578063a9fc664e1461062a578063b3bcea4814610646578063b88d4fde14610664578063c87b56dd1461068057610246565b80638da5cb5b116100fd5780638da5cb5b1461057c57806395d89b411461059a5780639b7995e8146105b85780639e05d240146105d4578063a22cb465146105f057610246565b8063715018a61461050057806379ba50971461050a57806380f91296146105145780638a616bc0146105445780638be18e571461056057610246565b80632a55205a116101c757806355f804b31161018b57806355f804b31461044a5780635944c753146104665780636221d13c146104825780636352211e146104a057806370a08231146104d057610246565b80632a55205a146103935780632cb3e494146103c457806340414ef1146103e257806342842e0e146103fe5780634f558e791461041a57610246565b8063090ca3d91161020e578063090ca3d914610302578063095ea7b31461031e578063098144d41461033a5780630d705df61461035857806323b872dd1461037757610246565b8063014635461461024a57806301ffc9a71461026857806304634d8d1461029857806306fdde03146102b4578063081812fc146102d2575b5f5ffd5b610252610756565b60405161025f91906137ba565b60405180910390f35b610282600480360381019061027d9190613839565b61076e565b60405161028f919061387e565b60405180910390f35b6102b260048036038101906102ad9190613902565b61077f565b005b6102bc610795565b6040516102c991906139ca565b60405180910390f35b6102ec60048036038101906102e79190613a1d565b610825565b6040516102f991906137ba565b60405180910390f35b61031c60048036038101906103179190613acb565b610867565b005b61033860048036038101906103339190613b28565b610a33565b005b610342610b49565b60405161034f91906137ba565b60405180910390f35b610360610bd1565b60405161036e929190613b75565b60405180910390f35b610391600480360381019061038c9190613b9c565b610bfe565b005b6103ad60048036038101906103a89190613bec565b610c5e565b6040516103bb929190613c39565b60405180910390f35b6103cc610e3a565b6040516103d991906137ba565b60405180910390f35b6103fc60048036038101906103f79190613d0a565b610e5f565b005b61041860048036038101906104139190613b9c565b610f06565b005b610434600480360381019061042f9190613a1d565b610f25565b604051610441919061387e565b60405180910390f35b610464600480360381019061045f9190613eb0565b610f36565b005b610480600480360381019061047b9190613ef7565b610f88565b005b61048a610fa0565b604051610497919061387e565b60405180910390f35b6104ba60048036038101906104b59190613a1d565b610fb3565b6040516104c791906137ba565b60405180910390f35b6104ea60048036038101906104e59190613f47565b611037565b6040516104f79190613f72565b60405180910390f35b6105086110eb565b005b6105126110fe565b005b61052e60048036038101906105299190613f8b565b61118a565b60405161053b9190613fce565b60405180910390f35b61055e60048036038101906105599190613a1d565b6111fa565b005b61057a60048036038101906105759190613eb0565b61120e565b005b610584611260565b60405161059191906137ba565b60405180910390f35b6105a2611287565b6040516105af91906139ca565b60405180910390f35b6105d260048036038101906105cd9190613f47565b611317565b005b6105ee60048036038101906105e99190614011565b611399565b005b61060a6004803603810190610605919061403c565b6113f5565b005b61061461140b565b60405161062191906139ca565b60405180910390f35b610644600480360381019061063f9190613f47565b611444565b005b61064e611582565b60405161065b91906139ca565b60405180910390f35b61067e60048036038101906106799190614118565b61160e565b005b61069a60048036038101906106959190613a1d565b611670565b6040516106a791906139ca565b60405180910390f35b6106b86116d8565b6040516106c591906139ca565b60405180910390f35b6106d6611764565b6040516106e391906137ba565b60405180910390f35b6106f461178c565b60405161070191906139ca565b60405180910390f35b610724600480360381019061071f9190614198565b6117c5565b604051610731919061387e565b60405180910390f35b610754600480360381019061074f9190613f47565b61182c565b005b73721c0078c2328597ca70f5451fff5a7b38d4e94781565b5f610778826118d8565b9050919050565b610787611951565b610791828261195b565b5050565b6060600880546107a490614203565b80601f01602080910402602001604051908101604052809291908181526020018280546107d090614203565b801561081b5780601f106107f25761010080835404028352916020019161081b565b820191905f5260205f20905b8154815290600101906020018083116107fe57829003601f168201915b5050505050905090565b5f61082f826119b7565b60065f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f8360200135148061087e575061115c8360200135115b156108b5576040517f3f6cc76800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16835f0160208101906108de9190613f47565b73ffffffffffffffffffffffffffffffffffffffff160361092b576040517f1e4ec46b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6109358461118a565b90505f6109858285858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050611a02565b9050600f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a0d576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a2c855f016020810190610a229190613f47565b8660200135611a27565b5050505050565b5f610a3d82610fb3565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610aad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa4906142a3565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610acc611c3a565b73ffffffffffffffffffffffffffffffffffffffff161480610afb5750610afa81610af5611c3a565b6117c5565b5b610b3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3190614331565b60405180910390fd5b610b448383611c48565b505050565b5f600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610bce57600a5f9054906101000a900460ff16610bcd5773721c0078c2328597ca70f5451fff5a7b38d4e94790505b5b90565b5f5f7fcaee23ea077851ee825819a64124f89235283956b811450bfef78adb3ab8b8d89150600190509091565b610c0f610c09611c3a565b82611cfe565b610c4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c45906143bf565b60405180910390fd5b610c59838383611d92565b505050565b5f5f5f600e5f8681526020019081526020015f206040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020015f820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505f73ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1603610de757600d6040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020015f820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b5f610df061207e565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610e1c919061440a565b610e269190614478565b9050815f0151819350935050509250929050565b600f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b818190508484905014610e9e576040517fa182dff800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f90505b84849050811015610eff57610ef4858583818110610ec457610ec36144a8565b5b905060400201848484818110610edd57610edc6144a8565b5b9050602002810190610eef91906144e1565b610867565b806001019050610ea3565b5050505050565b610f2083838360405180602001604052805f81525061160e565b505050565b5f610f2f82612087565b9050919050565b610f3e611951565b80600b9081610f4d91906146e3565b507ff9c7803e94e0d3c02900d8a90893a6d5e90dd04d32a4cfe825520f82bf9f32f681604051610f7d91906139ca565b60405180910390a150565b610f90611951565b610f9b8383836120c7565b505050565b600a60159054906101000a900460ff1681565b5f5f610fbe83612126565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361102e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611025906147fc565b60405180910390fd5b80915050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036110a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109d9061488a565b60405180910390fd5b60055f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6110f361215f565b6110fc5f6121dd565b565b5f611107611c3a565b90508073ffffffffffffffffffffffffffffffffffffffff16611128611764565b73ffffffffffffffffffffffffffffffffffffffff161461117e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117590614918565b60405180910390fd5b611187816121dd565b50565b5f6111f37f76b855a5e753bf331f36772b15008ccc2218aa5caad55130d399ab87a94e35e2835f0160208101906111c19190613f47565b84602001356040516020016111d893929190614936565b6040516020818303038152906040528051906020012061220d565b9050919050565b611202611951565b61120b81612226565b50565b611216611951565b80600c908161122591906146e3565b507f65ccd57f8a46e7a6cfc4d214d84094e8ba5561ab50fd328f26e4c44052ffeba08160405161125591906139ca565b60405180910390a150565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606009805461129690614203565b80601f01602080910402602001604051908101604052809291908181526020018280546112c290614203565b801561130d5780601f106112e45761010080835404028352916020019161130d565b820191905f5260205f20905b8154815290600101906020018083116112f057829003601f168201915b5050505050905090565b61131f611951565b80600f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe3deb566bdf0470483574006ccdfebff5a4e5affaf1c494024c52abe0fe2fa848160405161138e91906137ba565b60405180910390a150565b6113a1611951565b80600a60156101000a81548160ff0219169083151502179055507f6787c7f9a80aa0f5ceddab2c54f1f5169c0b88e75dd5e19d5e858a64144c7dbc816040516113ea919061387e565b60405180910390a150565b611407611400611c3a565b8383612280565b5050565b6040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b61144c611951565b5f5f8273ffffffffffffffffffffffffffffffffffffffff163b1190505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156114a3575080155b156114da576040517f32483afb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac611503610b49565b8360405161151292919061496b565b60405180910390a16001600a5f6101000a81548160ff02191690831515021790555081600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061157e826123e7565b5050565b600c805461158f90614203565b80601f01602080910402602001604051908101604052809291908181526020018280546115bb90614203565b80156116065780601f106115dd57610100808354040283529160200191611606565b820191905f5260205f20905b8154815290600101906020018083116115e957829003601f168201915b505050505081565b61161f611619611c3a565b83611cfe565b61165e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611655906143bf565b60405180910390fd5b61166a84848484612498565b50505050565b606061167b826119b7565b5f6116846124f4565b90505f8151116116a25760405180602001604052805f8152506116d0565b806116ac84612584565b600c6040516020016116c093929190614a4c565b6040516020818303038152906040525b915050919050565b600b80546116e590614203565b80601f016020809104026020016040519081016040528092919081815260200182805461171190614203565b801561175c5780601f106117335761010080835404028352916020019161175c565b820191905f5260205f20905b81548152906001019060200180831161173f57829003601f168201915b505050505081565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040518060400160405280601081526020017f57696c646361726457696c64706173730000000000000000000000000000000081525081565b5f6117d0838361264e565b90508061182657600a60159054906101000a900460ff1615611825576117f4610b49565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161490505b5b92915050565b61183461215f565b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16611893611260565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f7f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061194a5750611949826126dc565b5b9050919050565b61195961215f565b565b61196582826127bd565b8173ffffffffffffffffffffffffffffffffffffffff167f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef826040516119ab9190614a8b565b60405180910390a25050565b6119c081612087565b6119ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f6906147fc565b60405180910390fd5b50565b5f5f5f611a0f858561294d565b91509150611a1c81612999565b819250505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611a95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8c90614aee565b60405180910390fd5b611a9e81612087565b15611ade576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad590614b56565b60405180910390fd5b611aeb5f83836001612afe565b611af481612087565b15611b34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2b90614b56565b60405180910390fd5b600160055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508160045f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611c365f83836001612b33565b5050565b5f611c43612b68565b905090565b8160065f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611cb883610fb3565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b5f5f611d0983610fb3565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611d4b5750611d4a81856117c5565b5b80611d8957508373ffffffffffffffffffffffffffffffffffffffff16611d7184610825565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611db282610fb3565b73ffffffffffffffffffffffffffffffffffffffff1614611e08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dff90614be4565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611e76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e6d90614c72565b60405180910390fd5b611e838383836001612afe565b8273ffffffffffffffffffffffffffffffffffffffff16611ea382610fb3565b73ffffffffffffffffffffffffffffffffffffffff1614611ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef090614be4565b60405180910390fd5b60065f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600160055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282540392505081905550600160055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508160045f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46120798383836001612b33565b505050565b5f612710905090565b5f5f73ffffffffffffffffffffffffffffffffffffffff166120a883612126565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6120d2838383612b6f565b8173ffffffffffffffffffffffffffffffffffffffff16837f7f5b076c952c0ec86e5425963c1326dd0f03a3595c19f81d765e8ff559a6e33c836040516121199190614a8b565b60405180910390a3505050565b5f60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b612167611c3a565b73ffffffffffffffffffffffffffffffffffffffff16612185611260565b73ffffffffffffffffffffffffffffffffffffffff16146121db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d290614cda565b60405180910390fd5b565b60015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905561220a81612d0f565b50565b5f61221f612219612dd0565b83612ee9565b9050919050565b600e5f8281526020019081526020015f205f5f82015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555f820160146101000a8154906bffffffffffffffffffffffff0219169055505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036122ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e590614d42565b60405180910390fd5b8060075f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516123da919061387e565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612495575f813b90505f811115612493578173ffffffffffffffffffffffffffffffffffffffff1663fb2de5d73061244c612f1b565b6040518363ffffffff1660e01b8152600401612469929190614d7c565b5f604051808303815f87803b158015612480575f5ffd5b505af1925050508015612491575060015b505b505b50565b6124a3848484611d92565b6124af84848484612f24565b6124ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e590614e13565b60405180910390fd5b50505050565b6060600b805461250390614203565b80601f016020809104026020016040519081016040528092919081815260200182805461252f90614203565b801561257a5780601f106125515761010080835404028352916020019161257a565b820191905f5260205f20905b81548152906001019060200180831161255d57829003601f168201915b5050505050905090565b60605f6001612592846130a6565b0190505f8167ffffffffffffffff8111156125b0576125af613d8c565b5b6040519080825280601f01601f1916602001820160405280156125e25781602001600182028036833780820191505090505b5090505f82602001820190505b600115612643578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816126385761263761444b565b5b0494505f85036125ef575b819350505050919050565b5f60075f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f7fad0d7f6c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806127a657507fa07d229a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806127b657506127b5826131f7565b5b9050919050565b6127c561207e565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161281a90614ea1565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161288890614f09565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600d5f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151815f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b5f5f604183510361298a575f5f5f602086015192506040860151915060608601515f1a905061297e878285856132d8565b94509450505050612992565b5f6002915091505b9250929050565b5f60048111156129ac576129ab614f27565b5b8160048111156129bf576129be614f27565b5b0315612afb57600160048111156129d9576129d8614f27565b5b8160048111156129ec576129eb614f27565b5b03612a2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2390614f9e565b60405180910390fd5b60026004811115612a4057612a3f614f27565b5b816004811115612a5357612a52614f27565b5b03612a93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a8a90615006565b60405180910390fd5b60036004811115612aa757612aa6614f27565b5b816004811115612aba57612ab9614f27565b5b03612afa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612af190615094565b60405180910390fd5b5b50565b5f5f90505b81811015612b2c57612b2185858386612b1c91906150b2565b6133b0565b806001019050612b03565b5050505050565b5f5f90505b81811015612b6157612b5685858386612b5191906150b2565b6134ae565b806001019050612b38565b5050505050565b5f33905090565b612b7761207e565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612bd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bcc90614ea1565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612c43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c3a9061512f565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600e5f8581526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151815f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550905050505050565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f7f000000000000000000000000d8cb3f39875def5853b155c0adf253064439742873ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015612e4b57507f000000000000000000000000000000000000000000000000000000000000000146145b15612e78577f1937911c9bb42c3926425bee9f73150fe7bc0482731dfb10669ccbb3041fce889050612ee6565b612ee37f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f911863119fa4648b2a7018ec2b6fca3750ee447aa8afae1b62ae9abcab3f43f37fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66135ac565b90505b90565b5f8282604051602001612efd9291906151b7565b60405160208183030381529060405280519060200120905092915050565b5f6102d1905090565b5f612f448473ffffffffffffffffffffffffffffffffffffffff166135e5565b15613099578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612f6d611c3a565b8786866040518563ffffffff1660e01b8152600401612f8f949392919061523f565b6020604051808303815f875af1925050508015612fca57506040513d601f19601f82011682018060405250810190612fc7919061529d565b60015b613049573d805f8114612ff8576040519150601f19603f3d011682016040523d82523d5f602084013e612ffd565b606091505b505f815103613041576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161303890614e13565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061309e565b600190505b949350505050565b5f5f5f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613102577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816130f8576130f761444b565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061313f576d04ee2d6d415b85acef810000000083816131355761313461444b565b5b0492506020810190505b662386f26fc10000831061316e57662386f26fc1000083816131645761316361444b565b5b0492506010810190505b6305f5e1008310613197576305f5e100838161318d5761318c61444b565b5b0492506008810190505b61271083106131bc5761271083816131b2576131b161444b565b5b0492506004810190505b606483106131df57606483816131d5576131d461444b565b5b0492506002810190505b600a83106131ee576001810190505b80915050919050565b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806132c157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806132d157506132d082613607565b5b9050919050565b5f5f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0835f1c1115613310575f6003915091506133a7565b5f6001878787876040515f815260200160405260405161333394939291906152e3565b6020604051602081039080840390855afa158015613353573d5f5f3e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361339f575f600192509250506133a7565b805f92509250505b94509492505050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161490505f5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614905081801561341e5750805b15613455576040517f5cbd944100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156134735761346e613466611c3a565b858534613670565b6134a7565b80156134915761348c613484611c3a565b868534613676565b6134a6565b6134a561349c611c3a565b8686863461367c565b5b5b5050505050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161490505f5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614905081801561351c5750805b15613553576040517f5cbd944100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156135715761356c613564611c3a565b858534613768565b6135a5565b801561358f5761358a613582611c3a565b86853461376e565b6135a4565b6135a361359a611c3a565b86868634613774565b5b5b5050505050565b5f83838346306040516020016135c6959493929190615326565b6040516020818303038152906040528051906020012090509392505050565b5f5f8273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b50505050565b50505050565b5f613685610b49565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461375f578073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16036136f35750613761565b8073ffffffffffffffffffffffffffffffffffffffff1663caee23ea878787876040518563ffffffff1660e01b81526004016137329493929190615377565b5f6040518083038186803b158015613748575f5ffd5b505afa15801561375a573d5f5f3e3d5ffd5b505050505b505b5050505050565b50505050565b50505050565b5050505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6137a48261377b565b9050919050565b6137b48161379a565b82525050565b5f6020820190506137cd5f8301846137ab565b92915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613818816137e4565b8114613822575f5ffd5b50565b5f813590506138338161380f565b92915050565b5f6020828403121561384e5761384d6137dc565b5b5f61385b84828501613825565b91505092915050565b5f8115159050919050565b61387881613864565b82525050565b5f6020820190506138915f83018461386f565b92915050565b6138a08161379a565b81146138aa575f5ffd5b50565b5f813590506138bb81613897565b92915050565b5f6bffffffffffffffffffffffff82169050919050565b6138e1816138c1565b81146138eb575f5ffd5b50565b5f813590506138fc816138d8565b92915050565b5f5f60408385031215613918576139176137dc565b5b5f613925858286016138ad565b9250506020613936858286016138ee565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561397757808201518184015260208101905061395c565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61399c82613940565b6139a6818561394a565b93506139b681856020860161395a565b6139bf81613982565b840191505092915050565b5f6020820190508181035f8301526139e28184613992565b905092915050565b5f819050919050565b6139fc816139ea565b8114613a06575f5ffd5b50565b5f81359050613a17816139f3565b92915050565b5f60208284031215613a3257613a316137dc565b5b5f613a3f84828501613a09565b91505092915050565b5f5ffd5b5f60408284031215613a6157613a60613a48565b5b81905092915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f840112613a8b57613a8a613a6a565b5b8235905067ffffffffffffffff811115613aa857613aa7613a6e565b5b602083019150836001820283011115613ac457613ac3613a72565b5b9250929050565b5f5f5f60608486031215613ae257613ae16137dc565b5b5f613aef86828701613a4c565b935050604084013567ffffffffffffffff811115613b1057613b0f6137e0565b5b613b1c86828701613a76565b92509250509250925092565b5f5f60408385031215613b3e57613b3d6137dc565b5b5f613b4b858286016138ad565b9250506020613b5c85828601613a09565b9150509250929050565b613b6f816137e4565b82525050565b5f604082019050613b885f830185613b66565b613b95602083018461386f565b9392505050565b5f5f5f60608486031215613bb357613bb26137dc565b5b5f613bc0868287016138ad565b9350506020613bd1868287016138ad565b9250506040613be286828701613a09565b9150509250925092565b5f5f60408385031215613c0257613c016137dc565b5b5f613c0f85828601613a09565b9250506020613c2085828601613a09565b9150509250929050565b613c33816139ea565b82525050565b5f604082019050613c4c5f8301856137ab565b613c596020830184613c2a565b9392505050565b5f5f83601f840112613c7557613c74613a6a565b5b8235905067ffffffffffffffff811115613c9257613c91613a6e565b5b602083019150836040820283011115613cae57613cad613a72565b5b9250929050565b5f5f83601f840112613cca57613cc9613a6a565b5b8235905067ffffffffffffffff811115613ce757613ce6613a6e565b5b602083019150836020820283011115613d0357613d02613a72565b5b9250929050565b5f5f5f5f60408587031215613d2257613d216137dc565b5b5f85013567ffffffffffffffff811115613d3f57613d3e6137e0565b5b613d4b87828801613c60565b9450945050602085013567ffffffffffffffff811115613d6e57613d6d6137e0565b5b613d7a87828801613cb5565b925092505092959194509250565b5f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b613dc282613982565b810181811067ffffffffffffffff82111715613de157613de0613d8c565b5b80604052505050565b5f613df36137d3565b9050613dff8282613db9565b919050565b5f67ffffffffffffffff821115613e1e57613e1d613d8c565b5b613e2782613982565b9050602081019050919050565b828183375f83830152505050565b5f613e54613e4f84613e04565b613dea565b905082815260208101848484011115613e7057613e6f613d88565b5b613e7b848285613e34565b509392505050565b5f82601f830112613e9757613e96613a6a565b5b8135613ea7848260208601613e42565b91505092915050565b5f60208284031215613ec557613ec46137dc565b5b5f82013567ffffffffffffffff811115613ee257613ee16137e0565b5b613eee84828501613e83565b91505092915050565b5f5f5f60608486031215613f0e57613f0d6137dc565b5b5f613f1b86828701613a09565b9350506020613f2c868287016138ad565b9250506040613f3d868287016138ee565b9150509250925092565b5f60208284031215613f5c57613f5b6137dc565b5b5f613f69848285016138ad565b91505092915050565b5f602082019050613f855f830184613c2a565b92915050565b5f60408284031215613fa057613f9f6137dc565b5b5f613fad84828501613a4c565b91505092915050565b5f819050919050565b613fc881613fb6565b82525050565b5f602082019050613fe15f830184613fbf565b92915050565b613ff081613864565b8114613ffa575f5ffd5b50565b5f8135905061400b81613fe7565b92915050565b5f60208284031215614026576140256137dc565b5b5f61403384828501613ffd565b91505092915050565b5f5f60408385031215614052576140516137dc565b5b5f61405f858286016138ad565b925050602061407085828601613ffd565b9150509250929050565b5f67ffffffffffffffff82111561409457614093613d8c565b5b61409d82613982565b9050602081019050919050565b5f6140bc6140b78461407a565b613dea565b9050828152602081018484840111156140d8576140d7613d88565b5b6140e3848285613e34565b509392505050565b5f82601f8301126140ff576140fe613a6a565b5b813561410f8482602086016140aa565b91505092915050565b5f5f5f5f608085870312156141305761412f6137dc565b5b5f61413d878288016138ad565b945050602061414e878288016138ad565b935050604061415f87828801613a09565b925050606085013567ffffffffffffffff8111156141805761417f6137e0565b5b61418c878288016140eb565b91505092959194509250565b5f5f604083850312156141ae576141ad6137dc565b5b5f6141bb858286016138ad565b92505060206141cc858286016138ad565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061421a57607f821691505b60208210810361422d5761422c6141d6565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e655f8201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b5f61428d60218361394a565b915061429882614233565b604082019050919050565b5f6020820190508181035f8301526142ba81614281565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f5f8201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b5f61431b603d8361394a565b9150614326826142c1565b604082019050919050565b5f6020820190508181035f8301526143488161430f565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e655f8201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b5f6143a9602d8361394a565b91506143b48261434f565b604082019050919050565b5f6020820190508181035f8301526143d68161439d565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f614414826139ea565b915061441f836139ea565b925082820261442d816139ea565b91508282048414831517614444576144436143dd565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f614482826139ea565b915061448d836139ea565b92508261449d5761449c61444b565b5b828204905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f833560016020038436030381126144fd576144fc6144d5565b5b80840192508235915067ffffffffffffffff82111561451f5761451e6144d9565b5b60208301925060018202360383131561453b5761453a6144dd565b5b509250929050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261459f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614564565b6145a98683614564565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6145e46145df6145da846139ea565b6145c1565b6139ea565b9050919050565b5f819050919050565b6145fd836145ca565b614611614609826145eb565b848454614570565b825550505050565b5f5f905090565b614628614619565b6146338184846145f4565b505050565b5b818110156146565761464b5f82614620565b600181019050614639565b5050565b601f82111561469b5761466c81614543565b61467584614555565b81016020851015614684578190505b61469861469085614555565b830182614638565b50505b505050565b5f82821c905092915050565b5f6146bb5f19846008026146a0565b1980831691505092915050565b5f6146d383836146ac565b9150826002028217905092915050565b6146ec82613940565b67ffffffffffffffff81111561470557614704613d8c565b5b61470f8254614203565b61471a82828561465a565b5f60209050601f83116001811461474b575f8415614739578287015190505b61474385826146c8565b8655506147aa565b601f19841661475986614543565b5f5b828110156147805784890151825560018201915060208501945060208101905061475b565b8683101561479d5784890151614799601f8916826146ac565b8355505b6001600288020188555050505b505050505050565b7f4552433732313a20696e76616c696420746f6b656e20494400000000000000005f82015250565b5f6147e660188361394a565b91506147f1826147b2565b602082019050919050565b5f6020820190508181035f830152614813816147da565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f7420612076615f8201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b5f61487460298361394a565b915061487f8261481a565b604082019050919050565b5f6020820190508181035f8301526148a181614868565b9050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865205f8201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b5f61490260298361394a565b915061490d826148a8565b604082019050919050565b5f6020820190508181035f83015261492f816148f6565b9050919050565b5f6060820190506149495f830186613fbf565b61495660208301856137ab565b6149636040830184613c2a565b949350505050565b5f60408201905061497e5f8301856137ab565b61498b60208301846137ab565b9392505050565b5f81905092915050565b5f6149a682613940565b6149b08185614992565b93506149c081856020860161395a565b80840191505092915050565b5f81546149d881614203565b6149e28186614992565b9450600182165f81146149fc5760018114614a1157614a43565b60ff1983168652811515820286019350614a43565b614a1a85614543565b5f5b83811015614a3b57815481890152600182019150602081019050614a1c565b838801955050505b50505092915050565b5f614a57828661499c565b9150614a63828561499c565b9150614a6f82846149cc565b9150819050949350505050565b614a85816138c1565b82525050565b5f602082019050614a9e5f830184614a7c565b92915050565b7f4552433732313a206d696e7420746f20746865207a65726f20616464726573735f82015250565b5f614ad860208361394a565b9150614ae382614aa4565b602082019050919050565b5f6020820190508181035f830152614b0581614acc565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e746564000000005f82015250565b5f614b40601c8361394a565b9150614b4b82614b0c565b602082019050919050565b5f6020820190508181035f830152614b6d81614b34565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f7272656374205f8201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b5f614bce60258361394a565b9150614bd982614b74565b604082019050919050565b5f6020820190508181035f830152614bfb81614bc2565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f614c5c60248361394a565b9150614c6782614c02565b604082019050919050565b5f6020820190508181035f830152614c8981614c50565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f614cc460208361394a565b9150614ccf82614c90565b602082019050919050565b5f6020820190508181035f830152614cf181614cb8565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c6572000000000000005f82015250565b5f614d2c60198361394a565b9150614d3782614cf8565b602082019050919050565b5f6020820190508181035f830152614d5981614d20565b9050919050565b5f61ffff82169050919050565b614d7681614d60565b82525050565b5f604082019050614d8f5f8301856137ab565b614d9c6020830184614d6d565b9392505050565b7f4552433732313a207472616e7366657220746f206e6f6e2045524337323152655f8201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b5f614dfd60328361394a565b9150614e0882614da3565b604082019050919050565b5f6020820190508181035f830152614e2a81614df1565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c206578636565645f8201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b5f614e8b602a8361394a565b9150614e9682614e31565b604082019050919050565b5f6020820190508181035f830152614eb881614e7f565b9050919050565b7f455243323938313a20696e76616c6964207265636569766572000000000000005f82015250565b5f614ef360198361394a565b9150614efe82614ebf565b602082019050919050565b5f6020820190508181035f830152614f2081614ee7565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f45434453413a20696e76616c6964207369676e617475726500000000000000005f82015250565b5f614f8860188361394a565b9150614f9382614f54565b602082019050919050565b5f6020820190508181035f830152614fb581614f7c565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e677468005f82015250565b5f614ff0601f8361394a565b9150614ffb82614fbc565b602082019050919050565b5f6020820190508181035f83015261501d81614fe4565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c5f8201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b5f61507e60228361394a565b915061508982615024565b604082019050919050565b5f6020820190508181035f8301526150ab81615072565b9050919050565b5f6150bc826139ea565b91506150c7836139ea565b92508282019050808211156150df576150de6143dd565b5b92915050565b7f455243323938313a20496e76616c696420706172616d657465727300000000005f82015250565b5f615119601b8361394a565b9150615124826150e5565b602082019050919050565b5f6020820190508181035f8301526151468161510d565b9050919050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f615181600283614992565b915061518c8261514d565b600282019050919050565b5f819050919050565b6151b16151ac82613fb6565b615197565b82525050565b5f6151c182615175565b91506151cd82856151a0565b6020820191506151dd82846151a0565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f615211826151ed565b61521b81856151f7565b935061522b81856020860161395a565b61523481613982565b840191505092915050565b5f6080820190506152525f8301876137ab565b61525f60208301866137ab565b61526c6040830185613c2a565b818103606083015261527e8184615207565b905095945050505050565b5f815190506152978161380f565b92915050565b5f602082840312156152b2576152b16137dc565b5b5f6152bf84828501615289565b91505092915050565b5f60ff82169050919050565b6152dd816152c8565b82525050565b5f6080820190506152f65f830187613fbf565b61530360208301866152d4565b6153106040830185613fbf565b61531d6060830184613fbf565b95945050505050565b5f60a0820190506153395f830188613fbf565b6153466020830187613fbf565b6153536040830186613fbf565b6153606060830185613c2a565b61536d60808301846137ab565b9695505050505050565b5f60808201905061538a5f8301876137ab565b61539760208301866137ab565b6153a460408301856137ab565b6153b16060830184613c2a565b9594505050505056fea2646970667358221220206ed326b7b7b17bd9ce4eb628771ee0da9de547ba147302f23b93476895d15264736f6c634300081c0033

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

000000000000000000000000f3bddeb9a132ac2f56a0f024186247dbb9a67d2f00000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000b40ef71fe43e8aa1ea536e2c3ed93c9db8fb2059000000000000000000000000000000000000000000000000000000000000000857696c647061737300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025750000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : royaltyReceiver_ (address): 0xF3BdDeB9A132aC2f56A0f024186247DbB9A67d2f
Arg [1] : royaltyFeeNumerator_ (uint96): 750
Arg [2] : name_ (string): Wildpass
Arg [3] : symbol_ (string): WP
Arg [4] : expectedSigner_ (address): 0xB40ef71fe43E8Aa1ea536e2c3ed93c9db8fb2059

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000f3bddeb9a132ac2f56a0f024186247dbb9a67d2f
Arg [1] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [4] : 000000000000000000000000b40ef71fe43e8aa1ea536e2c3ed93c9db8fb2059
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [6] : 57696c6470617373000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [8] : 5750000000000000000000000000000000000000000000000000000000000000


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.