ETH Price: $3,487.20 (+2.67%)

Token

Cream (ICS)
 

Overview

Max Total Supply

2,222 ICS

Holders

612

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
airgeek.eth
Balance
1 ICS
0xd076a5dbe634e6855d1d49177d3e35759fd1f49c
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:
Cream

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-02-13
*/

// SPDX-License-Identifier: MIT

// File: operator-filter-registry/src/IOperatorFilterRegistry.sol

pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function unregister(address addr) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

// File: operator-filter-registry/src/OperatorFilterer.sol


pragma solidity ^0.8.13;


/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */
abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

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

    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

// File: operator-filter-registry/src/DefaultOperatorFilterer.sol


pragma solidity ^0.8.13;


/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 */
abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}

// File: @openzeppelin/contracts/utils/math/Math.sol


// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/utils/Strings.sol


// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;


/**
 * @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: @openzeppelin/contracts/utils/cryptography/ECDSA.sol


// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;


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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

// File: @openzeppelin/contracts/utils/Context.sol


// 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: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;


/**
 * @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: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

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

// File: @openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol


// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: @openzeppelin/contracts/finance/PaymentSplitter.sol


// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;




/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the
 * time of contract deployment and can't be updated thereafter.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Getter for the amount of payee's releasable Ether.
     */
    function releasable(address account) public view returns (uint256) {
        uint256 totalReceived = address(this).balance + totalReleased();
        return _pendingPayment(account, totalReceived, released(account));
    }

    /**
     * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an
     * IERC20 contract.
     */
    function releasable(IERC20 token, address account) public view returns (uint256) {
        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        return _pendingPayment(account, totalReceived, released(token, account));
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        // _totalReleased is the sum of all values in _released.
        // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow.
        _totalReleased += payment;
        unchecked {
            _released[account] += payment;
        }

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(token, account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token].
        // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment"
        // cannot overflow.
        _erc20TotalReleased[token] += payment;
        unchecked {
            _erc20Released[token][account] += payment;
        }

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

// File: @openzeppelin/contracts/security/ReentrancyGuard.sol


// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

// File: https://github.com/chiru-labs/ERC721A/blob/main/contracts/IERC721A.sol


// 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: https://github.com/chiru-labs/ERC721A/blob/main/contracts/ERC721A.sol


// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;


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

pragma solidity ^ 0.8.2;
contract Cream is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {

    /// @notice status booleans for phases 
    bool public isAllowlistActive = false;

    /// @notice settings for future burn utility
    address public meltContract;
    bool public isMeltActive = false;
    bool public meltDependent = false;

    /// @notice signer for allowlist
    address private signer = 0x9178080862BB0b4DDf91Ec3C3DB2A184C068180a;

    /// @notice collection settings
    uint256 public MAX_SUPPLY = 2222;
    uint256 private maxMintPerWalletAllowlist = 5;

    /// @notice mnetadata path
    string public _metadata;

    /// @notice tracks number minted per person for each phase
    mapping(address => uint256) public numMintedPerPersonAllowlist;

    constructor() ERC721A("Cream", "ICS") {}

    /// @notice mint allowlist
    function mintAllowlist(address _address, bytes calldata _voucher, uint256 _tokenAmount) external nonReentrant {
        uint256 ts = totalSupply();
        require(isAllowlistActive);
        require(_tokenAmount <= maxMintPerWalletAllowlist, "Purchase would exceed max tokens per tx in this phase");
        require(ts + _tokenAmount <= MAX_SUPPLY, "Purchase would exceed max tokens in the allowlist");
        require(msg.sender == _address, "Not your voucher");
        require(msg.sender == tx.origin);
        require(numMintedPerPersonAllowlist[_address] + _tokenAmount <= maxMintPerWalletAllowlist, "Purchase would exceed max tokens per Wallet");

        bytes32 hash = keccak256(
            abi.encodePacked(_address)
        );
        require(_verifySignature(signer, hash, _voucher), "Invalid voucher");

        _safeMint(_address, _tokenAmount);
        numMintedPerPersonAllowlist[_address] += _tokenAmount;
    }


    /// @notice reserve to wallets, only owner
    function reserve(address addr, uint256 _tokenAmount) public onlyOwner {
        uint256 ts = totalSupply();
        require(ts + _tokenAmount <= MAX_SUPPLY);
        _safeMint(addr, _tokenAmount);
    }

    /// @notice melt token, future utility
    function melt(uint256 token) external {
        require(isMeltActive);
        if (meltDependent) {
            require(tx.origin == meltContract || msg.sender == meltContract);
            _burn(token);
        } else {
            require(ownerOf(token) == msg.sender);
            _burn(token);
        }
    }

    /// @notice verify voucher
    function _verifySignature(address _signer, bytes32 _hash, bytes memory _signature) private pure returns(bool) {
        return _signer == ECDSA.recover(ECDSA.toEthSignedMessageHash(_hash), _signature);
    }

    /// @notice set signer for signature
    function setSigner(address _signer) external onlyOwner {
        signer = _signer;
    }

    /// @notice set allowlist active
    function setAllowlist(bool _status) external onlyOwner {
        isAllowlistActive = _status;
    }

    /// @notice set melt active
    function setMelt(bool _status) external onlyOwner {
        isMeltActive = _status;
    }

    /// @notice set future melt utility contract
    function setMeltContract(address _contract) external onlyOwner {
        meltContract = _contract;
    }

    /// @notice set burn dependent on a external contract
    function setMeltDependent(bool _status) external onlyOwner {
        meltDependent = _status;
    }

    /// @notice set max mint per wallet for allowlist
    function setMaxMintPerWalletAllowlist(uint256 _amount) external onlyOwner {
        maxMintPerWalletAllowlist = _amount;
    }

    /// @notice set metadata path
    function setMetadata(string memory metadata_) external onlyOwner {
        _metadata = metadata_;
    }

    /// @notice read metadata
    function _baseURI() internal view virtual override returns(string memory) {
        return _metadata;
    }

    /// @notice withdraw funds to deployer wallet
    function withdraw() public payable onlyOwner {
        (bool success, ) = payable(msg.sender).call {
            value: address(this).balance
        }("");
        require(success);
    }

    /// @notice opensea royalty filter

   function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
       super.setApprovalForAll(operator, approved);
   }
 
   function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
       super.approve(operator, tokenId);
   }
 
   function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
       super.transferFrom(from, to, tokenId);
   }
 
   function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
       super.safeTransferFrom(from, to, tokenId);
   }
 
   function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
       public
       override
       payable
       onlyAllowedOperator(from)
   {
       super.safeTransferFrom(from, to, tokenId, data);
   }

}

Contract Security Audit

Contract ABI

