ETH Price: $3,453.43 (+1.63%)
Gas: 11 Gwei

Token

Tulip Mania! (TULIP)
 

Overview

Max Total Supply

589 TULIP

Holders

161

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 TULIP
0xd8923e0d92b43fcab9dc9b6ce7eac3c60a47e9b3
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:
TulipMania

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

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

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

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256) {
        // Counter underflow is impossible as `_currentIndex` does not decrement,
        // and it is initialized to `_startTokenId()`.
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return _burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
    }

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

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

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) {
        if (_startTokenId() <= tokenId) {
            packed = _packedOwnerships[tokenId];
            // If not burned.
            if (packed & _BITMASK_BURNED == 0) {
                // If the data at the starting slot does not exist, start the scan.
                if (packed == 0) {
                    if (tokenId >= _currentIndex) revert OwnerQueryForNonexistentToken();
                    // Invariant:
                    // There will always be an initialized ownership slot
                    // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                    // before an unintialized ownership slot
                    // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                    // Hence, `tokenId` will not underflow.
                    //
                    // We can directly compare the packed value.
                    // If the address is zero, packed will be zero.
                    for (;;) {
                        unchecked {
                            packed = _packedOwnerships[--tokenId];
                        }
                        if (packed == 0) continue;
                        return packed;
                    }
                }
                // Otherwise, the data exists and is not burned. We can skip the scan.
                // This is possible because we have already achieved the target condition.
                // This saves 2143 gas on transfers of initialized tokens.
                return packed;
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     */
    function approve(address to, uint256 tokenId) public payable virtual override {
        _approve(to, tokenId, true);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @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) public virtual override {
        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

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

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

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

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @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 memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token IDs
     * are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token IDs
     * have been transferred. This includes minting.
     * And also called after one token has been burned.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            _currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            _currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, '');
    }

    // =============================================================
    //                       APPROVAL OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_approve(to, tokenId, false)`.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _approve(to, tokenId, false);
    }

    /**
     * @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:
     *
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        bool approvalCheck
    ) internal virtual {
        address owner = ownerOf(tokenId);

        if (approvalCheck)
            if (_msgSenderERC721A() != owner)
                if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                    revert ApprovalCallerNotOwnerNorApproved();
                }

        _tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }
}

File 2 of 8 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @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,
        bytes calldata data
    ) external payable;

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Transfers `tokenId` 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 payable;

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

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

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

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

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 4 of 8 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        return result;
    }
}

File 5 of 8 : 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 6 of 8 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 7 of 8 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 8 : TulipMania.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {ERC721A} from "erc721a/ERC721A.sol";
import {Ownable} from "openzeppelin-contracts/access/Ownable.sol";
import {Base64} from "openzeppelin-contracts/utils/Base64.sol";
import {Strings} from "openzeppelin-contracts/utils/Strings.sol";


contract TulipMania is ERC721A, Ownable {

    mapping(uint256 => string) public PaletteData;
    mapping(uint256 => mapping(uint256 => string)) public SymbolData;
    mapping(uint256 => string) public SymbolNames;
    mapping(uint256 => string) public TulipData;

    bool public ownerMinted;
    bool public mintingAllowed;
    bool public mintingHalted;
    address public deployer;
    uint256 public ownerMintAmount = 250;
    uint256 public numPaletteColors;
    uint256 public numSymbols;
    uint256 public numTulipParts;
    uint256 public mintPrice = 0.01637 ether;
    string public secret;

    constructor(string memory _secret) ERC721A("Tulip Mania!", "TULIP") {
        secret = _secret;
        deployer = msg.sender;
    }

    /*
    * Manage
    */

    function startMinting() external onlyOwner {
        mintingAllowed = true;
    }

    function stopMinting() external onlyOwner {
        require(mintingAllowed == true, "minting not active");
        mintingAllowed = false;
        mintingHalted = true;
        withdraw();
        renounceOwnership();
    }

    function ownerMint() external onlyOwner {
        require(ownerMinted == false, "owner already minted");
        _safeMint(msg.sender, ownerMintAmount);
        ownerMinted = true;
    }

    function withdraw() public onlyOwner {
        payable(msg.sender).transfer(address(this).balance);
    }


    /*
    * Minting
    */

    function mint(uint256 amount) external payable {
        require(mintingAllowed == true, "minting not allowed");
        require(mintingHalted == false, "minting not allowed");
        require(msg.value == mintPrice * amount, "not enough ether sent");
        _safeMint(msg.sender, amount);
    }


    /*
    * Storing SVG data
    */

    function updatePaletteData(string[] calldata colorCodes) external onlyOwner {
        for (uint256 i; i < colorCodes.length; i++) {
            PaletteData[i] = colorCodes[i];
        }
        numPaletteColors = colorCodes.length;
    }

    function updateSymbolData(uint256 symbolIndex, string[] calldata symbolSVGData) external onlyOwner {
        for (uint256 i; i < symbolSVGData.length; i++) {
            SymbolData[symbolIndex][i] = symbolSVGData[i];
        }
    }

    function updateSymbolNames(string[] calldata symbolNames) external onlyOwner {
        for (uint256 i; i < symbolNames.length; i++) {
            SymbolNames[i] = symbolNames[i];
        }
        numSymbols = symbolNames.length;
    }

    function updateTulipData(string[] calldata tulipParts) external onlyOwner {
        for (uint256 i; i < tulipParts.length; i++) {
            TulipData[i] = tulipParts[i];
        }
        numTulipParts = tulipParts.length;
    }


    /*
    * Rendering SVG data
    */

    function getRandomUint(string memory data, uint256 tokenId) private view returns (uint256 rand) {
        return uint256(keccak256(abi.encodePacked(secret, data, tokenId)));
    }

    function getRandomColors(uint256 tokenId, string memory salt) public view returns (uint256[4] memory rands) {
        string[4] memory data = [
            string(abi.encodePacked(salt, "1")), 
            string(abi.encodePacked(salt, "2")), 
            string(abi.encodePacked(salt, "3")), 
            string(abi.encodePacked(salt, "4"))
        ];
        uint256[4] memory _rands;
        for(uint256 i; i < data.length; i++) {
            uint256 rand = getRandomUint(data[i], tokenId);
            _rands[i] = rand % numPaletteColors;
        }
        return _rands;
    }

    function getRandomSymbols(uint256 tokenId) public view returns (uint256[4] memory rands) {
        string[4] memory data = ["bottomleft", "bottomright", "topleft", "topright"];
        uint256[4] memory _rands;
        for(uint256 i; i < data.length; i++) {
            uint256 rand = getRandomUint(data[i], tokenId);
            _rands[i] = rand % numSymbols;
        }
        return _rands;
    }

    function renderStyle(
        string memory className, 
        string memory animationType,
        uint256 duration,
        uint256[4] memory colorIds
    ) private view returns (string memory) {
        return string(
            abi.encodePacked(
                abi.encodePacked(
                    ".", className, 
                    "{animation: ", className, 
                    " ", Strings.toString(duration), 
                    "s ease alternate infinite } ",
                    "@keyframes ", className
                ),
                abi.encodePacked(
                    " { 0% { ", animationType, ": #", PaletteData[colorIds[0]], 
                    "} 33% { ", animationType, ": #", PaletteData[colorIds[1]], 
                    " } 66% { ", animationType, ": #", PaletteData[colorIds[2]], 
                    "} 100% { ", animationType, ": #", PaletteData[colorIds[3]], 
                    "} } "
                )
            )
        );
    }

    function renderStyles(uint256 tokenId) private view returns (string memory) {
        return string(
            abi.encodePacked(
                "<style>",
                abi.encodePacked(
                    ".wht {fill: white; animation: btw 15s ease alternate infinite} ",
                    ".blck {fill: black; animation: wtb 15s ease alternate infinite} ",
                    "@keyframes btw { 0% { fill: #231f20 } 25% { fill: #f9f9f9 } 50% { fill: #231f20} 75% { fill: #f9f9f9 } 100% { fill: #231f20} } ",
                    "@keyframes wtb { 0% { fill: #f9f9f9 } 25% { fill: #231f20 } 50% { fill: #f9f9f9} 75% { fill: #231f20 } 100% { fill: #f9f9f9} } ",
                    "#startGradient {animation: startGradient 15s ease alternate infinite} ",
                    "@keyframes startGradient { 0% { transform: rotate(0) } 50%{ transform: rotate(20deg) } 100%{ transform: rotate(40deg) } } ",
                    "#stopGradient {animation: stopGradient 15s ease alternate infinite} ",
                    "@keyframes stopGradient { 0% { transform: rotate(0) } 50%{ transform: rotate(20deg) } 100%{ transform: rotate(40deg) } } "
                ),
                abi.encodePacked(
                    renderStyle("stem", "fill", 10, getRandomColors(tokenId, "stem")),
                    renderStyle("leaf-lining", "fill", 12, getRandomColors(tokenId, "leaf-lining")),
                    renderStyle("matte", "fill", 20, getRandomColors(tokenId, "matte")),
                    renderStyle("startGradientStop1", "stop-color", 5, getRandomColors(tokenId, "startGradientStop1")),
                    renderStyle("startGradientStop2", "stop-color", 15, getRandomColors(tokenId, "startGradientStop2")),
                    renderStyle("stopGradientStop1", "stop-color", 25, getRandomColors(tokenId, "stopGradientStop1")),
                    renderStyle("stopGradientStop2", "stop-color", 35, getRandomColors(tokenId, "stopGradientStop2"))
                ),
                "</style>"      
            )
        );
    }

    function renderMetadata(uint256 tokenId) private view returns (string memory) {
        uint256[4] memory stemColors = getRandomColors(tokenId, "stem");
        uint256[4] memory liningColors = getRandomColors(tokenId, "leaf-lining");
        uint256[4] memory matteColors = getRandomColors(tokenId, "matte");
        uint256[4] memory startGradient1Colors = getRandomColors(tokenId, "startGradientStop1");
        uint256[4] memory startGradient2Colors = getRandomColors(tokenId, "startGradientStop2");
        uint256[4] memory stopGradient1Colors = getRandomColors(tokenId, "stopGradientStop1");
        uint256[4] memory stopGradient2Colors = getRandomColors(tokenId, "stopGradientStop2");
        uint256[4] memory symbolIds = getRandomSymbols(tokenId);
        return string(
            abi.encodePacked(
                '[{"trait_type": "StemColors", "value": "',
                abi.encodePacked(
                    '#', PaletteData[stemColors[0]],
                    ',#', PaletteData[stemColors[1]],
                    ',#', PaletteData[stemColors[2]],
                    ',#', PaletteData[stemColors[3]]
                ),
                '"}, {"trait_type": "LiningColors", "value": "',
                abi.encodePacked(
                    '#', PaletteData[liningColors[0]],
                    ',#', PaletteData[liningColors[1]],
                    ',#', PaletteData[liningColors[2]],
                    ',#', PaletteData[liningColors[3]]
                ),
                '"}, {"trait_type": "matteColors", "value": "',
                abi.encodePacked(
                    '#', PaletteData[matteColors[0]],
                    ',#', PaletteData[matteColors[1]],
                    ',#', PaletteData[matteColors[2]],
                    ',#', PaletteData[matteColors[3]]
                ),
                '"}, {"trait_type": "startGradientColors", "value": "',
                abi.encodePacked(
                    '#', PaletteData[startGradient1Colors[0]],
                    ',#', PaletteData[startGradient1Colors[1]],
                    ',#', PaletteData[startGradient1Colors[2]],
                    ',#', PaletteData[startGradient1Colors[3]],
                    ',#', PaletteData[startGradient2Colors[0]],
                    ',#', PaletteData[startGradient2Colors[1]],
                    ',#', PaletteData[startGradient2Colors[2]],
                    ',#', PaletteData[startGradient2Colors[3]]
                ),
                '"}, {"trait_type": "stopGradientColors", "value": "',
                abi.encodePacked(
                    '#', PaletteData[stopGradient1Colors[0]],
                    ',#', PaletteData[stopGradient1Colors[1]],
                    ',#', PaletteData[stopGradient1Colors[2]],
                    ',#', PaletteData[stopGradient1Colors[3]],
                    ',#', PaletteData[stopGradient2Colors[0]],
                    ',#', PaletteData[stopGradient2Colors[1]],
                    ',#', PaletteData[stopGradient2Colors[2]],
                    ',#', PaletteData[stopGradient2Colors[3]]
                ),
                abi.encodePacked(
                    '"}, {"trait_type": "BottomLeft", "value": "', SymbolNames[symbolIds[0]],
                    '"}, {"trait_type": "BottomRight", "value": "', SymbolNames[symbolIds[1]],
                    '"}, {"trait_type": "TopLeft", "value": "', SymbolNames[symbolIds[2]],
                    '"}, {"trait_type": "TopRight", "value": "', SymbolNames[symbolIds[3]]
                ),
                '"}]'
            )
        );
    }

    function renderTulip() private view returns (string memory) {
        bytes memory output;
        for (uint256 i; i < numTulipParts; i++) {
            output = abi.encodePacked(output, TulipData[i]);
        }
        return string(output);
    }

    function renderSymbols(uint256[4] memory symbolIds) private view returns (string memory) {
        return string(
            abi.encodePacked(
                SymbolData[symbolIds[0]][0],
                SymbolData[symbolIds[1]][1],
                SymbolData[symbolIds[2]][2],
                SymbolData[symbolIds[3]][3]
            )
        );
    }

    function renderSVG(uint256 tokenId) private view returns (string memory) {
        uint256[4] memory symbols = getRandomSymbols(tokenId);
        return string(
            abi.encodePacked(
                "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 1200' style='enable-background:new 0 0 800 1200' xml:space='preserve'>",
                renderStyles(tokenId),
                renderTulip(),
                renderSymbols(symbols),
                "</svg>"
            )
        );
    }


    /*
    * Meta
    */

    function approve(address to, uint256 tokenId) public payable virtual override {
        require(mintingAllowed == false, "cannot allow approvals while still minting");
        super.approve(to, tokenId);
    }

    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(mintingAllowed == false, "cannot allow approvals while still minting");
        super.setApprovalForAll(operator, approved);
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        string memory json = Base64.encode(
            bytes(
                string(
                    abi.encodePacked(
                        '{"name": "Tulip #', Strings.toString(tokenId), '"',
                        ', "description": "Normies are meme-ing tulips again and you\'ve spent the last 2 years buyin\' \'em. Why not mint one? Tulip Mania! is generative, animated, and 100% on-chain vector art. No allowlist, no promises, and no royalties. Tulip Mania! is a celebration of irrational exuberance. The content is cc0 and low on rarity."',
                        ', "attributes": ', renderMetadata(tokenId),
                        ', "image_data": "data:image/svg+xml;base64,',
                        Base64.encode(bytes(renderSVG(tokenId))), '"',
                        '}'
                    )
                )
            )
        );
        return string(
            abi.encodePacked(
                'data:application/json;base64,', 
                json
            )
        );
    }

}

