ETH Price: $2,533.09 (-0.03%)

Token

CreativeChecks (CC)
 

Overview

Max Total Supply

34 CC

Holders

18

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
*0x💛️💛️💛️.eth
Balance
1 CC
0xc38cb33426bff1e6264f990824d5f3c06820dfa4
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:
CreativeChecks

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 9999 runs

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

//                      xx        
//                    xx                       
//                  xx                       
//                  xx             
//                xx                   
//       xx       xx
//     xxxxxx   xx
//          xx  xx
//           xxxx 
//            xx          CreativeChecks.com
//            xx          		- by AlphaDigger.eth


pragma solidity ^0.8.4;

import "erc721a/contracts/extensions/ERC721AQueryable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "./Errors.sol";

/**
 * @title CreativeChecks Smart Contract
 * @dev Extends ERC721 Non-Fungible Token Standard basic implementation
 */
contract CreativeChecks is ERC721AQueryable, Ownable, ReentrancyGuard {
	address private _withdrawalAddress;

	uint256 public mintStart;
	uint256 public mintEnd;
	string  public baseSvg = '<svg>';
	uint256 public mintPrice = 4000000000000000;
	string  public webURL = 'https://creativechecks.com/token/';

	string[] public badges = ["ffffff", "fece1f", "f7921b", "ff0521", "fe0c91", "4916a1", "1e42c9", "31a4f1", "1bb80c", "006506", "572800", "907135", "c1c1c1", "818080", "3f3e3f", "000000"];
	string[] public ticks = ["000000", "000000", "000000", "000000", "000000", "ffffff", "ffffff", "000000", "000000", "ffffff", "ffffff", "000000", "000000", "000000", "ffffff", "ffffff"];

	mapping(uint256 => bytes) public data;
	mapping(bytes => bool) public taken;


	constructor(string memory name, string memory symbol, address withdrawalAddress_, uint256 mintStart_, uint256 mintEnd_) ERC721A(name, symbol) {
		mintStart = mintStart_;
		mintEnd = mintEnd_;
		_withdrawalAddress = withdrawalAddress_;
	}


	/// @notice overrides original ERC721A _startTokenId()
	/// @return  uint256 new starting token id.
	function _startTokenId() override internal view virtual returns (uint256) {
		return 1;
	}


	/// @notice Mint one token with data and send to 'to' address.
	/// @param  to address that will receive the tokens.
	/// @param  data_ token data
	function ownerMint(address to, bytes calldata data_) external onlyOwner nonReentrant {
		if (block.timestamp > mintEnd) 
			revert Errors.MintOver();

		if (data_.length != 40) 
			revert Errors.DataInvalid();

		if (taken[data_])
			revert Errors.DataTaken();

		data[_nextTokenId()] = data_;
		taken[data_] = true;
		_safeMint(to, 1);
	}


	/// @notice Mint one token with data.
	/// @param  data_ token data
	function mint(bytes calldata data_) external payable nonReentrant {
		if (block.timestamp < mintStart) 
			revert Errors.MintNotStarted();

		if (block.timestamp > mintEnd) 
			revert Errors.MintOver();

		if (msg.value < mintPrice) 
			revert Errors.InsufficientFunds();

		if (data_.length != 40) 
			revert Errors.DataInvalid();

		if (taken[data_])
			revert Errors.DataTaken();


		data[_nextTokenId()] = data_;
		taken[data_] = true;
		_safeMint(msg.sender, 1);
	}


	/// @notice Returns token metadata.
	/// @param  tokenId id of the token.
	/// @return string token metadata.
	function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
		if (!_exists(tokenId))
			revert Errors.TokenNotMinted();

		uint256[80] memory data_ = getUintArrayFromData(data[tokenId]);
		uint256 colors = countUnique(data_);

		string memory json    = Base64.encode(abi.encodePacked('{"name":"Creative Check #', Strings.toString(tokenId), '", "description": "This check may or may not be notable.", "external_url": "', string(abi.encodePacked(webURL, Strings.toString(tokenId))), '", "image":"', string(abi.encodePacked('data:image/svg+xml;base64,', Base64.encode(bytes(renderSvg(data_))))), '", "attributes": [{"trait_type": "Colors", "value": "', Strings.toString(colors), '"}]}'));
		string memory jsonUri = string(abi.encodePacked("data:application/json;base64,", json));

		return jsonUri;
	}


	/// @notice Generate a svg from token data
	/// @param  data_ uint256 array that contains the color index of each badge.
	/// @return string svg string.
	function renderSvg(uint256[80] memory data_) public view returns (string memory) {
		string memory svgString = baseSvg;
		for (uint i; i < 10; i++) {
			for (uint j; j < 8; j++) {
				svgString = string(abi.encodePacked(svgString, string(abi.encodePacked('<use xlink:href="#badge" fill="#', badges[data_[(i * 8) + j]], '" x="', Strings.toString(210 + j * 40), '" y="', Strings.toString(170 + i * 40), '" /><use xlink:href="#tick" fill="#', ticks[data_[(i * 8) + j]], '" x="', Strings.toString(210 + j * 40), '" y="', Strings.toString(170 + i * 40), '" />'))));
			}
		}

		svgString = string(abi.encodePacked(svgString, "</svg>"));
		return svgString;
	}


	/// @notice Returns token data as bytes.
	function tokenData(uint256 tokenId) public view returns (bytes memory) {
		if (!_exists(tokenId))
			revert Errors.TokenNotMinted();

		return data[tokenId];
	}

	/// @notice Withdraw all ether from the contract.
	function withdrawAll() external onlyOwner {
		uint256 balance = address(this).balance;
		if (balance == 0) revert Errors.NothingToWithdraw();
		(_withdrawalAddress.call{value: balance}(""));
	}
	
	/// @notice updates mintPrice.
	/// @param  mintPrice_ new mintPrice.
	function setMintPrice(uint256 mintPrice_) external onlyOwner {
		mintPrice = mintPrice_;
	} 

	/// @notice updates baseSvg.
	/// @param  baseSvg_ new baseSvg.
	function setBaseSvg(string calldata baseSvg_) external onlyOwner {
		baseSvg = baseSvg_;
	} 

	/// @notice updates webURL.
	/// @param  webURL_ new webURL.
	function setWebURL(string calldata webURL_) external onlyOwner {
		webURL = webURL_;
	} 

	/// @notice updates _withdrawalAddress.
	/// @param  newAddress new _withdrawalAddress.
	function setWithdrawalAddress(address newAddress) external onlyOwner {
		if (newAddress == address(0)) revert Errors.NewAddressCantBeZero();

		_withdrawalAddress = newAddress;
	} 

	/// @notice updates badges.
	/// @param  badges_ new badges.
	function setBadges(string[] memory badges_) external onlyOwner {
		if (badges_.length != 16)
			revert Errors.ArrayLengthInvalid();

		delete badges;
		badges = badges_;
	} 

	/// @notice updates ticks.
	/// @param  ticks_ new ticks.
	function setTicks(string[] memory ticks_) external onlyOwner {
		if (ticks_.length != 16)
			revert Errors.ArrayLengthInvalid();

		delete ticks;
		ticks = ticks_;
	} 

	/// @notice updates mint start date.
	/// @param  mintStart_ new start date.
	function setMintStartDate(uint256 mintStart_) external onlyOwner {
		mintStart = mintStart_;
	} 

	/// @notice updates mint end date.
	/// @param  mintEnd_ new end date.
	function setMintEndDate(uint256 mintEnd_) external onlyOwner {
		mintEnd = mintEnd_;
	}



	// Internal functions
	function getUintArrayFromData(bytes memory data_) internal pure returns (uint256[80] memory returnData) {
		for (uint i=0; i < data_.length * 2; i++) {
			uint256 value;
			uint256 index = i / 2;
			uint256 shift = i % 2 == 0 ? 4 : 0;

			assembly {
				let temp := mload(add(data_, add(index, 1)))
				value := shr(shift, and(shl(shift, shr(0xFC, not(0))), temp))
			}

			returnData[i] = value;
		}
	}

	function countUnique(uint256[80] memory arr) internal pure returns (uint256 count) {
		uint256[] memory uniqueArr = new uint256[](80);
		uint256 uniqueCount = 0;

		for (uint256 i = 0; i < arr.length; i++) {
			bool isUnique = true;
			for (uint256 j = 0; j < uniqueCount; j++) {
				if (arr[i] == uniqueArr[j]) {
					isUnique = false;
					break;
				}
			}

			if (isUnique) {
				uniqueArr[uniqueCount] = arr[i];
				uniqueCount++;
			}
		}

		count = uniqueCount;
	}
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        return result;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 8 of 12 : Errors.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.4;