[{"inputs":[],"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":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","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":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_metadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAllowlistActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMeltActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"melt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"meltContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"meltDependent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes","name":"_voucher","type":"bytes"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"mintAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numMintedPerPersonAllowlist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"reserve","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":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxMintPerWalletAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setMelt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"setMeltContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setMeltDependent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"metadata_","type":"string"}],"name":"setMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","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":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

6080604052600a805460ff61ffff60a81b0119169055600b80546001600160a01b031916739178080862bb0b4ddf91ec3c3db2a184c068180a1790556108ae600c556005600d553480156200005357600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb6600160405180604001604052806005815260200164437265616d60d81b8152506040518060400160405280600381526020016249435360e81b8152508160029081620000b6919062000320565b506003620000c5828262000320565b50506000805550620000d73362000229565b60016009556daaeb6d7670e522a718067333cd4e3b15620002215780156200016f57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200015057600080fd5b505af115801562000165573d6000803e3d6000fd5b5050505062000221565b6001600160a01b03821615620001c05760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000135565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200020757600080fd5b505af11580156200021c573d6000803e3d6000fd5b505050505b5050620003ec565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002a657607f821691505b602082108103620002c757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200031b57600081815260208120601f850160051c81016020861015620002f65750805b601f850160051c820191505b81811015620003175782815560010162000302565b5050505b505050565b81516001600160401b038111156200033c576200033c6200027b565b62000354816200034d845462000291565b84620002cd565b602080601f8311600181146200038c5760008415620003735750858301515b600019600386901b1c1916600185901b17855562000317565b600085815260208120601f198616915b82811015620003bd578886015182559484019460019091019084016200039c565b5085821015620003dc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6121d380620003fc6000396000f3fe60806040526004361061020f5760003560e01c806370a0823111610118578063a22cb465116100a0578063cc47a40b1161006f578063cc47a40b146105c5578063d2d515cc146105e5578063e985e9c5146105ff578063f2fde38b1461061f578063fb3600271461063f57600080fd5b8063a22cb46514610552578063a49a1e7d14610572578063b88d4fde14610592578063c87b56dd146105a557600080fd5b806386c84315116100e757806386c84315146104bf5780638c83ed33146104df5780638da5cb5b146104ff57806395d89b411461051d5780639a0fdde71461053257600080fd5b806370a0823114610448578063715018a61461046857806377bcf5f41461047d57806384cfcdbb1461049e57600080fd5b806339371b251161019b57806342842e0e1161016a57806342842e0e146103b55780634659aeb6146103c85780635ad1c1b5146103e85780636352211e146104085780636c19e7831461042857600080fd5b806339371b25146103495780633ab23d9a1461035e5780633ccfd60b1461038b57806341f434341461039357600080fd5b806318160ddd116101e257806318160ddd146102b85780631f0d7e5d146102db57806323b872dd146102fb578063280ffeda1461030e57806332cb6b0c1461033357600080fd5b806301ffc9a71461021457806306fdde0314610249578063081812fc1461026b578063095ea7b3146102a3575b600080fd5b34801561022057600080fd5b5061023461022f366004611bc0565b61065f565b60405190151581526020015b60405180910390f35b34801561025557600080fd5b5061025e6106b1565b6040516102409190611c2d565b34801561027757600080fd5b5061028b610286366004611c40565b610743565b6040516001600160a01b039091168152602001610240565b6102b66102b1366004611c70565b610787565b005b3480156102c457600080fd5b50600154600054035b604051908152602001610240565b3480156102e757600080fd5b506102b66102f6366004611ca8565b6107a0565b6102b6610309366004611cc5565b6107c6565b34801561031a57600080fd5b50600a5461028b9061010090046001600160a01b031681565b34801561033f57600080fd5b506102cd600c5481565b34801561035557600080fd5b5061025e6107f1565b34801561036a57600080fd5b506102cd610379366004611d01565b600f6020526000908152604090205481565b6102b661087f565b34801561039f57600080fd5b5061028b6daaeb6d7670e522a718067333cd4e81565b6102b66103c3366004611cc5565b6108df565b3480156103d457600080fd5b506102b66103e3366004611c40565b610904565b3480156103f457600080fd5b506102b6610403366004611ca8565b610911565b34801561041457600080fd5b5061028b610423366004611c40565b61092c565b34801561043457600080fd5b506102b6610443366004611d01565b610937565b34801561045457600080fd5b506102cd610463366004611d01565b610961565b34801561047457600080fd5b506102b66109b0565b34801561048957600080fd5b50600a5461023490600160a81b900460ff1681565b3480156104aa57600080fd5b50600a5461023490600160b01b900460ff1681565b3480156104cb57600080fd5b506102b66104da366004611d1c565b6109c4565b3480156104eb57600080fd5b506102b66104fa366004611c40565b610cbd565b34801561050b57600080fd5b506008546001600160a01b031661028b565b34801561052957600080fd5b5061025e610d41565b34801561053e57600080fd5b506102b661054d366004611ca8565b610d50565b34801561055e57600080fd5b506102b661056d366004611da5565b610d76565b34801561057e57600080fd5b506102b661058d366004611e68565b610d8a565b6102b66105a0366004611eb1565b610da2565b3480156105b157600080fd5b5061025e6105c0366004611c40565b610dcf565b3480156105d157600080fd5b506102b66105e0366004611c70565b610e53565b3480156105f157600080fd5b50600a546102349060ff1681565b34801561060b57600080fd5b5061023461061a366004611f2d565b610e8f565b34801561062b57600080fd5b506102b661063a366004611d01565b610ebd565b34801561064b57600080fd5b506102b661065a366004611d01565b610f33565b60006301ffc9a760e01b6001600160e01b03198316148061069057506380ac58cd60e01b6001600160e01b03198316145b806106ab5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600280546106c090611f60565b80601f01602080910402602001604051908101604052809291908181526020018280546106ec90611f60565b80156107395780601f1061070e57610100808354040283529160200191610739565b820191906000526020600020905b81548152906001019060200180831161071c57829003601f168201915b5050505050905090565b600061074e82610f63565b61076b576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b8161079181610f8a565b61079b8383611043565b505050565b6107a861104f565b600a8054911515600160b01b0260ff60b01b19909216919091179055565b826001600160a01b03811633146107e0576107e033610f8a565b6107eb8484846110a9565b50505050565b600e80546107fe90611f60565b80601f016020809104026020016040519081016040528092919081815260200182805461082a90611f60565b80156108775780601f1061084c57610100808354040283529160200191610877565b820191906000526020600020905b81548152906001019060200180831161085a57829003601f168201915b505050505081565b61088761104f565b604051600090339047908381818185875af1925050503d80600081146108c9576040519150601f19603f3d011682016040523d82523d6000602084013e6108ce565b606091505b50509050806108dc57600080fd5b50565b826001600160a01b03811633146108f9576108f933610f8a565b6107eb84848461123a565b61090c61104f565b600d55565b61091961104f565b600a805460ff1916911515919091179055565b60006106ab82611255565b61093f61104f565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b03821661098a576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6109b861104f565b6109c260006112d6565b565b6109cc611328565b60006109db6001546000540390565b600a5490915060ff166109ed57600080fd5b600d54821115610a625760405162461bcd60e51b815260206004820152603560248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e736044820152742070657220747820696e207468697320706861736560581b60648201526084015b60405180910390fd5b600c54610a6f8383611f9a565b1115610ad75760405162461bcd60e51b815260206004820152603160248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e73604482015270081a5b881d1a1948185b1b1bdddb1a5cdd607a1b6064820152608401610a59565b336001600160a01b03861614610b225760405162461bcd60e51b815260206004820152601060248201526f2737ba103cb7bab9103b37bab1b432b960811b6044820152606401610a59565b333214610b2e57600080fd5b600d546001600160a01b0386166000908152600f6020526040902054610b55908490611f9a565b1115610bb75760405162461bcd60e51b815260206004820152602b60248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e7360448201526a081c195c8815d85b1b195d60aa1b6064820152608401610a59565b6040516bffffffffffffffffffffffff19606087901b16602082015260009060340160408051601f198184030181528282528051602091820120600b54601f89018390048302850183019093528784529350610c3b926001600160a01b03909216918491899089908190840183828082843760009201919091525061138192505050565b610c795760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b2103b37bab1b432b960891b6044820152606401610a59565b610c838684611400565b6001600160a01b0386166000908152600f602052604081208054859290610cab908490611f9a565b90915550506001600955506107eb9050565b600a54600160a81b900460ff16610cd357600080fd5b600a54600160b01b900460ff1615610d2457600a5461010090046001600160a01b0316321480610d125750600a5461010090046001600160a01b031633145b610d1b57600080fd5b6108dc8161141a565b33610d2e8261092c565b6001600160a01b031614610d1b57600080fd5b6060600380546106c090611f60565b610d5861104f565b600a8054911515600160a81b0260ff60a81b19909216919091179055565b81610d8081610f8a565b61079b8383611425565b610d9261104f565b600e610d9e8282612001565b5050565b836001600160a01b0381163314610dbc57610dbc33610f8a565b610dc885858585611491565b5050505050565b6060610dda82610f63565b610df757604051630a14c4b560e41b815260040160405180910390fd5b6000610e016114d5565b90508051600003610e215760405180602001604052806000815250610e4c565b80610e2b846114e4565b604051602001610e3c9291906120c1565b6040516020818303038152906040525b9392505050565b610e5b61104f565b6000610e6a6001546000540390565b600c54909150610e7a8383611f9a565b1115610e8557600080fd5b61079b8383611400565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b610ec561104f565b6001600160a01b038116610f2a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a59565b6108dc816112d6565b610f3b61104f565b600a80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60008054821080156106ab575050600090815260046020526040902054600160e01b161590565b6daaeb6d7670e522a718067333cd4e3b156108dc57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610ff7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101b91906120f0565b6108dc57604051633b79c77360e21b81526001600160a01b0382166004820152602401610a59565b610d9e82826001611528565b6008546001600160a01b031633146109c25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a59565b60006110b482611255565b9050836001600160a01b0316816001600160a01b0316146110e75760405162a1148160e81b815260040160405180910390fd5b600082815260066020526040902080546111138187335b6001600160a01b039081169116811491141790565b61113e576111218633610e8f565b61113e57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661116557604051633a954ecd60e21b815260040160405180910390fd5b801561117057600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611202576001840160008181526004602052604081205490036112005760005481146112005760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b031660008051602061217e83398151915260405160405180910390a45b505050505050565b61079b83838360405180602001604052806000815250610da2565b60008181526004602052604081205490600160e01b821690036112bd57806000036112b857600054821061129c57604051636f96cda160e11b815260040160405180910390fd5b5b5060001901600081815260046020526040902054801561129d575b919050565b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60026009540361137a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a59565b6002600955565b60006113e36113dd846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b836115cf565b6001600160a01b0316846001600160a01b03161490509392505050565b610d9e8282604051806020016040528060008152506115f3565b6108dc816000611659565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61149c8484846107c6565b6001600160a01b0383163b156107eb576114b884848484611791565b6107eb576040516368d2bf6b60e11b815260040160405180910390fd5b6060600e80546106c090611f60565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806114fe5750819003601f19909101908152919050565b60006115338361092c565b9050811561157257336001600160a01b03821614611572576115558133610e8f565b611572576040516367d9dca160e11b815260040160405180910390fd5b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b60008060006115de858561187d565b915091506115eb816118c2565b509392505050565b6115fd8383611a0c565b6001600160a01b0383163b1561079b576000548281035b6116276000868380600101945086611791565b611644576040516368d2bf6b60e11b815260040160405180910390fd5b818110611614578160005414610dc857600080fd5b600061166483611255565b90508060008061168286600090815260066020526040902080549091565b9150915084156116c2576116978184336110fe565b6116c2576116a58333610e8f565b6116c257604051632ce44b5f60e11b815260040160405180910390fd5b80156116cd57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b8516900361175b576001860160008181526004602052604081205490036117595760005481146117595760008181526004602052604090208590555b505b60405186906000906001600160a01b0386169060008051602061217e833981519152908390a45050600180548101905550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906117c690339089908890889060040161210d565b6020604051808303816000875af1925050508015611801575060408051601f3d908101601f191682019092526117fe9181019061214a565b60015b61185f573d80801561182f576040519150601f19603f3d011682016040523d82523d6000602084013e611834565b606091505b508051600003611857576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60008082516041036118b35760208301516040840151606085015160001a6118a787828585611ae6565b945094505050506118bb565b506000905060025b9250929050565b60008160048111156118d6576118d6612167565b036118de5750565b60018160048111156118f2576118f2612167565b0361193f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a59565b600281600481111561195357611953612167565b036119a05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a59565b60038160048111156119b4576119b4612167565b036108dc5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a59565b6000805490829003611a315760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b1783179055828401908390839060008051602061217e8339815191528180a4600183015b818114611abc578083600060008051602061217e833981519152600080a4600101611a96565b5081600003611add57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611b1d5750600090506003611ba1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b71573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b9a57600060019250925050611ba1565b9150600090505b94509492505050565b6001600160e01b0319811681146108dc57600080fd5b600060208284031215611bd257600080fd5b8135610e4c81611baa565b60005b83811015611bf8578181015183820152602001611be0565b50506000910152565b60008151808452611c19816020860160208601611bdd565b601f01601f19169290920160200192915050565b602081526000610e4c6020830184611c01565b600060208284031215611c5257600080fd5b5035919050565b80356001600160a01b03811681146112b857600080fd5b60008060408385031215611c8357600080fd5b611c8c83611c59565b946020939093013593505050565b80151581146108dc57600080fd5b600060208284031215611cba57600080fd5b8135610e4c81611c9a565b600080600060608486031215611cda57600080fd5b611ce384611c59565b9250611cf160208501611c59565b9150604084013590509250925092565b600060208284031215611d1357600080fd5b610e4c82611c59565b60008060008060608587031215611d3257600080fd5b611d3b85611c59565b9350602085013567ffffffffffffffff80821115611d5857600080fd5b818701915087601f830112611d6c57600080fd5b813581811115611d7b57600080fd5b886020828501011115611d8d57600080fd5b95986020929092019750949560400135945092505050565b60008060408385031215611db857600080fd5b611dc183611c59565b91506020830135611dd181611c9a565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611e0d57611e0d611ddc565b604051601f8501601f19908116603f01168101908282118183101715611e3557611e35611ddc565b81604052809350858152868686011115611e4e57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611e7a57600080fd5b813567ffffffffffffffff811115611e9157600080fd5b8201601f81018413611ea257600080fd5b61187584823560208401611df2565b60008060008060808587031215611ec757600080fd5b611ed085611c59565b9350611ede60208601611c59565b925060408501359150606085013567ffffffffffffffff811115611f0157600080fd5b8501601f81018713611f1257600080fd5b611f2187823560208401611df2565b91505092959194509250565b60008060408385031215611f4057600080fd5b611f4983611c59565b9150611f5760208401611c59565b90509250929050565b600181811c90821680611f7457607f821691505b602082108103611f9457634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156106ab57634e487b7160e01b600052601160045260246000fd5b601f82111561079b57600081815260208120601f850160051c81016020861015611fe25750805b601f850160051c820191505b8181101561123257828155600101611fee565b815167ffffffffffffffff81111561201b5761201b611ddc565b61202f816120298454611f60565b84611fbb565b602080601f831160018114612064576000841561204c5750858301515b600019600386901b1c1916600185901b178555611232565b600085815260208120601f198616915b8281101561209357888601518255948401946001909101908401612074565b50858210156120b15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600083516120d3818460208801611bdd565b8351908301906120e7818360208801611bdd565b01949350505050565b60006020828403121561210257600080fd5b8151610e4c81611c9a565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061214090830184611c01565b9695505050505050565b60006020828403121561215c57600080fd5b8151610e4c81611baa565b634e487b7160e01b600052602160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220f3b21bef6bfd96d302b7b1214d75e769378d29fc4c6e4a4f426dece96e97951d64736f6c63430008110033

Deployed Bytecode

0x60806040526004361061020f5760003560e01c806370a0823111610118578063a22cb465116100a0578063cc47a40b1161006f578063cc47a40b146105c5578063d2d515cc146105e5578063e985e9c5146105ff578063f2fde38b1461061f578063fb3600271461063f57600080fd5b8063a22cb46514610552578063a49a1e7d14610572578063b88d4fde14610592578063c87b56dd146105a557600080fd5b806386c84315116100e757806386c84315146104bf5780638c83ed33146104df5780638da5cb5b146104ff57806395d89b411461051d5780639a0fdde71461053257600080fd5b806370a0823114610448578063715018a61461046857806377bcf5f41461047d57806384cfcdbb1461049e57600080fd5b806339371b251161019b57806342842e0e1161016a57806342842e0e146103b55780634659aeb6146103c85780635ad1c1b5146103e85780636352211e146104085780636c19e7831461042857600080fd5b806339371b25146103495780633ab23d9a1461035e5780633ccfd60b1461038b57806341f434341461039357600080fd5b806318160ddd116101e257806318160ddd146102b85780631f0d7e5d146102db57806323b872dd146102fb578063280ffeda1461030e57806332cb6b0c1461033357600080fd5b806301ffc9a71461021457806306fdde0314610249578063081812fc1461026b578063095ea7b3146102a3575b600080fd5b34801561022057600080fd5b5061023461022f366004611bc0565b61065f565b60405190151581526020015b60405180910390f35b34801561025557600080fd5b5061025e6106b1565b6040516102409190611c2d565b34801561027757600080fd5b5061028b610286366004611c40565b610743565b6040516001600160a01b039091168152602001610240565b6102b66102b1366004611c70565b610787565b005b3480156102c457600080fd5b50600154600054035b604051908152602001610240565b3480156102e757600080fd5b506102b66102f6366004611ca8565b6107a0565b6102b6610309366004611cc5565b6107c6565b34801561031a57600080fd5b50600a5461028b9061010090046001600160a01b031681565b34801561033f57600080fd5b506102cd600c5481565b34801561035557600080fd5b5061025e6107f1565b34801561036a57600080fd5b506102cd610379366004611d01565b600f6020526000908152604090205481565b6102b661087f565b34801561039f57600080fd5b5061028b6daaeb6d7670e522a718067333cd4e81565b6102b66103c3366004611cc5565b6108df565b3480156103d457600080fd5b506102b66103e3366004611c40565b610904565b3480156103f457600080fd5b506102b6610403366004611ca8565b610911565b34801561041457600080fd5b5061028b610423366004611c40565b61092c565b34801561043457600080fd5b506102b6610443366004611d01565b610937565b34801561045457600080fd5b506102cd610463366004611d01565b610961565b34801561047457600080fd5b506102b66109b0565b34801561048957600080fd5b50600a5461023490600160a81b900460ff1681565b3480156104aa57600080fd5b50600a5461023490600160b01b900460ff1681565b3480156104cb57600080fd5b506102b66104da366004611d1c565b6109c4565b3480156104eb57600080fd5b506102b66104fa366004611c40565b610cbd565b34801561050b57600080fd5b506008546001600160a01b031661028b565b34801561052957600080fd5b5061025e610d41565b34801561053e57600080fd5b506102b661054d366004611ca8565b610d50565b34801561055e57600080fd5b506102b661056d366004611da5565b610d76565b34801561057e57600080fd5b506102b661058d366004611e68565b610d8a565b6102b66105a0366004611eb1565b610da2565b3480156105b157600080fd5b5061025e6105c0366004611c40565b610dcf565b3480156105d157600080fd5b506102b66105e0366004611c70565b610e53565b3480156105f157600080fd5b50600a546102349060ff1681565b34801561060b57600080fd5b5061023461061a366004611f2d565b610e8f565b34801561062b57600080fd5b506102b661063a366004611d01565b610ebd565b34801561064b57600080fd5b506102b661065a366004611d01565b610f33565b60006301ffc9a760e01b6001600160e01b03198316148061069057506380ac58cd60e01b6001600160e01b03198316145b806106ab5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600280546106c090611f60565b80601f01602080910402602001604051908101604052809291908181526020018280546106ec90611f60565b80156107395780601f1061070e57610100808354040283529160200191610739565b820191906000526020600020905b81548152906001019060200180831161071c57829003601f168201915b5050505050905090565b600061074e82610f63565b61076b576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b8161079181610f8a565b61079b8383611043565b505050565b6107a861104f565b600a8054911515600160b01b0260ff60b01b19909216919091179055565b826001600160a01b03811633146107e0576107e033610f8a565b6107eb8484846110a9565b50505050565b600e80546107fe90611f60565b80601f016020809104026020016040519081016040528092919081815260200182805461082a90611f60565b80156108775780601f1061084c57610100808354040283529160200191610877565b820191906000526020600020905b81548152906001019060200180831161085a57829003601f168201915b505050505081565b61088761104f565b604051600090339047908381818185875af1925050503d80600081146108c9576040519150601f19603f3d011682016040523d82523d6000602084013e6108ce565b606091505b50509050806108dc57600080fd5b50565b826001600160a01b03811633146108f9576108f933610f8a565b6107eb84848461123a565b61090c61104f565b600d55565b61091961104f565b600a805460ff1916911515919091179055565b60006106ab82611255565b61093f61104f565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b03821661098a576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6109b861104f565b6109c260006112d6565b565b6109cc611328565b60006109db6001546000540390565b600a5490915060ff166109ed57600080fd5b600d54821115610a625760405162461bcd60e51b815260206004820152603560248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e736044820152742070657220747820696e207468697320706861736560581b60648201526084015b60405180910390fd5b600c54610a6f8383611f9a565b1115610ad75760405162461bcd60e51b815260206004820152603160248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e73604482015270081a5b881d1a1948185b1b1bdddb1a5cdd607a1b6064820152608401610a59565b336001600160a01b03861614610b225760405162461bcd60e51b815260206004820152601060248201526f2737ba103cb7bab9103b37bab1b432b960811b6044820152606401610a59565b333214610b2e57600080fd5b600d546001600160a01b0386166000908152600f6020526040902054610b55908490611f9a565b1115610bb75760405162461bcd60e51b815260206004820152602b60248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e7360448201526a081c195c8815d85b1b195d60aa1b6064820152608401610a59565b6040516bffffffffffffffffffffffff19606087901b16602082015260009060340160408051601f198184030181528282528051602091820120600b54601f89018390048302850183019093528784529350610c3b926001600160a01b03909216918491899089908190840183828082843760009201919091525061138192505050565b610c795760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b2103b37bab1b432b960891b6044820152606401610a59565b610c838684611400565b6001600160a01b0386166000908152600f602052604081208054859290610cab908490611f9a565b90915550506001600955506107eb9050565b600a54600160a81b900460ff16610cd357600080fd5b600a54600160b01b900460ff1615610d2457600a5461010090046001600160a01b0316321480610d125750600a5461010090046001600160a01b031633145b610d1b57600080fd5b6108dc8161141a565b33610d2e8261092c565b6001600160a01b031614610d1b57600080fd5b6060600380546106c090611f60565b610d5861104f565b600a8054911515600160a81b0260ff60a81b19909216919091179055565b81610d8081610f8a565b61079b8383611425565b610d9261104f565b600e610d9e8282612001565b5050565b836001600160a01b0381163314610dbc57610dbc33610f8a565b610dc885858585611491565b5050505050565b6060610dda82610f63565b610df757604051630a14c4b560e41b815260040160405180910390fd5b6000610e016114d5565b90508051600003610e215760405180602001604052806000815250610e4c565b80610e2b846114e4565b604051602001610e3c9291906120c1565b6040516020818303038152906040525b9392505050565b610e5b61104f565b6000610e6a6001546000540390565b600c54909150610e7a8383611f9a565b1115610e8557600080fd5b61079b8383611400565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b610ec561104f565b6001600160a01b038116610f2a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a59565b6108dc816112d6565b610f3b61104f565b600a80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60008054821080156106ab575050600090815260046020526040902054600160e01b161590565b6daaeb6d7670e522a718067333cd4e3b156108dc57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610ff7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101b91906120f0565b6108dc57604051633b79c77360e21b81526001600160a01b0382166004820152602401610a59565b610d9e82826001611528565b6008546001600160a01b031633146109c25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a59565b60006110b482611255565b9050836001600160a01b0316816001600160a01b0316146110e75760405162a1148160e81b815260040160405180910390fd5b600082815260066020526040902080546111138187335b6001600160a01b039081169116811491141790565b61113e576111218633610e8f565b61113e57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661116557604051633a954ecd60e21b815260040160405180910390fd5b801561117057600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611202576001840160008181526004602052604081205490036112005760005481146112005760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b031660008051602061217e83398151915260405160405180910390a45b505050505050565b61079b83838360405180602001604052806000815250610da2565b60008181526004602052604081205490600160e01b821690036112bd57806000036112b857600054821061129c57604051636f96cda160e11b815260040160405180910390fd5b5b5060001901600081815260046020526040902054801561129d575b919050565b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60026009540361137a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a59565b6002600955565b60006113e36113dd846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b836115cf565b6001600160a01b0316846001600160a01b03161490509392505050565b610d9e8282604051806020016040528060008152506115f3565b6108dc816000611659565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61149c8484846107c6565b6001600160a01b0383163b156107eb576114b884848484611791565b6107eb576040516368d2bf6b60e11b815260040160405180910390fd5b6060600e80546106c090611f60565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806114fe5750819003601f19909101908152919050565b60006115338361092c565b9050811561157257336001600160a01b03821614611572576115558133610e8f565b611572576040516367d9dca160e11b815260040160405180910390fd5b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b60008060006115de858561187d565b915091506115eb816118c2565b509392505050565b6115fd8383611a0c565b6001600160a01b0383163b1561079b576000548281035b6116276000868380600101945086611791565b611644576040516368d2bf6b60e11b815260040160405180910390fd5b818110611614578160005414610dc857600080fd5b600061166483611255565b90508060008061168286600090815260066020526040902080549091565b9150915084156116c2576116978184336110fe565b6116c2576116a58333610e8f565b6116c257604051632ce44b5f60e11b815260040160405180910390fd5b80156116cd57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b8516900361175b576001860160008181526004602052604081205490036117595760005481146117595760008181526004602052604090208590555b505b60405186906000906001600160a01b0386169060008051602061217e833981519152908390a45050600180548101905550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906117c690339089908890889060040161210d565b6020604051808303816000875af1925050508015611801575060408051601f3d908101601f191682019092526117fe9181019061214a565b60015b61185f573d80801561182f576040519150601f19603f3d011682016040523d82523d6000602084013e611834565b606091505b508051600003611857576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60008082516041036118b35760208301516040840151606085015160001a6118a787828585611ae6565b945094505050506118bb565b506000905060025b9250929050565b60008160048111156118d6576118d6612167565b036118de5750565b60018160048111156118f2576118f2612167565b0361193f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a59565b600281600481111561195357611953612167565b036119a05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a59565b60038160048111156119b4576119b4612167565b036108dc5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a59565b6000805490829003611a315760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b1783179055828401908390839060008051602061217e8339815191528180a4600183015b818114611abc578083600060008051602061217e833981519152600080a4600101611a96565b5081600003611add57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611b1d5750600090506003611ba1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b71573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b9a57600060019250925050611ba1565b9150600090505b94509492505050565b6001600160e01b0319811681146108dc57600080fd5b600060208284031215611bd257600080fd5b8135610e4c81611baa565b60005b83811015611bf8578181015183820152602001611be0565b50506000910152565b60008151808452611c19816020860160208601611bdd565b601f01601f19169290920160200192915050565b602081526000610e4c6020830184611c01565b600060208284031215611c5257600080fd5b5035919050565b80356001600160a01b03811681146112b857600080fd5b60008060408385031215611c8357600080fd5b611c8c83611c59565b946020939093013593505050565b80151581146108dc57600080fd5b600060208284031215611cba57600080fd5b8135610e4c81611c9a565b600080600060608486031215611cda57600080fd5b611ce384611c59565b9250611cf160208501611c59565b9150604084013590509250925092565b600060208284031215611d1357600080fd5b610e4c82611c59565b60008060008060608587031215611d3257600080fd5b611d3b85611c59565b9350602085013567ffffffffffffffff80821115611d5857600080fd5b818701915087601f830112611d6c57600080fd5b813581811115611d7b57600080fd5b886020828501011115611d8d57600080fd5b95986020929092019750949560400135945092505050565b60008060408385031215611db857600080fd5b611dc183611c59565b91506020830135611dd181611c9a565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611e0d57611e0d611ddc565b604051601f8501601f19908116603f01168101908282118183101715611e3557611e35611ddc565b81604052809350858152868686011115611e4e57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611e7a57600080fd5b813567ffffffffffffffff811115611e9157600080fd5b8201601f81018413611ea257600080fd5b61187584823560208401611df2565b60008060008060808587031215611ec757600080fd5b611ed085611c59565b9350611ede60208601611c59565b925060408501359150606085013567ffffffffffffffff811115611f0157600080fd5b8501601f81018713611f1257600080fd5b611f2187823560208401611df2565b91505092959194509250565b60008060408385031215611f4057600080fd5b611f4983611c59565b9150611f5760208401611c59565b90509250929050565b600181811c90821680611f7457607f821691505b602082108103611f9457634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156106ab57634e487b7160e01b600052601160045260246000fd5b601f82111561079b57600081815260208120601f850160051c81016020861015611fe25750805b601f850160051c820191505b8181101561123257828155600101611fee565b815167ffffffffffffffff81111561201b5761201b611ddc565b61202f816120298454611f60565b84611fbb565b602080601f831160018114612064576000841561204c5750858301515b600019600386901b1c1916600185901b178555611232565b600085815260208120601f198616915b8281101561209357888601518255948401946001909101908401612074565b50858210156120b15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600083516120d3818460208801611bdd565b8351908301906120e7818360208801611bdd565b01949350505050565b60006020828403121561210257600080fd5b8151610e4c81611c9a565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061214090830184611c01565b9695505050505050565b60006020828403121561215c57600080fd5b8151610e4c81611baa565b634e487b7160e01b600052602160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220f3b21bef6bfd96d302b7b1214d75e769378d29fc4c6e4a4f426dece96e97951d64736f6c63430008110033

Deployed Bytecode Sourcemap

116596:5194:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82332:639;;;;;;;;;;-1:-1:-1;82332:639:0;;;;;:::i;:::-;;:::i;:::-;;;565:14:1;;558:22;540:41;;528:2;513:18;82332:639:0;;;;;;;;83234:100;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;89634:218::-;;;;;;;;;;-1:-1:-1;89634:218:0;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1697:32:1;;;1679:51;;1667:2;1652:18;89634:218:0;1533:203:1;121014:163:0;;;;;;:::i;:::-;;:::i;:::-;;78985:323;;;;;;;;;;-1:-1:-1;79259:12:0;;79046:7;79243:13;:28;78985:323;;;2324:25:1;;;2312:2;2297:18;78985:323:0;2178:177:1;119943:101:0;;;;;;;;;;-1:-1:-1;119943:101:0;;;;;:::i;:::-;;:::i;121185:169::-;;;;;;:::i;:::-;;:::i;116823:27::-;;;;;;;;;;-1:-1:-1;116823:27:0;;;;;;;-1:-1:-1;;;;;116823:27:0;;;117089:32;;;;;;;;;;;;;;;;117214:23;;;;;;;;;;;;;:::i;117310:62::-;;;;;;;;;;-1:-1:-1;117310:62:0;;;;;:::i;:::-;;;;;;;;;;;;;;120590:193;;;:::i;2960:143::-;;;;;;;;;;;;3060:42;2960:143;;121362:177;;;;;;:::i;:::-;;:::i;120107:128::-;;;;;;;;;;-1:-1:-1;120107:128:0;;;;;:::i;:::-;;:::i;119479:101::-;;;;;;;;;;-1:-1:-1;119479:101:0;;;;;:::i;:::-;;:::i;84627:152::-;;;;;;;;;;-1:-1:-1;84627:152:0;;;;;:::i;:::-;;:::i;119343:90::-;;;;;;;;;;-1:-1:-1;119343:90:0;;;;;:::i;:::-;;:::i;80169:233::-;;;;;;;;;;-1:-1:-1;80169:233:0;;;;;:::i;:::-;;:::i;32194:103::-;;;;;;;;;;;;;:::i;116857:32::-;;;;;;;;;;-1:-1:-1;116857:32:0;;;;-1:-1:-1;;;116857:32:0;;;;;;116896:33;;;;;;;;;;-1:-1:-1;116896:33:0;;;;-1:-1:-1;;;116896:33:0;;;;;;117461:945;;;;;;;;;;-1:-1:-1;117461:945:0;;;;;:::i;:::-;;:::i;118722:322::-;;;;;;;;;;-1:-1:-1;118722:322:0;;;;;:::i;:::-;;:::i;31546:87::-;;;;;;;;;;-1:-1:-1;31619:6:0;;-1:-1:-1;;;;;31619:6:0;31546:87;;83410:104;;;;;;;;;;;;;:::i;119621:91::-;;;;;;;;;;-1:-1:-1;119621:91:0;;;;;:::i;:::-;;:::i;120832:174::-;;;;;;;;;;-1:-1:-1;120832:174:0;;;;;:::i;:::-;;:::i;120278:105::-;;;;;;;;;;-1:-1:-1;120278:105:0;;;;;:::i;:::-;;:::i;121547:238::-;;;;;;:::i;:::-;;:::i;83620:318::-;;;;;;;;;;-1:-1:-1;83620:318:0;;;;;:::i;:::-;;:::i;118464:206::-;;;;;;;;;;-1:-1:-1;118464:206:0;;;;;:::i;:::-;;:::i;116727:37::-;;;;;;;;;;-1:-1:-1;116727:37:0;;;;;;;;90583:164;;;;;;;;;;-1:-1:-1;90583:164:0;;;;;:::i;:::-;;:::i;32452:201::-;;;;;;;;;;-1:-1:-1;32452:201:0;;;;;:::i;:::-;;:::i;119770:106::-;;;;;;;;;;-1:-1:-1;119770:106:0;;;;;:::i;:::-;;:::i;82332:639::-;82417:4;-1:-1:-1;;;;;;;;;82741:25:0;;;;:102;;-1:-1:-1;;;;;;;;;;82818:25:0;;;82741:102;:179;;;-1:-1:-1;;;;;;;;;;82895:25:0;;;82741:179;82721:199;82332:639;-1:-1:-1;;82332:639:0:o;83234:100::-;83288:13;83321:5;83314:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83234:100;:::o;89634:218::-;89710:7;89735:16;89743:7;89735;:16::i;:::-;89730:64;;89760:34;;-1:-1:-1;;;89760:34:0;;;;;;;;;;;89730:64;-1:-1:-1;89814:24:0;;;;:15;:24;;;;;:30;-1:-1:-1;;;;;89814:30:0;;89634:218::o;121014:163::-;121118:8;4481:30;4502:8;4481:20;:30::i;:::-;121138:32:::1;121152:8;121162:7;121138:13;:32::i;:::-;121014:163:::0;;;:::o;119943:101::-;31432:13;:11;:13::i;:::-;120013::::1;:23:::0;;;::::1;;-1:-1:-1::0;;;120013:23:0::1;-1:-1:-1::0;;;;120013:23:0;;::::1;::::0;;;::::1;::::0;;119943:101::o;121185:169::-;121294:4;-1:-1:-1;;;;;4301:18:0;;4309:10;4301:18;4297:83;;4336:32;4357:10;4336:20;:32::i;:::-;121310:37:::1;121329:4;121335:2;121339:7;121310:18;:37::i;:::-;121185:169:::0;;;;:::o;117214:23::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;120590:193::-;31432:13;:11;:13::i;:::-;120665:83:::1;::::0;120647:12:::1;::::0;120673:10:::1;::::0;120712:21:::1;::::0;120647:12;120665:83;120647:12;120665:83;120712:21;120673:10;120665:83:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;120646:102;;;120767:7;120759:16;;;::::0;::::1;;120635:148;120590:193::o:0;121362:177::-;121475:4;-1:-1:-1;;;;;4301:18:0;;4309:10;4301:18;4297:83;;4336:32;4357:10;4336:20;:32::i;:::-;121491:41:::1;121514:4;121520:2;121524:7;121491:22;:41::i;120107:128::-:0;31432:13;:11;:13::i;:::-;120192:25:::1;:35:::0;120107:128::o;119479:101::-;31432:13;:11;:13::i;:::-;119545:17:::1;:27:::0;;-1:-1:-1;;119545:27:0::1;::::0;::::1;;::::0;;;::::1;::::0;;119479:101::o;84627:152::-;84699:7;84742:27;84761:7;84742:18;:27::i;119343:90::-;31432:13;:11;:13::i;:::-;119409:6:::1;:16:::0;;-1:-1:-1;;;;;;119409:16:0::1;-1:-1:-1::0;;;;;119409:16:0;;;::::1;::::0;;;::::1;::::0;;119343:90::o;80169:233::-;80241:7;-1:-1:-1;;;;;80265:19:0;;80261:60;;80293:28;;-1:-1:-1;;;80293:28:0;;;;;;;;;;;80261:60;-1:-1:-1;;;;;;80339:25:0;;;;;:18;:25;;;;;;74328:13;80339:55;;80169:233::o;32194:103::-;31432:13;:11;:13::i;:::-;32259:30:::1;32286:1;32259:18;:30::i;:::-;32194:103::o:0;117461:945::-;63247:21;:19;:21::i;:::-;117582:10:::1;117595:13;79259:12:::0;;79046:7;79243:13;:28;;78985:323;117595:13:::1;117627:17;::::0;117582:26;;-1:-1:-1;117627:17:0::1;;117619:26;;;::::0;::::1;;117680:25;;117664:12;:41;;117656:107;;;::::0;-1:-1:-1;;;117656:107:0;;7509:2:1;117656:107:0::1;::::0;::::1;7491:21:1::0;7548:2;7528:18;;;7521:30;7587:34;7567:18;;;7560:62;-1:-1:-1;;;7638:18:1;;;7631:51;7699:19;;117656:107:0::1;;;;;;;;;117803:10;::::0;117782:17:::1;117787:12:::0;117782:2;:17:::1;:::i;:::-;:31;;117774:93;;;::::0;-1:-1:-1;;;117774:93:0;;8158:2:1;117774:93:0::1;::::0;::::1;8140:21:1::0;8197:2;8177:18;;;8170:30;8236:34;8216:18;;;8209:62;-1:-1:-1;;;8287:18:1;;;8280:47;8344:19;;117774:93:0::1;7956:413:1::0;117774:93:0::1;117886:10;-1:-1:-1::0;;;;;117886:22:0;::::1;;117878:51;;;::::0;-1:-1:-1;;;117878:51:0;;8576:2:1;117878:51:0::1;::::0;::::1;8558:21:1::0;8615:2;8595:18;;;8588:30;-1:-1:-1;;;8634:18:1;;;8627:46;8690:18;;117878:51:0::1;8374:340:1::0;117878:51:0::1;117948:10;117962:9;117948:23;117940:32;;;::::0;::::1;;118047:25;::::0;-1:-1:-1;;;;;117991:37:0;::::1;;::::0;;;:27:::1;:37;::::0;;;;;:52:::1;::::0;118031:12;;117991:52:::1;:::i;:::-;:81;;117983:137;;;::::0;-1:-1:-1;;;117983:137:0;;8921:2:1;117983:137:0::1;::::0;::::1;8903:21:1::0;8960:2;8940:18;;;8933:30;8999:34;8979:18;;;8972:62;-1:-1:-1;;;9050:18:1;;;9043:41;9101:19;;117983:137:0::1;8719:407:1::0;117983:137:0::1;118172:26;::::0;-1:-1:-1;;9280:2:1;9276:15;;;9272:53;118172:26:0::1;::::0;::::1;9260:66:1::0;118133:12:0::1;::::0;9342::1;;118172:26:0::1;::::0;;-1:-1:-1;;118172:26:0;;::::1;::::0;;;;;;118148:61;;118172:26:::1;118148:61:::0;;::::1;::::0;118245:6:::1;::::0;118228:40:::1;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;118148:61;-1:-1:-1;118228:40:0::1;::::0;-1:-1:-1;;;;;118245:6:0;;::::1;::::0;118148:61;;118259:8;;;;;;118228:40;::::1;118259:8:::0;;;;118228:40;::::1;;::::0;::::1;::::0;;;;-1:-1:-1;118228:16:0::1;::::0;-1:-1:-1;;;118228:40:0:i:1;:::-;118220:68;;;::::0;-1:-1:-1;;;118220:68:0;;9567:2:1;118220:68:0::1;::::0;::::1;9549:21:1::0;9606:2;9586:18;;;9579:30;-1:-1:-1;;;9625:18:1;;;9618:45;9680:18;;118220:68:0::1;9365:339:1::0;118220:68:0::1;118301:33;118311:8;118321:12;118301:9;:33::i;:::-;-1:-1:-1::0;;;;;118345:37:0;::::1;;::::0;;;:27:::1;:37;::::0;;;;:53;;118386:12;;118345:37;:53:::1;::::0;118386:12;;118345:53:::1;:::i;:::-;::::0;;;-1:-1:-1;;62685:1:0;63811:7;:22;-1:-1:-1;63291:20:0;;-1:-1:-1;63628:213:0;118722:322;118779:12;;-1:-1:-1;;;118779:12:0;;;;118771:21;;;;;;118807:13;;-1:-1:-1;;;118807:13:0;;;;118803:234;;;118858:12;;;;;-1:-1:-1;;;;;118858:12:0;118845:9;:25;;:55;;-1:-1:-1;118888:12:0;;;;;-1:-1:-1;;;;;118888:12:0;118874:10;:26;118845:55;118837:64;;;;;;118916:12;118922:5;118916;:12::i;118803:234::-;118987:10;118969:14;118977:5;118969:7;:14::i;:::-;-1:-1:-1;;;;;118969:28:0;;118961:37;;;;;83410:104;83466:13;83499:7;83492:14;;;;;:::i;119621:91::-;31432:13;:11;:13::i;:::-;119682:12:::1;:22:::0;;;::::1;;-1:-1:-1::0;;;119682:22:0::1;-1:-1:-1::0;;;;119682:22:0;;::::1;::::0;;;::::1;::::0;;119621:91::o;120832:174::-;120936:8;4481:30;4502:8;4481:20;:30::i;:::-;120956:43:::1;120980:8;120990;120956:23;:43::i;120278:105::-:0;31432:13;:11;:13::i;:::-;120354:9:::1;:21;120366:9:::0;120354;:21:::1;:::i;:::-;;120278:105:::0;:::o;121547:238::-;121711:4;-1:-1:-1;;;;;4301:18:0;;4309:10;4301:18;4297:83;;4336:32;4357:10;4336:20;:32::i;:::-;121731:47:::1;121754:4;121760:2;121764:7;121773:4;121731:22;:47::i;:::-;121547:238:::0;;;;;:::o;83620:318::-;83693:13;83724:16;83732:7;83724;:16::i;:::-;83719:59;;83749:29;;-1:-1:-1;;;83749:29:0;;;;;;;;;;;83719:59;83791:21;83815:10;:8;:10::i;:::-;83791:34;;83849:7;83843:21;83868:1;83843:26;:87;;;;;;;;;;;;;;;;;83896:7;83905:18;83915:7;83905:9;:18::i;:::-;83879:45;;;;;;;;;:::i;:::-;;;;;;;;;;;;;83843:87;83836:94;83620:318;-1:-1:-1;;;83620:318:0:o;118464:206::-;31432:13;:11;:13::i;:::-;118545:10:::1;118558:13;79259:12:::0;;79046:7;79243:13;:28;;78985:323;118558:13:::1;118611:10;::::0;118545:26;;-1:-1:-1;118590:17:0::1;118595:12:::0;118545:26;118590:17:::1;:::i;:::-;:31;;118582:40;;;::::0;::::1;;118633:29;118643:4;118649:12;118633:9;:29::i;90583:164::-:0;-1:-1:-1;;;;;90704:25:0;;;90680:4;90704:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;90583:164::o;32452:201::-;31432:13;:11;:13::i;:::-;-1:-1:-1;;;;;32541:22:0;::::1;32533:73;;;::::0;-1:-1:-1;;;32533:73:0;;12616:2:1;32533:73:0::1;::::0;::::1;12598:21:1::0;12655:2;12635:18;;;12628:30;12694:34;12674:18;;;12667:62;-1:-1:-1;;;12745:18:1;;;12738:36;12791:19;;32533:73:0::1;12414:402:1::0;32533:73:0::1;32617:28;32636:8;32617:18;:28::i;119770:106::-:0;31432:13;:11;:13::i;:::-;119844:12:::1;:24:::0;;-1:-1:-1;;;;;119844:24:0;;::::1;;;-1:-1:-1::0;;;;;;119844:24:0;;::::1;::::0;;;::::1;::::0;;119770:106::o;91005:282::-;91070:4;91160:13;;91150:7;:23;91107:153;;;;-1:-1:-1;;91211:26:0;;;;:17;:26;;;;;;-1:-1:-1;;;91211:44:0;:49;;91005:282::o;4539:419::-;3060:42;4730:45;:49;4726:225;;4801:67;;-1:-1:-1;;;4801:67:0;;4852:4;4801:67;;;13033:34:1;-1:-1:-1;;;;;13103:15:1;;13083:18;;;13076:43;3060:42:0;;4801;;12968:18:1;;4801:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4796:144;;4896:28;;-1:-1:-1;;;4896:28:0;;-1:-1:-1;;;;;1697:32:1;;4896:28:0;;;1679:51:1;1652:18;;4896:28:0;1533:203:1;89351:124:0;89440:27;89449:2;89453:7;89462:4;89440:8;:27::i;31711:132::-;31619:6;;-1:-1:-1;;;;;31619:6:0;30177:10;31775:23;31767:68;;;;-1:-1:-1;;;31767:68:0;;13582:2:1;31767:68:0;;;13564:21:1;;;13601:18;;;13594:30;13660:34;13640:18;;;13633:62;13712:18;;31767:68:0;13380:356:1;93273:2825:0;93415:27;93445;93464:7;93445:18;:27::i;:::-;93415:57;;93530:4;-1:-1:-1;;;;;93489:45:0;93505:19;-1:-1:-1;;;;;93489:45:0;;93485:86;;93543:28;;-1:-1:-1;;;93543:28:0;;;;;;;;;;;93485:86;93585:27;92381:24;;;:15;:24;;;;;92609:26;;93776:68;92609:26;93818:4;30177:10;93824:19;-1:-1:-1;;;;;91855:32:0;;;91699:28;;91984:20;;92006:30;;91981:56;;91396:659;93776:68;93771:180;;93864:43;93881:4;30177:10;90583:164;:::i;93864:43::-;93859:92;;93916:35;;-1:-1:-1;;;93916:35:0;;;;;;;;;;;93859:92;-1:-1:-1;;;;;93968:16:0;;93964:52;;93993:23;;-1:-1:-1;;;93993:23:0;;;;;;;;;;;93964:52;94165:15;94162:160;;;94305:1;94284:19;94277:30;94162:160;-1:-1:-1;;;;;94702:24:0;;;;;;;:18;:24;;;;;;94700:26;;-1:-1:-1;;94700:26:0;;;94771:22;;;;;;;;;94769:24;;-1:-1:-1;94769:24:0;;;88453:11;88428:23;88424:41;88411:63;-1:-1:-1;;;88411:63:0;95064:26;;;;:17;:26;;;;;:175;;;;-1:-1:-1;;;95359:47:0;;:52;;95355:627;;95464:1;95454:11;;95432:19;95587:30;;;:17;:30;;;;;;:35;;95583:384;;95725:13;;95710:11;:28;95706:242;;95872:30;;;;:17;:30;;;;;:52;;;95706:242;95413:569;95355:627;96029:7;96025:2;-1:-1:-1;;;;;96010:27:0;96019:4;-1:-1:-1;;;;;96010:27:0;-1:-1:-1;;;;;;;;;;;96010:27:0;;;;;;;;;96048:42;93404:2694;;;93273:2825;;;:::o;96194:193::-;96340:39;96357:4;96363:2;96367:7;96340:39;;;;;;;;;;;;:16;:39::i;85782:1712::-;85932:26;;;;:17;:26;;;;;;;-1:-1:-1;;;86008:24:0;;:29;;86004:1423;;86147:6;86157:1;86147:11;86143:981;;86198:13;;86187:7;:24;86183:68;;86220:31;;-1:-1:-1;;;86220:31:0;;;;;;;;;;;86183:68;86848:257;-1:-1:-1;;;86952:9:0;86934:28;;;;:17;:28;;;;;;87016:25;;86848:257;87016:25;;85782:1712;;;:::o;86004:1423::-;87455:31;;-1:-1:-1;;;87455:31:0;;;;;;;;;;;32813:191;32906:6;;;-1:-1:-1;;;;;32923:17:0;;;-1:-1:-1;;;;;;32923:17:0;;;;;;;32956:40;;32906:6;;;32923:17;32906:6;;32956:40;;32887:16;;32956:40;32876:128;32813:191;:::o;63327:293::-;62729:1;63461:7;;:19;63453:63;;;;-1:-1:-1;;;63453:63:0;;13943:2:1;63453:63:0;;;13925:21:1;13982:2;13962:18;;;13955:30;14021:33;14001:18;;;13994:61;14072:18;;63453:63:0;13741:355:1;63453:63:0;62729:1;63594:7;:18;63327:293::o;119084:209::-;119188:4;119223:62;119237:35;119266:5;28305:58;;14343:66:1;28305:58:0;;;14331:79:1;14426:12;;;14419:28;;;28172:7:0;;14463:12:1;;28305:58:0;;;;;;;;;;;;28295:69;;;;;;28288:76;;28103:269;;;;119237:35;119274:10;119223:13;:62::i;:::-;-1:-1:-1;;;;;119212:73:0;:7;-1:-1:-1;;;;;119212:73:0;;119205:80;;119084:209;;;;;:::o;107145:112::-;107222:27;107232:2;107236:8;107222:27;;;;;;;;;;;;:9;:27::i;108822:89::-;108882:21;108888:7;108897:5;108882;:21::i;90192:234::-;30177:10;90287:39;;;;:18;:39;;;;;;;;-1:-1:-1;;;;;90287:49:0;;;;;;;;;;;;:60;;-1:-1:-1;;90287:60:0;;;;;;;;;;90363:55;;540:41:1;;;90287:49:0;;30177:10;90363:55;;513:18:1;90363:55:0;;;;;;;90192:234;;:::o;96985:407::-;97160:31;97173:4;97179:2;97183:7;97160:12;:31::i;:::-;-1:-1:-1;;;;;97206:14:0;;;:19;97202:183;;97245:56;97276:4;97282:2;97286:7;97295:5;97245:30;:56::i;:::-;97240:145;;97329:40;;-1:-1:-1;;;97329:40:0;;;;;;;;;;;120422:109;120481:13;120514:9;120507:16;;;;;:::i;114818:1745::-;114883:17;115317:4;115310;115304:11;115300:22;115409:1;115403:4;115396:15;115484:4;115481:1;115477:12;115470:19;;;115566:1;115561:3;115554:14;115670:3;115909:5;115891:428;115957:1;115952:3;115948:11;115941:18;;116128:2;116122:4;116118:13;116114:2;116110:22;116105:3;116097:36;116222:2;116212:13;;116279:25;115891:428;116279:25;-1:-1:-1;116349:13:0;;;-1:-1:-1;;116464:14:0;;;116526:19;;;116464:14;114818:1745;-1:-1:-1;114818:1745:0:o;108063:492::-;108192:13;108208:16;108216:7;108208;:16::i;:::-;108192:32;;108241:13;108237:219;;;30177:10;-1:-1:-1;;;;;108273:28:0;;;108269:187;;108325:44;108342:5;30177:10;90583:164;:::i;108325:44::-;108320:136;;108401:35;;-1:-1:-1;;;108401:35:0;;;;;;;;;;;108320:136;108468:24;;;;:15;:24;;;;;;:35;;-1:-1:-1;;;;;;108468:35:0;-1:-1:-1;;;;;108468:35:0;;;;;;;;;108519:28;;108468:24;;108519:28;;;;;;;108181:374;108063:492;;;:::o;24413:231::-;24491:7;24512:17;24531:18;24553:27;24564:4;24570:9;24553:10;:27::i;:::-;24511:69;;;;24591:18;24603:5;24591:11;:18::i;:::-;-1:-1:-1;24627:9:0;24413:231;-1:-1:-1;;;24413:231:0:o;106372:689::-;106503:19;106509:2;106513:8;106503:5;:19::i;:::-;-1:-1:-1;;;;;106564:14:0;;;:19;106560:483;;106604:11;106618:13;106666:14;;;106699:233;106730:62;106769:1;106773:2;106777:7;;;;;;106786:5;106730:30;:62::i;:::-;106725:167;;106828:40;;-1:-1:-1;;;106828:40:0;;;;;;;;;;;106725:167;106927:3;106919:5;:11;106699:233;;107014:3;106997:13;;:20;106993:34;;107019:8;;;109140:3081;109220:27;109250;109269:7;109250:18;:27::i;:::-;109220:57;-1:-1:-1;109220:57:0;109290:12;;109412:35;109439:7;92270:27;92381:24;;;:15;:24;;;;;92609:26;;92381:24;;92168:485;109412:35;109355:92;;;;109464:13;109460:316;;;109585:68;109610:15;109627:4;30177:10;109633:19;30097:98;109585:68;109580:184;;109677:43;109694:4;30177:10;90583:164;:::i;109677:43::-;109672:92;;109729:35;;-1:-1:-1;;;109729:35:0;;;;;;;;;;;109672:92;109932:15;109929:160;;;110072:1;110051:19;110044:30;109929:160;-1:-1:-1;;;;;110691:24:0;;;;;;:18;:24;;;;;:60;;110719:32;110691:60;;;88453:11;88428:23;88424:41;88411:63;-1:-1:-1;;;88411:63:0;110989:26;;;;:17;:26;;;;;:205;;;;-1:-1:-1;;;111314:47:0;;:52;;111310:627;;111419:1;111409:11;;111387:19;111542:30;;;:17;:30;;;;;;:35;;111538:384;;111680:13;;111665:11;:28;111661:242;;111827:30;;;;:17;:30;;;;;:52;;;111661:242;111368:569;111310:627;111965:35;;111992:7;;111988:1;;-1:-1:-1;;;;;111965:35:0;;;-1:-1:-1;;;;;;;;;;;111965:35:0;111988:1;;111965:35;-1:-1:-1;;112188:12:0;:14;;;;;;-1:-1:-1;;;;109140:3081:0:o;99476:716::-;99660:88;;-1:-1:-1;;;99660:88:0;;99639:4;;-1:-1:-1;;;;;99660:45:0;;;;;:88;;30177:10;;99727:4;;99733:7;;99742:5;;99660:88;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;99660:88:0;;;;;;;;-1:-1:-1;;99660:88:0;;;;;;;;;;;;:::i;:::-;;;99656:529;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;99943:6;:13;99960:1;99943:18;99939:235;;99989:40;;-1:-1:-1;;;99989:40:0;;;;;;;;;;;99939:235;100132:6;100126:13;100117:6;100113:2;100109:15;100102:38;99656:529;-1:-1:-1;;;;;;99819:64:0;-1:-1:-1;;;99819:64:0;;-1:-1:-1;99656:529:0;99476:716;;;;;;:::o;22864:747::-;22945:7;22954:12;22983:9;:16;23003:2;22983:22;22979:625;;23327:4;23312:20;;23306:27;23377:4;23362:20;;23356:27;23435:4;23420:20;;23414:27;23022:9;23406:36;23478:25;23489:4;23406:36;23306:27;23356;23478:10;:25::i;:::-;23471:32;;;;;;;;;22979:625;-1:-1:-1;23552:1:0;;-1:-1:-1;23556:35:0;22979:625;22864:747;;;;;:::o;21257:521::-;21335:20;21326:5;:29;;;;;;;;:::i;:::-;;21322:449;;21257:521;:::o;21322:449::-;21433:29;21424:5;:38;;;;;;;;:::i;:::-;;21420:351;;21479:34;;-1:-1:-1;;;21479:34:0;;15568:2:1;21479:34:0;;;15550:21:1;15607:2;15587:18;;;15580:30;15646:26;15626:18;;;15619:54;15690:18;;21479:34:0;15366:348:1;21420:351:0;21544:35;21535:5;:44;;;;;;;;:::i;:::-;;21531:240;;21596:41;;-1:-1:-1;;;21596:41:0;;15921:2:1;21596:41:0;;;15903:21:1;15960:2;15940:18;;;15933:30;15999:33;15979:18;;;15972:61;16050:18;;21596:41:0;15719:355:1;21531:240:0;21668:30;21659:5;:39;;;;;;;;:::i;:::-;;21655:116;;21715:44;;-1:-1:-1;;;21715:44:0;;16281:2:1;21715:44:0;;;16263:21:1;16320:2;16300:18;;;16293:30;16359:34;16339:18;;;16332:62;-1:-1:-1;;;16410:18:1;;;16403:32;16452:19;;21715:44:0;16079:398:1;100654:2966:0;100727:20;100750:13;;;100778;;;100774:44;;100800:18;;-1:-1:-1;;;100800:18:0;;;;;;;;;;;100774:44;-1:-1:-1;;;;;101306:22:0;;;;;;:18;:22;;;;74466:2;101306:22;;;:71;;101344:32;101332:45;;101306:71;;;101620:31;;;:17;:31;;;;;-1:-1:-1;88884:15:0;;88858:24;88854:46;88453:11;88428:23;88424:41;88421:52;88411:63;;101620:173;;101855:23;;;;101620:31;;101306:22;;-1:-1:-1;;;;;;;;;;;101306:22:0;;102473:335;103134:1;103120:12;103116:20;103074:346;103175:3;103166:7;103163:16;103074:346;;103393:7;103383:8;103380:1;-1:-1:-1;;;;;;;;;;;103350:1:0;103347;103342:59;103228:1;103215:15;103074:346;;;103078:77;103453:8;103465:1;103453:13;103449:45;;103475:19;;-1:-1:-1;;;103475:19:0;;;;;;;;;;;103449:45;103511:13;:19;-1:-1:-1;121014:163:0;;;:::o;25865:1520::-;25996:7;;26930:66;26917:79;;26913:163;;;-1:-1:-1;27029:1:0;;-1:-1:-1;27033:30:0;27013:51;;26913:163;27190:24;;;27173:14;27190:24;;;;;;;;;16709:25:1;;;16782:4;16770:17;;16750:18;;;16743:45;;;;16804:18;;;16797:34;;;16847:18;;;16840:34;;;27190:24:0;;16681:19:1;;27190:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;27190:24:0;;-1:-1:-1;;27190:24:0;;;-1:-1:-1;;;;;;;27229:20:0;;27225:103;;27282:1;27286:29;27266:50;;;;;;;27225:103;27348:6;-1:-1:-1;27356:20:0;;-1:-1:-1;25865:1520:0;;;;;;;;:::o;14:131:1:-;-1:-1:-1;;;;;;88:32:1;;78:43;;68:71;;135:1;132;125:12;150:245;208:6;261:2;249:9;240:7;236:23;232:32;229:52;;;277:1;274;267:12;229:52;316:9;303:23;335:30;359:5;335:30;:::i;592:250::-;677:1;687:113;701:6;698:1;695:13;687:113;;;777:11;;;771:18;758:11;;;751:39;723:2;716:10;687:113;;;-1:-1:-1;;834:1:1;816:16;;809:27;592:250::o;847:271::-;889:3;927:5;921:12;954:6;949:3;942:19;970:76;1039:6;1032:4;1027:3;1023:14;1016:4;1009:5;1005:16;970:76;:::i;:::-;1100:2;1079:15;-1:-1:-1;;1075:29:1;1066:39;;;;1107:4;1062:50;;847:271;-1:-1:-1;;847:271:1:o;1123:220::-;1272:2;1261:9;1254:21;1235:4;1292:45;1333:2;1322:9;1318:18;1310:6;1292:45;:::i;1348:180::-;1407:6;1460:2;1448:9;1439:7;1435:23;1431:32;1428:52;;;1476:1;1473;1466:12;1428:52;-1:-1:-1;1499:23:1;;1348:180;-1:-1:-1;1348:180:1:o;1741:173::-;1809:20;;-1:-1:-1;;;;;1858:31:1;;1848:42;;1838:70;;1904:1;1901;1894:12;1919:254;1987:6;1995;2048:2;2036:9;2027:7;2023:23;2019:32;2016:52;;;2064:1;2061;2054:12;2016:52;2087:29;2106:9;2087:29;:::i;:::-;2077:39;2163:2;2148:18;;;;2135:32;;-1:-1:-1;;;1919:254:1:o;2360:118::-;2446:5;2439:13;2432:21;2425:5;2422:32;2412:60;;2468:1;2465;2458:12;2483:241;2539:6;2592:2;2580:9;2571:7;2567:23;2563:32;2560:52;;;2608:1;2605;2598:12;2560:52;2647:9;2634:23;2666:28;2688:5;2666:28;:::i;2729:328::-;2806:6;2814;2822;2875:2;2863:9;2854:7;2850:23;2846:32;2843:52;;;2891:1;2888;2881:12;2843:52;2914:29;2933:9;2914:29;:::i;:::-;2904:39;;2962:38;2996:2;2985:9;2981:18;2962:38;:::i;:::-;2952:48;;3047:2;3036:9;3032:18;3019:32;3009:42;;2729:328;;;;;:::o;3062:186::-;3121:6;3174:2;3162:9;3153:7;3149:23;3145:32;3142:52;;;3190:1;3187;3180:12;3142:52;3213:29;3232:9;3213:29;:::i;3492:733::-;3580:6;3588;3596;3604;3657:2;3645:9;3636:7;3632:23;3628:32;3625:52;;;3673:1;3670;3663:12;3625:52;3696:29;3715:9;3696:29;:::i;:::-;3686:39;;3776:2;3765:9;3761:18;3748:32;3799:18;3840:2;3832:6;3829:14;3826:34;;;3856:1;3853;3846:12;3826:34;3894:6;3883:9;3879:22;3869:32;;3939:7;3932:4;3928:2;3924:13;3920:27;3910:55;;3961:1;3958;3951:12;3910:55;4001:2;3988:16;4027:2;4019:6;4016:14;4013:34;;;4043:1;4040;4033:12;4013:34;4088:7;4083:2;4074:6;4070:2;4066:15;4062:24;4059:37;4056:57;;;4109:1;4106;4099:12;4056:57;3492:733;;4140:2;4132:11;;;;;-1:-1:-1;4162:6:1;;4215:2;4200:18;4187:32;;-1:-1:-1;3492:733:1;-1:-1:-1;;;3492:733:1:o;4230:315::-;4295:6;4303;4356:2;4344:9;4335:7;4331:23;4327:32;4324:52;;;4372:1;4369;4362:12;4324:52;4395:29;4414:9;4395:29;:::i;:::-;4385:39;;4474:2;4463:9;4459:18;4446:32;4487:28;4509:5;4487:28;:::i;:::-;4534:5;4524:15;;;4230:315;;;;;:::o;4550:127::-;4611:10;4606:3;4602:20;4599:1;4592:31;4642:4;4639:1;4632:15;4666:4;4663:1;4656:15;4682:632;4747:5;4777:18;4818:2;4810:6;4807:14;4804:40;;;4824:18;;:::i;:::-;4899:2;4893:9;4867:2;4953:15;;-1:-1:-1;;4949:24:1;;;4975:2;4945:33;4941:42;4929:55;;;4999:18;;;5019:22;;;4996:46;4993:72;;;5045:18;;:::i;:::-;5085:10;5081:2;5074:22;5114:6;5105:15;;5144:6;5136;5129:22;5184:3;5175:6;5170:3;5166:16;5163:25;5160:45;;;5201:1;5198;5191:12;5160:45;5251:6;5246:3;5239:4;5231:6;5227:17;5214:44;5306:1;5299:4;5290:6;5282;5278:19;5274:30;5267:41;;;;4682:632;;;;;:::o;5319:451::-;5388:6;5441:2;5429:9;5420:7;5416:23;5412:32;5409:52;;;5457:1;5454;5447:12;5409:52;5497:9;5484:23;5530:18;5522:6;5519:30;5516:50;;;5562:1;5559;5552:12;5516:50;5585:22;;5638:4;5630:13;;5626:27;-1:-1:-1;5616:55:1;;5667:1;5664;5657:12;5616:55;5690:74;5756:7;5751:2;5738:16;5733:2;5729;5725:11;5690:74;:::i;5775:667::-;5870:6;5878;5886;5894;5947:3;5935:9;5926:7;5922:23;5918:33;5915:53;;;5964:1;5961;5954:12;5915:53;5987:29;6006:9;5987:29;:::i;:::-;5977:39;;6035:38;6069:2;6058:9;6054:18;6035:38;:::i;:::-;6025:48;;6120:2;6109:9;6105:18;6092:32;6082:42;;6175:2;6164:9;6160:18;6147:32;6202:18;6194:6;6191:30;6188:50;;;6234:1;6231;6224:12;6188:50;6257:22;;6310:4;6302:13;;6298:27;-1:-1:-1;6288:55:1;;6339:1;6336;6329:12;6288:55;6362:74;6428:7;6423:2;6410:16;6405:2;6401;6397:11;6362:74;:::i;:::-;6352:84;;;5775:667;;;;;;;:::o;6447:260::-;6515:6;6523;6576:2;6564:9;6555:7;6551:23;6547:32;6544:52;;;6592:1;6589;6582:12;6544:52;6615:29;6634:9;6615:29;:::i;:::-;6605:39;;6663:38;6697:2;6686:9;6682:18;6663:38;:::i;:::-;6653:48;;6447:260;;;;;:::o;6712:380::-;6791:1;6787:12;;;;6834;;;6855:61;;6909:4;6901:6;6897:17;6887:27;;6855:61;6962:2;6954:6;6951:14;6931:18;6928:38;6925:161;;7008:10;7003:3;6999:20;6996:1;6989:31;7043:4;7040:1;7033:15;7071:4;7068:1;7061:15;6925:161;;6712:380;;;:::o;7729:222::-;7794:9;;;7815:10;;;7812:133;;;7867:10;7862:3;7858:20;7855:1;7848:31;7902:4;7899:1;7892:15;7930:4;7927:1;7920:15;9835:545;9937:2;9932:3;9929:11;9926:448;;;9973:1;9998:5;9994:2;9987:17;10043:4;10039:2;10029:19;10113:2;10101:10;10097:19;10094:1;10090:27;10084:4;10080:38;10149:4;10137:10;10134:20;10131:47;;;-1:-1:-1;10172:4:1;10131:47;10227:2;10222:3;10218:12;10215:1;10211:20;10205:4;10201:31;10191:41;;10282:82;10300:2;10293:5;10290:13;10282:82;;;10345:17;;;10326:1;10315:13;10282:82;;10556:1352;10682:3;10676:10;10709:18;10701:6;10698:30;10695:56;;;10731:18;;:::i;:::-;10760:97;10850:6;10810:38;10842:4;10836:11;10810:38;:::i;:::-;10804:4;10760:97;:::i;:::-;10912:4;;10976:2;10965:14;;10993:1;10988:663;;;;11695:1;11712:6;11709:89;;;-1:-1:-1;11764:19:1;;;11758:26;11709:89;-1:-1:-1;;10513:1:1;10509:11;;;10505:24;10501:29;10491:40;10537:1;10533:11;;;10488:57;11811:81;;10958:944;;10988:663;9782:1;9775:14;;;9819:4;9806:18;;-1:-1:-1;;11024:20:1;;;11142:236;11156:7;11153:1;11150:14;11142:236;;;11245:19;;;11239:26;11224:42;;11337:27;;;;11305:1;11293:14;;;;11172:19;;11142:236;;;11146:3;11406:6;11397:7;11394:19;11391:201;;;11467:19;;;11461:26;-1:-1:-1;;11550:1:1;11546:14;;;11562:3;11542:24;11538:37;11534:42;11519:58;11504:74;;11391:201;-1:-1:-1;;;;;11638:1:1;11622:14;;;11618:22;11605:36;;-1:-1:-1;10556:1352:1:o;11913:496::-;12092:3;12130:6;12124:13;12146:66;12205:6;12200:3;12193:4;12185:6;12181:17;12146:66;:::i;:::-;12275:13;;12234:16;;;;12297:70;12275:13;12234:16;12344:4;12332:17;;12297:70;:::i;:::-;12383:20;;11913:496;-1:-1:-1;;;;11913:496:1:o;13130:245::-;13197:6;13250:2;13238:9;13229:7;13225:23;13221:32;13218:52;;;13266:1;13263;13256:12;13218:52;13298:9;13292:16;13317:28;13339:5;13317:28;:::i;14486:489::-;-1:-1:-1;;;;;14755:15:1;;;14737:34;;14807:15;;14802:2;14787:18;;14780:43;14854:2;14839:18;;14832:34;;;14902:3;14897:2;14882:18;;14875:31;;;14680:4;;14923:46;;14949:19;;14941:6;14923:46;:::i;:::-;14915:54;14486:489;-1:-1:-1;;;;;;14486:489:1:o;14980:249::-;15049:6;15102:2;15090:9;15081:7;15077:23;15073:32;15070:52;;;15118:1;15115;15108:12;15070:52;15150:9;15144:16;15169:30;15193:5;15169:30;:::i;15234:127::-;15295:10;15290:3;15286:20;15283:1;15276:31;15326:4;15323:1;15316:15;15350:4;15347:1;15340:15

Swarm Source

ipfs://f3b21bef6bfd96d302b7b1214d75e769378d29fc4c6e4a4f426dece96e97951d
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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