Settings
{
  "remappings": [
    "ERC721A/=lib/ERC721A/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "erc721a/=lib/ERC721A/contracts/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_secret","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","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":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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":"uint256","name":"","type":"uint256"}],"name":"PaletteData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"SymbolData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"SymbolNames","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"TulipData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"salt","type":"string"}],"name":"getRandomColors","outputs":[{"internalType":"uint256[4]","name":"rands","type":"uint256[4]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRandomSymbols","outputs":[{"internalType":"uint256[4]","name":"rands","type":"uint256[4]"}],"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":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintingAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintingHalted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numPaletteColors","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numSymbols","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numTulipParts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ownerMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"payable","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":"payable","type":"function"},{"inputs":[],"name":"secret","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopMinting","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":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"colorCodes","type":"string[]"}],"name":"updatePaletteData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"symbolIndex","type":"uint256"},{"internalType":"string[]","name":"symbolSVGData","type":"string[]"}],"name":"updateSymbolData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"symbolNames","type":"string[]"}],"name":"updateSymbolNames","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"tulipParts","type":"string[]"}],"name":"updateTulipData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405260fa600e55663a286da2f920006012553480156200002157600080fd5b5060405162003fb638038062003fb6833981016040819052620000449162000152565b6040518060400160405280600c81526020016b54756c6970204d616e69612160a01b81525060405180604001604052806005815260200164054554c49560dc1b8152508160029081620000989190620002b6565b506003620000a78282620002b6565b50506000805550620000b933620000ea565b6013620000c78282620002b6565b5050600d80546301000000600160b81b0319163363010000000217905562000382565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156200016657600080fd5b82516001600160401b03808211156200017e57600080fd5b818501915085601f8301126200019357600080fd5b815181811115620001a857620001a86200013c565b604051601f8201601f19908116603f01168101908382118183101715620001d357620001d36200013c565b816040528281528886848701011115620001ec57600080fd5b600093505b82841015620002105784840186015181850187015292850192620001f1565b600086848301015280965050505050505092915050565b600181811c908216806200023c57607f821691505b6020821081036200025d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002b157600081815260208120601f850160051c810160208610156200028c5750805b601f850160051c820191505b81811015620002ad5782815560010162000298565b5050505b505050565b81516001600160401b03811115620002d257620002d26200013c565b620002ea81620002e3845462000227565b8462000263565b602080601f831160018114620003225760008415620003095750858301515b600019600386901b1c1916600185901b178555620002ad565b600085815260208120601f198616915b82811015620003535788860151825594840194600190910190840162000332565b5085821015620003725787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b613c2480620003926000396000f3fe6080604052600436106102515760003560e01c806370a0823111610139578063b12dc991116100b6578063d5f394881161007a578063d5f394881461065c578063e985e9c514610683578063ea78992e146106cc578063f2fde38b146106ec578063f4e40b661461070c578063ff59b5cb1461072c57600080fd5b8063b12dc991146105e9578063b88d4fde146105fe578063bb00c8f914610611578063c87b56dd14610627578063d1efd30d1461064757600080fd5b806395d89b41116100fd57806395d89b411461056d57806396532d1c146105825780639a65ea26146105a1578063a0712d68146105b6578063a22cb465146105c957600080fd5b806370a08231146104da578063715018a6146104fa578063797f32421461050f5780638da5cb5b1461052f57806394e517981461054d57600080fd5b80633ad14d58116101d2578063464eabab11610196578063464eabab1461041757806358e13b4c146104445780636352211e1461046457806363e5abc7146104845780636817c76c146104a45780636a53664c146104ba57600080fd5b80633ad14d58146103a45780633ccfd60b146103c45780633e3e0b12146103d9578063427722d2146103ee57806342842e0e1461040457600080fd5b80630bf7a627116102195780630bf7a6271461031e5780630cc7540d1461033857806318160ddd1461035857806323b872dd146103715780632de32fcc1461038457600080fd5b806301ffc9a714610256578063065a672d1461028b57806306fdde03146102af578063081812fc146102d1578063095ea7b314610309575b600080fd5b34801561026257600080fd5b506102766102713660046124ee565b610742565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a160105481565b604051908152602001610282565b3480156102bb57600080fd5b506102c4610794565b6040516102829190612562565b3480156102dd57600080fd5b506102f16102ec366004612575565b610826565b6040516001600160a01b039091168152602001610282565b61031c6103173660046125a5565b61086a565b005b34801561032a57600080fd5b50600d546102769060ff1681565b34801561034457600080fd5b5061031c61035336600461261b565b6108a9565b34801561036457600080fd5b50600154600054036102a1565b61031c61037f366004612667565b61091e565b34801561039057600080fd5b5061031c61039f3660046126a3565b610ab7565b3480156103b057600080fd5b5061031c6103bf3660046126a3565b610b22565b3480156103d057600080fd5b5061031c610b8d565b3480156103e557600080fd5b5061031c610bc4565b3480156103fa57600080fd5b506102a1600f5481565b61031c610412366004612667565b610c41565b34801561042357600080fd5b50610437610432366004612575565b610c61565b60405161028291906126e5565b34801561045057600080fd5b50600d546102769062010000900460ff1681565b34801561047057600080fd5b506102f161047f366004612575565b610d75565b34801561049057600080fd5b5061031c61049f3660046126a3565b610d80565b3480156104b057600080fd5b506102a160125481565b3480156104c657600080fd5b506102c46104d5366004612575565b610deb565b3480156104e657600080fd5b506102a16104f5366004612716565b610e85565b34801561050657600080fd5b5061031c610ed4565b34801561051b57600080fd5b5061043761052a3660046127bd565b610ee6565b34801561053b57600080fd5b506008546001600160a01b03166102f1565b34801561055957600080fd5b506102c4610568366004612575565b611008565b34801561057957600080fd5b506102c4611021565b34801561058e57600080fd5b50600d5461027690610100900460ff1681565b3480156105ad57600080fd5b5061031c611030565b61031c6105c4366004612575565b611049565b3480156105d557600080fd5b5061031c6105e4366004612818565b611149565b3480156105f557600080fd5b5061031c61117b565b61031c61060c366004612854565b6111e8565b34801561061d57600080fd5b506102a1600e5481565b34801561063357600080fd5b506102c4610642366004612575565b61122c565b34801561065357600080fd5b506102c46112a6565b34801561066857600080fd5b50600d546102f190630100000090046001600160a01b031681565b34801561068f57600080fd5b5061027661069e3660046128d0565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156106d857600080fd5b506102c46106e7366004612575565b6112b3565b3480156106f857600080fd5b5061031c610707366004612716565b6112cc565b34801561071857600080fd5b506102c4610727366004612903565b611342565b34801561073857600080fd5b506102a160115481565b60006301ffc9a760e01b6001600160e01b03198316148061077357506380ac58cd60e01b6001600160e01b03198316145b8061078e5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600280546107a390612925565b80601f01602080910402602001604051908101604052809291908181526020018280546107cf90612925565b801561081c5780601f106107f15761010080835404028352916020019161081c565b820191906000526020600020905b8154815290600101906020018083116107ff57829003601f168201915b5050505050905090565b600061083182611366565b61084e576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600d54610100900460ff161561089b5760405162461bcd60e51b815260040161089290612959565b60405180910390fd5b6108a5828261138d565b5050565b6108b1611399565b60005b81811015610918578282828181106108ce576108ce6129a3565b90506020028101906108e091906129b9565b6000868152600a60209081526040808320868452909152902091610905919083612a46565b508061091081612b1c565b9150506108b4565b50505050565b6000610929826113f3565b9050836001600160a01b0316816001600160a01b03161461095c5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176109a95761098c863361069e565b6109a957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166109d057604051633a954ecd60e21b815260040160405180910390fd5b80156109db57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610a6d57600184016000818152600460205260408120549003610a6b576000548114610a6b5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b610abf611399565b60005b81811015610b1b57828282818110610adc57610adc6129a3565b9050602002810190610aee91906129b9565b6000838152600b6020526040902091610b08919083612a46565b5080610b1381612b1c565b915050610ac2565b5060105550565b610b2a611399565b60005b81811015610b8657828282818110610b4757610b476129a3565b9050602002810190610b5991906129b9565b6000838152600c6020526040902091610b73919083612a46565b5080610b7e81612b1c565b915050610b2d565b5060115550565b610b95611399565b60405133904780156108fc02916000818181858888f19350505050158015610bc1573d6000803e3d6000fd5b50565b610bcc611399565b600d5460ff610100909104161515600114610c1e5760405162461bcd60e51b81526020600482015260126024820152716d696e74696e67206e6f742061637469766560701b6044820152606401610892565b600d805462ffff00191662010000179055610c37610b8d565b610c3f610ed4565b565b610c5c838383604051806020016040528060008152506111e8565b505050565b610c696124ba565b6040805160c081018252600a6080820190815269189bdd1d1bdb5b19599d60b21b60a0830152815281518083018352600b81526a189bdd1d1bdb5c9a59da1d60aa1b602082810191909152808301919091528251808401845260078152661d1bdc1b19599d60ca1b8183015282840152825180840190935260088352671d1bdc1c9a59da1d60c21b908301526060810191909152610d056124ba565b60005b6004811015610d6d576000610d33848360048110610d2857610d286129a3565b602002015187611474565b905060105481610d439190612b4b565b838360048110610d5557610d556129a3565b60200201525080610d6581612b1c565b915050610d08565b509392505050565b600061078e826113f3565b610d88611399565b60005b81811015610de457828282818110610da557610da56129a3565b9050602002810190610db791906129b9565b600083815260096020526040902091610dd1919083612a46565b5080610ddc81612b1c565b915050610d8b565b50600f5550565b600b6020526000908152604090208054610e0490612925565b80601f0160208091040260200160405190810160405280929190818152602001828054610e3090612925565b8015610e7d5780601f10610e5257610100808354040283529160200191610e7d565b820191906000526020600020905b815481529060010190602001808311610e6057829003601f168201915b505050505081565b60006001600160a01b038216610eae576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b610edc611399565b610c3f60006114ab565b610eee6124ba565b6000604051806080016040528084604051602001610f0c9190612b7b565b604051602081830303815290604052815260200184604051602001610f319190612ba0565b604051602081830303815290604052815260200184604051602001610f569190612bc5565b604051602081830303815290604052815260200184604051602001610f7b9190612bea565b6040516020818303038152906040528152509050610f976124ba565b60005b6004811015610fff576000610fc5848360048110610fba57610fba6129a3565b602002015188611474565b9050600f5481610fd59190612b4b565b838360048110610fe757610fe76129a3565b60200201525080610ff781612b1c565b915050610f9a565b50949350505050565b60096020526000908152604090208054610e0490612925565b6060600380546107a390612925565b611038611399565b600d805461ff001916610100179055565b600d5460ff61010090910416151560011461109c5760405162461bcd60e51b81526020600482015260136024820152721b5a5b9d1a5b99c81b9bdd08185b1b1bddd959606a1b6044820152606401610892565b600d5462010000900460ff16156110eb5760405162461bcd60e51b81526020600482015260136024820152721b5a5b9d1a5b99c81b9bdd08185b1b1bddd959606a1b6044820152606401610892565b806012546110f99190612c0f565b341461113f5760405162461bcd60e51b81526020600482015260156024820152741b9bdd08195b9bdd59da08195d1a195c881cd95b9d605a1b6044820152606401610892565b610bc133826114fd565b600d54610100900460ff16156111715760405162461bcd60e51b815260040161089290612959565b6108a58282611517565b611183611399565b600d5460ff16156111cd5760405162461bcd60e51b81526020600482015260146024820152731bdddb995c88185b1c9958591e481b5a5b9d195960621b6044820152606401610892565b6111d933600e546114fd565b600d805460ff19166001179055565b6111f384848461091e565b6001600160a01b0383163b156109185761120f84848484611583565b610918576040516368d2bf6b60e11b815260040160405180910390fd5b6060600061127c61123c8461166e565b61124585611701565b61125661125187611afc565b611b37565b60405160200161126893929190612c26565b604051602081830303815290604052611b37565b90508060405160200161128f9190612e8c565b604051602081830303815290604052915050919050565b60138054610e0490612925565b600c6020526000908152604090208054610e0490612925565b6112d4611399565b6001600160a01b0381166113395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610892565b610bc1816114ab565b600a60209081526000928352604080842090915290825290208054610e0490612925565b600080548210801561078e575050600090815260046020526040902054600160e01b161590565b6108a582826001611c8a565b6008546001600160a01b03163314610c3f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610892565b60008181526004602052604081205490600160e01b8216900361145b578060000361145657600054821061143a57604051636f96cda160e11b815260040160405180910390fd5b5b5060001901600081815260046020526040902054801561143b575b919050565b604051636f96cda160e11b815260040160405180910390fd5b60006013838360405160200161148c93929190612f44565b60408051601f1981840301815291905280516020909101209392505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6108a5828260405180602001604052806000815250611d31565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906115b8903390899088908890600401612f6f565b6020604051808303816000875af19250505080156115f3575060408051601f3d908101601f191682019092526115f091810190612fa2565b60015b611651573d808015611621576040519150601f19603f3d011682016040523d82523d6000602084013e611626565b606091505b508051600003611649576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6060600061167b83611d9e565b600101905060008167ffffffffffffffff81111561169b5761169b612731565b6040519080825280601f01601f1916602001820160405280156116c5576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846116cf57509392505050565b6060600061172b83604051806040016040528060048152602001637374656d60e01b815250610ee6565b9050600061175c846040518060400160405280600b81526020016a6c6561662d6c696e696e6760a81b815250610ee6565b9050600061178785604051806040016040528060058152602001646d6174746560d81b815250610ee6565b905060006117bf866040518060400160405280601281526020017173746172744772616469656e7453746f703160701b815250610ee6565b905060006117f7876040518060400160405280601281526020017139ba30b93a23b930b234b2b73a29ba37b81960711b815250610ee6565b9050600061182e886040518060400160405280601181526020017073746f704772616469656e7453746f703160781b815250610ee6565b90506000611865896040518060400160405280601181526020017039ba37b823b930b234b2b73a29ba37b81960791b815250610ee6565b905060006118728a610c61565b88516000908152600960209081526040808320828d01518452818420828e0151855282852060608f015186529483902092519596506118b8959194909390929101612fbf565b60408051601f198184030181528282528951600090815260096020908152838220818d015183528483208d860151845285842060608f01518552959093209395611906959194919201612fbf565b60408051601f198184030181528282528951600090815260096020908152838220818d015183528483208d860151845285842060608f01518552959093209395611954959194919201612fbf565b60408051808303601f190181529181528851600090815260096020818152838320818d015184528484208d860151855285852060608f015186528686208e518752878720948f015187528787208f8901518852978720939792969195909493918f6003602002015181526020019081526020016000206040516020016119e198979695949392919061301a565b60408051808303601f190181529181528751600090815260096020818152838320818c015184528484208c860151855285852060608e015186528686208d518752878720948e015187528787208e8901518852978720939792969195909493918e600360200201518152602001908152602001600020604051602001611a6e98979695949392919061301a565b60408051601f1981840301815282825287516000908152600b6020908152838220818b015183528483208b860151845285842060608d01518552959093209395611abc9591949192016130be565b60408051601f1981840301815290829052611ade9695949392916020016131d0565b60405160208183030381529060405298505050505050505050919050565b60606000611b0983610c61565b9050611b1483611e76565b611b1c61223c565b611b258361229b565b60405160200161128f9392919061338d565b60608151600003611b5657505060408051602081019091526000815290565b6000604051806060016040528060408152602001613baf6040913990506000600384516002611b859190613484565b611b8f9190613497565b611b9a906004612c0f565b67ffffffffffffffff811115611bb257611bb2612731565b6040519080825280601f01601f191660200182016040528015611bdc576020820181803683370190505b509050600182016020820185865187015b80821015611c48576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611bed565b5050600386510660018114611c645760028114611c7757611c7f565b603d6001830353603d6002830353611c7f565b603d60018303535b509195945050505050565b6000611c9583610d75565b90508115611cd457336001600160a01b03821614611cd457611cb7813361069e565b611cd4576040516367d9dca160e11b815260040160405180910390fd5b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b611d3b838361230e565b6001600160a01b0383163b15610c5c576000548281035b611d656000868380600101945086611583565b611d82576040516368d2bf6b60e11b815260040160405180910390fd5b818110611d52578160005414611d9757600080fd5b5050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611ddd5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611e09576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611e2757662386f26fc10000830492506010015b6305f5e1008310611e3f576305f5e100830492506008015b6127108310611e5357612710830492506004015b60648310611e65576064830492506002015b600a831061078e5760010192915050565b6060604051602001611e87906134ab565b604051602081830303815290604052611f00604051806040016040528060048152602001637374656d60e01b81525060405180604001604052806004815260200163199a5b1b60e21b815250600a611efb87604051806040016040528060048152602001637374656d60e01b815250610ee6565b61240c565b611f736040518060400160405280600b81526020016a6c6561662d6c696e696e6760a81b81525060405180604001604052806004815260200163199a5b1b60e21b815250600c611efb886040518060400160405280600b81526020016a6c6561662d6c696e696e6760a81b815250610ee6565b611fda604051806040016040528060058152602001646d6174746560d81b81525060405180604001604052806004815260200163199a5b1b60e21b8152506014611efb89604051806040016040528060058152602001646d6174746560d81b815250610ee6565b6120616040518060400160405280601281526020017173746172744772616469656e7453746f703160701b8152506040518060400160405280600a81526020016939ba37b816b1b7b637b960b11b8152506005611efb8a6040518060400160405280601281526020017173746172744772616469656e7453746f703160701b815250610ee6565b6120e86040518060400160405280601281526020017139ba30b93a23b930b234b2b73a29ba37b81960711b8152506040518060400160405280600a81526020016939ba37b816b1b7b637b960b11b815250600f611efb8b6040518060400160405280601281526020017139ba30b93a23b930b234b2b73a29ba37b81960711b815250610ee6565b61216d6040518060400160405280601181526020017073746f704772616469656e7453746f703160781b8152506040518060400160405280600a81526020016939ba37b816b1b7b637b960b11b8152506019611efb8c6040518060400160405280601181526020017073746f704772616469656e7453746f703160781b815250610ee6565b6121f26040518060400160405280601181526020017039ba37b823b930b234b2b73a29ba37b81960791b8152506040518060400160405280600a81526020016939ba37b816b1b7b637b960b11b8152506023611efb8d6040518060400160405280601181526020017039ba37b823b930b234b2b73a29ba37b81960791b815250610ee6565b6040516020016122089796959493929190613871565b60408051601f19818403018152908290526122269291602001613903565b6040516020818303038152906040529050919050565b60608060005b6011548110156122955781600c600083815260200190815260200160002060405160200161227192919061395d565b6040516020818303038152906040529150808061228d90612b1c565b915050612242565b50919050565b80516000908152600a6020818152604080842084805282528084208286015185528383528185206001865283528185208287015186528484528286206002875284528286206060808901518852958552838720600388528552958390209251949561222695929491939092909101613984565b60008054908290036123335760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146123e257808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016123aa565b508160000361240357604051622e076360e81b815260040160405180910390fd5b60005550505050565b606084856124198561166e565b8760405160200161242d94939291906139ab565b60408051601f19818403018152828252845160009081526009602090815283822081880151835284832088860151845285842060608a01518552959093209395612483958b959294869490938593849201613a75565b60408051601f19818403018152908290526124a19291602001613b7f565b6040516020818303038152906040529050949350505050565b60405180608001604052806004906020820280368337509192915050565b6001600160e01b031981168114610bc157600080fd5b60006020828403121561250057600080fd5b813561250b816124d8565b9392505050565b60005b8381101561252d578181015183820152602001612515565b50506000910152565b6000815180845261254e816020860160208601612512565b601f01601f19169290920160200192915050565b60208152600061250b6020830184612536565b60006020828403121561258757600080fd5b5035919050565b80356001600160a01b038116811461145657600080fd5b600080604083850312156125b857600080fd5b6125c18361258e565b946020939093013593505050565b60008083601f8401126125e157600080fd5b50813567ffffffffffffffff8111156125f957600080fd5b6020830191508360208260051b850101111561261457600080fd5b9250929050565b60008060006040848603121561263057600080fd5b83359250602084013567ffffffffffffffff81111561264e57600080fd5b61265a868287016125cf565b9497909650939450505050565b60008060006060848603121561267c57600080fd5b6126858461258e565b92506126936020850161258e565b9150604084013590509250925092565b600080602083850312156126b657600080fd5b823567ffffffffffffffff8111156126cd57600080fd5b6126d9858286016125cf565b90969095509350505050565b60808101818360005b600481101561270d5781518352602092830192909101906001016126ee565b50505092915050565b60006020828403121561272857600080fd5b61250b8261258e565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561276257612762612731565b604051601f8501601f19908116603f0116810190828211818310171561278a5761278a612731565b816040528093508581528686860111156127a357600080fd5b858560208301376000602087830101525050509392505050565b600080604083850312156127d057600080fd5b82359150602083013567ffffffffffffffff8111156127ee57600080fd5b8301601f810185136127ff57600080fd5b61280e85823560208401612747565b9150509250929050565b6000806040838503121561282b57600080fd5b6128348361258e565b91506020830135801515811461284957600080fd5b809150509250929050565b6000806000806080858703121561286a57600080fd5b6128738561258e565b93506128816020860161258e565b925060408501359150606085013567ffffffffffffffff8111156128a457600080fd5b8501601f810187136128b557600080fd5b6128c487823560208401612747565b91505092959194509250565b600080604083850312156128e357600080fd5b6128ec8361258e565b91506128fa6020840161258e565b90509250929050565b6000806040838503121561291657600080fd5b50508035926020909101359150565b600181811c9082168061293957607f821691505b60208210810361229557634e487b7160e01b600052602260045260246000fd5b6020808252602a908201527f63616e6e6f7420616c6c6f7720617070726f76616c73207768696c65207374696040820152696c6c206d696e74696e6760b01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126129d057600080fd5b83018035915067ffffffffffffffff8211156129eb57600080fd5b60200191503681900382131561261457600080fd5b601f821115610c5c57600081815260208120601f850160051c81016020861015612a275750805b601f850160051c820191505b81811015610aaf57828155600101612a33565b67ffffffffffffffff831115612a5e57612a5e612731565b612a7283612a6c8354612925565b83612a00565b6000601f841160018114612aa65760008515612a8e5750838201355b600019600387901b1c1916600186901b178355611d97565b600083815260209020601f19861690835b82811015612ad75786850135825560209485019460019092019101612ab7565b5086821015612af45760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201612b2e57612b2e612b06565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612b5a57612b5a612b35565b500690565b60008151612b71818560208601612512565b9290920192915050565b60008251612b8d818460208701612512565b603160f81b920191825250600101919050565b60008251612bb2818460208701612512565b601960f91b920191825250600101919050565b60008251612bd7818460208701612512565b603360f81b920191825250600101919050565b60008251612bfc818460208701612512565b600d60fa1b920191825250600101919050565b808202811582820484141761078e5761078e612b06565b707b226e616d65223a202254756c6970202360781b81528351600090612c53816011850160208901612512565b601160f91b6011918401918201527f2c20226465736372697074696f6e223a20224e6f726d69657320617265206d6560128201527f6d652d696e672074756c69707320616761696e20616e6420796f75277665207360328201527f70656e7420746865206c617374203220796561727320627579696e272027656d60528201527f2e20576879206e6f74206d696e74206f6e653f2054756c6970204d616e69612160728201527f2069732067656e657261746976652c20616e696d617465642c20616e6420313060928201527f3025206f6e2d636861696e20766563746f72206172742e204e6f20616c6c6f7760b28201527f6c6973742c206e6f2070726f6d697365732c20616e64206e6f20726f79616c7460d28201527f6965732e2054756c6970204d616e69612120697320612063656c65627261746960f28201527f6f6e206f66206972726174696f6e616c20657875626572616e63652e205468656101128201527f20636f6e74656e742069732063633020616e64206c6f77206f6e207261726974610132820152623c971160e91b610152820152612e82612e75612e68612e62612e25612e1f61015587016f016101130ba3a3934b13aba32b9911d160851b815260100190565b8a612b5f565b7f2c2022696d6167655f64617461223a2022646174613a696d6167652f7376672b81526a1e1b5b0ed8985cd94d8d0b60aa1b6020820152602b0190565b87612b5f565b601160f91b815260010190565b607d60f81b815260010190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612ec481601d850160208701612512565b91909101601d0192915050565b60008154612ede81612925565b60018281168015612ef65760018114612f0b57612f3a565b60ff1984168752821515830287019450612f3a565b8560005260208060002060005b85811015612f315781548a820152908401908201612f18565b50505082870194505b5050505092915050565b6000612f508286612ed1565b8451612f60818360208901612512565b01928352505060200192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612e8290830184612536565b600060208284031215612fb457600080fd5b815161250b816124d8565b602360f81b81526000612fd56001830187612ed1565b612c2360f01b808252612feb6002830188612ed1565b9150808252612ffd6002830187612ed1565b908152905061300f6002820185612ed1565b979650505050505050565b602360f81b81526000613030600183018b612ed1565b612c2360f01b80825260026130478184018d612ed1565b92508183526130588184018c612ed1565b92508183526130698184018b612ed1565b925081835261307a8184018a612ed1565b925081835261308b81840189612ed1565b925081835261309c81840188612ed1565b92508183526130ad81840187612ed1565b9d9c50505050505050505050505050565b7f227d2c207b2274726169745f74797065223a2022426f74746f6d4c656674222c81526a10113b30b63ab2911d101160a91b60208201526000613104602b830187612ed1565b7f227d2c207b2274726169745f74797065223a2022426f74746f6d52696768742281526b1610113b30b63ab2911d101160a11b6020820152613149602c820187612ed1565b7f227d2c207b2274726169745f74797065223a2022546f704c656674222c20227681526730b63ab2911d101160c11b6020820152905061318c6028820186612ed1565b7f227d2c207b2274726169745f74797065223a2022546f705269676874222c20228152683b30b63ab2911d101160b91b6020820152905061300f6029820185612ed1565b7f5b7b2274726169745f74797065223a20225374656d436f6c6f7273222c20227681526730b63ab2911d101160c11b602082015260008751613219816028850160208c01612512565b7f227d2c207b2274726169745f74797065223a20224c696e696e67436f6c6f72736028918401918201526c111610113b30b63ab2911d101160991b6048820152875161326c816055840160208c01612512565b7f227d2c207b2274726169745f74797065223a20226d61747465436f6c6f727322605592909101918201526b1610113b30b63ab2911d101160a11b607582015286516132bf816081840160208b01612512565b7f227d2c207b2274726169745f74797065223a202273746172744772616469656e60819290910191820152733a21b7b637b939911610113b30b63ab2911d101160611b60a182015261338061337161336b61336561332060b586018b612b5f565b7f227d2c207b2274726169745f74797065223a202273746f704772616469656e7481527221b7b637b939911610113b30b63ab2911d101160691b602082015260330190565b88612b5f565b86612b5f565b62227d5d60e81b815260030190565b9998505050505050505050565b7f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323081527f30302f737667272076696577426f783d2730203020383030203132303027207360208201527f74796c653d27656e61626c652d6261636b67726f756e643a6e6577203020302060408201527f38303020313230302720786d6c3a73706163653d277072657365727665273e0060608201526000845161343781607f850160208901612512565b84519083019061344e81607f840160208901612512565b845191019061346481607f840160208801612512565b651e17b9bb339f60d11b607f929091019182015260850195945050505050565b8082018082111561078e5761078e612b06565b6000826134a6576134a6612b35565b500490565b7f2e776874207b66696c6c3a2077686974653b20616e696d6174696f6e3a20627481527f7720313573206561736520616c7465726e61746520696e66696e6974657d200060208201527f2e626c636b207b66696c6c3a20626c61636b3b20616e696d6174696f6e3a2077603f8201527f746220313573206561736520616c7465726e61746520696e66696e6974657d20605f8201527f406b65796672616d657320627477207b203025207b2066696c6c3a2023323331607f8201527f663230207d20323525207b2066696c6c3a2023663966396639207d2035302520609f8201527f7b2066696c6c3a20233233316632307d20373525207b2066696c6c3a2023663960bf8201527f66396639207d2031303025207b2066696c6c3a20233233316632307d207d200060df8201527f406b65796672616d657320777462207b203025207b2066696c6c3a202366396660fe8201527f396639207d20323525207b2066696c6c3a2023323331663230207d203530252061011e8201527f7b2066696c6c3a20236639663966397d20373525207b2066696c6c3a2023323361013e8201527f31663230207d2031303025207b2066696c6c3a20236639663966397d207d200061015e8201527f2373746172744772616469656e74207b616e696d6174696f6e3a20737461727461017d8201527f4772616469656e7420313573206561736520616c7465726e61746520696e666961019d8201526503734ba32be960d51b6101bd8201527f406b65796672616d65732073746172744772616469656e74207b203025207b206101c38201527f7472616e73666f726d3a20726f74617465283029207d203530257b207472616e6101e38201527f73666f726d3a20726f7461746528323064656729207d20313030257b207472616102038201527f6e73666f726d3a20726f7461746528343064656729207d207d200000000000006102238201527f2373746f704772616469656e74207b616e696d6174696f6e3a2073746f70477261023d8201527f616469656e7420313573206561736520616c7465726e61746520696e66696e6961025d8201526303a32be960e51b61027d8201527f406b65796672616d65732073746f704772616469656e74207b203025207b20746102818201527f72616e73666f726d3a20726f74617465283029207d203530257b207472616e736102a18201527f666f726d3a20726f7461746528323064656729207d20313030257b207472616e6102c18201527f73666f726d3a20726f7461746528343064656729207d207d20000000000000006102e182015260006102fa820161078e565b6000885160206138848285838e01612512565b8951918401916138978184848e01612512565b89519201916138a98184848d01612512565b88519201916138bb8184848c01612512565b87519201916138cd8184848b01612512565b86519201916138df8184848a01612512565b85519201916138f18184848901612512565b919091019a9950505050505050505050565b661e39ba3cb6329f60c91b815260008351613925816007850160208801612512565b83519083019061393c816007840160208801612512565b671e17b9ba3cb6329f60c11b60079290910191820152600f01949350505050565b6000835161396f818460208801612512565b61397b81840185612ed1565b95945050505050565b6000612e826139a561399f613999858a612ed1565b88612ed1565b86612ed1565b84612ed1565b601760f91b8152600085516139c7816001850160208a01612512565b6b03db0b734b6b0ba34b7b71d160a51b60019184019182015285516139f381600d840160208a01612512565b600160fd1b600d92909101918201528451613a1581600e840160208901612512565b7f73206561736520616c7465726e61746520696e66696e697465207d2000000000600e92909101918201526a02035b2bcb33930b6b2b9960ad1b602a8201528351613a67816035840160208801612512565b016035019695505050505050565b670103d901812903d960c51b815260008951613a98816008850160208e01612512565b8083019050623a202360e81b806008830152613ab7600b83018c612ed1565b91506703e90199992903d960c51b82528951613ada816008850160208e01612512565b60089201918201819052613af1600b83018a612ed1565b9150680103e901b1b12903d960bd1b82528751613b15816009850160208c01612512565b6009920191820152613b2a600c820187612ed1565b90506803e9018981812903d960bd1b8152613b70613b6061399f613b516009850189612b5f565b623a202360e81b815260030190565b6303e903e960e51b815260040190565b9b9a5050505050505050505050565b60008351613b91818460208801612512565b835190830190613ba5818360208801612512565b0194935050505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212202712d26d801cd7ea291efc557768a75f1d8a1ac63fc2543844e870e5e3a6773a64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000183864383438656230636662303030383032616163613230650000000000000000