library Errors {
    error InsufficientFunds();
    error NothingToWithdraw();
    error MintNotStarted();
    error MintOver();
    error DataTaken();
    error DataInvalid();
    error TokenNotMinted();
    error ArrayLengthInvalid();
    error NewAddressCantBeZero();
}

File 9 of 12 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // 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, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        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.
     * 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) public payable virtual override {
        address owner = ownerOf(tokenId);

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

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

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 12 : ERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AQueryable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721AQueryable.
 *
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {
    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *
     * - `addr = address(0)`
     * - `startTimestamp = 0`
     * - `burned = false`
     * - `extraData = 0`
     *
     * If the `tokenId` is burned:
     *
     * - `addr = <Address of owner before token was burned>`
     * - `startTimestamp = <Timestamp when token was burned>`
     * - `burned = true`
     * - `extraData = <Extra data when token was burned>`
     *
     * Otherwise:
     *
     * - `addr = <Address of owner>`
     * - `startTimestamp = <Timestamp of start of ownership>`
     * - `burned = false`
     * - `extraData = <Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) {
        TokenOwnership memory ownership;
        if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) {
            return ownership;
        }
        ownership = _ownershipAt(tokenId);
        if (ownership.burned) {
            return ownership;
        }
        return _ownershipOf(tokenId);
    }

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] calldata tokenIds)
        external
        view
        virtual
        override
        returns (TokenOwnership[] memory)
    {
        unchecked {
            uint256 tokenIdsLength = tokenIds.length;
            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
            for (uint256 i; i != tokenIdsLength; ++i) {
                ownerships[i] = explicitOwnershipOf(tokenIds[i]);
            }
            return ownerships;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view virtual override returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            uint256 tokenIdsIdx;
            uint256 stopLimit = _nextTokenId();
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, stopLimit)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }
            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }
            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }
            // We need to call `explicitOwnershipOf(start)`,
            // because the slot at `start` may not be initialized.
            TokenOwnership memory ownership = explicitOwnershipOf(start);
            address currOwnershipAddr;
            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
            if (!ownership.burned) {
                currOwnershipAddr = ownership.addr;
            }
            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }
}

File 11 of 12 : IERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of ERC721AQueryable.
 */
interface IERC721AQueryable is IERC721A {
    /**
     * Invalid query range (`start` >= `stop`).
     */
    error InvalidQueryRange();

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *
     * - `addr = address(0)`
     * - `startTimestamp = 0`
     * - `burned = false`
     * - `extraData = 0`
     *
     * If the `tokenId` is burned:
     *
     * - `addr = <Address of owner before token was burned>`
     * - `startTimestamp = <Timestamp when token was burned>`
     * - `burned = true`
     * - `extraData = <Extra data when token was burned>`
     *
     * Otherwise:
     *
     * - `addr = <Address of owner>`
     * - `startTimestamp = <Timestamp of start of ownership>`
     * - `burned = false`
     * - `extraData = <Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view returns (uint256[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

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

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"withdrawalAddress_","type":"address"},{"internalType":"uint256","name":"mintStart_","type":"uint256"},{"internalType":"uint256","name":"mintEnd_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ArrayLengthInvalid","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"DataInvalid","type":"error"},{"inputs":[],"name":"DataTaken","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintNotStarted","type":"error"},{"inputs":[],"name":"MintOver","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NewAddressCantBeZero","type":"error"},{"inputs":[],"name":"NothingToWithdraw","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TokenNotMinted","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"badges","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseSvg","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"data","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[80]","name":"data_","type":"uint256[80]"}],"name":"renderSvg","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"badges_","type":"string[]"}],"name":"setBadges","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseSvg_","type":"string"}],"name":"setBaseSvg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintEnd_","type":"uint256"}],"name":"setMintEndDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintPrice_","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintStart_","type":"uint256"}],"name":"setMintStartDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"ticks_","type":"string[]"}],"name":"setTicks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"webURL_","type":"string"}],"name":"setWebURL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setWithdrawalAddress","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":"bytes","name":"","type":"bytes"}],"name":"taken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ticks","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"webURL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405260056080819052641e39bb339f60d91b60a09081526200002891600d9190620004f0565b50660e35fa931a0000600e55604051806060016040528060218152602001620043766021913980516200006491600f91602090910190620004f0565b506040805161024081018252600661020082018181526533333333333360d11b610220840152825282518084018452818152653332b1b298b360d11b602082810191909152808401919091528351808501855282815265331b9c9918b160d11b8183015283850152835180850185528281526566663035323160d01b818301526060840152835180850185528281526566653063393160d01b818301526080840152835180850185528281526534393136613160d01b8183015260a0840152835180850185528281526531653432633960d01b8183015260c0840152835180850185528281526533316134663160d01b8183015260e0840152835180850185528281526531626238306360d01b81830152610100840152835180850185528281526518181b1a981b60d11b81830152610120840152835180850185528281526503537323830360d41b81830152610140840152835180850185528281526539303731333560d01b81830152610160840152835180850185528281526563316331633160d01b81830152610180840152835180850185528281526503831383038360d41b818301526101a0840152835180850185528281526519b319b299b360d11b818301526101c084015283518085019094529083526503030303030360d41b908301526101e08101919091526200026090601090816200057f565b506040805161024081018252600661020082018181526503030303030360d41b6102208401819052908352835180850185528281526020818101839052808501919091528451808601865283815280820183905284860152845180860186528381528082018390526060850152845180860186528381528082018390526080850152845180860186528381526533333333333360d11b81830181905260a08601919091528551808701875284815280830182905260c08601528551808701875284815280830184905260e0860152855180870187528481528083018490526101008601528551808701875284815280830182905261012086015285518087018752848152808301829052610140860152855180870187528481528083018490526101608601528551808701875284815280830184905261018086015285518087018752848152808301939093526101a0850192909252845180860186528381528082018390526101c08501528451808601909552918452908301526101e0810191909152620003f49060119060106200057f565b503480156200040257600080fd5b50604051620043973803806200439783398101604081905262000425916200070c565b8451859085906200043e906002906020850190620004f0565b50805162000454906003906020840190620004f0565b505060016000555062000467336200049e565b6001600955600b91909155600c55600a80546001600160a01b0319166001600160a01b039290921691909117905550620007f99050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620004fe90620007a6565b90600052602060002090601f0160209004810192826200052257600085556200056d565b82601f106200053d57805160ff19168380011785556200056d565b828001600101855582156200056d579182015b828111156200056d57825182559160200191906001019062000550565b506200057b929150620005df565b5090565b828054828255906000526020600020908101928215620005d1579160200282015b82811115620005d15782518051620005c0918491602090910190620004f0565b5091602001919060010190620005a0565b506200057b929150620005f6565b5b808211156200057b5760008155600101620005e0565b808211156200057b5760006200060d828262000617565b50600101620005f6565b5080546200062590620007a6565b6000825580601f1062000636575050565b601f016020900490600052602060002090810190620006569190620005df565b50565b600082601f8301126200066a578081fd5b81516001600160401b0380821115620006875762000687620007e3565b604051601f8301601f19908116603f01168101908282118183101715620006b257620006b2620007e3565b81604052838152602092508683858801011115620006ce578485fd5b8491505b83821015620006f15785820183015181830184015290820190620006d2565b838211156200070257848385830101525b9695505050505050565b600080600080600060a0868803121562000724578081fd5b85516001600160401b03808211156200073b578283fd5b6200074989838a0162000659565b965060208801519150808211156200075f578283fd5b506200076e8882890162000659565b604088015190955090506001600160a01b03811681146200078d578182fd5b6060870151608090970151959894975095949392505050565b600181811c90821680620007bb57607f821691505b60208210811415620007dd57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b613b6d80620008096000396000f3fe6080604052600436106102dc5760003560e01c80637ba0e2e711610184578063b88d4fde116100d6578063ea2b4ab21161008a578063f4a0a52811610064578063f4a0a5281461081e578063fedf13271461083e578063ff45f5761461085357600080fd5b8063ea2b4ab2146107c8578063f0ba8440146107de578063f2fde38b146107fe57600080fd5b8063c87b56dd116100bb578063c87b56dd14610717578063d17f421914610737578063e985e9c51461077257600080fd5b8063b88d4fde146106d7578063c23dc68f146106ea57600080fd5b806395d89b4111610138578063a22cb46511610112578063a22cb46514610677578063b307667d14610697578063b4b5b48f146106b757600080fd5b806395d89b411461062257806398e36d8b1461063757806399a2557a1461065757600080fd5b8063853828b611610169578063853828b6146105c25780638ab517d1146105d75780638da5cb5b146105f757600080fd5b80637ba0e2e7146105825780638462151c1461059557600080fd5b8063255e46851161023d5780636352211e116101f1578063700738f8116101cb578063700738f81461052d57806370a082311461054d578063715018a61461056d57600080fd5b80636352211e146104d75780636817c76c146104f75780636d41707d1461050d57600080fd5b806342842e0e1161022257806342842e0e14610477578063534cb30d1461048a5780635bbb2177146104aa57600080fd5b8063255e4685146104415780633d761dd11461045757600080fd5b80630d8912611161029457806321b8092e1161027957806321b8092e146103f957806323b872dd146104195780632407deaf1461042c57600080fd5b80630d891261146103b257806318160ddd146103d257600080fd5b806306fdde03116102c557806306fdde0314610338578063081812fc1461035a578063095ea7b31461039f57600080fd5b806301ffc9a7146102e1578063033b345814610316575b600080fd5b3480156102ed57600080fd5b506103016102fc366004613231565b610873565b60405190151581526020015b60405180910390f35b34801561032257600080fd5b50610336610331366004612fce565b610958565b005b34801561034457600080fd5b5061034d610ab3565b60405161030d9190613916565b34801561036657600080fd5b5061037a6103753660046132dc565b610b45565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161030d565b6103366103ad36600461301f565b610baf565b3480156103be57600080fd5b5061034d6103cd36600461313c565b610c9a565b3480156103de57600080fd5b5060015460005403600019015b60405190815260200161030d565b34801561040557600080fd5b50610336610414366004612ea7565b610ef6565b610336610427366004612ef3565b610f92565b34801561043857600080fd5b5061034d6111fc565b34801561044d57600080fd5b506103eb600b5481565b34801561046357600080fd5b5061033661047236600461307a565b61128a565b610336610485366004612ef3565b6112f0565b34801561049657600080fd5b5061034d6104a53660046132dc565b61130b565b3480156104b657600080fd5b506104ca6104c53660046131c1565b611336565b60405161030d9190613854565b3480156104e357600080fd5b5061037a6104f23660046132dc565b61142c565b34801561050357600080fd5b506103eb600e5481565b34801561051957600080fd5b50610336610528366004613269565b611437565b34801561053957600080fd5b506103366105483660046132dc565b61144b565b34801561055957600080fd5b506103eb610568366004612ea7565b611458565b34801561057957600080fd5b506103366114da565b610336610590366004613269565b6114ee565b3480156105a157600080fd5b506105b56105b0366004612ea7565b6116b4565b60405161030d91906138de565b3480156105ce57600080fd5b50610336611802565b3480156105e357600080fd5b506103366105f23660046132dc565b6118a7565b34801561060357600080fd5b5060085473ffffffffffffffffffffffffffffffffffffffff1661037a565b34801561062e57600080fd5b5061034d6118b4565b34801561064357600080fd5b5061034d6106523660046132dc565b6118c3565b34801561066357600080fd5b506105b5610672366004613048565b6118d3565b34801561068357600080fd5b50610336610692366004612f94565b611abb565b3480156106a357600080fd5b506103366106b2366004613269565b611b34565b3480156106c357600080fd5b5061034d6106d23660046132dc565b611b48565b6103366106e5366004612f2e565b611c27565b3480156106f657600080fd5b5061070a6107053660046132dc565b611c91565b60405161030d9190613929565b34801561072357600080fd5b5061034d6107323660046132dc565b611d19565b34801561074357600080fd5b506103016107523660046132a9565b805160208183018101805160138252928201919093012091525460ff1681565b34801561077e57600080fd5b5061030161078d366004612ec1565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107d457600080fd5b506103eb600c5481565b3480156107ea57600080fd5b5061034d6107f93660046132dc565b611ed2565b34801561080a57600080fd5b50610336610819366004612ea7565b611eeb565b34801561082a57600080fd5b506103366108393660046132dc565b611fa7565b34801561084a57600080fd5b5061034d611fb4565b34801561085f57600080fd5b5061033661086e36600461307a565b611fc1565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061090657507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061095257507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b610960612023565b6109686120a4565b600c544211156109a4576040517fcfed9d4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602881146109de576040517f6ff8352600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601382826040516109f09291906133d4565b9081526040519081900360200190205460ff1615610a3a576040517f86ea494800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818160126000610a4960005490565b81526020019081526020016000209190610a64929190612bd2565b50600160138383604051610a799291906133d4565b908152604051908190036020019020805491151560ff19909216919091179055610aa4836001612118565b610aae6001600955565b505050565b606060028054610ac290613a23565b80601f0160208091040260200160405190810160405280929190818152602001828054610aee90613a23565b8015610b3b5780601f10610b1057610100808354040283529160200191610b3b565b820191906000526020600020905b815481529060010190602001808311610b1e57829003601f168201915b5050505050905090565b6000610b5082612132565b610b86576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610bba8261142c565b90503373ffffffffffffffffffffffffffffffffffffffff821614610c1957610be3813361078d565b610c19576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60606000600d8054610cab90613a23565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd790613a23565b8015610d245780601f10610cf957610100808354040283529160200191610d24565b820191906000526020600020905b815481529060010190602001808311610d0757829003601f168201915b5050505050905060005b600a811015610ecd5760005b6008811015610eba578260108683610d538660086139d8565b610d5d91906139ac565b60508110610d7b57634e487b7160e01b600052603260045260246000fd5b602002015181548110610d9e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001610dc8836028610db891906139d8565b610dc39060d26139ac565b612180565b610de1610dd68660286139d8565b610dc39060aa6139ac565b60118986610df08960086139d8565b610dfa91906139ac565b60508110610e1857634e487b7160e01b600052603260045260246000fd5b602002015181548110610e3b57634e487b7160e01b600052603260045260246000fd5b90600052602060002001610e55866028610db891906139d8565b610e63610dd68960286139d8565b604051602001610e7896959493929190613604565b60408051601f1981840301815290829052610e9692916020016133e4565b60405160208183030381529060405292508080610eb290613a58565b915050610d3a565b5080610ec581613a58565b915050610d2e565b5080604051602001610edf9190613413565b60408051601f198184030181529190529392505050565b610efe612023565b73ffffffffffffffffffffffffffffffffffffffff8116610f4b576040517fbe46899400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000610f9d82612238565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611004576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff88169091141761107757611041863361078d565b611077576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166110c4576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156110cf57600082555b73ffffffffffffffffffffffffffffffffffffffff8681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260409020557c0200000000000000000000000000000000000000000000000000000000831661119957600184016000818152600460205260409020546111975760005481146111975760008181526004602052604090208490555b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600f805461120990613a23565b80601f016020809104026020016040519081016040528092919081815260200182805461123590613a23565b80156112825780601f1061125757610100808354040283529160200191611282565b820191906000526020600020905b81548152906001019060200180831161126557829003601f168201915b505050505081565b611292612023565b80516010146112cd576040517f045b326b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112d960116000612c56565b80516112ec906011906020840190612c74565b5050565b610aae83838360405180602001604052806000815250611c27565b6011818154811061131b57600080fd5b90600052602060002001600091509050805461120990613a23565b60608160008167ffffffffffffffff81111561136257634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113b457816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816113805790505b50905060005b828114611423576113f08686838181106113e457634e487b7160e01b600052603260045260246000fd5b90506020020135611c91565b82828151811061141057634e487b7160e01b600052603260045260246000fd5b60209081029190910101526001016113ba565b50949350505050565b600061095282612238565b61143f612023565b610aae600d8383612bd2565b611453612023565b600c55565b600073ffffffffffffffffffffffffffffffffffffffff82166114a7576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205467ffffffffffffffff1690565b6114e2612023565b6114ec60006122d3565b565b6114f66120a4565b600b54421015611532576040517f06290e4e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c5442111561156e576040517fcfed9d4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e543410156115aa576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602881146115e4576040517f6ff8352600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601382826040516115f69291906133d4565b9081526040519081900360200190205460ff1615611640576040517f86ea494800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816012600061164f60005490565b8152602001908152602001600020919061166a929190612bd2565b5060016013838360405161167f9291906133d4565b908152604051908190036020019020805491151560ff199092169190911790556116aa336001612118565b6112ec6001600955565b606060008060006116c485611458565b905060008167ffffffffffffffff8111156116ef57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611718578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b8386146117f6576117538161234a565b9150816040015115611764576117ee565b815173ffffffffffffffffffffffffffffffffffffffff161561178657815194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156117ee57808387806001019850815181106117e157634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b600101611743565b50909695505050505050565b61180a612023565b4780611842576040517fd0d04f6000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5460405173ffffffffffffffffffffffffffffffffffffffff909116908290600081818185875af1925050503d806000811461189c576040519150601f19603f3d011682016040523d82523d6000602084013e6118a1565b606091505b50505050565b6118af612023565b600b55565b606060038054610ac290613a23565b6010818154811061131b57600080fd5b606081831061190e576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061191a60005490565b9050600185101561192a57600194505b80841115611936578093505b600061194187611458565b905084861015611960578585038181101561195a578091505b50611964565b5060005b60008167ffffffffffffffff81111561198d57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156119b6578160200160208202803683370190505b509050816119c9579350611ab492505050565b60006119d488611c91565b9050600081604001516119e5575080515b885b8881141580156119f75750848714155b15611aa857611a058161234a565b9250826040015115611a1657611aa0565b825173ffffffffffffffffffffffffffffffffffffffff1615611a3857825191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611aa05780848880600101995081518110611a9357634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b6001016119e7565b50505092835250909150505b9392505050565b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611b3c612023565b610aae600f8383612bd2565b6060611b5382612132565b611b89576040517fd03ce9df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526012602052604090208054611ba290613a23565b80601f0160208091040260200160405190810160405280929190818152602001828054611bce90613a23565b8015611c1b5780601f10611bf057610100808354040283529160200191611c1b565b820191906000526020600020905b815481529060010190602001808311611bfe57829003601f168201915b50505050509050919050565b611c32848484610f92565b73ffffffffffffffffffffffffffffffffffffffff83163b156118a157611c5b848484846123ef565b6118a1576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160808101825260008082526020820181905291810182905260608101919091526040805160808101825260008082526020820181905291810182905260608101919091526001831080611cea57506000548310155b15611cf55792915050565b611cfe8361234a565b9050806040015115611d105792915050565b611ab483612557565b6060611d2482612132565b611d5a576040517fd03ce9df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526012602052604081208054611dfb9190611d7890613a23565b80601f0160208091040260200160405190810160405280929190818152602001828054611da490613a23565b8015611df15780601f10611dc657610100808354040283529160200191611df1565b820191906000526020600020905b815481529060010190602001808311611dd457829003601f168201915b50505050506125f5565b90506000611e088261269c565b90506000611ea3611e1886612180565b600f611e2388612180565b604051602001611e34929190613454565b604051602081830303815290604052611e54611e4f87610c9a565b6127c4565b604051602001611e6491906137c6565b604051602081830303815290604052611e7c86612180565b604051602001611e8f9493929190613470565b6040516020818303038152906040526127c4565b9050600081604051602001611eb89190613781565b60408051601f198184030181529190529695505050505050565b6012602052600090815260409020805461120990613a23565b611ef3612023565b73ffffffffffffffffffffffffffffffffffffffff8116611f9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b611fa4816122d3565b50565b611faf612023565b600e55565b600d805461120990613a23565b611fc9612023565b8051601014612004576040517f045b326b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61201060106000612c56565b80516112ec906010906020840190612c74565b60085473ffffffffffffffffffffffffffffffffffffffff1633146114ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611f92565b60026009541415612111576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611f92565b6002600955565b6112ec828260405180602001604052806000815250612926565b600081600111158015612146575060005482105b80156109525750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b6060600061218d836129b9565b600101905060008167ffffffffffffffff8111156121bb57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156121e5576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461222b57612230565b6121ef565b509392505050565b600081806001116122a1576000548110156122a1576000818152600460205260409020547c0100000000000000000000000000000000000000000000000000000000811661229f575b80611ab4575060001901600081815260046020526040902054612281565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610952906040805160808101825273ffffffffffffffffffffffffffffffffffffffff8316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a029061244a90339089908890889060040161380b565b602060405180830381600087803b15801561246457600080fd5b505af1925050508015612494575060408051601f3d908101601f191682019092526124919181019061324d565b60015b612508573d8080156124c2576040519150601f19603f3d011682016040523d82523d6000602084013e6124c7565b606091505b508051612500576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261095261258783612238565b6040805160808101825273ffffffffffffffffffffffffffffffffffffffff8316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b6125fd612ccd565b60005b825161260d9060026139d8565b811015612696576000806126226002846139c4565b90506000612631600285613a73565b1561263d576000612640565b60045b86830160010151600f60ff9290921691821b16811c935090508285856050811061267a57634e487b7160e01b600052603260045260246000fd5b60200201525082915061268e905081613a58565b915050612600565b50919050565b604080516050808252610a20820190925260009182919060208201610a00803683370190505090506000805b605081101561223057600160005b8381101561274c578481815181106126fe57634e487b7160e01b600052603260045260246000fd5b602002602001015187846050811061272657634e487b7160e01b600052603260045260246000fd5b6020020151141561273a576000915061274c565b8061274481613a58565b9150506126d6565b5080156127b15785826050811061277357634e487b7160e01b600052603260045260246000fd5b602002015184848151811061279857634e487b7160e01b600052603260045260246000fd5b6020908102919091010152826127ad81613a58565b9350505b50806127bc81613a58565b9150506126c8565b60608151600014156127e457505060408051602081019091526000815290565b6000604051806060016040528060408152602001613af8604091399050600060038451600261281391906139ac565b61281d91906139c4565b6128289060046139d8565b67ffffffffffffffff81111561284e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612878576020820181803683370190505b509050600182016020820185865187015b808210156128e4576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612889565b505060038651066001811461290057600281146129135761291b565b603d6001830353603d600283035361291b565b603d60018303535b509195945050505050565b6129308383612a9b565b73ffffffffffffffffffffffffffffffffffffffff83163b15610aae576000548281035b61296760008683806001019450866123ef565b61299d576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181106129545781600054146129b257600080fd5b5050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612a02577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612a2e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612a4c57662386f26fc10000830492506010015b6305f5e1008310612a64576305f5e100830492506008015b6127108310612a7857612710830492506004015b60648310612a8a576064830492506002015b600a83106109525760010192915050565b60005481612ad5576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612b9157808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612b59565b5081612bc9576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b828054612bde90613a23565b90600052602060002090601f016020900481019282612c005760008555612c46565b82601f10612c195782800160ff19823516178555612c46565b82800160010185558215612c46579182015b82811115612c46578235825591602001919060010190612c2b565b50612c52929150612cec565b5090565b5080546000825590600052602060002090810190611fa49190612d01565b828054828255906000526020600020908101928215612cc1579160200282015b82811115612cc15782518051612cb1918491602090910190612d1e565b5091602001919060010190612c94565b50612c52929150612d01565b60405180610a0001604052806050906020820280368337509192915050565b5b80821115612c525760008155600101612ced565b80821115612c52576000612d158282612d92565b50600101612d01565b828054612d2a90613a23565b90600052602060002090601f016020900481019282612d4c5760008555612c46565b82601f10612d6557805160ff1916838001178555612c46565b82800160010185558215612c46579182015b82811115612c46578251825591602001919060010190612d77565b508054612d9e90613a23565b6000825580601f10612dae575050565b601f016020900490600052602060002090810190611fa49190612cec565b803573ffffffffffffffffffffffffffffffffffffffff81168114612df057600080fd5b919050565b60008083601f840112612e06578182fd5b50813567ffffffffffffffff811115612e1d578182fd5b602083019150836020828501011115612e3557600080fd5b9250929050565b600082601f830112612e4c578081fd5b813567ffffffffffffffff811115612e6657612e66613ab3565b612e796020601f19601f8401160161397b565b818152846020838601011115612e8d578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215612eb8578081fd5b611ab482612dcc565b60008060408385031215612ed3578081fd5b612edc83612dcc565b9150612eea60208401612dcc565b90509250929050565b600080600060608486031215612f07578081fd5b612f1084612dcc565b9250612f1e60208501612dcc565b9150604084013590509250925092565b60008060008060808587031215612f43578081fd5b612f4c85612dcc565b9350612f5a60208601612dcc565b925060408501359150606085013567ffffffffffffffff811115612f7c578182fd5b612f8887828801612e3c565b91505092959194509250565b60008060408385031215612fa6578182fd5b612faf83612dcc565b915060208301358015158114612fc3578182fd5b809150509250929050565b600080600060408486031215612fe2578283fd5b612feb84612dcc565b9250602084013567ffffffffffffffff811115613006578283fd5b61301286828701612df5565b9497909650939450505050565b60008060408385031215613031578182fd5b61303a83612dcc565b946020939093013593505050565b60008060006060848603121561305c578081fd5b61306584612dcc565b95602085013595506040909401359392505050565b6000602080838503121561308c578182fd5b823567ffffffffffffffff808211156130a3578384fd5b818501915085601f8301126130b6578384fd5b8135818111156130c8576130c8613ab3565b8060051b6130d785820161397b565b8281528581019085870183870188018b10156130f1578889fd5b8893505b8484101561312e5780358681111561310b57898afd5b6131198c8a838b0101612e3c565b845250600193909301929187019187016130f5565b509998505050505050505050565b6000610a0080838503121561314f578182fd5b83601f84011261315d578182fd5b60405181810181811067ffffffffffffffff8211171561317f5761317f613ab3565b6040528084838101871015613192578485fd5b8493505b60508410156131b657803582526001939093019260209182019101613196565b509095945050505050565b600080602083850312156131d3578182fd5b823567ffffffffffffffff808211156131ea578384fd5b818501915085601f8301126131fd578384fd5b81358181111561320b578485fd5b8660208260051b850101111561321f578485fd5b60209290920196919550909350505050565b600060208284031215613242578081fd5b8135611ab481613ac9565b60006020828403121561325e578081fd5b8151611ab481613ac9565b6000806020838503121561327b578182fd5b823567ffffffffffffffff811115613291578283fd5b61329d85828601612df5565b90969095509350505050565b6000602082840312156132ba578081fd5b813567ffffffffffffffff8111156132d0578182fd5b61254f84828501612e3c565b6000602082840312156132ed578081fd5b5035919050565b6000815180845261330c8160208601602086016139f7565b601f01601f19169290920160200192915050565b600081516133328185602086016139f7565b9290920192915050565b8054600090600181811c908083168061335657607f831692505b602080841082141561337657634e487b7160e01b86526022600452602486fd5b81801561338a576001811461339b576133c8565b60ff198616895284890196506133c8565b60008881526020902060005b868110156133c05781548b8201529085019083016133a7565b505084890196505b50505050505092915050565b8183823760009101908152919050565b600083516133f68184602088016139f7565b83519083019061340a8183602088016139f7565b01949350505050565b600082516134258184602087016139f7565b7f3c2f7376673e0000000000000000000000000000000000000000000000000000920191825250600601919050565b6000613460828561333c565b835161340a8183602088016139f7565b7f7b226e616d65223a22437265617469766520436865636b2023000000000000008152600085516134a8816019850160208a016139f7565b7f222c20226465736372697074696f6e223a20225468697320636865636b206d616019918401918201527f79206f72206d6179206e6f74206265206e6f7461626c652e222c20226578746560398201527f726e616c5f75726c223a2022000000000000000000000000000000000000000060598201528551613531816065840160208a016139f7565b7f222c2022696d616765223a22000000000000000000000000000000000000000060659290910191820152845161356f8160718401602089016139f7565b7f222c202261747472696275746573223a205b7b2274726169745f74797065223a607192909101918201527f2022436f6c6f7273222c202276616c7565223a2022000000000000000000000060918201526135f96135d060a6830186613320565b7f227d5d7d00000000000000000000000000000000000000000000000000000000815260040190565b979650505050505050565b7f3c75736520786c696e6b3a687265663d22236261646765222066696c6c3d222381526000613636602083018961333c565b7f2220783d22000000000000000000000000000000000000000000000000000000808252885161366d816005850160208d016139f7565b8083019250507f2220793d2200000000000000000000000000000000000000000000000000000080600584015288516136ad81600a860160208d016139f7565b7f22202f3e3c75736520786c696e6b3a687265663d22237469636b222066696c6c600a94909101938401527f3d22230000000000000000000000000000000000000000000000000000000000602a84015261370b602d84018961333c565b9182528651919250613724826005850160208a016139f7565b60059290910191820152835161374181600a8401602088016139f7565b613773600a828401017f22202f3e00000000000000000000000000000000000000000000000000000000815260040190565b9a9950505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516137b981601d8501602087016139f7565b91909101601d0192915050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000008152600082516137fe81601a8501602087016139f7565b91909101601a0192915050565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261384a60808301846132f4565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156117f6576138cb83855173ffffffffffffffffffffffffffffffffffffffff815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101613870565b6020808252825182820181905260009190848201906040850190845b818110156117f6578351835292840192918401916001016138fa565b602081526000611ab460208301846132f4565b815173ffffffffffffffffffffffffffffffffffffffff16815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610952565b604051601f8201601f1916810167ffffffffffffffff811182821017156139a4576139a4613ab3565b604052919050565b600082198211156139bf576139bf613a87565b500190565b6000826139d3576139d3613a9d565b500490565b60008160001904831182151516156139f2576139f2613a87565b500290565b60005b83811015613a125781810151838201526020016139fa565b838111156118a15750506000910152565b600181811c90821680613a3757607f821691505b6020821081141561269657634e487b7160e01b600052602260045260246000fd5b6000600019821415613a6c57613a6c613a87565b5060010190565b600082613a8257613a82613a9d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611fa457600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212205fc89bb0c6ad869c6d97e224dc040aaf3ac2c7739762a28926424759cedfc7b864736f6c6343000804003368747470733a2f2f6372656174697665636865636b732e636f6d2f746f6b656e2f00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000079101aa7991213120e941c22417534221c5f42820000000000000000000000000000000000000000000000000000000063e3f1300000000000000000000000000000000000000000000000000000000063f12030000000000000000000000000000000000000000000000000000000000000000e4372656174697665436865636b7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024343000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102dc5760003560e01c80637ba0e2e711610184578063b88d4fde116100d6578063ea2b4ab21161008a578063f4a0a52811610064578063f4a0a5281461081e578063fedf13271461083e578063ff45f5761461085357600080fd5b8063ea2b4ab2146107c8578063f0ba8440146107de578063f2fde38b146107fe57600080fd5b8063c87b56dd116100bb578063c87b56dd14610717578063d17f421914610737578063e985e9c51461077257600080fd5b8063b88d4fde146106d7578063c23dc68f146106ea57600080fd5b806395d89b4111610138578063a22cb46511610112578063a22cb46514610677578063b307667d14610697578063b4b5b48f146106b757600080fd5b806395d89b411461062257806398e36d8b1461063757806399a2557a1461065757600080fd5b8063853828b611610169578063853828b6146105c25780638ab517d1146105d75780638da5cb5b146105f757600080fd5b80637ba0e2e7146105825780638462151c1461059557600080fd5b8063255e46851161023d5780636352211e116101f1578063700738f8116101cb578063700738f81461052d57806370a082311461054d578063715018a61461056d57600080fd5b80636352211e146104d75780636817c76c146104f75780636d41707d1461050d57600080fd5b806342842e0e1161022257806342842e0e14610477578063534cb30d1461048a5780635bbb2177146104aa57600080fd5b8063255e4685146104415780633d761dd11461045757600080fd5b80630d8912611161029457806321b8092e1161027957806321b8092e146103f957806323b872dd146104195780632407deaf1461042c57600080fd5b80630d891261146103b257806318160ddd146103d257600080fd5b806306fdde03116102c557806306fdde0314610338578063081812fc1461035a578063095ea7b31461039f57600080fd5b806301ffc9a7146102e1578063033b345814610316575b600080fd5b3480156102ed57600080fd5b506103016102fc366004613231565b610873565b60405190151581526020015b60405180910390f35b34801561032257600080fd5b50610336610331366004612fce565b610958565b005b34801561034457600080fd5b5061034d610ab3565b60405161030d9190613916565b34801561036657600080fd5b5061037a6103753660046132dc565b610b45565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161030d565b6103366103ad36600461301f565b610baf565b3480156103be57600080fd5b5061034d6103cd36600461313c565b610c9a565b3480156103de57600080fd5b5060015460005403600019015b60405190815260200161030d565b34801561040557600080fd5b50610336610414366004612ea7565b610ef6565b610336610427366004612ef3565b610f92565b34801561043857600080fd5b5061034d6111fc565b34801561044d57600080fd5b506103eb600b5481565b34801561046357600080fd5b5061033661047236600461307a565b61128a565b610336610485366004612ef3565b6112f0565b34801561049657600080fd5b5061034d6104a53660046132dc565b61130b565b3480156104b657600080fd5b506104ca6104c53660046131c1565b611336565b60405161030d9190613854565b3480156104e357600080fd5b5061037a6104f23660046132dc565b61142c565b34801561050357600080fd5b506103eb600e5481565b34801561051957600080fd5b50610336610528366004613269565b611437565b34801561053957600080fd5b506103366105483660046132dc565b61144b565b34801561055957600080fd5b506103eb610568366004612ea7565b611458565b34801561057957600080fd5b506103366114da565b610336610590366004613269565b6114ee565b3480156105a157600080fd5b506105b56105b0366004612ea7565b6116b4565b60405161030d91906138de565b3480156105ce57600080fd5b50610336611802565b3480156105e357600080fd5b506103366105f23660046132dc565b6118a7565b34801561060357600080fd5b5060085473ffffffffffffffffffffffffffffffffffffffff1661037a565b34801561062e57600080fd5b5061034d6118b4565b34801561064357600080fd5b5061034d6106523660046132dc565b6118c3565b34801561066357600080fd5b506105b5610672366004613048565b6118d3565b34801561068357600080fd5b50610336610692366004612f94565b611abb565b3480156106a357600080fd5b506103366106b2366004613269565b611b34565b3480156106c357600080fd5b5061034d6106d23660046132dc565b611b48565b6103366106e5366004612f2e565b611c27565b3480156106f657600080fd5b5061070a6107053660046132dc565b611c91565b60405161030d9190613929565b34801561072357600080fd5b5061034d6107323660046132dc565b611d19565b34801561074357600080fd5b506103016107523660046132a9565b805160208183018101805160138252928201919093012091525460ff1681565b34801561077e57600080fd5b5061030161078d366004612ec1565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107d457600080fd5b506103eb600c5481565b3480156107ea57600080fd5b5061034d6107f93660046132dc565b611ed2565b34801561080a57600080fd5b50610336610819366004612ea7565b611eeb565b34801561082a57600080fd5b506103366108393660046132dc565b611fa7565b34801561084a57600080fd5b5061034d611fb4565b34801561085f57600080fd5b5061033661086e36600461307a565b611fc1565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061090657507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061095257507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b610960612023565b6109686120a4565b600c544211156109a4576040517fcfed9d4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602881146109de576040517f6ff8352600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601382826040516109f09291906133d4565b9081526040519081900360200190205460ff1615610a3a576040517f86ea494800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818160126000610a4960005490565b81526020019081526020016000209190610a64929190612bd2565b50600160138383604051610a799291906133d4565b908152604051908190036020019020805491151560ff19909216919091179055610aa4836001612118565b610aae6001600955565b505050565b606060028054610ac290613a23565b80601f0160208091040260200160405190810160405280929190818152602001828054610aee90613a23565b8015610b3b5780601f10610b1057610100808354040283529160200191610b3b565b820191906000526020600020905b815481529060010190602001808311610b1e57829003601f168201915b5050505050905090565b6000610b5082612132565b610b86576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610bba8261142c565b90503373ffffffffffffffffffffffffffffffffffffffff821614610c1957610be3813361078d565b610c19576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60606000600d8054610cab90613a23565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd790613a23565b8015610d245780601f10610cf957610100808354040283529160200191610d24565b820191906000526020600020905b815481529060010190602001808311610d0757829003601f168201915b5050505050905060005b600a811015610ecd5760005b6008811015610eba578260108683610d538660086139d8565b610d5d91906139ac565b60508110610d7b57634e487b7160e01b600052603260045260246000fd5b602002015181548110610d9e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001610dc8836028610db891906139d8565b610dc39060d26139ac565b612180565b610de1610dd68660286139d8565b610dc39060aa6139ac565b60118986610df08960086139d8565b610dfa91906139ac565b60508110610e1857634e487b7160e01b600052603260045260246000fd5b602002015181548110610e3b57634e487b7160e01b600052603260045260246000fd5b90600052602060002001610e55866028610db891906139d8565b610e63610dd68960286139d8565b604051602001610e7896959493929190613604565b60408051601f1981840301815290829052610e9692916020016133e4565b60405160208183030381529060405292508080610eb290613a58565b915050610d3a565b5080610ec581613a58565b915050610d2e565b5080604051602001610edf9190613413565b60408051601f198184030181529190529392505050565b610efe612023565b73ffffffffffffffffffffffffffffffffffffffff8116610f4b576040517fbe46899400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000610f9d82612238565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611004576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff88169091141761107757611041863361078d565b611077576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166110c4576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156110cf57600082555b73ffffffffffffffffffffffffffffffffffffffff8681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260409020557c0200000000000000000000000000000000000000000000000000000000831661119957600184016000818152600460205260409020546111975760005481146111975760008181526004602052604090208490555b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600f805461120990613a23565b80601f016020809104026020016040519081016040528092919081815260200182805461123590613a23565b80156112825780601f1061125757610100808354040283529160200191611282565b820191906000526020600020905b81548152906001019060200180831161126557829003601f168201915b505050505081565b611292612023565b80516010146112cd576040517f045b326b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112d960116000612c56565b80516112ec906011906020840190612c74565b5050565b610aae83838360405180602001604052806000815250611c27565b6011818154811061131b57600080fd5b90600052602060002001600091509050805461120990613a23565b60608160008167ffffffffffffffff81111561136257634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113b457816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816113805790505b50905060005b828114611423576113f08686838181106113e457634e487b7160e01b600052603260045260246000fd5b90506020020135611c91565b82828151811061141057634e487b7160e01b600052603260045260246000fd5b60209081029190910101526001016113ba565b50949350505050565b600061095282612238565b61143f612023565b610aae600d8383612bd2565b611453612023565b600c55565b600073ffffffffffffffffffffffffffffffffffffffff82166114a7576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205467ffffffffffffffff1690565b6114e2612023565b6114ec60006122d3565b565b6114f66120a4565b600b54421015611532576040517f06290e4e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c5442111561156e576040517fcfed9d4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e543410156115aa576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602881146115e4576040517f6ff8352600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601382826040516115f69291906133d4565b9081526040519081900360200190205460ff1615611640576040517f86ea494800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816012600061164f60005490565b8152602001908152602001600020919061166a929190612bd2565b5060016013838360405161167f9291906133d4565b908152604051908190036020019020805491151560ff199092169190911790556116aa336001612118565b6112ec6001600955565b606060008060006116c485611458565b905060008167ffffffffffffffff8111156116ef57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611718578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b8386146117f6576117538161234a565b9150816040015115611764576117ee565b815173ffffffffffffffffffffffffffffffffffffffff161561178657815194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156117ee57808387806001019850815181106117e157634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b600101611743565b50909695505050505050565b61180a612023565b4780611842576040517fd0d04f6000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5460405173ffffffffffffffffffffffffffffffffffffffff909116908290600081818185875af1925050503d806000811461189c576040519150601f19603f3d011682016040523d82523d6000602084013e6118a1565b606091505b50505050565b6118af612023565b600b55565b606060038054610ac290613a23565b6010818154811061131b57600080fd5b606081831061190e576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061191a60005490565b9050600185101561192a57600194505b80841115611936578093505b600061194187611458565b905084861015611960578585038181101561195a578091505b50611964565b5060005b60008167ffffffffffffffff81111561198d57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156119b6578160200160208202803683370190505b509050816119c9579350611ab492505050565b60006119d488611c91565b9050600081604001516119e5575080515b885b8881141580156119f75750848714155b15611aa857611a058161234a565b9250826040015115611a1657611aa0565b825173ffffffffffffffffffffffffffffffffffffffff1615611a3857825191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611aa05780848880600101995081518110611a9357634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b6001016119e7565b50505092835250909150505b9392505050565b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611b3c612023565b610aae600f8383612bd2565b6060611b5382612132565b611b89576040517fd03ce9df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526012602052604090208054611ba290613a23565b80601f0160208091040260200160405190810160405280929190818152602001828054611bce90613a23565b8015611c1b5780601f10611bf057610100808354040283529160200191611c1b565b820191906000526020600020905b815481529060010190602001808311611bfe57829003601f168201915b50505050509050919050565b611c32848484610f92565b73ffffffffffffffffffffffffffffffffffffffff83163b156118a157611c5b848484846123ef565b6118a1576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160808101825260008082526020820181905291810182905260608101919091526040805160808101825260008082526020820181905291810182905260608101919091526001831080611cea57506000548310155b15611cf55792915050565b611cfe8361234a565b9050806040015115611d105792915050565b611ab483612557565b6060611d2482612132565b611d5a576040517fd03ce9df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526012602052604081208054611dfb9190611d7890613a23565b80601f0160208091040260200160405190810160405280929190818152602001828054611da490613a23565b8015611df15780601f10611dc657610100808354040283529160200191611df1565b820191906000526020600020905b815481529060010190602001808311611dd457829003601f168201915b50505050506125f5565b90506000611e088261269c565b90506000611ea3611e1886612180565b600f611e2388612180565b604051602001611e34929190613454565b604051602081830303815290604052611e54611e4f87610c9a565b6127c4565b604051602001611e6491906137c6565b604051602081830303815290604052611e7c86612180565b604051602001611e8f9493929190613470565b6040516020818303038152906040526127c4565b9050600081604051602001611eb89190613781565b60408051601f198184030181529190529695505050505050565b6012602052600090815260409020805461120990613a23565b611ef3612023565b73ffffffffffffffffffffffffffffffffffffffff8116611f9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b611fa4816122d3565b50565b611faf612023565b600e55565b600d805461120990613a23565b611fc9612023565b8051601014612004576040517f045b326b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61201060106000612c56565b80516112ec906010906020840190612c74565b60085473ffffffffffffffffffffffffffffffffffffffff1633146114ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611f92565b60026009541415612111576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611f92565b6002600955565b6112ec828260405180602001604052806000815250612926565b600081600111158015612146575060005482105b80156109525750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b6060600061218d836129b9565b600101905060008167ffffffffffffffff8111156121bb57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156121e5576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461222b57612230565b6121ef565b509392505050565b600081806001116122a1576000548110156122a1576000818152600460205260409020547c0100000000000000000000000000000000000000000000000000000000811661229f575b80611ab4575060001901600081815260046020526040902054612281565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610952906040805160808101825273ffffffffffffffffffffffffffffffffffffffff8316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a029061244a90339089908890889060040161380b565b602060405180830381600087803b15801561246457600080fd5b505af1925050508015612494575060408051601f3d908101601f191682019092526124919181019061324d565b60015b612508573d8080156124c2576040519150601f19603f3d011682016040523d82523d6000602084013e6124c7565b606091505b508051612500576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261095261258783612238565b6040805160808101825273ffffffffffffffffffffffffffffffffffffffff8316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b6125fd612ccd565b60005b825161260d9060026139d8565b811015612696576000806126226002846139c4565b90506000612631600285613a73565b1561263d576000612640565b60045b86830160010151600f60ff9290921691821b16811c935090508285856050811061267a57634e487b7160e01b600052603260045260246000fd5b60200201525082915061268e905081613a58565b915050612600565b50919050565b604080516050808252610a20820190925260009182919060208201610a00803683370190505090506000805b605081101561223057600160005b8381101561274c578481815181106126fe57634e487b7160e01b600052603260045260246000fd5b602002602001015187846050811061272657634e487b7160e01b600052603260045260246000fd5b6020020151141561273a576000915061274c565b8061274481613a58565b9150506126d6565b5080156127b15785826050811061277357634e487b7160e01b600052603260045260246000fd5b602002015184848151811061279857634e487b7160e01b600052603260045260246000fd5b6020908102919091010152826127ad81613a58565b9350505b50806127bc81613a58565b9150506126c8565b60608151600014156127e457505060408051602081019091526000815290565b6000604051806060016040528060408152602001613af8604091399050600060038451600261281391906139ac565b61281d91906139c4565b6128289060046139d8565b67ffffffffffffffff81111561284e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612878576020820181803683370190505b509050600182016020820185865187015b808210156128e4576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612889565b505060038651066001811461290057600281146129135761291b565b603d6001830353603d600283035361291b565b603d60018303535b509195945050505050565b6129308383612a9b565b73ffffffffffffffffffffffffffffffffffffffff83163b15610aae576000548281035b61296760008683806001019450866123ef565b61299d576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181106129545781600054146129b257600080fd5b5050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612a02577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612a2e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612a4c57662386f26fc10000830492506010015b6305f5e1008310612a64576305f5e100830492506008015b6127108310612a7857612710830492506004015b60648310612a8a576064830492506002015b600a83106109525760010192915050565b60005481612ad5576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612b9157808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612b59565b5081612bc9576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b828054612bde90613a23565b90600052602060002090601f016020900481019282612c005760008555612c46565b82601f10612c195782800160ff19823516178555612c46565b82800160010185558215612c46579182015b82811115612c46578235825591602001919060010190612c2b565b50612c52929150612cec565b5090565b5080546000825590600052602060002090810190611fa49190612d01565b828054828255906000526020600020908101928215612cc1579160200282015b82811115612cc15782518051612cb1918491602090910190612d1e565b5091602001919060010190612c94565b50612c52929150612d01565b60405180610a0001604052806050906020820280368337509192915050565b5b80821115612c525760008155600101612ced565b80821115612c52576000612d158282612d92565b50600101612d01565b828054612d2a90613a23565b90600052602060002090601f016020900481019282612d4c5760008555612c46565b82601f10612d6557805160ff1916838001178555612c46565b82800160010185558215612c46579182015b82811115612c46578251825591602001919060010190612d77565b508054612d9e90613a23565b6000825580601f10612dae575050565b601f016020900490600052602060002090810190611fa49190612cec565b803573ffffffffffffffffffffffffffffffffffffffff81168114612df057600080fd5b919050565b60008083601f840112612e06578182fd5b50813567ffffffffffffffff811115612e1d578182fd5b602083019150836020828501011115612e3557600080fd5b9250929050565b600082601f830112612e4c578081fd5b813567ffffffffffffffff811115612e6657612e66613ab3565b612e796020601f19601f8401160161397b565b818152846020838601011115612e8d578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215612eb8578081fd5b611ab482612dcc565b60008060408385031215612ed3578081fd5b612edc83612dcc565b9150612eea60208401612dcc565b90509250929050565b600080600060608486031215612f07578081fd5b612f1084612dcc565b9250612f1e60208501612dcc565b9150604084013590509250925092565b60008060008060808587031215612f43578081fd5b612f4c85612dcc565b9350612f5a60208601612dcc565b925060408501359150606085013567ffffffffffffffff811115612f7c578182fd5b612f8887828801612e3c565b91505092959194509250565b60008060408385031215612fa6578182fd5b612faf83612dcc565b915060208301358015158114612fc3578182fd5b809150509250929050565b600080600060408486031215612fe2578283fd5b612feb84612dcc565b9250602084013567ffffffffffffffff811115613006578283fd5b61301286828701612df5565b9497909650939450505050565b60008060408385031215613031578182fd5b61303a83612dcc565b946020939093013593505050565b60008060006060848603121561305c578081fd5b61306584612dcc565b95602085013595506040909401359392505050565b6000602080838503121561308c578182fd5b823567ffffffffffffffff808211156130a3578384fd5b818501915085601f8301126130b6578384fd5b8135818111156130c8576130c8613ab3565b8060051b6130d785820161397b565b8281528581019085870183870188018b10156130f1578889fd5b8893505b8484101561312e5780358681111561310b57898afd5b6131198c8a838b0101612e3c565b845250600193909301929187019187016130f5565b509998505050505050505050565b6000610a0080838503121561314f578182fd5b83601f84011261315d578182fd5b60405181810181811067ffffffffffffffff8211171561317f5761317f613ab3565b6040528084838101871015613192578485fd5b8493505b60508410156131b657803582526001939093019260209182019101613196565b509095945050505050565b600080602083850312156131d3578182fd5b823567ffffffffffffffff808211156131ea578384fd5b818501915085601f8301126131fd578384fd5b81358181111561320b578485fd5b8660208260051b850101111561321f578485fd5b60209290920196919550909350505050565b600060208284031215613242578081fd5b8135611ab481613ac9565b60006020828403121561325e578081fd5b8151611ab481613ac9565b6000806020838503121561327b578182fd5b823567ffffffffffffffff811115613291578283fd5b61329d85828601612df5565b90969095509350505050565b6000602082840312156132ba578081fd5b813567ffffffffffffffff8111156132d0578182fd5b61254f84828501612e3c565b6000602082840312156132ed578081fd5b5035919050565b6000815180845261330c8160208601602086016139f7565b601f01601f19169290920160200192915050565b600081516133328185602086016139f7565b9290920192915050565b8054600090600181811c908083168061335657607f831692505b602080841082141561337657634e487b7160e01b86526022600452602486fd5b81801561338a576001811461339b576133c8565b60ff198616895284890196506133c8565b60008881526020902060005b868110156133c05781548b8201529085019083016133a7565b505084890196505b50505050505092915050565b8183823760009101908152919050565b600083516133f68184602088016139f7565b83519083019061340a8183602088016139f7565b01949350505050565b600082516134258184602087016139f7565b7f3c2f7376673e0000000000000000000000000000000000000000000000000000920191825250600601919050565b6000613460828561333c565b835161340a8183602088016139f7565b7f7b226e616d65223a22437265617469766520436865636b2023000000000000008152600085516134a8816019850160208a016139f7565b7f222c20226465736372697074696f6e223a20225468697320636865636b206d616019918401918201527f79206f72206d6179206e6f74206265206e6f7461626c652e222c20226578746560398201527f726e616c5f75726c223a2022000000000000000000000000000000000000000060598201528551613531816065840160208a016139f7565b7f222c2022696d616765223a22000000000000000000000000000000000000000060659290910191820152845161356f8160718401602089016139f7565b7f222c202261747472696275746573223a205b7b2274726169745f74797065223a607192909101918201527f2022436f6c6f7273222c202276616c7565223a2022000000000000000000000060918201526135f96135d060a6830186613320565b7f227d5d7d00000000000000000000000000000000000000000000000000000000815260040190565b979650505050505050565b7f3c75736520786c696e6b3a687265663d22236261646765222066696c6c3d222381526000613636602083018961333c565b7f2220783d22000000000000000000000000000000000000000000000000000000808252885161366d816005850160208d016139f7565b8083019250507f2220793d2200000000000000000000000000000000000000000000000000000080600584015288516136ad81600a860160208d016139f7565b7f22202f3e3c75736520786c696e6b3a687265663d22237469636b222066696c6c600a94909101938401527f3d22230000000000000000000000000000000000000000000000000000000000602a84015261370b602d84018961333c565b9182528651919250613724826005850160208a016139f7565b60059290910191820152835161374181600a8401602088016139f7565b613773600a828401017f22202f3e00000000000000000000000000000000000000000000000000000000815260040190565b9a9950505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516137b981601d8501602087016139f7565b91909101601d0192915050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000008152600082516137fe81601a8501602087016139f7565b91909101601a0192915050565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261384a60808301846132f4565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156117f6576138cb83855173ffffffffffffffffffffffffffffffffffffffff815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101613870565b6020808252825182820181905260009190848201906040850190845b818110156117f6578351835292840192918401916001016138fa565b602081526000611ab460208301846132f4565b815173ffffffffffffffffffffffffffffffffffffffff16815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610952565b604051601f8201601f1916810167ffffffffffffffff811182821017156139a4576139a4613ab3565b604052919050565b600082198211156139bf576139bf613a87565b500190565b6000826139d3576139d3613a9d565b500490565b60008160001904831182151516156139f2576139f2613a87565b500290565b60005b83811015613a125781810151838201526020016139fa565b838111156118a15750506000910152565b600181811c90821680613a3757607f821691505b6020821081141561269657634e487b7160e01b600052602260045260246000fd5b6000600019821415613a6c57613a6c613a87565b5060010190565b600082613a8257613a82613a9d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611fa457600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212205fc89bb0c6ad869c6d97e224dc040aaf3ac2c7739762a28926424759cedfc7b864736f6c63430008040033

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000079101aa7991213120e941c22417534221c5f42820000000000000000000000000000000000000000000000000000000063e3f1300000000000000000000000000000000000000000000000000000000063f12030000000000000000000000000000000000000000000000000000000000000000e4372656174697665436865636b7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024343000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name (string): CreativeChecks
Arg [1] : symbol (string): CC
Arg [2] : withdrawalAddress_ (address): 0x79101AA7991213120e941c22417534221c5f4282
Arg [3] : mintStart_ (uint256): 1675882800
Arg [4] : mintEnd_ (uint256): 1676746800

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 00000000000000000000000079101aa7991213120e941c22417534221c5f4282
Arg [3] : 0000000000000000000000000000000000000000000000000000000063e3f130
Arg [4] : 0000000000000000000000000000000000000000000000000000000063f12030
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [6] : 4372656174697665436865636b73000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [8] : 4343000000000000000000000000000000000000000000000000000000000000


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.