ETH Price: $3,906.28 (-0.21%)

Token

Cryptoville High Alumni (CHA)
 

Overview

Max Total Supply

10,000 CHA

Holders

1

Total Transfers

-

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
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:
CryptovilleHighAlumni

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 81 runs

Other Settings:
default evmVersion
File 1 of 15 : CryptovilleHighAlumni.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.13;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

import "./ProxyRegistry.sol";

error TokenOwnerQueryForInvalidToken();
error BalanceQueryForZeroAddress();
error ReservedTokenSupplyExhausted();
error SupplyInitRevealedTokensWhileInitUnrevealedMintingNotPaused();
error InitRevealedTokenSupplyExhausted();
error MintToZeroAddress();
error MintWithInvalidSignature();
error MintRevealedTokenDoesNotSupportReservedTokens();
error MintRevealedTokenInsufficientFund();
error MintRevealedTokenIdIsInvalid();
error MintRevealedTokenIsMinted();
error InitUnrevealedTokenMintingIsPaused();
error MintUnrevealedTokenInsufficientFund();
error MintUnrevealedTokenQuantityExceedsSupply();
error MintUnrevealedTokenQuantityIsProhibited();
error ApproveToTokenOwner();
error ApproveCallerIsNotOwnerNorApprovedForAll();
error ApprovedOperatorQueryForNonexistentToken();
error SetApprovalForAllTargetOperatorIsCaller();
error TransferInvalidToken();
error TransferFromIncorrectOwner();
error TransferFromZeroAddress();
error TransferToZeroAddress();
error TransferCallerIsNotOwnerNorApproved();
error TransferToNonERC721ReceiverImplementer();
error TokenUriQueryForNonexistentToken();
error WithdrawalFailed();