Deployed Bytecode

0x6080604052600436106102515760003560e01c806370a0823111610139578063b12dc991116100b6578063d5f394881161007a578063d5f394881461065c578063e985e9c514610683578063ea78992e146106cc578063f2fde38b146106ec578063f4e40b661461070c578063ff59b5cb1461072c57600080fd5b8063b12dc991146105e9578063b88d4fde146105fe578063bb00c8f914610611578063c87b56dd14610627578063d1efd30d1461064757600080fd5b806395d89b41116100fd57806395d89b411461056d57806396532d1c146105825780639a65ea26146105a1578063a0712d68146105b6578063a22cb465146105c957600080fd5b806370a08231146104da578063715018a6146104fa578063797f32421461050f5780638da5cb5b1461052f57806394e517981461054d57600080fd5b80633ad14d58116101d2578063464eabab11610196578063464eabab1461041757806358e13b4c146104445780636352211e1461046457806363e5abc7146104845780636817c76c146104a45780636a53664c146104ba57600080fd5b80633ad14d58146103a45780633ccfd60b146103c45780633e3e0b12146103d9578063427722d2146103ee57806342842e0e1461040457600080fd5b80630bf7a627116102195780630bf7a6271461031e5780630cc7540d1461033857806318160ddd1461035857806323b872dd146103715780632de32fcc1461038457600080fd5b806301ffc9a714610256578063065a672d1461028b57806306fdde03146102af578063081812fc146102d1578063095ea7b314610309575b600080fd5b34801561026257600080fd5b506102766102713660046124ee565b610742565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a160105481565b604051908152602001610282565b3480156102bb57600080fd5b506102c4610794565b6040516102829190612562565b3480156102dd57600080fd5b506102f16102ec366004612575565b610826565b6040516001600160a01b039091168152602001610282565b61031c6103173660046125a5565b61086a565b005b34801561032a57600080fd5b50600d546102769060ff1681565b34801561034457600080fd5b5061031c61035336600461261b565b6108a9565b34801561036457600080fd5b50600154600054036102a1565b61031c61037f366004612667565b61091e565b34801561039057600080fd5b5061031c61039f3660046126a3565b610ab7565b3480156103b057600080fd5b5061031c6103bf3660046126a3565b610b22565b3480156103d057600080fd5b5061031c610b8d565b3480156103e557600080fd5b5061031c610bc4565b3480156103fa57600080fd5b506102a1600f5481565b61031c610412366004612667565b610c41565b34801561042357600080fd5b50610437610432366004612575565b610c61565b60405161028291906126e5565b34801561045057600080fd5b50600d546102769062010000900460ff1681565b34801561047057600080fd5b506102f161047f366004612575565b610d75565b34801561049057600080fd5b5061031c61049f3660046126a3565b610d80565b3480156104b057600080fd5b506102a160125481565b3480156104c657600080fd5b506102c46104d5366004612575565b610deb565b3480156104e657600080fd5b506102a16104f5366004612716565b610e85565b34801561050657600080fd5b5061031c610ed4565b34801561051b57600080fd5b5061043761052a3660046127bd565b610ee6565b34801561053b57600080fd5b506008546001600160a01b03166102f1565b34801561055957600080fd5b506102c4610568366004612575565b611008565b34801561057957600080fd5b506102c4611021565b34801561058e57600080fd5b50600d5461027690610100900460ff1681565b3480156105ad57600080fd5b5061031c611030565b61031c6105c4366004612575565b611049565b3480156105d557600080fd5b5061031c6105e4366004612818565b611149565b3480156105f557600080fd5b5061031c61117b565b61031c61060c366004612854565b6111e8565b34801561061d57600080fd5b506102a1600e5481565b34801561063357600080fd5b506102c4610642366004612575565b61122c565b34801561065357600080fd5b506102c46112a6565b34801561066857600080fd5b50600d546102f190630100000090046001600160a01b031681565b34801561068f57600080fd5b5061027661069e3660046128d0565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156106d857600080fd5b506102c46106e7366004612575565b6112b3565b3480156106f857600080fd5b5061031c610707366004612716565b6112cc565b34801561071857600080fd5b506102c4610727366004612903565b611342565b34801561073857600080fd5b506102a160115481565b60006301ffc9a760e01b6001600160e01b03198316148061077357506380ac58cd60e01b6001600160e01b03198316145b8061078e5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600280546107a390612925565b80601f01602080910402602001604051908101604052809291908181526020018280546107cf90612925565b801561081c5780601f106107f15761010080835404028352916020019161081c565b820191906000526020600020905b8154815290600101906020018083116107ff57829003601f168201915b5050505050905090565b600061083182611366565b61084e576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600d54610100900460ff161561089b5760405162461bcd60e51b815260040161089290612959565b60405180910390fd5b6108a5828261138d565b5050565b6108b1611399565b60005b81811015610918578282828181106108ce576108ce6129a3565b90506020028101906108e091906129b9565b6000868152600a60209081526040808320868452909152902091610905919083612a46565b508061091081612b1c565b9150506108b4565b50505050565b6000610929826113f3565b9050836001600160a01b0316816001600160a01b03161461095c5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176109a95761098c863361069e565b6109a957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166109d057604051633a954ecd60e21b815260040160405180910390fd5b80156109db57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610a6d57600184016000818152600460205260408120549003610a6b576000548114610a6b5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b610abf611399565b60005b81811015610b1b57828282818110610adc57610adc6129a3565b9050602002810190610aee91906129b9565b6000838152600b6020526040902091610b08919083612a46565b5080610b1381612b1c565b915050610ac2565b5060105550565b610b2a611399565b60005b81811015610b8657828282818110610b4757610b476129a3565b9050602002810190610b5991906129b9565b6000838152600c6020526040902091610b73919083612a46565b5080610b7e81612b1c565b915050610b2d565b5060115550565b610b95611399565b60405133904780156108fc02916000818181858888f19350505050158015610bc1573d6000803e3d6000fd5b50565b610bcc611399565b600d5460ff610100909104161515600114610c1e5760405162461bcd60e51b81526020600482015260126024820152716d696e74696e67206e6f742061637469766560701b6044820152606401610892565b600d805462ffff00191662010000179055610c37610b8d565b610c3f610ed4565b565b610c5c838383604051806020016040528060008152506111e8565b505050565b610c696124ba565b6040805160c081018252600a6080820190815269189bdd1d1bdb5b19599d60b21b60a0830152815281518083018352600b81526a189bdd1d1bdb5c9a59da1d60aa1b602082810191909152808301919091528251808401845260078152661d1bdc1b19599d60ca1b8183015282840152825180840190935260088352671d1bdc1c9a59da1d60c21b908301526060810191909152610d056124ba565b60005b6004811015610d6d576000610d33848360048110610d2857610d286129a3565b602002015187611474565b905060105481610d439190612b4b565b838360048110610d5557610d556129a3565b60200201525080610d6581612b1c565b915050610d08565b509392505050565b600061078e826113f3565b610d88611399565b60005b81811015610de457828282818110610da557610da56129a3565b9050602002810190610db791906129b9565b600083815260096020526040902091610dd1919083612a46565b5080610ddc81612b1c565b915050610d8b565b50600f5550565b600b6020526000908152604090208054610e0490612925565b80601f0160208091040260200160405190810160405280929190818152602001828054610e3090612925565b8015610e7d5780601f10610e5257610100808354040283529160200191610e7d565b820191906000526020600020905b815481529060010190602001808311610e6057829003601f168201915b505050505081565b60006001600160a01b038216610eae576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b610edc611399565b610c3f60006114ab565b610eee6124ba565b6000604051806080016040528084604051602001610f0c9190612b7b565b604051602081830303815290604052815260200184604051602001610f319190612ba0565b604051602081830303815290604052815260200184604051602001610f569190612bc5565b604051602081830303815290604052815260200184604051602001610f7b9190612bea565b6040516020818303038152906040528152509050610f976124ba565b60005b6004811015610fff576000610fc5848360048110610fba57610fba6129a3565b602002015188611474565b9050600f5481610fd59190612b4b565b838360048110610fe757610fe76129a3565b60200201525080610ff781612b1c565b915050610f9a565b50949350505050565b60096020526000908152604090208054610e0490612925565b6060600380546107a390612925565b611038611399565b600d805461ff001916610100179055565b600d5460ff61010090910416151560011461109c5760405162461bcd60e51b81526020600482015260136024820152721b5a5b9d1a5b99c81b9bdd08185b1b1bddd959606a1b6044820152606401610892565b600d5462010000900460ff16156110eb5760405162461bcd60e51b81526020600482015260136024820152721b5a5b9d1a5b99c81b9bdd08185b1b1bddd959606a1b6044820152606401610892565b806012546110f99190612c0f565b341461113f5760405162461bcd60e51b81526020600482015260156024820152741b9bdd08195b9bdd59da08195d1a195c881cd95b9d605a1b6044820152606401610892565b610bc133826114fd565b600d54610100900460ff16156111715760405162461bcd60e51b815260040161089290612959565b6108a58282611517565b611183611399565b600d5460ff16156111cd5760405162461bcd60e51b81526020600482015260146024820152731bdddb995c88185b1c9958591e481b5a5b9d195960621b6044820152606401610892565b6111d933600e546114fd565b600d805460ff19166001179055565b6111f384848461091e565b6001600160a01b0383163b156109185761120f84848484611583565b610918576040516368d2bf6b60e11b815260040160405180910390fd5b6060600061127c61123c8461166e565b61124585611701565b61125661125187611afc565b611b37565b60405160200161126893929190612c26565b604051602081830303815290604052611b37565b90508060405160200161128f9190612e8c565b604051602081830303815290604052915050919050565b60138054610e0490612925565b600c6020526000908152604090208054610e0490612925565b6112d4611399565b6001600160a01b0381166113395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610892565b610bc1816114ab565b600a60209081526000928352604080842090915290825290208054610e0490612925565b600080548210801561078e575050600090815260046020526040902054600160e01b161590565b6108a582826001611c8a565b6008546001600160a01b03163314610c3f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610892565b60008181526004602052604081205490600160e01b8216900361145b578060000361145657600054821061143a57604051636f96cda160e11b815260040160405180910390fd5b5b5060001901600081815260046020526040902054801561143b575b919050565b604051636f96cda160e11b815260040160405180910390fd5b60006013838360405160200161148c93929190612f44565b60408051601f1981840301815291905280516020909101209392505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6108a5828260405180602001604052806000815250611d31565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906115b8903390899088908890600401612f6f565b6020604051808303816000875af19250505080156115f3575060408051601f3d908101601f191682019092526115f091810190612fa2565b60015b611651573d808015611621576040519150601f19603f3d011682016040523d82523d6000602084013e611626565b606091505b508051600003611649576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6060600061167b83611d9e565b600101905060008167ffffffffffffffff81111561169b5761169b612731565b6040519080825280601f01601f1916602001820160405280156116c5576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846116cf57509392505050565b6060600061172b83604051806040016040528060048152602001637374656d60e01b815250610ee6565b9050600061175c846040518060400160405280600b81526020016a6c6561662d6c696e696e6760a81b815250610ee6565b9050600061178785604051806040016040528060058152602001646d6174746560d81b815250610ee6565b905060006117bf866040518060400160405280601281526020017173746172744772616469656e7453746f703160701b815250610ee6565b905060006117f7876040518060400160405280601281526020017139ba30b93a23b930b234b2b73a29ba37b81960711b815250610ee6565b9050600061182e886040518060400160405280601181526020017073746f704772616469656e7453746f703160781b815250610ee6565b90506000611865896040518060400160405280601181526020017039ba37b823b930b234b2b73a29ba37b81960791b815250610ee6565b905060006118728a610c61565b88516000908152600960209081526040808320828d01518452818420828e0151855282852060608f015186529483902092519596506118b8959194909390929101612fbf565b60408051601f198184030181528282528951600090815260096020908152838220818d015183528483208d860151845285842060608f01518552959093209395611906959194919201612fbf565b60408051601f198184030181528282528951600090815260096020908152838220818d015183528483208d860151845285842060608f01518552959093209395611954959194919201612fbf565b60408051808303601f190181529181528851600090815260096020818152838320818d015184528484208d860151855285852060608f015186528686208e518752878720948f015187528787208f8901518852978720939792969195909493918f6003602002015181526020019081526020016000206040516020016119e198979695949392919061301a565b60408051808303601f190181529181528751600090815260096020818152838320818c015184528484208c860151855285852060608e015186528686208d518752878720948e015187528787208e8901518852978720939792969195909493918e600360200201518152602001908152602001600020604051602001611a6e98979695949392919061301a565b60408051601f1981840301815282825287516000908152600b6020908152838220818b015183528483208b860151845285842060608d01518552959093209395611abc9591949192016130be565b60408051601f1981840301815290829052611ade9695949392916020016131d0565b60405160208183030381529060405298505050505050505050919050565b60606000611b0983610c61565b9050611b1483611e76565b611b1c61223c565b611b258361229b565b60405160200161128f9392919061338d565b60608151600003611b5657505060408051602081019091526000815290565b6000604051806060016040528060408152602001613baf6040913990506000600384516002611b859190613484565b611b8f9190613497565b611b9a906004612c0f565b67ffffffffffffffff811115611bb257611bb2612731565b6040519080825280601f01601f191660200182016040528015611bdc576020820181803683370190505b509050600182016020820185865187015b80821015611c48576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611bed565b5050600386510660018114611c645760028114611c7757611c7f565b603d6001830353603d6002830353611c7f565b603d60018303535b509195945050505050565b6000611c9583610d75565b90508115611cd457336001600160a01b03821614611cd457611cb7813361069e565b611cd4576040516367d9dca160e11b815260040160405180910390fd5b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b611d3b838361230e565b6001600160a01b0383163b15610c5c576000548281035b611d656000868380600101945086611583565b611d82576040516368d2bf6b60e11b815260040160405180910390fd5b818110611d52578160005414611d9757600080fd5b5050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611ddd5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611e09576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611e2757662386f26fc10000830492506010015b6305f5e1008310611e3f576305f5e100830492506008015b6127108310611e5357612710830492506004015b60648310611e65576064830492506002015b600a831061078e5760010192915050565b6060604051602001611e87906134ab565b604051602081830303815290604052611f00604051806040016040528060048152602001637374656d60e01b81525060405180604001604052806004815260200163199a5b1b60e21b815250600a611efb87604051806040016040528060048152602001637374656d60e01b815250610ee6565b61240c565b611f736040518060400160405280600b81526020016a6c6561662d6c696e696e6760a81b81525060405180604001604052806004815260200163199a5b1b60e21b815250600c611efb886040518060400160405280600b81526020016a6c6561662d6c696e696e6760a81b815250610ee6565b611fda604051806040016040528060058152602001646d6174746560d81b81525060405180604001604052806004815260200163199a5b1b60e21b8152506014611efb89604051806040016040528060058152602001646d6174746560d81b815250610ee6565b6120616040518060400160405280601281526020017173746172744772616469656e7453746f703160701b8152506040518060400160405280600a81526020016939ba37b816b1b7b637b960b11b8152506005611efb8a6040518060400160405280601281526020017173746172744772616469656e7453746f703160701b815250610ee6565b6120e86040518060400160405280601281526020017139ba30b93a23b930b234b2b73a29ba37b81960711b8152506040518060400160405280600a81526020016939ba37b816b1b7b637b960b11b815250600f611efb8b6040518060400160405280601281526020017139ba30b93a23b930b234b2b73a29ba37b81960711b815250610ee6565b61216d6040518060400160405280601181526020017073746f704772616469656e7453746f703160781b8152506040518060400160405280600a81526020016939ba37b816b1b7b637b960b11b8152506019611efb8c6040518060400160405280601181526020017073746f704772616469656e7453746f703160781b815250610ee6565b6121f26040518060400160405280601181526020017039ba37b823b930b234b2b73a29ba37b81960791b8152506040518060400160405280600a81526020016939ba37b816b1b7b637b960b11b8152506023611efb8d6040518060400160405280601181526020017039ba37b823b930b234b2b73a29ba37b81960791b815250610ee6565b6040516020016122089796959493929190613871565b60408051601f19818403018152908290526122269291602001613903565b6040516020818303038152906040529050919050565b60608060005b6011548110156122955781600c600083815260200190815260200160002060405160200161227192919061395d565b6040516020818303038152906040529150808061228d90612b1c565b915050612242565b50919050565b80516000908152600a6020818152604080842084805282528084208286015185528383528185206001865283528185208287015186528484528286206002875284528286206060808901518852958552838720600388528552958390209251949561222695929491939092909101613984565b60008054908290036123335760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146123e257808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016123aa565b508160000361240357604051622e076360e81b815260040160405180910390fd5b60005550505050565b606084856124198561166e565b8760405160200161242d94939291906139ab565b60408051601f19818403018152828252845160009081526009602090815283822081880151835284832088860151845285842060608a01518552959093209395612483958b959294869490938593849201613a75565b60408051601f19818403018152908290526124a19291602001613b7f565b6040516020818303038152906040529050949350505050565b60405180608001604052806004906020820280368337509192915050565b6001600160e01b031981168114610bc157600080fd5b60006020828403121561250057600080fd5b813561250b816124d8565b9392505050565b60005b8381101561252d578181015183820152602001612515565b50506000910152565b6000815180845261254e816020860160208601612512565b601f01601f19169290920160200192915050565b60208152600061250b6020830184612536565b60006020828403121561258757600080fd5b5035919050565b80356001600160a01b038116811461145657600080fd5b600080604083850312156125b857600080fd5b6125c18361258e565b946020939093013593505050565b60008083601f8401126125e157600080fd5b50813567ffffffffffffffff8111156125f957600080fd5b6020830191508360208260051b850101111561261457600080fd5b9250929050565b60008060006040848603121561263057600080fd5b83359250602084013567ffffffffffffffff81111561264e57600080fd5b61265a868287016125cf565b9497909650939450505050565b60008060006060848603121561267c57600080fd5b6126858461258e565b92506126936020850161258e565b9150604084013590509250925092565b600080602083850312156126b657600080fd5b823567ffffffffffffffff8111156126cd57600080fd5b6126d9858286016125cf565b90969095509350505050565b60808101818360005b600481101561270d5781518352602092830192909101906001016126ee565b50505092915050565b60006020828403121561272857600080fd5b61250b8261258e565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561276257612762612731565b604051601f8501601f19908116603f0116810190828211818310171561278a5761278a612731565b816040528093508581528686860111156127a357600080fd5b858560208301376000602087830101525050509392505050565b600080604083850312156127d057600080fd5b82359150602083013567ffffffffffffffff8111156127ee57600080fd5b8301601f810185136127ff57600080fd5b61280e85823560208401612747565b9150509250929050565b6000806040838503121561282b57600080fd5b6128348361258e565b91506020830135801515811461284957600080fd5b809150509250929050565b6000806000806080858703121561286a57600080fd5b6128738561258e565b93506128816020860161258e565b925060408501359150606085013567ffffffffffffffff8111156128a457600080fd5b8501601f810187136128b557600080fd5b6128c487823560208401612747565b91505092959194509250565b600080604083850312156128e357600080fd5b6128ec8361258e565b91506128fa6020840161258e565b90509250929050565b6000806040838503121561291657600080fd5b50508035926020909101359150565b600181811c9082168061293957607f821691505b60208210810361229557634e487b7160e01b600052602260045260246000fd5b6020808252602a908201527f63616e6e6f7420616c6c6f7720617070726f76616c73207768696c65207374696040820152696c6c206d696e74696e6760b01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126129d057600080fd5b83018035915067ffffffffffffffff8211156129eb57600080fd5b60200191503681900382131561261457600080fd5b601f821115610c5c57600081815260208120601f850160051c81016020861015612a275750805b601f850160051c820191505b81811015610aaf57828155600101612a33565b67ffffffffffffffff831115612a5e57612a5e612731565b612a7283612a6c8354612925565b83612a00565b6000601f841160018114612aa65760008515612a8e5750838201355b600019600387901b1c1916600186901b178355611d97565b600083815260209020601f19861690835b82811015612ad75786850135825560209485019460019092019101612ab7565b5086821015612af45760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201612b2e57612b2e612b06565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612b5a57612b5a612b35565b500690565b60008151612b71818560208601612512565b9290920192915050565b60008251612b8d818460208701612512565b603160f81b920191825250600101919050565b60008251612bb2818460208701612512565b601960f91b920191825250600101919050565b60008251612bd7818460208701612512565b603360f81b920191825250600101919050565b60008251612bfc818460208701612512565b600d60fa1b920191825250600101919050565b808202811582820484141761078e5761078e612b06565b707b226e616d65223a202254756c6970202360781b81528351600090612c53816011850160208901612512565b601160f91b6011918401918201527f2c20226465736372697074696f6e223a20224e6f726d69657320617265206d6560128201527f6d652d696e672074756c69707320616761696e20616e6420796f75277665207360328201527f70656e7420746865206c617374203220796561727320627579696e272027656d60528201527f2e20576879206e6f74206d696e74206f6e653f2054756c6970204d616e69612160728201527f2069732067656e657261746976652c20616e696d617465642c20616e6420313060928201527f3025206f6e2d636861696e20766563746f72206172742e204e6f20616c6c6f7760b28201527f6c6973742c206e6f2070726f6d697365732c20616e64206e6f20726f79616c7460d28201527f6965732e2054756c6970204d616e69612120697320612063656c65627261746960f28201527f6f6e206f66206972726174696f6e616c20657875626572616e63652e205468656101128201527f20636f6e74656e742069732063633020616e64206c6f77206f6e207261726974610132820152623c971160e91b610152820152612e82612e75612e68612e62612e25612e1f61015587016f016101130ba3a3934b13aba32b9911d160851b815260100190565b8a612b5f565b7f2c2022696d6167655f64617461223a2022646174613a696d6167652f7376672b81526a1e1b5b0ed8985cd94d8d0b60aa1b6020820152602b0190565b87612b5f565b601160f91b815260010190565b607d60f81b815260010190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612ec481601d850160208701612512565b91909101601d0192915050565b60008154612ede81612925565b60018281168015612ef65760018114612f0b57612f3a565b60ff1984168752821515830287019450612f3a565b8560005260208060002060005b85811015612f315781548a820152908401908201612f18565b50505082870194505b5050505092915050565b6000612f508286612ed1565b8451612f60818360208901612512565b01928352505060200192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612e8290830184612536565b600060208284031215612fb457600080fd5b815161250b816124d8565b602360f81b81526000612fd56001830187612ed1565b612c2360f01b808252612feb6002830188612ed1565b9150808252612ffd6002830187612ed1565b908152905061300f6002820185612ed1565b979650505050505050565b602360f81b81526000613030600183018b612ed1565b612c2360f01b80825260026130478184018d612ed1565b92508183526130588184018c612ed1565b92508183526130698184018b612ed1565b925081835261307a8184018a612ed1565b925081835261308b81840189612ed1565b925081835261309c81840188612ed1565b92508183526130ad81840187612ed1565b9d9c50505050505050505050505050565b7f227d2c207b2274726169745f74797065223a2022426f74746f6d4c656674222c81526a10113b30b63ab2911d101160a91b60208201526000613104602b830187612ed1565b7f227d2c207b2274726169745f74797065223a2022426f74746f6d52696768742281526b1610113b30b63ab2911d101160a11b6020820152613149602c820187612ed1565b7f227d2c207b2274726169745f74797065223a2022546f704c656674222c20227681526730b63ab2911d101160c11b6020820152905061318c6028820186612ed1565b7f227d2c207b2274726169745f74797065223a2022546f705269676874222c20228152683b30b63ab2911d101160b91b6020820152905061300f6029820185612ed1565b7f5b7b2274726169745f74797065223a20225374656d436f6c6f7273222c20227681526730b63ab2911d101160c11b602082015260008751613219816028850160208c01612512565b7f227d2c207b2274726169745f74797065223a20224c696e696e67436f6c6f72736028918401918201526c111610113b30b63ab2911d101160991b6048820152875161326c816055840160208c01612512565b7f227d2c207b2274726169745f74797065223a20226d61747465436f6c6f727322605592909101918201526b1610113b30b63ab2911d101160a11b607582015286516132bf816081840160208b01612512565b7f227d2c207b2274726169745f74797065223a202273746172744772616469656e60819290910191820152733a21b7b637b939911610113b30b63ab2911d101160611b60a182015261338061337161336b61336561332060b586018b612b5f565b7f227d2c207b2274726169745f74797065223a202273746f704772616469656e7481527221b7b637b939911610113b30b63ab2911d101160691b602082015260330190565b88612b5f565b86612b5f565b62227d5d60e81b815260030190565b9998505050505050505050565b7f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323081527f30302f737667272076696577426f783d2730203020383030203132303027207360208201527f74796c653d27656e61626c652d6261636b67726f756e643a6e6577203020302060408201527f38303020313230302720786d6c3a73706163653d277072657365727665273e0060608201526000845161343781607f850160208901612512565b84519083019061344e81607f840160208901612512565b845191019061346481607f840160208801612512565b651e17b9bb339f60d11b607f929091019182015260850195945050505050565b8082018082111561078e5761078e612b06565b6000826134a6576134a6612b35565b500490565b7f2e776874207b66696c6c3a2077686974653b20616e696d6174696f6e3a20627481527f7720313573206561736520616c7465726e61746520696e66696e6974657d200060208201527f2e626c636b207b66696c6c3a20626c61636b3b20616e696d6174696f6e3a2077603f8201527f746220313573206561736520616c7465726e61746520696e66696e6974657d20605f8201527f406b65796672616d657320627477207b203025207b2066696c6c3a2023323331607f8201527f663230207d20323525207b2066696c6c3a2023663966396639207d2035302520609f8201527f7b2066696c6c3a20233233316632307d20373525207b2066696c6c3a2023663960bf8201527f66396639207d2031303025207b2066696c6c3a20233233316632307d207d200060df8201527f406b65796672616d657320777462207b203025207b2066696c6c3a202366396660fe8201527f396639207d20323525207b2066696c6c3a2023323331663230207d203530252061011e8201527f7b2066696c6c3a20236639663966397d20373525207b2066696c6c3a2023323361013e8201527f31663230207d2031303025207b2066696c6c3a20236639663966397d207d200061015e8201527f2373746172744772616469656e74207b616e696d6174696f6e3a20737461727461017d8201527f4772616469656e7420313573206561736520616c7465726e61746520696e666961019d8201526503734ba32be960d51b6101bd8201527f406b65796672616d65732073746172744772616469656e74207b203025207b206101c38201527f7472616e73666f726d3a20726f74617465283029207d203530257b207472616e6101e38201527f73666f726d3a20726f7461746528323064656729207d20313030257b207472616102038201527f6e73666f726d3a20726f7461746528343064656729207d207d200000000000006102238201527f2373746f704772616469656e74207b616e696d6174696f6e3a2073746f70477261023d8201527f616469656e7420313573206561736520616c7465726e61746520696e66696e6961025d8201526303a32be960e51b61027d8201527f406b65796672616d65732073746f704772616469656e74207b203025207b20746102818201527f72616e73666f726d3a20726f74617465283029207d203530257b207472616e736102a18201527f666f726d3a20726f7461746528323064656729207d20313030257b207472616e6102c18201527f73666f726d3a20726f7461746528343064656729207d207d20000000000000006102e182015260006102fa820161078e565b6000885160206138848285838e01612512565b8951918401916138978184848e01612512565b89519201916138a98184848d01612512565b88519201916138bb8184848c01612512565b87519201916138cd8184848b01612512565b86519201916138df8184848a01612512565b85519201916138f18184848901612512565b919091019a9950505050505050505050565b661e39ba3cb6329f60c91b815260008351613925816007850160208801612512565b83519083019061393c816007840160208801612512565b671e17b9ba3cb6329f60c11b60079290910191820152600f01949350505050565b6000835161396f818460208801612512565b61397b81840185612ed1565b95945050505050565b6000612e826139a561399f613999858a612ed1565b88612ed1565b86612ed1565b84612ed1565b601760f91b8152600085516139c7816001850160208a01612512565b6b03db0b734b6b0ba34b7b71d160a51b60019184019182015285516139f381600d840160208a01612512565b600160fd1b600d92909101918201528451613a1581600e840160208901612512565b7f73206561736520616c7465726e61746520696e66696e697465207d2000000000600e92909101918201526a02035b2bcb33930b6b2b9960ad1b602a8201528351613a67816035840160208801612512565b016035019695505050505050565b670103d901812903d960c51b815260008951613a98816008850160208e01612512565b8083019050623a202360e81b806008830152613ab7600b83018c612ed1565b91506703e90199992903d960c51b82528951613ada816008850160208e01612512565b60089201918201819052613af1600b83018a612ed1565b9150680103e901b1b12903d960bd1b82528751613b15816009850160208c01612512565b6009920191820152613b2a600c820187612ed1565b90506803e9018981812903d960bd1b8152613b70613b6061399f613b516009850189612b5f565b623a202360e81b815260030190565b6303e903e960e51b815260040190565b9b9a5050505050505050505050565b60008351613b91818460208801612512565b835190830190613ba5818360208801612512565b0194935050505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212202712d26d801cd7ea291efc557768a75f1d8a1ac63fc2543844e870e5e3a6773a64736f6c63430008110033

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

000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000183864383438656230636662303030383032616163613230650000000000000000

-----Decoded View---------------
Arg [0] : _secret (string): 8d848eb0cfb000802aaca20e

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [2] : 3864383438656230636662303030383032616163613230650000000000000000


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.