contract CryptovilleHighAlumni is
    ERC165,
    IERC721,
    IERC721Metadata,
    EIP712,
    Ownable
{
    using Strings for uint256;
    using Address for address;

    struct TokenOwnerData {
        uint64 balance;
        bool giveawayOfferClaimed;
    }

    /**
     * @dev Emitted when the state variable `nextRevealedTokenId` has been
     * updated to `newValue` from the old value `newValue` - `delta`.
     */
    event NextRevealedTokenIdChange(
        uint256 indexed newValue,
        uint256 indexed delta
    );

    /**
     * @dev Emitted when the state variable `nextInitUnrevealedTokenId` has
     * been updated to `newValue` from `oldValue`.
     */
    event NextInitUnrevealedTokenIdChange(
        uint256 indexed newValue,
        uint256 indexed oldValue
    );

    string private _name = "Cryptoville High Alumni";
    string private _symbol = "CHA";
    address private _proxyRegistryAddress;
    bool private _proxyRegistryEnabled = true;

    mapping(uint256 => address) private _ownerships;
    mapping(address => TokenOwnerData) private _owners;
    mapping(uint256 => address) private _tokenApprovals;
    mapping(address => mapping(address => bool)) private _operatorApprovals;
    mapping(address => bool) private _canSign;

    string private _metadataBaseUri;
    string private constant _unrevealedMetadataUri =
        "ipfs://bafkreigzl4khqp5v3g2ix4bnitmatsdd33goypayocmszlvlmruf4qepue";

    /** @dev Token IDs are seqential integers starting from `_startTokenId`. */
    uint256 private constant _startTokenId = 1;
    uint256 private constant _maxTotalSupply = 10000;
    uint256 private constant _numInitRevealed = 8000;
    uint256 private constant _lastReservedTokenId = 1000;

    uint256 private constant _revealedMintGiveawayQuantity = 1;
    uint256 private constant _maxInitUnrevealedBatchMintSize = 10;

    /** @dev Whether minting for initially unrevealed tokens is paused. */
    bool public initUnrevealedMintingPaused;
    uint256 private _nextReservedTokenId = 201;

    /**
     * @notice ID for the next initially unrevealed token to be minted.
     * @dev Only decrementable.
     * @dev _maxTotalSupply - nextInitUnrevealedTokenId
     *      = number of initially unrevealed tokens minted
     * @dev nextInitUnrevealedTokenId - nextRevealedTokenId + 1
     *      = number of initially unrevealed tokens that are mintable
     */
    uint256 public nextInitUnrevealedTokenId = _maxTotalSupply;

    /**
     * @notice ID for the next initially revealed token that can be made
     * available for sale.
     * @dev Only incrementable.
     * @dev nextRevealedTokenId - 1
     *      = maximum number of initially revealed tokens that can be in
     *        circulation
     * @dev nextInitUnrevealedTokenId - nextRevealedTokenId + 1
     *      = maximum number of initially revealed tokens that can be further
     *        supplied by the deployer/issuer
     */
    uint256 public nextRevealedTokenId = 8001;

    /**
     * @notice Initializes the contract for the NFT collection with limited
     * supply.
     */
    constructor(string memory baseUri, address proxyRegistryAddress)
        EIP712(_name, "1.0.0")
    {
        for (uint256 id = _startTokenId; id < _nextReservedTokenId; id++) {
            emit Transfer(address(0), owner(), id);
        }
        _owners[address(0)].balance += uint64(_nextReservedTokenId - 1);
        _canSign[owner()] = true;
        _metadataBaseUri = baseUri;
        _proxyRegistryAddress = proxyRegistryAddress;
    }

    /**
     * @notice Returns the maximum number of tokens that can be in circulation
     * at any time.
     */
    function totalSupply() public pure returns (uint256) {
        return _maxTotalSupply;
    }

    function setCanSign(address signer, bool allowed) public onlyOwner {
        _canSign[signer] = allowed;
    }

    function enableProxyRegistry(bool enabled) public onlyOwner {
        _proxyRegistryEnabled = enabled;
    }

    /**
     * @notice Enables/disables minting of initially unrevealed tokens.
     * @dev Must be disabled before supplying initially revealed tokens, which
     * automatically enables minting of initially unrevealed tokens when
     * the incremental supply of initially revealed tokens is completed.
     */
    function pauseInitUnrevealedTokenMinting(bool paused) public onlyOwner {
        initUnrevealedMintingPaused = paused;
    }

    /** @dev Use it to just check if `id` falls within the admissible range. */
    function _validTokenId(uint256 id) private pure returns (bool) {
        return _startTokenId <= id && id <= _maxTotalSupply;
    }

    function _initUnrevealedOwnerOf(uint256 tokenId)
        private
        view
        returns (address)
    {
        unchecked {
            address owner;
            uint256 currId = tokenId;
            for (uint256 i = 0; i < _maxInitUnrevealedBatchMintSize; i++) {
                owner = _ownerships[currId++];
                if (owner != address(0)) {
                    return owner;
                }
            }
        }
        revert TokenOwnerQueryForInvalidToken();
    }

    /**
     * @notice Returns the owner of the token identified by `tokenId` if it
     * maps to a token that has been revealed and in circulation (including
     * tokens that are initially unrevealed at deployment); reverts otherwise.
     * @dev Tokens that have an ID not exceeding `lastReservedTokenId` and are
     * still available for sale in the primary market are owned by the
     * deployer/issuer.
     * @dev Owner query for any invalid or unminted token ID reverts.
     */
    function ownerOf(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        if (tokenId != 0 && tokenId < nextRevealedTokenId) {
            address tokenOwner = _ownerships[tokenId];
            if (tokenOwner == address(0)) {
                if (tokenId < _nextReservedTokenId) {
                    return owner();
                }
                revert TokenOwnerQueryForInvalidToken();
            }
            return tokenOwner;
        }
        if (nextInitUnrevealedTokenId < tokenId && tokenId <= _maxTotalSupply) {
            return _initUnrevealedOwnerOf(tokenId);
        }
        revert TokenOwnerQueryForInvalidToken();
    }

    /**
     * @notice Returns the number of tokens owned by `tokenOwner`.
     * @dev `tokenOwner` must not be the zero address, for which any query
     * reverts.
     */
    function balanceOf(address tokenOwner)
        public
        view
        virtual
        override
        returns (uint256)
    {
        if (tokenOwner == address(0)) revert BalanceQueryForZeroAddress();
        uint64 balance = _owners[tokenOwner].balance;
        if (tokenOwner == owner()) {
            balance += _owners[address(0)].balance;
        }
        return uint256(balance);
    }

    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        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 TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @notice Makes the next `quantity` number of (initially revealed)
     * reserved tokens available for sale in the primary market.
     * @dev If `quantity` exceeds the total number of mintable reserved tokens
     * available, it would be decremented to align with such amount.
     * @dev `quantity==0` does not revert if supply has not been exhausted.
     */
    function mintReservedTokens(uint256 quantity) public onlyOwner {
        if (_nextReservedTokenId > _lastReservedTokenId) {
            revert ReservedTokenSupplyExhausted();
        }
        uint256 maxQuantity = _lastReservedTokenId + 1 - _nextReservedTokenId;
        if (quantity > maxQuantity) {
            quantity = maxQuantity;
        }

        uint256 newNextId = _nextReservedTokenId + quantity;
        address to = owner();
        for (uint256 id = _nextReservedTokenId; id < newNextId; id++) {
            emit Transfer(address(0), to, id);
        }
        _owners[address(0)].balance += uint64(quantity);
        _nextReservedTokenId = newNextId;
    }

    function _maxInitUnrevealedMintable() private view returns (uint256) {
        return nextInitUnrevealedTokenId + 1 - nextRevealedTokenId;
    }

    /**
     * @notice Provides an additional `quantity` number of initially revealed
     * tokens for sale in the primary market, hence decreasing the supply of
     * initially unrevealed tokens.
     * @dev Reverts if minting of initially unrevealed tokens is not paused
     * before executing the incremental supply.
     * @dev If `quantity` exceeds the total number of mintable tokens available,
     * it would be decremented to align with such amount.
     * @dev `quantity==0` does not revert if supply has not been exhausted.
     */
    function supplyInitRevealedTokens(uint256 quantity) public onlyOwner {
        if (!initUnrevealedMintingPaused) {
            revert SupplyInitRevealedTokensWhileInitUnrevealedMintingNotPaused();
        }
        uint256 maxQuantity = _maxInitUnrevealedMintable();
        if (quantity > maxQuantity) {
            quantity = maxQuantity;
        }
        nextRevealedTokenId += quantity;
        initUnrevealedMintingPaused = false;
        emit NextRevealedTokenIdChange(nextRevealedTokenId, quantity);
    }

    /**
     * @notice Returns `true` if the token identified by `tokenId` is initally
     * revealed and is available in the primary market at the moment of this
     * query.
     */
    function isInitRevealedAndInPrimaryMarket(uint256 tokenId)
        public
        view
        returns (bool)
    {
        return
            _ownerships[tokenId] == address(0) &&
            ((_lastReservedTokenId < tokenId &&
                tokenId < nextRevealedTokenId) ||
                (_startTokenId <= tokenId && tokenId < _nextReservedTokenId));
    }

    /**
     * @notice Mints the initially revealed token that is identified by
     * `tokenId` and transfers it to the address `to`. `tokenId` must be in
     * either of the ranges [`_startTokenId`, `_nextReservedTokenId` - 1] or
     * [`lastReservedTokenId` + 1, `nextRevealedTokenId` - 1]. A minting fee
     * of `minPrice` wei applies and is payable by the message sender.
     * A successful mint may receive the giveaway offer of at most
     * `_revealedMintGiveawayQuantity` number of initially unrevealed tokens
     * in limited time while supply lasts and on a first-come-first-served
     * basis. Each wallet address is eligible for this offer only once.
     * Minting by a contract is not eligible for this offer. Giveaway offers
     * cannot be fulfilled when minting for initially unrevealed tokens is
     * paused. To check the status, use `initUnrevealedMintingPaused`.
     */
    function mintRevealedToken(
        uint256 tokenId,
        uint256 minPrice,
        address to,
        bytes32 nonce,
        address signer,
        bytes calldata signature
    ) public payable {
        if (to != owner()) {
            if (msg.value < minPrice) {
                revert MintRevealedTokenInsufficientFund();
            }
            bytes32 digest = _hashTypedDataV4(
                keccak256(
                    abi.encode(
                        keccak256(
                            "Voucher(uint256 tokenId,uint256 minPrice,address to,bytes32 nonce)"
                        ),
                        tokenId,
                        minPrice,
                        to,
                        nonce
                    )
                )
            );
            if (
                !_canSign[signer] ||
                !SignatureChecker.isValidSignatureNow(signer, digest, signature)
            ) {
                revert MintWithInvalidSignature();
            }
        }
        _safeMintRevealed(to, tokenId, "");
    }

    function _safeMintRevealed(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private {
        if (tokenId < _startTokenId || tokenId >= nextRevealedTokenId) {
            revert MintRevealedTokenIdIsInvalid();
        }

        if (
            _nextReservedTokenId <= tokenId && tokenId <= _lastReservedTokenId
        ) {
            revert MintRevealedTokenDoesNotSupportReservedTokens();
        }

        if (_ownerships[tokenId] != address(0)) {
            revert MintRevealedTokenIsMinted();
        }

        if (to == address(0)) revert MintToZeroAddress();

        bool notExceedingLastReservedTokenId = tokenId <= _lastReservedTokenId;
        address from = notExceedingLastReservedTokenId ? owner() : address(0);

        _tokenApprovals[tokenId] = address(0);

        if (notExceedingLastReservedTokenId) {
            _owners[address(0)].balance -= 1;
        }
        _owners[to].balance += 1;
        _ownerships[tokenId] = to;

        emit Transfer(from, to, tokenId);

        if (
            to.isContract() && !_checkOnERC721Received(from, to, tokenId, _data)
        ) {
            revert TransferToNonERC721ReceiverImplementer();
        }

        _claimGiveawayOffer(to, _revealedMintGiveawayQuantity);
    }

    function _claimGiveawayOffer(address to, uint256 quantity) private {
        if (
            !initUnrevealedMintingPaused &&
            !to.isContract() &&
            !_owners[to].giveawayOfferClaimed &&
            nextInitUnrevealedTokenId >= nextRevealedTokenId
        ) {
            _safeMintUnrevealed(to, quantity, "");
            _owners[to].giveawayOfferClaimed = true;
        }
    }

    /**
     * @notice Mints `quantity` number of initially unrevealed tokens and
     * transfers all minted tokens to the address `to`, subject to a maximum
     * quantity of `_maxInitUnrevealedBatchMintSize` per transaction.
     * A miniting fee of `unitPrice` wei per token applies and is payable by
     * the message sender.
     * @dev `to` cannot be the zero address.
     * @dev `quantity` must be greater than 0 and no larger than
     * `_maxInitUnrevealedBatchMintSize`.
     * @dev Reverts if `quantity` exceeds the maximum possible supply of
     * initially unrevealed tokens. To check the number of initially unrevealed
     * tokens that are mintable, see `nextInitUnrevealedTokenId`.
     */
    function mintUnrevealedToken(
        uint256 quantity,
        uint256 unitPrice,
        address to,
        bytes32 nonce,
        address signer,
        bytes calldata signature
    ) public payable {
        if (
            nextInitUnrevealedTokenId < nextRevealedTokenId ||
            quantity > _maxInitUnrevealedMintable()
        ) {
            revert MintUnrevealedTokenQuantityExceedsSupply();
        }
        if (to != owner()) {
            if (msg.value < quantity * unitPrice) {
                revert MintUnrevealedTokenInsufficientFund();
            }
            bytes32 digest = _hashTypedDataV4(
                keccak256(
                    abi.encode(
                        keccak256(
                            "BatchVoucher(bytes32 nonce,uint256 quantity,address to,uint256 unitPrice)"
                        ),
                        nonce,
                        quantity,
                        to,
                        unitPrice
                    )
                )
            );
            if (
                !_canSign[signer] ||
                !SignatureChecker.isValidSignatureNow(signer, digest, signature)
            ) {
                revert MintWithInvalidSignature();
            }
        }
        _safeMintUnrevealed(to, quantity, "");
    }

    function withdraw() public onlyOwner {
        (bool sent, ) = payable(owner()).call{value: address(this).balance}("");
        if (!sent) revert WithdrawalFailed();
    }

    function _safeMintUnrevealed(
        address to,
        uint256 quantity,
        bytes memory _data
    ) private {
        if (initUnrevealedMintingPaused) {
            revert InitUnrevealedTokenMintingIsPaused();
        }

        if (quantity == 0 || quantity > _maxInitUnrevealedBatchMintSize) {
            revert MintUnrevealedTokenQuantityIsProhibited();
        }

        if (to == address(0)) revert MintToZeroAddress();

        uint256 maxQuantity = _maxInitUnrevealedMintable();
        if (quantity > maxQuantity) {
            quantity = maxQuantity;
        }

        uint256 firstTokenId = nextInitUnrevealedTokenId;
        unchecked {
            _owners[to].balance += uint64(quantity);
            _ownerships[firstTokenId] = to;

            uint256 currTokenId = firstTokenId;
            uint256 lastTokenId = currTokenId - quantity;
            if (to.isContract()) {
                do {
                    emit Transfer(address(0), to, currTokenId);
                    if (
                        !_checkOnERC721Received(
                            address(0),
                            to,
                            currTokenId--,
                            _data
                        )
                    ) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (currTokenId != lastTokenId);
                if (nextInitUnrevealedTokenId != firstTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, currTokenId--);
                } while (currTokenId != lastTokenId);
            }
            nextInitUnrevealedTokenId = currTokenId;
            emit NextInitUnrevealedTokenIdChange(currTokenId, firstTokenId);
        }
    }

    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ownerOf(tokenId);
        if (to == owner) revert ApproveToTokenOwner();

        if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
            revert ApproveCallerIsNotOwnerNorApprovedForAll();
        }

        _approve(to, tokenId, owner);
    }

    /** @dev See {IERC721-getApproved}. */
    function getApproved(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        if (!_validTokenId(tokenId)) {
            revert ApprovedOperatorQueryForNonexistentToken();
        }

        return _tokenApprovals[tokenId];
    }

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

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

    /** @dev See {IERC721-isApprovedForAll}. */
    function isApprovedForAll(address owner, address operator)
        public
        view
        virtual
        override
        returns (bool)
    {
        if (_proxyRegistryEnabled) {
            ProxyRegistry proxyRegistry = ProxyRegistry(_proxyRegistryAddress);
            if (address(proxyRegistry.proxies(owner)) == operator) {
                return true;
            }
        }
        return _operatorApprovals[owner][operator];
    }

    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        if (
            _msgSender() != from &&
            !isApprovedForAll(from, _msgSender()) &&
            getApproved(tokenId) != _msgSender()
        ) revert TransferCallerIsNotOwnerNorApproved();

        if (
            from == owner() &&
            _ownerships[tokenId] == address(0) &&
            tokenId < _nextReservedTokenId
        ) {
            return _safeMintRevealed(to, tokenId, "");
        }

        if (!_validTokenId(tokenId)) revert TransferInvalidToken();

        if (from == address(0)) revert TransferFromZeroAddress();

        address prevOwner = tokenId <= nextInitUnrevealedTokenId
            ? _ownerships[tokenId]
            : _initUnrevealedOwnerOf(tokenId);
        if (prevOwner != from) revert TransferFromIncorrectOwner();

        if (to == address(0)) revert TransferToZeroAddress();

        _approve(address(0), tokenId, from);

        unchecked {
            _owners[from].balance -= 1;
            _owners[to].balance += 1;
            _ownerships[tokenId] = to;

            if (tokenId > nextInitUnrevealedTokenId) {
                uint256 prevTokenId = tokenId - 1;
                if (
                    prevTokenId > nextInitUnrevealedTokenId &&
                    _ownerships[prevTokenId] == address(0)
                ) {
                    _ownerships[prevTokenId] = from;
                }
            }
        }
        emit Transfer(from, to, tokenId);
    }

    /** @dev See {IERC721-transferFrom}. */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _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 {
        _transfer(from, to, tokenId);
        if (
            to.isContract() && !_checkOnERC721Received(from, to, tokenId, _data)
        ) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /** @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)
    {
        if (!_validTokenId(tokenId)) {
            revert TokenUriQueryForNonexistentToken();
        }

        if (
            tokenId < nextRevealedTokenId || tokenId > nextInitUnrevealedTokenId
        ) {
            string memory baseURI = _metadataBaseUri;
            return
                bytes(baseURI).length != 0
                    ? string(abi.encodePacked(baseURI, tokenId.toString()))
                    : "";
        }
        return _unrevealedMetadataUri;
    }

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 3 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 6 of 15 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-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);
    }
}

File 7 of 15 : SignatureChecker.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/SignatureChecker.sol)

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 10 of 15 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @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] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 12 of 15 : ProxyRegistry.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.13;

contract OwnableDelegateProxy {}

contract ProxyRegistry {
    mapping(address => OwnableDelegateProxy) public proxies;
}

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

pragma solidity ^0.8.0;

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

File 14 of 15 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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
    }

    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");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' 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) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        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.
            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 if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } 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 (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"baseUri","type":"string"},{"internalType":"address","name":"proxyRegistryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApproveCallerIsNotOwnerNorApprovedForAll","type":"error"},{"inputs":[],"name":"ApproveToTokenOwner","type":"error"},{"inputs":[],"name":"ApprovedOperatorQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InitUnrevealedTokenMintingIsPaused","type":"error"},{"inputs":[],"name":"MintRevealedTokenDoesNotSupportReservedTokens","type":"error"},{"inputs":[],"name":"MintRevealedTokenIdIsInvalid","type":"error"},{"inputs":[],"name":"MintRevealedTokenInsufficientFund","type":"error"},{"inputs":[],"name":"MintRevealedTokenIsMinted","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintUnrevealedTokenInsufficientFund","type":"error"},{"inputs":[],"name":"MintUnrevealedTokenQuantityExceedsSupply","type":"error"},{"inputs":[],"name":"MintUnrevealedTokenQuantityIsProhibited","type":"error"},{"inputs":[],"name":"MintWithInvalidSignature","type":"error"},{"inputs":[],"name":"ReservedTokenSupplyExhausted","type":"error"},{"inputs":[],"name":"SetApprovalForAllTargetOperatorIsCaller","type":"error"},{"inputs":[],"name":"SupplyInitRevealedTokensWhileInitUnrevealedMintingNotPaused","type":"error"},{"inputs":[],"name":"TokenOwnerQueryForInvalidToken","type":"error"},{"inputs":[],"name":"TokenUriQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerIsNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferFromZeroAddress","type":"error"},{"inputs":[],"name":"TransferInvalidToken","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"WithdrawalFailed","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":true,"internalType":"uint256","name":"newValue","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"oldValue","type":"uint256"}],"name":"NextInitUnrevealedTokenIdChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"newValue","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"delta","type":"uint256"}],"name":"NextRevealedTokenIdChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenOwner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"enableProxyRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initUnrevealedMintingPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isInitRevealedAndInPrimaryMarket","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintReservedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPrice","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintRevealedToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"unitPrice","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintUnrevealedToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextInitUnrevealedTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextRevealedTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"bool","name":"paused","type":"bool"}],"name":"pauseInitUnrevealedTokenMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"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":"address","name":"signer","type":"address"},{"internalType":"bool","name":"allowed","type":"bool"}],"name":"setCanSign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"supplyInitRevealedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","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"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

61018060405260176101408190527f43727970746f76696c6c65204869676820416c756d6e69000000000000000000610160908152620000439160019190620003f3565b506040805180820190915260038082526243484160e81b60209092019182526200007091600291620003f3565b506003805460ff60a01b1916600160a01b17905560c9600b55612710600c55611f41600d55348015620000a257600080fd5b5060405162002f5b38038062002f5b833981016040819052620000c591620004cc565b60018054620000d490620005bd565b80601f01602080910402602001604051908101604052809291908181526020018280546200010290620005bd565b8015620001535780601f10620001275761010080835404028352916020019162000153565b820191906000526020600020905b8154815290600101906020018083116200013557829003601f168201915b505060408051808201825260058152640312e302e360dc1b60209182015285519581019590952060e08190527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c6101008190524660a081815284517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818b01819052818701959095526060810193909352608080840192909252308382018190528551808503909201825260c09384019095528051980197909720909652945250505061012052620002253362000394565b60015b600b548110156200029c5780620002476000546001600160a01b031690565b6001600160a01b031660006001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a48062000293816200060f565b91505062000228565b506001600b54620002ae91906200062b565b600080805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc8054909190620002f49084906001600160401b031662000645565b92506101000a8154816001600160401b0302191690836001600160401b031602179055506001600860006200032e620003e460201b60201c565b6001600160a01b03168152602080820192909252604001600020805460ff19169215159290921790915582516200036c9160099190850190620003f3565b50600380546001600160a01b0319166001600160a01b03929092169190911790555062000673565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b031690565b8280546200040190620005bd565b90600052602060002090601f01602090048101928262000425576000855562000470565b82601f106200044057805160ff191683800117855562000470565b8280016001018555821562000470579182015b828111156200047057825182559160200191906001019062000453565b506200047e92915062000482565b5090565b5b808211156200047e576000815560010162000483565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620004c757600080fd5b919050565b60008060408385031215620004e057600080fd5b82516001600160401b0380821115620004f857600080fd5b818501915085601f8301126200050d57600080fd5b81518181111562000522576200052262000499565b604051601f8201601f19908116603f011681019083821181831017156200054d576200054d62000499565b816040528281526020935088848487010111156200056a57600080fd5b600091505b828210156200058e57848201840151818301850152908301906200056f565b82821115620005a05760008484830101525b9550620005b2915050858201620004af565b925050509250929050565b600181811c90821680620005d257607f821691505b602082108103620005f357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600060018201620006245762000624620005f9565b5060010190565b600082821015620006405762000640620005f9565b500390565b60006001600160401b038281168482168083038211156200066a576200066a620005f9565b01949350505050565b60805160a05160c05160e0516101005161012051612898620006c36000396000611eca01526000611f1901526000611ef401526000611e4d01526000611e7701526000611ea101526128986000f3fe6080604052600436106101825760003560e01c80638b918b55116100d7578063affecb9b11610085578063affecb9b14610401578063b88d4fde14610421578063bb36ad2214610441578063c87b56dd14610457578063e985e9c514610477578063f08a577814610497578063f2fde38b146104b7578063f8c47def146104d757600080fd5b80638b918b551461034e5780638da5cb5b1461036457806391a3f79b1461037957806395d89b411461039957806398c36b0e146103ae578063a22cb465146103ce578063acdad240146103ee57600080fd5b806342842e0e1161013457806342842e0e1461028c5780635c4691f6146102ac5780636352211e146102c65780636ad9f708146102e657806370a08231146102f9578063715018a6146103195780637d5cb4e51461032e57600080fd5b806301ffc9a71461018757806306fdde03146101bc578063081812fc146101de578063095ea7b31461021657806318160ddd1461023857806323b872dd146102575780633ccfd60b14610277575b600080fd5b34801561019357600080fd5b506101a76101a23660046121b2565b6104f7565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506101d1610549565b6040516101b39190612227565b3480156101ea57600080fd5b506101fe6101f936600461223a565b6105db565b6040516001600160a01b0390911681526020016101b3565b34801561022257600080fd5b50610236610231366004612268565b61061f565b005b34801561024457600080fd5b506127105b6040519081526020016101b3565b34801561026357600080fd5b50610236610272366004612294565b6106ac565b34801561028357600080fd5b506102366106b7565b34801561029857600080fd5b506102366102a7366004612294565b61076d565b3480156102b857600080fd5b50600a546101a79060ff1681565b3480156102d257600080fd5b506101fe6102e136600461223a565b610788565b6102366102f43660046122d5565b61080f565b34801561030557600080fd5b50610249610314366004612389565b610955565b34801561032557600080fd5b506102366109fe565b34801561033a57600080fd5b5061023661034936600461223a565b610a39565b34801561035a57600080fd5b50610249600c5481565b34801561037057600080fd5b506101fe610b7f565b34801561038557600080fd5b506102366103943660046123bb565b610b8e565b3480156103a557600080fd5b506101d1610bd0565b3480156103ba57600080fd5b506102366103c936600461223a565b610bdf565b3480156103da57600080fd5b506102366103e93660046123d6565b610c9d565b6102366103fc3660046122d5565b610d32565b34801561040d57600080fd5b5061023661041c3660046123d6565b610e93565b34801561042d57600080fd5b5061023661043c366004612421565b610eed565b34801561044d57600080fd5b50610249600d5481565b34801561046357600080fd5b506101d161047236600461223a565b610f43565b34801561048357600080fd5b506101a7610492366004612500565b61107e565b3480156104a357600080fd5b506101a76104b236600461223a565b61114f565b3480156104c357600080fd5b506102366104d2366004612389565b61119b565b3480156104e357600080fd5b506102366104f23660046123bb565b611238565b60006001600160e01b031982166380ac58cd60e01b148061052857506001600160e01b03198216635b5e139f60e01b145b8061054357506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606001805461055890612539565b80601f016020809104026020016040519081016040528092919081815260200182805461058490612539565b80156105d15780601f106105a6576101008083540402835291602001916105d1565b820191906000526020600020905b8154815290600101906020018083116105b457829003601f168201915b5050505050905090565b60006105e682611285565b61060357604051637cbaa69d60e01b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061062a82610788565b9050806001600160a01b0316836001600160a01b03160361065e57604051631e74e1a760e21b815260040160405180910390fd5b336001600160a01b0382161480159061067e575061067c813361107e565b155b1561069c57604051630228cb8560e51b815260040160405180910390fd5b6106a783838361129c565b505050565b6106a78383836112f8565b336106c0610b7f565b6001600160a01b0316146106ef5760405162461bcd60e51b81526004016106e690612573565b60405180910390fd5b60006106f9610b7f565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114610743576040519150601f19603f3d011682016040523d82523d6000602084013e610748565b606091505b505090508061076a576040516327fcd9d160e01b815260040160405180910390fd5b50565b6106a783838360405180602001604052806000815250610eed565b6000811580159061079a5750600d5482105b156107ee576000828152600460205260409020546001600160a01b03168061054357600b548310156107d5576107ce610b7f565b9392505050565b6040516339b8395160e21b815260040160405180910390fd5b81600c5410801561080157506127108211155b156107d557610543826115b5565b610817610b7f565b6001600160a01b0316856001600160a01b0316146109325785341015610850576040516317afe20f60e21b815260040160405180910390fd5b60006108a97fc53bc3fc5e0d43c98b6b0096eaaaadeefb2a06390b83e2f99f08e607fd32b2668989898960405160200161088e9594939291906125a8565b60405160208183030381529060405280519060200120611617565b6001600160a01b03851660009081526008602052604090205490915060ff1615806109125750610910848285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061166592505050565b155b156109305760405163f07cb63760e01b815260040160405180910390fd5b505b61094c8588604051806020016040528060008152506117b1565b50505050505050565b60006001600160a01b03821661097e576040516323d3ad8160e21b815260040160405180910390fd5b6001600160a01b0382166000908152600560205260409020546001600160401b03166109a8610b7f565b6001600160a01b0316836001600160a01b0316036109ef57600080526005602052600080516020612843833981519152546109ec906001600160401b0316826125ea565b90505b6001600160401b031692915050565b33610a07610b7f565b6001600160a01b031614610a2d5760405162461bcd60e51b81526004016106e690612573565b610a3760006119f8565b565b33610a42610b7f565b6001600160a01b031614610a685760405162461bcd60e51b81526004016106e690612573565b6103e8600b541115610a8d576040516307eb191160e11b815260040160405180910390fd5b600b54600090610aa06103e86001612615565b610aaa919061262d565b905080821115610ab8578091505b600082600b54610ac89190612615565b90506000610ad4610b7f565b600b549091505b82811015610b1b5760405181906001600160a01b03841690600090600080516020612823833981519152908290a480610b1381612644565b915050610adb565b50600080805260056020526000805160206128438339815191528054869290610b4e9084906001600160401b03166125ea565b92506101000a8154816001600160401b0302191690836001600160401b0316021790555081600b8190555050505050565b6000546001600160a01b031690565b33610b97610b7f565b6001600160a01b031614610bbd5760405162461bcd60e51b81526004016106e690612573565b600a805460ff1916911515919091179055565b60606002805461055890612539565b33610be8610b7f565b6001600160a01b031614610c0e5760405162461bcd60e51b81526004016106e690612573565b600a5460ff16610c315760405163028f351d60e01b815260040160405180910390fd5b6000610c3b611a48565b905080821115610c49578091505b81600d6000828254610c5b9190612615565b9091555050600a805460ff19169055600d546040518391907fe4aad838b19c668bce60cdbaf569fa2c7f2f36b178e8b74425139ffc028df6d290600090a35050565b6001600160a01b0382163303610cc65760405163010ec78b60e31b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d54600c541080610d4a5750610d47611a48565b87115b15610d6857604051636212837560e01b815260040160405180910390fd5b610d70610b7f565b6001600160a01b0316856001600160a01b031614610e7957610d92868861265d565b341015610db257604051632f3520d560e01b815260040160405180910390fd5b6000610df07f05f355c67db7d9e99d3c62928053e3abbff13a26753970e0cda326e23a29a22c868a898b60405160200161088e9594939291906125a8565b6001600160a01b03851660009081526008602052604090205490915060ff161580610e595750610e57848285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061166592505050565b155b15610e775760405163f07cb63760e01b815260040160405180910390fd5b505b61094c858860405180602001604052806000815250611a6b565b33610e9c610b7f565b6001600160a01b031614610ec25760405162461bcd60e51b81526004016106e690612573565b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b610ef88484846112f8565b610f0a836001600160a01b0316611c45565b8015610f1f5750610f1d84848484611c54565b155b15610f3d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060610f4e82611285565b610f6b576040516355d578d560e01b815260040160405180910390fd5b600d54821080610f7c5750600c5482115b1561105f57600060098054610f9090612539565b80601f0160208091040260200160405190810160405280929190818152602001828054610fbc90612539565b80156110095780601f10610fde57610100808354040283529160200191611009565b820191906000526020600020905b815481529060010190602001808311610fec57829003601f168201915b50505050509050805160000361102e57604051806020016040528060008152506107ce565b8061103884611d40565b60405160200161104992919061267c565b6040516020818303038152906040529392505050565b6040518060800160405280604281526020016127e16042913992915050565b600354600090600160a01b900460ff16156111205760035460405163c455279160e01b81526001600160a01b03858116600483015291821691841690829063c455279190602401602060405180830381865afa1580156110e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110691906126a2565b6001600160a01b03160361111e576001915050610543565b505b506001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6000818152600460205260408120546001600160a01b03161580156105435750816103e81080156111815750600d5482105b80610543575081600111158015610543575050600b541190565b336111a4610b7f565b6001600160a01b0316146111ca5760405162461bcd60e51b81526004016106e690612573565b6001600160a01b03811661122f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e6565b61076a816119f8565b33611241610b7f565b6001600160a01b0316146112675760405162461bcd60e51b81526004016106e690612573565b60038054911515600160a01b0260ff60a01b19909216919091179055565b600081600111158015610543575050612710101590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b336001600160a01b038416148015906113185750611316833361107e565b155b8015611335575033611329826105db565b6001600160a01b031614155b15611353576040516330af938560e01b815260040160405180910390fd5b61135b610b7f565b6001600160a01b0316836001600160a01b031614801561139057506000818152600460205260409020546001600160a01b0316155b801561139d5750600b5481105b156113bc576106a78282604051806020016040528060008152506117b1565b6113c581611285565b6113e2576040516306851e9160e31b815260040160405180910390fd5b6001600160a01b03831661140957604051630b07e54560e11b815260040160405180910390fd5b6000600c548211156114235761141e826115b5565b61143c565b6000828152600460205260409020546001600160a01b03165b9050836001600160a01b0316816001600160a01b03161461146f5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b03831661149657604051633a954ecd60e21b815260040160405180910390fd5b6114a26000838661129c565b6001600160a01b038481166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b03928316600019018316179092559488168085528285208054928316928716600101909616919091179094558583526004909152902080546001600160a01b0319169091179055600c5482111561158057600c546000198301908111801561155157506000818152600460205260409020546001600160a01b0316155b1561157e57600081815260046020526040902080546001600160a01b0319166001600160a01b0387161790555b505b81836001600160a01b0316856001600160a01b031660008051602061282383398151915260405160405180910390a450505050565b60008082815b600a8110156115fb576000828152600460205260409020546001600160a01b0316925060019091019082156115f35750909392505050565b6001016115bb565b5050506040516339b8395160e21b815260040160405180910390fd5b6000610543611624611e40565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006116748585611f67565b9092509050600081600481111561168d5761168d6126bf565b1480156116ab5750856001600160a01b0316826001600160a01b0316145b156116bb576001925050506107ce565b600080876001600160a01b0316631626ba7e60e01b88886040516024016116e39291906126d5565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161172191906126ee565b600060405180830381855afa9150503d806000811461175c576040519150601f19603f3d011682016040523d82523d6000602084013e611761565b606091505b5091509150818015611774575080516020145b80156117a557508051630b135d3f60e11b90611799908301602090810190840161270a565b6001600160e01b031916145b98975050505050505050565b60018210806117c25750600d548210155b156117e057604051633e8aaa2360e11b815260040160405180910390fd5b81600b54111580156117f457506103e88211155b1561181257604051633700369d60e01b815260040160405180910390fd5b6000828152600460205260409020546001600160a01b03161561184857604051633e7312f160e11b815260040160405180910390fd5b6001600160a01b03831661186e57604051622e076360e81b815260040160405180910390fd5b6103e882111560008161188257600061188a565b61188a610b7f565b600085815260066020526040902080546001600160a01b03191690559050811561190657600080805260056020526000805160206128438339815191528054600192906118e19084906001600160401b0316612727565b92506101000a8154816001600160401b0302191690836001600160401b031602179055505b6001600160a01b03851660009081526005602052604081208054600192906119389084906001600160401b03166125ea565b82546001600160401b039182166101009390930a92830291909202199091161790555060008481526004602052604080822080546001600160a01b03808a166001600160a01b03199092168217909255915187939185169160008051602061282383398151915291a46119b3856001600160a01b0316611c45565b80156119c857506119c681868686611c54565b155b156119e6576040516368d2bf6b60e11b815260040160405180910390fd5b6119f1856001611fd5565b5050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000600d54600c546001611a5c9190612615565b611a66919061262d565b905090565b600a5460ff1615611a8f576040516308a0c94360e01b815260040160405180910390fd5b811580611a9c5750600a82115b15611aba576040516303db427360e41b815260040160405180910390fd5b6001600160a01b038316611ae057604051622e076360e81b815260040160405180910390fd5b6000611aea611a48565b905080831115611af8578092505b600c546001600160a01b038516600081815260056020908152604080832080546001600160401b038082168b011667ffffffffffffffff199091161790558483526004909152902080546001600160a01b03191682179055819085820390611b5f90611c45565b15611bd6575b60405182906001600160a01b03891690600090600080516020612823833981519152908290a4611b9f600088848060019003955088611c54565b611bbc576040516368d2bf6b60e11b815260040160405180910390fd5b808203611b655782600c5414611bd157600080fd5b611c0a565b5b604051600019830192906001600160a01b03891690600090600080516020612823833981519152908290a4808203611bd7575b600c829055604051839083907faa49764afd52001fe92c35c53d7ec453ba53005d1349e35c035edacd98ef3ed390600090a350505050505050565b6001600160a01b03163b151590565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611c8990339089908890889060040161274f565b6020604051808303816000875af1925050508015611cc4575060408051601f3d908101601f19168201909252611cc19181019061270a565b60015b611d22573d808015611cf2576040519150601f19603f3d011682016040523d82523d6000602084013e611cf7565b606091505b508051600003611d1a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606081600003611d675750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611d915780611d7b81612644565b9150611d8a9050600a836127a2565b9150611d6b565b6000816001600160401b03811115611dab57611dab61240b565b6040519080825280601f01601f191660200182016040528015611dd5576020820181803683370190505b5090505b8415611d3857611dea60018361262d565b9150611df7600a866127b6565b611e02906030612615565b60f81b818381518110611e1757611e176127ca565b60200101906001600160f81b031916908160001a905350611e39600a866127a2565b9450611dd9565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611e9957507f000000000000000000000000000000000000000000000000000000000000000046145b15611ec357507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000808251604103611f9d5760208301516040840151606085015160001a611f9187828585612080565b94509450505050611fce565b8251604003611fc65760208301516040840151611fbb868383612163565b935093505050611fce565b506000905060025b9250929050565b600a5460ff16158015611ff75750611ff5826001600160a01b0316611c45565b155b801561202357506001600160a01b038216600090815260056020526040902054600160401b900460ff16155b80156120335750600d54600c5410155b1561207c57612052828260405180602001604052806000815250611a6b565b6001600160a01b0382166000908152600560205260409020805460ff60401b1916600160401b1790555b5050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156120ad575060009050600361215a565b8460ff16601b141580156120c557508460ff16601c14155b156120d6575060009050600461215a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561212a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166121535760006001925092505061215a565b9150600090505b94509492505050565b6000806001600160ff1b0383168161218060ff86901c601b612615565b905061218e87828885612080565b935093505050935093915050565b6001600160e01b03198116811461076a57600080fd5b6000602082840312156121c457600080fd5b81356107ce8161219c565b60005b838110156121ea5781810151838201526020016121d2565b83811115610f3d5750506000910152565b600081518084526122138160208601602086016121cf565b601f01601f19169290920160200192915050565b6020815260006107ce60208301846121fb565b60006020828403121561224c57600080fd5b5035919050565b6001600160a01b038116811461076a57600080fd5b6000806040838503121561227b57600080fd5b823561228681612253565b946020939093013593505050565b6000806000606084860312156122a957600080fd5b83356122b481612253565b925060208401356122c481612253565b929592945050506040919091013590565b600080600080600080600060c0888a0312156122f057600080fd5b8735965060208801359550604088013561230981612253565b945060608801359350608088013561232081612253565b925060a08801356001600160401b038082111561233c57600080fd5b818a0191508a601f83011261235057600080fd5b81358181111561235f57600080fd5b8b602082850101111561237157600080fd5b60208301945080935050505092959891949750929550565b60006020828403121561239b57600080fd5b81356107ce81612253565b803580151581146123b657600080fd5b919050565b6000602082840312156123cd57600080fd5b6107ce826123a6565b600080604083850312156123e957600080fd5b82356123f481612253565b9150612402602084016123a6565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561243757600080fd5b843561244281612253565b9350602085013561245281612253565b92506040850135915060608501356001600160401b038082111561247557600080fd5b818701915087601f83011261248957600080fd5b81358181111561249b5761249b61240b565b604051601f8201601f19908116603f011681019083821181831017156124c3576124c361240b565b816040528281528a60208487010111156124dc57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561251357600080fd5b823561251e81612253565b9150602083013561252e81612253565b809150509250929050565b600181811c9082168061254d57607f821691505b60208210810361256d57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b948552602085019390935260408401919091526001600160a01b03166060830152608082015260a00190565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681851680830382111561260c5761260c6125d4565b01949350505050565b60008219821115612628576126286125d4565b500190565b60008282101561263f5761263f6125d4565b500390565b600060018201612656576126566125d4565b5060010190565b6000816000190483118215151615612677576126776125d4565b500290565b6000835161268e8184602088016121cf565b83519083019061260c8183602088016121cf565b6000602082840312156126b457600080fd5b81516107ce81612253565b634e487b7160e01b600052602160045260246000fd5b828152604060208201526000611d3860408301846121fb565b600082516127008184602087016121cf565b9190910192915050565b60006020828403121561271c57600080fd5b81516107ce8161219c565b60006001600160401b0383811690831681811015612747576127476125d4565b039392505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612782908301846121fb565b9695505050505050565b634e487b7160e01b600052601260045260246000fd5b6000826127b1576127b161278c565b500490565b6000826127c5576127c561278c565b500690565b634e487b7160e01b600052603260045260246000fdfe697066733a2f2f6261666b726569677a6c346b6871703576336732697834626e69746d61747364643333676f797061796f636d737a6c766c6d727566347165707565ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bca26469706673582212209f7b0a08342d24939f5c7850e59a624d34368d14740b0d987ee32d7b6691a4aa64736f6c634300080d00330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000000000000000000000000000000000000000000043697066733a2f2f62616679626569657265663672746e65783236356a3275667466727968376f6a36626f77636f68336d71797937756273686962337a32787379686d2f0000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101825760003560e01c80638b918b55116100d7578063affecb9b11610085578063affecb9b14610401578063b88d4fde14610421578063bb36ad2214610441578063c87b56dd14610457578063e985e9c514610477578063f08a577814610497578063f2fde38b146104b7578063f8c47def146104d757600080fd5b80638b918b551461034e5780638da5cb5b1461036457806391a3f79b1461037957806395d89b411461039957806398c36b0e146103ae578063a22cb465146103ce578063acdad240146103ee57600080fd5b806342842e0e1161013457806342842e0e1461028c5780635c4691f6146102ac5780636352211e146102c65780636ad9f708146102e657806370a08231146102f9578063715018a6146103195780637d5cb4e51461032e57600080fd5b806301ffc9a71461018757806306fdde03146101bc578063081812fc146101de578063095ea7b31461021657806318160ddd1461023857806323b872dd146102575780633ccfd60b14610277575b600080fd5b34801561019357600080fd5b506101a76101a23660046121b2565b6104f7565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506101d1610549565b6040516101b39190612227565b3480156101ea57600080fd5b506101fe6101f936600461223a565b6105db565b6040516001600160a01b0390911681526020016101b3565b34801561022257600080fd5b50610236610231366004612268565b61061f565b005b34801561024457600080fd5b506127105b6040519081526020016101b3565b34801561026357600080fd5b50610236610272366004612294565b6106ac565b34801561028357600080fd5b506102366106b7565b34801561029857600080fd5b506102366102a7366004612294565b61076d565b3480156102b857600080fd5b50600a546101a79060ff1681565b3480156102d257600080fd5b506101fe6102e136600461223a565b610788565b6102366102f43660046122d5565b61080f565b34801561030557600080fd5b50610249610314366004612389565b610955565b34801561032557600080fd5b506102366109fe565b34801561033a57600080fd5b5061023661034936600461223a565b610a39565b34801561035a57600080fd5b50610249600c5481565b34801561037057600080fd5b506101fe610b7f565b34801561038557600080fd5b506102366103943660046123bb565b610b8e565b3480156103a557600080fd5b506101d1610bd0565b3480156103ba57600080fd5b506102366103c936600461223a565b610bdf565b3480156103da57600080fd5b506102366103e93660046123d6565b610c9d565b6102366103fc3660046122d5565b610d32565b34801561040d57600080fd5b5061023661041c3660046123d6565b610e93565b34801561042d57600080fd5b5061023661043c366004612421565b610eed565b34801561044d57600080fd5b50610249600d5481565b34801561046357600080fd5b506101d161047236600461223a565b610f43565b34801561048357600080fd5b506101a7610492366004612500565b61107e565b3480156104a357600080fd5b506101a76104b236600461223a565b61114f565b3480156104c357600080fd5b506102366104d2366004612389565b61119b565b3480156104e357600080fd5b506102366104f23660046123bb565b611238565b60006001600160e01b031982166380ac58cd60e01b148061052857506001600160e01b03198216635b5e139f60e01b145b8061054357506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606001805461055890612539565b80601f016020809104026020016040519081016040528092919081815260200182805461058490612539565b80156105d15780601f106105a6576101008083540402835291602001916105d1565b820191906000526020600020905b8154815290600101906020018083116105b457829003601f168201915b5050505050905090565b60006105e682611285565b61060357604051637cbaa69d60e01b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061062a82610788565b9050806001600160a01b0316836001600160a01b03160361065e57604051631e74e1a760e21b815260040160405180910390fd5b336001600160a01b0382161480159061067e575061067c813361107e565b155b1561069c57604051630228cb8560e51b815260040160405180910390fd5b6106a783838361129c565b505050565b6106a78383836112f8565b336106c0610b7f565b6001600160a01b0316146106ef5760405162461bcd60e51b81526004016106e690612573565b60405180910390fd5b60006106f9610b7f565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114610743576040519150601f19603f3d011682016040523d82523d6000602084013e610748565b606091505b505090508061076a576040516327fcd9d160e01b815260040160405180910390fd5b50565b6106a783838360405180602001604052806000815250610eed565b6000811580159061079a5750600d5482105b156107ee576000828152600460205260409020546001600160a01b03168061054357600b548310156107d5576107ce610b7f565b9392505050565b6040516339b8395160e21b815260040160405180910390fd5b81600c5410801561080157506127108211155b156107d557610543826115b5565b610817610b7f565b6001600160a01b0316856001600160a01b0316146109325785341015610850576040516317afe20f60e21b815260040160405180910390fd5b60006108a97fc53bc3fc5e0d43c98b6b0096eaaaadeefb2a06390b83e2f99f08e607fd32b2668989898960405160200161088e9594939291906125a8565b60405160208183030381529060405280519060200120611617565b6001600160a01b03851660009081526008602052604090205490915060ff1615806109125750610910848285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061166592505050565b155b156109305760405163f07cb63760e01b815260040160405180910390fd5b505b61094c8588604051806020016040528060008152506117b1565b50505050505050565b60006001600160a01b03821661097e576040516323d3ad8160e21b815260040160405180910390fd5b6001600160a01b0382166000908152600560205260409020546001600160401b03166109a8610b7f565b6001600160a01b0316836001600160a01b0316036109ef57600080526005602052600080516020612843833981519152546109ec906001600160401b0316826125ea565b90505b6001600160401b031692915050565b33610a07610b7f565b6001600160a01b031614610a2d5760405162461bcd60e51b81526004016106e690612573565b610a3760006119f8565b565b33610a42610b7f565b6001600160a01b031614610a685760405162461bcd60e51b81526004016106e690612573565b6103e8600b541115610a8d576040516307eb191160e11b815260040160405180910390fd5b600b54600090610aa06103e86001612615565b610aaa919061262d565b905080821115610ab8578091505b600082600b54610ac89190612615565b90506000610ad4610b7f565b600b549091505b82811015610b1b5760405181906001600160a01b03841690600090600080516020612823833981519152908290a480610b1381612644565b915050610adb565b50600080805260056020526000805160206128438339815191528054869290610b4e9084906001600160401b03166125ea565b92506101000a8154816001600160401b0302191690836001600160401b0316021790555081600b8190555050505050565b6000546001600160a01b031690565b33610b97610b7f565b6001600160a01b031614610bbd5760405162461bcd60e51b81526004016106e690612573565b600a805460ff1916911515919091179055565b60606002805461055890612539565b33610be8610b7f565b6001600160a01b031614610c0e5760405162461bcd60e51b81526004016106e690612573565b600a5460ff16610c315760405163028f351d60e01b815260040160405180910390fd5b6000610c3b611a48565b905080821115610c49578091505b81600d6000828254610c5b9190612615565b9091555050600a805460ff19169055600d546040518391907fe4aad838b19c668bce60cdbaf569fa2c7f2f36b178e8b74425139ffc028df6d290600090a35050565b6001600160a01b0382163303610cc65760405163010ec78b60e31b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d54600c541080610d4a5750610d47611a48565b87115b15610d6857604051636212837560e01b815260040160405180910390fd5b610d70610b7f565b6001600160a01b0316856001600160a01b031614610e7957610d92868861265d565b341015610db257604051632f3520d560e01b815260040160405180910390fd5b6000610df07f05f355c67db7d9e99d3c62928053e3abbff13a26753970e0cda326e23a29a22c868a898b60405160200161088e9594939291906125a8565b6001600160a01b03851660009081526008602052604090205490915060ff161580610e595750610e57848285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061166592505050565b155b15610e775760405163f07cb63760e01b815260040160405180910390fd5b505b61094c858860405180602001604052806000815250611a6b565b33610e9c610b7f565b6001600160a01b031614610ec25760405162461bcd60e51b81526004016106e690612573565b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b610ef88484846112f8565b610f0a836001600160a01b0316611c45565b8015610f1f5750610f1d84848484611c54565b155b15610f3d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060610f4e82611285565b610f6b576040516355d578d560e01b815260040160405180910390fd5b600d54821080610f7c5750600c5482115b1561105f57600060098054610f9090612539565b80601f0160208091040260200160405190810160405280929190818152602001828054610fbc90612539565b80156110095780601f10610fde57610100808354040283529160200191611009565b820191906000526020600020905b815481529060010190602001808311610fec57829003601f168201915b50505050509050805160000361102e57604051806020016040528060008152506107ce565b8061103884611d40565b60405160200161104992919061267c565b6040516020818303038152906040529392505050565b6040518060800160405280604281526020016127e16042913992915050565b600354600090600160a01b900460ff16156111205760035460405163c455279160e01b81526001600160a01b03858116600483015291821691841690829063c455279190602401602060405180830381865afa1580156110e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110691906126a2565b6001600160a01b03160361111e576001915050610543565b505b506001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6000818152600460205260408120546001600160a01b03161580156105435750816103e81080156111815750600d5482105b80610543575081600111158015610543575050600b541190565b336111a4610b7f565b6001600160a01b0316146111ca5760405162461bcd60e51b81526004016106e690612573565b6001600160a01b03811661122f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e6565b61076a816119f8565b33611241610b7f565b6001600160a01b0316146112675760405162461bcd60e51b81526004016106e690612573565b60038054911515600160a01b0260ff60a01b19909216919091179055565b600081600111158015610543575050612710101590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b336001600160a01b038416148015906113185750611316833361107e565b155b8015611335575033611329826105db565b6001600160a01b031614155b15611353576040516330af938560e01b815260040160405180910390fd5b61135b610b7f565b6001600160a01b0316836001600160a01b031614801561139057506000818152600460205260409020546001600160a01b0316155b801561139d5750600b5481105b156113bc576106a78282604051806020016040528060008152506117b1565b6113c581611285565b6113e2576040516306851e9160e31b815260040160405180910390fd5b6001600160a01b03831661140957604051630b07e54560e11b815260040160405180910390fd5b6000600c548211156114235761141e826115b5565b61143c565b6000828152600460205260409020546001600160a01b03165b9050836001600160a01b0316816001600160a01b03161461146f5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b03831661149657604051633a954ecd60e21b815260040160405180910390fd5b6114a26000838661129c565b6001600160a01b038481166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b03928316600019018316179092559488168085528285208054928316928716600101909616919091179094558583526004909152902080546001600160a01b0319169091179055600c5482111561158057600c546000198301908111801561155157506000818152600460205260409020546001600160a01b0316155b1561157e57600081815260046020526040902080546001600160a01b0319166001600160a01b0387161790555b505b81836001600160a01b0316856001600160a01b031660008051602061282383398151915260405160405180910390a450505050565b60008082815b600a8110156115fb576000828152600460205260409020546001600160a01b0316925060019091019082156115f35750909392505050565b6001016115bb565b5050506040516339b8395160e21b815260040160405180910390fd5b6000610543611624611e40565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006116748585611f67565b9092509050600081600481111561168d5761168d6126bf565b1480156116ab5750856001600160a01b0316826001600160a01b0316145b156116bb576001925050506107ce565b600080876001600160a01b0316631626ba7e60e01b88886040516024016116e39291906126d5565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161172191906126ee565b600060405180830381855afa9150503d806000811461175c576040519150601f19603f3d011682016040523d82523d6000602084013e611761565b606091505b5091509150818015611774575080516020145b80156117a557508051630b135d3f60e11b90611799908301602090810190840161270a565b6001600160e01b031916145b98975050505050505050565b60018210806117c25750600d548210155b156117e057604051633e8aaa2360e11b815260040160405180910390fd5b81600b54111580156117f457506103e88211155b1561181257604051633700369d60e01b815260040160405180910390fd5b6000828152600460205260409020546001600160a01b03161561184857604051633e7312f160e11b815260040160405180910390fd5b6001600160a01b03831661186e57604051622e076360e81b815260040160405180910390fd5b6103e882111560008161188257600061188a565b61188a610b7f565b600085815260066020526040902080546001600160a01b03191690559050811561190657600080805260056020526000805160206128438339815191528054600192906118e19084906001600160401b0316612727565b92506101000a8154816001600160401b0302191690836001600160401b031602179055505b6001600160a01b03851660009081526005602052604081208054600192906119389084906001600160401b03166125ea565b82546001600160401b039182166101009390930a92830291909202199091161790555060008481526004602052604080822080546001600160a01b03808a166001600160a01b03199092168217909255915187939185169160008051602061282383398151915291a46119b3856001600160a01b0316611c45565b80156119c857506119c681868686611c54565b155b156119e6576040516368d2bf6b60e11b815260040160405180910390fd5b6119f1856001611fd5565b5050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000600d54600c546001611a5c9190612615565b611a66919061262d565b905090565b600a5460ff1615611a8f576040516308a0c94360e01b815260040160405180910390fd5b811580611a9c5750600a82115b15611aba576040516303db427360e41b815260040160405180910390fd5b6001600160a01b038316611ae057604051622e076360e81b815260040160405180910390fd5b6000611aea611a48565b905080831115611af8578092505b600c546001600160a01b038516600081815260056020908152604080832080546001600160401b038082168b011667ffffffffffffffff199091161790558483526004909152902080546001600160a01b03191682179055819085820390611b5f90611c45565b15611bd6575b60405182906001600160a01b03891690600090600080516020612823833981519152908290a4611b9f600088848060019003955088611c54565b611bbc576040516368d2bf6b60e11b815260040160405180910390fd5b808203611b655782600c5414611bd157600080fd5b611c0a565b5b604051600019830192906001600160a01b03891690600090600080516020612823833981519152908290a4808203611bd7575b600c829055604051839083907faa49764afd52001fe92c35c53d7ec453ba53005d1349e35c035edacd98ef3ed390600090a350505050505050565b6001600160a01b03163b151590565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611c8990339089908890889060040161274f565b6020604051808303816000875af1925050508015611cc4575060408051601f3d908101601f19168201909252611cc19181019061270a565b60015b611d22573d808015611cf2576040519150601f19603f3d011682016040523d82523d6000602084013e611cf7565b606091505b508051600003611d1a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606081600003611d675750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611d915780611d7b81612644565b9150611d8a9050600a836127a2565b9150611d6b565b6000816001600160401b03811115611dab57611dab61240b565b6040519080825280601f01601f191660200182016040528015611dd5576020820181803683370190505b5090505b8415611d3857611dea60018361262d565b9150611df7600a866127b6565b611e02906030612615565b60f81b818381518110611e1757611e176127ca565b60200101906001600160f81b031916908160001a905350611e39600a866127a2565b9450611dd9565b6000306001600160a01b037f000000000000000000000000febe7e643641da16aed3893a62706118bc04721a16148015611e9957507f000000000000000000000000000000000000000000000000000000000000000146145b15611ec357507f8218268c3a3ff0241964b6dc76421bd459395fed3d3d2071d317d4583e6957e890565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527fdcf2039b841032e92577eb744eb3f16beb8e6197d28f38ef56a5db039a2028b2828401527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c60608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000808251604103611f9d5760208301516040840151606085015160001a611f9187828585612080565b94509450505050611fce565b8251604003611fc65760208301516040840151611fbb868383612163565b935093505050611fce565b506000905060025b9250929050565b600a5460ff16158015611ff75750611ff5826001600160a01b0316611c45565b155b801561202357506001600160a01b038216600090815260056020526040902054600160401b900460ff16155b80156120335750600d54600c5410155b1561207c57612052828260405180602001604052806000815250611a6b565b6001600160a01b0382166000908152600560205260409020805460ff60401b1916600160401b1790555b5050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156120ad575060009050600361215a565b8460ff16601b141580156120c557508460ff16601c14155b156120d6575060009050600461215a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561212a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166121535760006001925092505061215a565b9150600090505b94509492505050565b6000806001600160ff1b0383168161218060ff86901c601b612615565b905061218e87828885612080565b935093505050935093915050565b6001600160e01b03198116811461076a57600080fd5b6000602082840312156121c457600080fd5b81356107ce8161219c565b60005b838110156121ea5781810151838201526020016121d2565b83811115610f3d5750506000910152565b600081518084526122138160208601602086016121cf565b601f01601f19169290920160200192915050565b6020815260006107ce60208301846121fb565b60006020828403121561224c57600080fd5b5035919050565b6001600160a01b038116811461076a57600080fd5b6000806040838503121561227b57600080fd5b823561228681612253565b946020939093013593505050565b6000806000606084860312156122a957600080fd5b83356122b481612253565b925060208401356122c481612253565b929592945050506040919091013590565b600080600080600080600060c0888a0312156122f057600080fd5b8735965060208801359550604088013561230981612253565b945060608801359350608088013561232081612253565b925060a08801356001600160401b038082111561233c57600080fd5b818a0191508a601f83011261235057600080fd5b81358181111561235f57600080fd5b8b602082850101111561237157600080fd5b60208301945080935050505092959891949750929550565b60006020828403121561239b57600080fd5b81356107ce81612253565b803580151581146123b657600080fd5b919050565b6000602082840312156123cd57600080fd5b6107ce826123a6565b600080604083850312156123e957600080fd5b82356123f481612253565b9150612402602084016123a6565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561243757600080fd5b843561244281612253565b9350602085013561245281612253565b92506040850135915060608501356001600160401b038082111561247557600080fd5b818701915087601f83011261248957600080fd5b81358181111561249b5761249b61240b565b604051601f8201601f19908116603f011681019083821181831017156124c3576124c361240b565b816040528281528a60208487010111156124dc57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561251357600080fd5b823561251e81612253565b9150602083013561252e81612253565b809150509250929050565b600181811c9082168061254d57607f821691505b60208210810361256d57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b948552602085019390935260408401919091526001600160a01b03166060830152608082015260a00190565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681851680830382111561260c5761260c6125d4565b01949350505050565b60008219821115612628576126286125d4565b500190565b60008282101561263f5761263f6125d4565b500390565b600060018201612656576126566125d4565b5060010190565b6000816000190483118215151615612677576126776125d4565b500290565b6000835161268e8184602088016121cf565b83519083019061260c8183602088016121cf565b6000602082840312156126b457600080fd5b81516107ce81612253565b634e487b7160e01b600052602160045260246000fd5b828152604060208201526000611d3860408301846121fb565b600082516127008184602087016121cf565b9190910192915050565b60006020828403121561271c57600080fd5b81516107ce8161219c565b60006001600160401b0383811690831681811015612747576127476125d4565b039392505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612782908301846121fb565b9695505050505050565b634e487b7160e01b600052601260045260246000fd5b6000826127b1576127b161278c565b500490565b6000826127c5576127c561278c565b500690565b634e487b7160e01b600052603260045260246000fdfe697066733a2f2f6261666b726569677a6c346b6871703576336732697834626e69746d61747364643333676f797061796f636d737a6c766c6d727566347165707565ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bca26469706673582212209f7b0a08342d24939f5c7850e59a624d34368d14740b0d987ee32d7b6691a4aa64736f6c634300080d0033

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

0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000000000000000000000000000000000000000000043697066733a2f2f62616679626569657265663672746e65783236356a3275667466727968376f6a36626f77636f68336d71797937756273686962337a32787379686d2f0000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : baseUri (string): ipfs://bafybeieref6rtnex265j2uftfryh7oj6bowcoh3mqyy7ubshib3z2xsyhm/
Arg [1] : proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [3] : 697066733a2f2f62616679626569657265663672746e65783236356a32756674
Arg [4] : 66727968376f6a36626f77636f68336d71797937756273686962337a32787379
Arg [5] : 686d2f0000000000000000000000000000000000000000000000000000000000


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.