ETH Price: $2,627.41 (+5.80%)
Gas: 6 Gwei

DAOHAUS (DAOHAUS)
 

Overview

TokenID

222

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

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

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 16 : DAOHAUS.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "./DAOHAUSMinter.sol";

contract DAOHAUS is DAOHAUSMinter {
    // ====== STATE VARIABLES ======

    string internal _baseTokenURISegmentBefore;
    string internal _baseTokenURISegmentAfter;
    address internal _teamWalletAddress;

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

    constructor(
        uint256 maxMintSupply,
        string memory baseTokenURISegmentBefore,
        string memory baseTokenURISegmentAfter,
        address teamWalletAddress_
    ) DAOHAUSMinter("DAOHAUS", "DAOHAUS", maxMintSupply) {
        _baseTokenURISegmentBefore = baseTokenURISegmentBefore;
        _baseTokenURISegmentAfter = baseTokenURISegmentAfter;
        _teamWalletAddress = teamWalletAddress_;
    }

    // ====== OVERRIDES ======

    function _baseURI() internal view override returns (string memory) {
        return _baseTokenURISegmentBefore;
    }

    /**
     * @dev Returns the URI of a DAOHAUS with the given token ID.
     *
     * Throws if the given token ID is not a valid (i.e. it does not point to a
     * minted DAOHAUS).
     */
    function tokenURI(uint256 tokenId)
        public
        view
        override(ERC721A, IERC721A)
        returns (string memory)
    {
        require(_exists(tokenId), "DH_NONEXISTENT_TOKEN");
        return
            string(
                abi.encodePacked(
                    _baseURI(),
                    _toString(tokenId),
                    _baseTokenURISegmentAfter
                )
            );
    }

    // ====== EXTERNAL FUNCTIONS ======

    /**
     * @dev Returns the address of the contract's owner.
     *
     * This function is required by OpenSea. Normally, you'd inherit from
     * `Ownable` and get the owner from there, but since we're using
     * `AccessControl`, we'll return the only user with `DEFAULT_ADMIN_ROLE`.
     */
    function owner() external view virtual returns (address) {
        return _admin;
    }

    // ====== ONLY-OPERATOR FUNCTIONS ======

    /**
     * @dev Returns the address that will be used to withdraw the contract's
     * balance to.
     *
     * You must have at least the OPERATOR role to call this function.
     */
    function teamWalletAddress() external view onlyOperator returns (address) {
        return _teamWalletAddress;
    }

    /**
     * @dev Returns a tuple of before and after segments that will sandwich the
     * token ID when querying the token URI for a specific minted token.
     *
     * You must have at least the OPERATOR role to call this function.
     */
    function baseTokenURISegments()
        external
        view
        onlyOperator
        returns (string memory segmentBefore, string memory segmentAfter)
    {
        return (_baseTokenURISegmentBefore, _baseTokenURISegmentAfter);
    }

    /**
     * @dev Update the segments that will sandwich the token ID when querying
     * the token ID for a specific minted token.
     */
    function setBaseTokenURISegments(
        string memory newSegmentBefore,
        string memory newSegmentAfter
    ) external onlyOperator {
        _baseTokenURISegmentBefore = newSegmentBefore;
        _baseTokenURISegmentAfter = newSegmentAfter;
    }

    // ====== ONLY-WITHDRAWER FUNCTIONS ======

    /**
     * @dev Transfers any pending balance available in the contract to the
     * designated team wallet address.
     *
     * You must have at least the WITHDRAWER role to call this function.
     */
    function withdraw() external onlyWithdrawer {
        uint256 balance = address(this).balance;
        (bool success, ) = payable(_teamWalletAddress).call{value: balance}("");
        require(success, "HH_TRANSFER_FAILURE");
    }
}

File 2 of 16 : DAOHAUSMinter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "./DAOHAUSAccessControl.sol";
import "./DAOHAUSRoleVerifier.sol";

contract DAOHAUSMinter is
    DAOHAUSAccessControl,
    DAOHAUSRoleVerifier,
    ERC721ABurnable,
    ReentrancyGuard
{
    // ====== INTERNAL TYPES ======

    uint256 internal constant ROLE_COUNT = 4;
    struct DAOHAUSMinterState {
        bool isMintOpen;
        uint256 maxMintSupply;
        DAOHAUSRole minimumRoleRequired;
        uint256[ROLE_COUNT] mintPriceForRole;
        uint256[ROLE_COUNT] mintLimitForRole;
    }

    // ====== STATE VARIABLES ======

    DAOHAUSMinterState internal _state;
    mapping(address => uint256) public totalClaimedForAddress;

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

    constructor(
        string memory tokenName,
        string memory tokenSymbol,
        uint256 maxMintSupply
    ) ERC721A(tokenName, tokenSymbol) {
        _state.isMintOpen = false;
        _state.maxMintSupply = maxMintSupply;
        _state.minimumRoleRequired = DAOHAUSRole.TEAM;

        _state.mintPriceForRole[uint256(DAOHAUSRole.PUBLIC)] = 0.00 ether;
        _state.mintPriceForRole[uint256(DAOHAUSRole.DAOLIST)] = 0.00 ether;
        _state.mintPriceForRole[uint256(DAOHAUSRole.CREATOR)] = 0.00 ether;
        _state.mintPriceForRole[uint256(DAOHAUSRole.TEAM)] = 0.00 ether;

        _state.mintLimitForRole[uint256(DAOHAUSRole.PUBLIC)] = 2;
        _state.mintLimitForRole[uint256(DAOHAUSRole.DAOLIST)] = 2;
        _state.mintLimitForRole[uint256(DAOHAUSRole.CREATOR)] = 2;
        _state.mintLimitForRole[uint256(DAOHAUSRole.TEAM)] = 3;
    }

    // ====== MODIFIERS ======

    /**
     * @dev Determines if the mint is currently open to the given `role`.
     */
    modifier isMintOpenToRole(DAOHAUSRole role) {
        require(_state.isMintOpen, "DH_MINT_NOT_OPEN");
        require(role >= _state.minimumRoleRequired, "DH_MINT_NOT_OPEN_TO_ROLE");
        _;
    }

    /**
     * @dev Determines if there is enough supply available to mint `amount` more
     * tokens.
     */
    modifier isSupplyAvailable(uint256 amount) {
        require(
            (_totalMinted() + amount) <= _state.maxMintSupply,
            "DH_SUPPLY_EXHAUSTED"
        );
        _;
    }

    /**
     * @dev Determines if the caller has provided sufficient funds to mint
     * `amount` number of tokens with the given `role`.
     *
     * If a caller with a role higher than `PUBLIC` decides to mint after their
     * designated time to mint, they will only be charged the discounted price
     * originally set for their role.
     */
    modifier isCorrectPaymentForRole(DAOHAUSRole role, uint256 amount) {
        require(
            msg.value >= _state.mintPriceForRole[uint256(role)] * amount,
            "DH_INSUFFICIENT_FUNDS"
        );
        _;
    }

    /**
     * @dev Determines if the caller has not minted the maximum allowed for
     * the given `role`.
     */
    modifier hasNotReachedMintLimitForRole(DAOHAUSRole role, uint256 amount) {
        uint256 mintLimit = _state.mintLimitForRole[uint256(role)];
        require(
            totalClaimedForAddress[msg.sender] + amount <= mintLimit,
            "DH_MINT_LIMIT_EXCEEDED"
        );
        _;
    }

    // ====== MINTING FUNCTIONS ======

    /**
     * @dev Mints `amount` number of DAOHAUSes with the given `role`, verified
     * with the provided `merkleProof`.
     *
     * This function requires several prerequisites to be met for `msg.sender`
     * to successfully mint a DAOHAUS token:
     *
     *   - The mint is currently open to the given `role`;
     *   - There is enough supply available to mint `amount` extra tokens;
     *   - Sufficient amount of ETH has been provided to purchase `amount`
     *     number of tokens;
     *   - The caller has not minted (or will not mint) over the maximum
     *     number of tokens they are allowed to mint; and
     *   - It can be verified that `msg.sender` is a member of `role` using the
     *     provided `merkleProof`. If `role` is `PUBLIC`, this check will be
     *     skipped.
     *
     * If any of the above prerequisites are not met, this function will reject
     * the mint and throw an error.
     */
    function mint(
        DAOHAUSRole role,
        uint256 amount,
        bytes32[] calldata merkleProof
    )
        external
        payable
        nonReentrant
        isMintOpenToRole(role)
        isSupplyAvailable(amount)
        isCorrectPaymentForRole(role, amount)
        hasNotReachedMintLimitForRole(role, amount)
        isValidMerkleProofForRole(role, merkleProof)
    {
        _mintToAddress(msg.sender, amount);
    }

    /**
     * @dev Mints `amount` number of DAOHAUSes directly to `receiver`.
     *
     * This function does not validate the DAOHAUS role of the receiver.
     * However, it will ensure that there is enough supply available to mint the
     * given amount of DAOHAUSes.
     *
     * Note that this function will not check if gifting the token will exceed
     * the mint limit imposed on the receiver, simply because we don't know
     * which role this receiver belongs to without complicating the function.
      However, it will still increment `_totalClaimedForAddress`, so any
     * subsequent calls to `mint` from the receiver will fail with the expected
     * `"DH_MINT_LIMIT_EXCEEDED"` error.
     */
    function mintUnchecked(address receiver, uint256 amount)
        external
        onlyOperator
        isSupplyAvailable(amount)
    {
        _mintToAddress(receiver, amount);
    }

    /**
     * @dev Internal function that mints `amount` number of DAOHAUSes to
     * `receiver`.
     */
    function _mintToAddress(address receiver, uint256 amount) internal {
        // Record the total amount of tokens minted by the minter.
        totalClaimedForAddress[receiver] += amount;

        // The second argument of `_safeMint` in AZUKI's `ERC721A` contract
        // expects the amount to mint, not a token ID.
        _safeMint(receiver, amount);
    }

    // ====== EXTERNAL/PUBLIC FUNCTIONS ======

    /**
     * @dev Returns a convenient struct reporting the current state of the
     * DAOHAUS mint orchestrator.
     *
     * The JavaScript ABI does not expose the array fields `mintPriceForRole`
     * and `mintLimitForRole` if we make the `_state` property public, which is
     * why we resorted to return it from a function here.
     */
    function currentState() external view returns (DAOHAUSMinterState memory) {
        return _state;
    }

    /**
     * @dev Returns the current minting price for the given `role`.
     */
    function mintPriceForRole(DAOHAUSRole role)
        external
        view
        returns (uint256)
    {
        return _state.mintPriceForRole[uint256(role)];
    }

    // ====== ONLY-OPERATOR FUNCTIONS ======

    /**
     * @dev Opens the mint to all minters who have at least the given minimum
     * role. Anyone with roles that are higher than the given role would also be
     * able to mint (if they weren't able to before) at the price that was
     * originally set for them.
     *
     * You must have at least the OPERATOR role to call this function.
     */
    function openMint(DAOHAUSRole minimumRoleRequired) external onlyOperator {
        if (!_state.isMintOpen) _state.isMintOpen = true;
        _state.minimumRoleRequired = minimumRoleRequired;
    }

    /**
     * @dev Closes the mint to ALL potential minters of ANY role.
     *
     * You must have at least the OPERATOR role to call this function.
     */
    function closeMint() external onlyOperator {
        if (_state.isMintOpen) _state.isMintOpen = false;
        _state.minimumRoleRequired = DAOHAUSRole.TEAM;
    }

    /**
     * @dev Updates the maximum number of tokens that can be minted.
     *
     * This function will ensure that `newTotal` is greater than or equal to
     * the current number of tokens minted.
     *
     * You must have at least the OPERATOR role to call this function.
     */
    function setMaxMintSupply(uint256 newTotal) external onlyOperator {
        require(newTotal >= _totalMinted(), "DH_NEW_SUPPLY_TOO_SMALL");
        _state.maxMintSupply = newTotal;
    }

    /**
     * @dev Updates the maximum number of tokens allowed to be minted for a
     * caller with the given `role`.
     *
     * You must have at least the OPERATOR role to call this function.
     */
    function setMintLimitForRole(DAOHAUSRole role, uint256 newLimit)
        external
        onlyOperator
    {
        _state.mintLimitForRole[uint256(role)] = newLimit;
    }

    /**
     * @dev Updates the price of each token for a caller with the given `role`.
     *
     * You must have at least the OPERATOR role to call this function.
     */
    function setMintPriceForRole(DAOHAUSRole role, uint256 newPrice)
        external
        onlyOperator
    {
        _state.mintPriceForRole[uint256(role)] = newPrice;
    }

    // ====== MISCELLANEOUS ======

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(AccessControl, ERC721A, IERC721A)
        returns (bool)
    {
        return
            AccessControl.supportsInterface(interfaceId) ||
            ERC721A.supportsInterface(interfaceId);
    }
}

File 3 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

        // 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 16 : ERC721ABurnable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721ABurnable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721ABurnable.
 *
 * @dev ERC721A token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual override {
        _burn(tokenId, true);
    }
}

File 5 of 16 : DAOHAUSAccessControl.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/access/AccessControl.sol";

contract DAOHAUSAccessControl is AccessControl {
    // ====== CONSTANTS ======

    // Responsible for changing state variables.
    bytes32 public constant OPERATOR_ROLE = keccak256("DH_OPERATOR_ROLE");
    // Responsible for withdrawing pending funds.
    bytes32 public constant WITHDRAWER_ROLE = keccak256("DH_WITHDRAWER_ROLE");

    // ====== STATE VARIABLES ======

    // The account with the `DEFAULT_ADMIN_ROLE` role (this will never change).
    address internal immutable _admin;

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

    constructor() {
        // Set contract's deployer as the only admin.
        _admin = msg.sender;

        // The admin may grant and revoke operators and withdrawers.
        _setRoleAdmin(OPERATOR_ROLE, DEFAULT_ADMIN_ROLE);
        _setRoleAdmin(WITHDRAWER_ROLE, DEFAULT_ADMIN_ROLE);

        // The contract deployer is the admin.
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    // ====== MODIFIERS ======

    modifier onlyAdmin() {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "DH_CALLER_NOT_ADMIN");
        _;
    }

    modifier onlyOperator() {
        require(
            hasGivenOrAdminRole(OPERATOR_ROLE, msg.sender),
            "DH_CALLER_NOT_OPERATOR"
        );
        _;
    }

    modifier onlyWithdrawer() {
        require(
            hasGivenOrAdminRole(WITHDRAWER_ROLE, msg.sender),
            "DH_CALLER_NOT_WITHDRAWER"
        );
        _;
    }

    // ====== EXTERNAL/PUBLIC FUNCTIONS ======

    /**
     * @dev Determines whether the given `account` is a member of the given
     * `role` or is an admin.
     *
     * By default, `AccessControl#hasRole` only checks if the account is a
     * member of the given role. However, it is useful to allow the admin to
     * also pass this check. This function does just that by first checking if
     * `account` is the admin before checking if it is a member of `role`.
     */
    function hasGivenOrAdminRole(bytes32 role, address account)
        public
        view
        returns (bool)
    {
        return hasRole(DEFAULT_ADMIN_ROLE, account) || hasRole(role, account);
    }
}

File 6 of 16 : DAOHAUSRoleVerifier.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./DAOHAUSAccessControl.sol";

enum DAOHAUSRole {
    PUBLIC, // = 0
    DAOLIST, // = 1
    CREATOR, // = 2
    TEAM // = 3
}

contract DAOHAUSRoleVerifier is DAOHAUSAccessControl {
    // ====== STATE VARIABLES ======

    mapping(DAOHAUSRole => bytes32) internal _merkleRootForRole;

    // ====== MODIFIERS ======

    /**
     * @dev Determines if the caller of this function is a member of `role`
     * using the `merkleProof`.
     *
     * The parameter `merkleProof` will need to be generated from a database of
     * addresses that belong to `role`. It will then be checked against the
     * current merkle root to determine if the address truly exists in the list.
     *
     * Note: The merkle root for the `role` will need to be synced if the
     * aforementioned database of addresses is updated in any way.
     */
    modifier isValidMerkleProofForRole(
        DAOHAUSRole role,
        bytes32[] calldata merkleProof
    ) {
        if (role > DAOHAUSRole.PUBLIC) {
            require(
                _merkleRootForRole[role] != bytes32(0x0),
                "DH_MERKLE_ROOT_NOT_SET"
            );
            require(
                MerkleProof.verify(
                    merkleProof,
                    _merkleRootForRole[role],
                    keccak256(abi.encodePacked(msg.sender))
                ),
                "DH_ROLE_VERIFICATION_FAILED"
            );
        }
        _;
    }

    // ====== EXTERNAL FUNCTIONS ======

    /**
     * @dev Returns the merkle root used in the verification process to check if
     * an address is a member of `role`.
     *
     * You must have at least the OPERATOR role to call this function.
     */
    function merkleRootForRole(DAOHAUSRole role)
        external
        view
        onlyOperator
        returns (bytes32)
    {
        return _merkleRootForRole[role];
    }

    /**
     * @dev Updates the merkle root to keep in sync with the latest version of
     * addresses belonging to `role`.
     *
     * You must have at least the OPERATOR role to call this function.
     */
    function setMerkleRootForRole(DAOHAUSRole role, bytes32 newRoot)
        external
        onlyOperator
    {
        _merkleRootForRole[role] = newRoot;
    }
}

File 7 of 16 : IERC721ABurnable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of ERC721ABurnable.
 */
interface IERC721ABurnable is IERC721A {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) external;
}

File 8 of 16 : 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 9 of 16 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 16 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 11 of 16 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 12 of 16 : 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 13 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_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) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

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

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

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

    /**
     * @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 14 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 16 of 16 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"maxMintSupply","type":"uint256"},{"internalType":"string","name":"baseTokenURISegmentBefore","type":"string"},{"internalType":"string","name":"baseTokenURISegmentAfter","type":"string"},{"internalType":"address","name":"teamWalletAddress_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURISegments","outputs":[{"internalType":"string","name":"segmentBefore","type":"string"},{"internalType":"string","name":"segmentAfter","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentState","outputs":[{"components":[{"internalType":"bool","name":"isMintOpen","type":"bool"},{"internalType":"uint256","name":"maxMintSupply","type":"uint256"},{"internalType":"enum DAOHAUSRole","name":"minimumRoleRequired","type":"uint8"},{"internalType":"uint256[4]","name":"mintPriceForRole","type":"uint256[4]"},{"internalType":"uint256[4]","name":"mintLimitForRole","type":"uint256[4]"}],"internalType":"struct DAOHAUSMinter.DAOHAUSMinterState","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":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasGivenOrAdminRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum DAOHAUSRole","name":"role","type":"uint8"}],"name":"merkleRootForRole","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum DAOHAUSRole","name":"role","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"enum DAOHAUSRole","name":"role","type":"uint8"}],"name":"mintPriceForRole","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintUnchecked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum DAOHAUSRole","name":"minimumRoleRequired","type":"uint8"}],"name":"openMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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":"newSegmentBefore","type":"string"},{"internalType":"string","name":"newSegmentAfter","type":"string"}],"name":"setBaseTokenURISegments","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTotal","type":"uint256"}],"name":"setMaxMintSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum DAOHAUSRole","name":"role","type":"uint8"},{"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"setMerkleRootForRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum DAOHAUSRole","name":"role","type":"uint8"},{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"setMintLimitForRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum DAOHAUSRole","name":"role","type":"uint8"},{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setMintPriceForRole","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":[],"name":"teamWalletAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"","type":"address"}],"name":"totalClaimedForAddress","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":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b506040516200354a3803806200354a83398101604081905262000034916200033f565b60408051808201825260078082526644414f4841555360c81b60208084018290528451808601909552918452908301523360805290858282620000997f5653a16b1626f7b9604d5ed10d6dcc3f74c41fac951cebd85b3290a4c87522aa60006200018e565b620000c67f565234e475aa7df0df7d9a3f45b927e1e8419bc0fe7afa79b51f30a3dd7b065a60006200018e565b620000d3600033620001d9565b6004620000e1838262000464565b506005620000f0828262000464565b5050600060028181556001600a55600b805460ff19908116909155600c94909455600d80546003951685179055600e829055600f82905560108290556011919091556012819055601381905560145550601555506017905062000154848262000464565b50601862000163838262000464565b50601980546001600160a01b0319166001600160a01b03929092169190911790555062000530915050565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000276576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002353390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002a257600080fd5b81516001600160401b0380821115620002bf57620002bf6200027a565b604051601f8301601f19908116603f01168101908282118183101715620002ea57620002ea6200027a565b816040528381526020925086838588010111156200030757600080fd5b600091505b838210156200032b57858201830151818301840152908201906200030c565b600093810190920192909252949350505050565b600080600080608085870312156200035657600080fd5b845160208601519094506001600160401b03808211156200037657600080fd5b620003848883890162000290565b945060408701519150808211156200039b57600080fd5b50620003aa8782880162000290565b606087015190935090506001600160a01b0381168114620003ca57600080fd5b939692955090935050565b600181811c90821680620003ea57607f821691505b6020821081036200040b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200045f57600081815260208120601f850160051c810160208610156200043a5750805b601f850160051c820191505b818110156200045b5782815560010162000446565b5050505b505050565b81516001600160401b038111156200048057620004806200027a565b6200049881620004918454620003d5565b8462000411565b602080601f831160018114620004d05760008415620004b75750858301515b600019600386901b1c1916600185901b1785556200045b565b600085815260208120601f198616915b828110156200050157888601518255948401946001909101908401620004e0565b5085821015620005205787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b608051612ffe6200054c60003960006105f90152612ffe6000f3fe6080604052600436106102c65760003560e01c806370a0823111610179578063a22cb465116100d6578063d547741f1161008a578063e985e9c511610064578063e985e9c5146107b4578063f35f2e54146107fd578063f5b541a61461081d57600080fd5b8063d547741f14610761578063da39f8cf14610781578063e077f28e1461079457600080fd5b8063c40e050f116100bb578063c40e050f146106fe578063c50394a01461071e578063c87b56dd1461074157600080fd5b8063a22cb465146106cb578063b88d4fde146106eb57600080fd5b806391d148541161012d5780639f73047a116101125780639f73047a14610676578063a094140214610696578063a217fddf146106b657600080fd5b806391d148541461061d57806395d89b411461066157600080fd5b806382578f261161015e57806382578f261461059657806385f438c1146105b65780638da5cb5b146105ea57600080fd5b806370a08231146105565780637389fbb71461057657600080fd5b806336568abe1161022757806354780dc3116101db5780636352211e116101c05780636352211e1461050157806364f101f0146105215780636ce07bf51461053657600080fd5b806354780dc3146104c157806361c2aa40146104e157600080fd5b806342842e0e1161020c57806342842e0e1461046157806342966c68146104745780634b9bf2491461049457600080fd5b806336568abe1461042c5780633ccfd60b1461044c57600080fd5b80631245e3471161027e57806323b872dd1161026357806323b872dd146103c9578063248a9ca3146103dc5780632f2ff15d1461040c57600080fd5b80631245e3471461039157806318160ddd146103a657600080fd5b8063081812fc116102af578063081812fc14610322578063095ea7b31461035a5780630c3f6acf1461036f57600080fd5b806301ffc9a7146102cb57806306fdde0314610300575b600080fd5b3480156102d757600080fd5b506102eb6102e6366004612776565b61083f565b60405190151581526020015b60405180910390f35b34801561030c57600080fd5b5061031561085f565b6040516102f791906127e3565b34801561032e57600080fd5b5061034261033d3660046127f6565b6108f1565b6040516001600160a01b0390911681526020016102f7565b61036d610368366004612826565b61094e565b005b34801561037b57600080fd5b50610384610a1f565b6040516102f79190612889565b34801561039d57600080fd5b50610342610aee565b3480156103b257600080fd5b50600354600254035b6040519081526020016102f7565b61036d6103d73660046128f5565b610b62565b3480156103e857600080fd5b506103bb6103f73660046127f6565b60009081526020819052604090206001015490565b34801561041857600080fd5b5061036d610427366004612931565b610d38565b34801561043857600080fd5b5061036d610447366004612931565b610d62565b34801561045857600080fd5b5061036d610dee565b61036d61046f3660046128f5565b610f0b565b34801561048057600080fd5b5061036d61048f3660046127f6565b610f26565b3480156104a057600080fd5b506103bb6104af36600461295d565b60166020526000908152604090205481565b3480156104cd57600080fd5b506103bb6104dc366004612987565b610f34565b3480156104ed57600080fd5b5061036d6104fc366004612a4e565b610fd1565b34801561050d57600080fd5b5061034261051c3660046127f6565b611047565b34801561052d57600080fd5b5061036d611052565b34801561054257600080fd5b506102eb610551366004612931565b6110d4565b34801561056257600080fd5b506103bb61057136600461295d565b611141565b34801561058257600080fd5b5061036d6105913660046127f6565b6111a9565b3480156105a257600080fd5b5061036d6105b1366004612ab2565b61125d565b3480156105c257600080fd5b506103bb7f565234e475aa7df0df7d9a3f45b927e1e8419bc0fe7afa79b51f30a3dd7b065a81565b3480156105f657600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610342565b34801561062957600080fd5b506102eb610638366004612931565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561066d57600080fd5b506103156112f7565b34801561068257600080fd5b5061036d610691366004612826565b611306565b3480156106a257600080fd5b5061036d6106b1366004612ab2565b6113d4565b3480156106c257600080fd5b506103bb600081565b3480156106d757600080fd5b5061036d6106e6366004612ace565b61145c565b61036d6106f9366004612b0a565b6114c8565b34801561070a57600080fd5b506103bb610719366004612987565b611512565b34801561072a57600080fd5b50610733611540565b6040516102f7929190612b86565b34801561074d57600080fd5b5061031561075c3660046127f6565b6116c4565b34801561076d57600080fd5b5061036d61077c366004612931565b611756565b61036d61078f366004612bb4565b61177b565b3480156107a057600080fd5b5061036d6107af366004612ab2565b611bda565b3480156107c057600080fd5b506102eb6107cf366004612c3e565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b34801561080957600080fd5b5061036d610818366004612987565b611c4c565b34801561082957600080fd5b506103bb600080516020612fa983398151915281565b600061084a82611ce8565b80610859575061085982611d36565b92915050565b60606004805461086e90612c68565b80601f016020809104026020016040519081016040528092919081815260200182805461089a90612c68565b80156108e75780601f106108bc576101008083540402835291602001916108e7565b820191906000526020600020905b8154815290600101906020018083116108ca57829003601f168201915b5050505050905090565b60006108fc82611db6565b610932576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b600061095982611047565b9050336001600160a01b038216146109ab5761097581336107cf565b6109ab576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526008602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610a27612708565b6040805160a081018252600b805460ff90811615158352600c546020840152600d549293919291840191166003811115610a6357610a63612850565b6003811115610a7457610a74612850565b815260408051608081019182905260209092019190600384019060049082845b815481526020019060010190808311610a9457505050918352505060408051608081019182905260209092019190600784019060049082845b815481526020019060010190808311610acd57505050505081525050905090565b6000610b08600080516020612fa9833981519152336110d4565b610b525760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b60448201526064015b60405180910390fd5b506019546001600160a01b031690565b6000610b6d82611dde565b9050836001600160a01b0316816001600160a01b031614610bba576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526008602052604090208054610be68187335b6001600160a01b039081169116811491141790565b610c1157610bf486336107cf565b610c1157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610c51576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015610c5c57600082555b6001600160a01b038681166000908152600760205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260066020526040812091909155600160e11b84169003610cee57600184016000818152600660205260408120549003610cec576002548114610cec5760008181526006602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600082815260208190526040902060010154610d5381611e5e565b610d5d8383611e68565b505050565b6001600160a01b0381163314610de05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b49565b610dea8282611f06565b5050565b610e187f565234e475aa7df0df7d9a3f45b927e1e8419bc0fe7afa79b51f30a3dd7b065a336110d4565b610e645760405162461bcd60e51b815260206004820152601860248201527f44485f43414c4c45525f4e4f545f5749544844524157455200000000000000006044820152606401610b49565b60195460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114610eb5576040519150601f19603f3d011682016040523d82523d6000602084013e610eba565b606091505b5050905080610dea5760405162461bcd60e51b815260206004820152601360248201527f48485f5452414e534645525f4641494c555245000000000000000000000000006044820152606401610b49565b610d5d838383604051806020016040528060008152506114c8565b610f31816001611f85565b50565b6000610f4e600080516020612fa9833981519152336110d4565b610f935760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b60016000836003811115610fa957610fa9612850565b6003811115610fba57610fba612850565b81526020019081526020016000205490505b919050565b610fe9600080516020612fa9833981519152336110d4565b61102e5760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b601761103a8382612ce8565b506018610d5d8282612ce8565b600061085982611dde565b61106a600080516020612fa9833981519152336110d4565b6110af5760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b600b5460ff16156110c557600b805460ff191690555b600d805460ff19166003179055565b6001600160a01b03811660009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604081205460ff168061113a57506000838152602081815260408083206001600160a01b038616845290915290205460ff165b9392505050565b60006001600160a01b038216611183576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b6111c1600080516020612fa9833981519152336110d4565b6112065760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b6002548110156112585760405162461bcd60e51b815260206004820152601760248201527f44485f4e45575f535550504c595f544f4f5f534d414c4c0000000000000000006044820152606401610b49565b600c55565b611275600080516020612fa9833981519152336110d4565b6112ba5760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b80600160008460038111156112d1576112d1612850565b60038111156112e2576112e2612850565b81526020810191909152604001600020555050565b60606005805461086e90612c68565b61131e600080516020612fa9833981519152336110d4565b6113635760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b600c5481908161137260025490565b61137c9190612dbe565b11156113ca5760405162461bcd60e51b815260206004820152601360248201527f44485f535550504c595f455848415553544544000000000000000000000000006044820152606401610b49565b610d5d83836120e9565b6113ec600080516020612fa9833981519152336110d4565b6114315760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b80601283600381111561144657611446612850565b6004811061145657611456612dd1565b01555050565b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6114d3848484610b62565b6001600160a01b0383163b1561150c576114ef84848484612121565b61150c576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000600e82600381111561152857611528612850565b6004811061153857611538612dd1565b015492915050565b60608061155b600080516020612fa9833981519152336110d4565b6115a05760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b601760188180546115b090612c68565b80601f01602080910402602001604051908101604052809291908181526020018280546115dc90612c68565b80156116295780601f106115fe57610100808354040283529160200191611629565b820191906000526020600020905b81548152906001019060200180831161160c57829003601f168201915b5050505050915080805461163c90612c68565b80601f016020809104026020016040519081016040528092919081815260200182805461166890612c68565b80156116b55780601f1061168a576101008083540402835291602001916116b5565b820191906000526020600020905b81548152906001019060200180831161169857829003601f168201915b50505050509050915091509091565b60606116cf82611db6565b61171b5760405162461bcd60e51b815260206004820152601460248201527f44485f4e4f4e4558495354454e545f544f4b454e0000000000000000000000006044820152606401610b49565b61172361220c565b61172c8361221b565b601860405160200161174093929190612de7565b6040516020818303038152906040529050919050565b60008281526020819052604090206001015461177181611e5e565b610d5d8383611f06565b6002600a54036117cd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b49565b6002600a55600b54849060ff166118265760405162461bcd60e51b815260206004820152601060248201527f44485f4d494e545f4e4f545f4f50454e000000000000000000000000000000006044820152606401610b49565b600d5460ff16600381111561183d5761183d612850565b81600381111561184f5761184f612850565b101561189d5760405162461bcd60e51b815260206004820152601860248201527f44485f4d494e545f4e4f545f4f50454e5f544f5f524f4c4500000000000000006044820152606401610b49565b600c548490816118ac60025490565b6118b69190612dbe565b11156119045760405162461bcd60e51b815260206004820152601360248201527f44485f535550504c595f455848415553544544000000000000000000000000006044820152606401610b49565b858580600e83600381111561191b5761191b612850565b6004811061192b5761192b612dd1565b01546119379190612e87565b3410156119865760405162461bcd60e51b815260206004820152601560248201527f44485f494e53554646494349454e545f46554e445300000000000000000000006044820152606401610b49565b87876000601283600381111561199e5761199e612850565b600481106119ae576119ae612dd1565b01543360009081526016602052604090205490915081906119d0908490612dbe565b1115611a1e5760405162461bcd60e51b815260206004820152601660248201527f44485f4d494e545f4c494d49545f4558434545444544000000000000000000006044820152606401610b49565b8a89896000836003811115611a3557611a35612850565b1115611bbb576000600181856003811115611a5257611a52612850565b6003811115611a6357611a63612850565b81526020019081526020016000205403611abf5760405162461bcd60e51b815260206004820152601660248201527f44485f4d45524b4c455f524f4f545f4e4f545f534554000000000000000000006044820152606401610b49565b611b6f82828080602002602001604051908101604052809392919081815260200183836020028082843760009201829052506001935091508790506003811115611b0b57611b0b612850565b6003811115611b1c57611b1c612850565b81526020019081526020016000205433604051602001611b54919060609190911b6bffffffffffffffffffffffff1916815260140190565b6040516020818303038152906040528051906020012061225f565b611bbb5760405162461bcd60e51b815260206004820152601b60248201527f44485f524f4c455f564552494649434154494f4e5f4641494c454400000000006044820152606401610b49565b611bc5338e6120e9565b50506001600a55505050505050505050505050565b611bf2600080516020612fa9833981519152336110d4565b611c375760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b80600e83600381111561144657611446612850565b611c64600080516020612fa9833981519152336110d4565b611ca95760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b600b5460ff16611cc157600b805460ff191660011790555b600d805482919060ff19166001836003811115611ce057611ce0612850565b021790555050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061085957506301ffc9a760e01b6001600160e01b0319831614610859565b60006301ffc9a760e01b6001600160e01b031983161480611d8057507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806108595750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b600060025482108015610859575050600090815260066020526040902054600160e01b161590565b600081600254811015611e2c5760008181526006602052604081205490600160e01b82169003611e2a575b8060000361113a575060001901600081815260066020526040902054611e09565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f318133612275565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610dea576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611ec23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610dea576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611f9083611dde565b905080600080611fae86600090815260086020526040902080549091565b915091508415611fee57611fc3818433610bd1565b611fee57611fd183336107cf565b611fee57604051632ce44b5f60e11b815260040160405180910390fd5b8015611ff957600082555b6001600160a01b038316600081815260076020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260066020526040812091909155600160e11b851690036120a05760018601600081815260066020526040812054900361209e57600254811461209e5760008181526006602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060038054600101905550505050565b6001600160a01b03821660009081526016602052604081208054839290612111908490612dbe565b90915550610dea905082826122f3565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612156903390899088908890600401612e9e565b6020604051808303816000875af1925050508015612191575060408051601f3d908101601f1916820190925261218e91810190612eda565b60015b6121ef573d8080156121bf576040519150601f19603f3d011682016040523d82523d6000602084013e6121c4565b606091505b5080516000036121e7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60606017805461086e90612c68565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806122355750819003601f19909101908152919050565b60008261226c858461230d565b14949350505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610dea576122b1816001600160a01b0316601461235a565b6122bc83602061235a565b6040516020016122cd929190612ef7565b60408051601f198184030181529082905262461bcd60e51b8252610b49916004016127e3565b610dea82826040518060200160405280600081525061253b565b600081815b84518110156123525761233e8286838151811061233157612331612dd1565b60200260200101516125a8565b91508061234a81612f78565b915050612312565b509392505050565b60606000612369836002612e87565b612374906002612dbe565b67ffffffffffffffff81111561238c5761238c6129a2565b6040519080825280601f01601f1916602001820160405280156123b6576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106123ed576123ed612dd1565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061243857612438612dd1565b60200101906001600160f81b031916908160001a905350600061245c846002612e87565b612467906001612dbe565b90505b60018111156124ec577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106124a8576124a8612dd1565b1a60f81b8282815181106124be576124be612dd1565b60200101906001600160f81b031916908160001a90535060049490941c936124e581612f91565b905061246a565b50831561113a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b49565b61254583836125d7565b6001600160a01b0383163b15610d5d576002548281035b61256f6000868380600101945086612121565b61258c576040516368d2bf6b60e11b815260040160405180910390fd5b81811061255c5781600254146125a157600080fd5b5050505050565b60008183106125c457600082815260208490526040902061113a565b600083815260208390526040902061113a565b6002546000829003612615576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526007602090815260408083208054680100000000000000018802019055848352600690915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146126c457808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010161268c565b50816000036126ff576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025550505050565b6040805160a08101825260008082526020820181905290918201908152602001612730612742565b815260200161273d612742565b905290565b60405180608001604052806004906020820280368337509192915050565b6001600160e01b031981168114610f3157600080fd5b60006020828403121561278857600080fd5b813561113a81612760565b60005b838110156127ae578181015183820152602001612796565b50506000910152565b600081518084526127cf816020860160208601612793565b601f01601f19169290920160200192915050565b60208152600061113a60208301846127b7565b60006020828403121561280857600080fd5b5035919050565b80356001600160a01b0381168114610fcc57600080fd5b6000806040838503121561283957600080fd5b6128428361280f565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b8060005b600481101561150c57815184526020938401939091019060010161286a565b815115158152602080830151908201526040820151610160820190600481106128c257634e487b7160e01b600052602160045260246000fd5b8060408401525060608301516128db6060840182612866565b5060808301516128ee60e0840182612866565b5092915050565b60008060006060848603121561290a57600080fd5b6129138461280f565b92506129216020850161280f565b9150604084013590509250925092565b6000806040838503121561294457600080fd5b823591506129546020840161280f565b90509250929050565b60006020828403121561296f57600080fd5b61113a8261280f565b803560048110610fcc57600080fd5b60006020828403121561299957600080fd5b61113a82612978565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156129d3576129d36129a2565b604051601f8501601f19908116603f011681019082821181831017156129fb576129fb6129a2565b81604052809350858152868686011115612a1457600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612a3f57600080fd5b61113a838335602085016129b8565b60008060408385031215612a6157600080fd5b823567ffffffffffffffff80821115612a7957600080fd5b612a8586838701612a2e565b93506020850135915080821115612a9b57600080fd5b50612aa885828601612a2e565b9150509250929050565b60008060408385031215612ac557600080fd5b61284283612978565b60008060408385031215612ae157600080fd5b612aea8361280f565b915060208301358015158114612aff57600080fd5b809150509250929050565b60008060008060808587031215612b2057600080fd5b612b298561280f565b9350612b376020860161280f565b925060408501359150606085013567ffffffffffffffff811115612b5a57600080fd5b8501601f81018713612b6b57600080fd5b612b7a878235602084016129b8565b91505092959194509250565b604081526000612b9960408301856127b7565b8281036020840152612bab81856127b7565b95945050505050565b60008060008060608587031215612bca57600080fd5b612bd385612978565b935060208501359250604085013567ffffffffffffffff80821115612bf757600080fd5b818701915087601f830112612c0b57600080fd5b813581811115612c1a57600080fd5b8860208260051b8501011115612c2f57600080fd5b95989497505060200194505050565b60008060408385031215612c5157600080fd5b612c5a8361280f565b91506129546020840161280f565b600181811c90821680612c7c57607f821691505b602082108103612c9c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610d5d57600081815260208120601f850160051c81016020861015612cc95750805b601f850160051c820191505b81811015610d3057828155600101612cd5565b815167ffffffffffffffff811115612d0257612d026129a2565b612d1681612d108454612c68565b84612ca2565b602080601f831160018114612d4b5760008415612d335750858301515b600019600386901b1c1916600185901b178555610d30565b600085815260208120601f198616915b82811015612d7a57888601518255948401946001909101908401612d5b565b5085821015612d985787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8082018082111561085957610859612da8565b634e487b7160e01b600052603260045260246000fd5b600084516020612dfa8285838a01612793565b855191840191612e0d8184848a01612793565b8554920191600090612e1e81612c68565b60018281168015612e365760018114612e4b57612e77565b60ff1984168752821515830287019450612e77565b896000528560002060005b84811015612e6f57815489820152908301908701612e56565b505082870194505b50929a9950505050505050505050565b808202811582820484141761085957610859612da8565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612ed060808301846127b7565b9695505050505050565b600060208284031215612eec57600080fd5b815161113a81612760565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612f2f816017850160208801612793565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612f6c816028840160208801612793565b01602801949350505050565b600060018201612f8a57612f8a612da8565b5060010190565b600081612fa057612fa0612da8565b50600019019056fe5653a16b1626f7b9604d5ed10d6dcc3f74c41fac951cebd85b3290a4c87522aaa2646970667358221220da92159e436d4c8c7ddff4348714d7ca60c608173095f8d5895c45b894c516df64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000014d000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000587bea191592f934e5c92e1181adfa44f947ba24000000000000000000000000000000000000000000000000000000000000003b687474703a2f2f6c6f63616c686f73743a353030312f64616f686175732d6e66742f75732d63656e7472616c312f6170692f6d657461646174612f00000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102c65760003560e01c806370a0823111610179578063a22cb465116100d6578063d547741f1161008a578063e985e9c511610064578063e985e9c5146107b4578063f35f2e54146107fd578063f5b541a61461081d57600080fd5b8063d547741f14610761578063da39f8cf14610781578063e077f28e1461079457600080fd5b8063c40e050f116100bb578063c40e050f146106fe578063c50394a01461071e578063c87b56dd1461074157600080fd5b8063a22cb465146106cb578063b88d4fde146106eb57600080fd5b806391d148541161012d5780639f73047a116101125780639f73047a14610676578063a094140214610696578063a217fddf146106b657600080fd5b806391d148541461061d57806395d89b411461066157600080fd5b806382578f261161015e57806382578f261461059657806385f438c1146105b65780638da5cb5b146105ea57600080fd5b806370a08231146105565780637389fbb71461057657600080fd5b806336568abe1161022757806354780dc3116101db5780636352211e116101c05780636352211e1461050157806364f101f0146105215780636ce07bf51461053657600080fd5b806354780dc3146104c157806361c2aa40146104e157600080fd5b806342842e0e1161020c57806342842e0e1461046157806342966c68146104745780634b9bf2491461049457600080fd5b806336568abe1461042c5780633ccfd60b1461044c57600080fd5b80631245e3471161027e57806323b872dd1161026357806323b872dd146103c9578063248a9ca3146103dc5780632f2ff15d1461040c57600080fd5b80631245e3471461039157806318160ddd146103a657600080fd5b8063081812fc116102af578063081812fc14610322578063095ea7b31461035a5780630c3f6acf1461036f57600080fd5b806301ffc9a7146102cb57806306fdde0314610300575b600080fd5b3480156102d757600080fd5b506102eb6102e6366004612776565b61083f565b60405190151581526020015b60405180910390f35b34801561030c57600080fd5b5061031561085f565b6040516102f791906127e3565b34801561032e57600080fd5b5061034261033d3660046127f6565b6108f1565b6040516001600160a01b0390911681526020016102f7565b61036d610368366004612826565b61094e565b005b34801561037b57600080fd5b50610384610a1f565b6040516102f79190612889565b34801561039d57600080fd5b50610342610aee565b3480156103b257600080fd5b50600354600254035b6040519081526020016102f7565b61036d6103d73660046128f5565b610b62565b3480156103e857600080fd5b506103bb6103f73660046127f6565b60009081526020819052604090206001015490565b34801561041857600080fd5b5061036d610427366004612931565b610d38565b34801561043857600080fd5b5061036d610447366004612931565b610d62565b34801561045857600080fd5b5061036d610dee565b61036d61046f3660046128f5565b610f0b565b34801561048057600080fd5b5061036d61048f3660046127f6565b610f26565b3480156104a057600080fd5b506103bb6104af36600461295d565b60166020526000908152604090205481565b3480156104cd57600080fd5b506103bb6104dc366004612987565b610f34565b3480156104ed57600080fd5b5061036d6104fc366004612a4e565b610fd1565b34801561050d57600080fd5b5061034261051c3660046127f6565b611047565b34801561052d57600080fd5b5061036d611052565b34801561054257600080fd5b506102eb610551366004612931565b6110d4565b34801561056257600080fd5b506103bb61057136600461295d565b611141565b34801561058257600080fd5b5061036d6105913660046127f6565b6111a9565b3480156105a257600080fd5b5061036d6105b1366004612ab2565b61125d565b3480156105c257600080fd5b506103bb7f565234e475aa7df0df7d9a3f45b927e1e8419bc0fe7afa79b51f30a3dd7b065a81565b3480156105f657600080fd5b507f000000000000000000000000bb868cd266cc19ff65307e6b2cce961230e165a3610342565b34801561062957600080fd5b506102eb610638366004612931565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561066d57600080fd5b506103156112f7565b34801561068257600080fd5b5061036d610691366004612826565b611306565b3480156106a257600080fd5b5061036d6106b1366004612ab2565b6113d4565b3480156106c257600080fd5b506103bb600081565b3480156106d757600080fd5b5061036d6106e6366004612ace565b61145c565b61036d6106f9366004612b0a565b6114c8565b34801561070a57600080fd5b506103bb610719366004612987565b611512565b34801561072a57600080fd5b50610733611540565b6040516102f7929190612b86565b34801561074d57600080fd5b5061031561075c3660046127f6565b6116c4565b34801561076d57600080fd5b5061036d61077c366004612931565b611756565b61036d61078f366004612bb4565b61177b565b3480156107a057600080fd5b5061036d6107af366004612ab2565b611bda565b3480156107c057600080fd5b506102eb6107cf366004612c3e565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b34801561080957600080fd5b5061036d610818366004612987565b611c4c565b34801561082957600080fd5b506103bb600080516020612fa983398151915281565b600061084a82611ce8565b80610859575061085982611d36565b92915050565b60606004805461086e90612c68565b80601f016020809104026020016040519081016040528092919081815260200182805461089a90612c68565b80156108e75780601f106108bc576101008083540402835291602001916108e7565b820191906000526020600020905b8154815290600101906020018083116108ca57829003601f168201915b5050505050905090565b60006108fc82611db6565b610932576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b600061095982611047565b9050336001600160a01b038216146109ab5761097581336107cf565b6109ab576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526008602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610a27612708565b6040805160a081018252600b805460ff90811615158352600c546020840152600d549293919291840191166003811115610a6357610a63612850565b6003811115610a7457610a74612850565b815260408051608081019182905260209092019190600384019060049082845b815481526020019060010190808311610a9457505050918352505060408051608081019182905260209092019190600784019060049082845b815481526020019060010190808311610acd57505050505081525050905090565b6000610b08600080516020612fa9833981519152336110d4565b610b525760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b60448201526064015b60405180910390fd5b506019546001600160a01b031690565b6000610b6d82611dde565b9050836001600160a01b0316816001600160a01b031614610bba576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526008602052604090208054610be68187335b6001600160a01b039081169116811491141790565b610c1157610bf486336107cf565b610c1157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610c51576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015610c5c57600082555b6001600160a01b038681166000908152600760205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260066020526040812091909155600160e11b84169003610cee57600184016000818152600660205260408120549003610cec576002548114610cec5760008181526006602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600082815260208190526040902060010154610d5381611e5e565b610d5d8383611e68565b505050565b6001600160a01b0381163314610de05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b49565b610dea8282611f06565b5050565b610e187f565234e475aa7df0df7d9a3f45b927e1e8419bc0fe7afa79b51f30a3dd7b065a336110d4565b610e645760405162461bcd60e51b815260206004820152601860248201527f44485f43414c4c45525f4e4f545f5749544844524157455200000000000000006044820152606401610b49565b60195460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114610eb5576040519150601f19603f3d011682016040523d82523d6000602084013e610eba565b606091505b5050905080610dea5760405162461bcd60e51b815260206004820152601360248201527f48485f5452414e534645525f4641494c555245000000000000000000000000006044820152606401610b49565b610d5d838383604051806020016040528060008152506114c8565b610f31816001611f85565b50565b6000610f4e600080516020612fa9833981519152336110d4565b610f935760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b60016000836003811115610fa957610fa9612850565b6003811115610fba57610fba612850565b81526020019081526020016000205490505b919050565b610fe9600080516020612fa9833981519152336110d4565b61102e5760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b601761103a8382612ce8565b506018610d5d8282612ce8565b600061085982611dde565b61106a600080516020612fa9833981519152336110d4565b6110af5760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b600b5460ff16156110c557600b805460ff191690555b600d805460ff19166003179055565b6001600160a01b03811660009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604081205460ff168061113a57506000838152602081815260408083206001600160a01b038616845290915290205460ff165b9392505050565b60006001600160a01b038216611183576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b6111c1600080516020612fa9833981519152336110d4565b6112065760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b6002548110156112585760405162461bcd60e51b815260206004820152601760248201527f44485f4e45575f535550504c595f544f4f5f534d414c4c0000000000000000006044820152606401610b49565b600c55565b611275600080516020612fa9833981519152336110d4565b6112ba5760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b80600160008460038111156112d1576112d1612850565b60038111156112e2576112e2612850565b81526020810191909152604001600020555050565b60606005805461086e90612c68565b61131e600080516020612fa9833981519152336110d4565b6113635760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b600c5481908161137260025490565b61137c9190612dbe565b11156113ca5760405162461bcd60e51b815260206004820152601360248201527f44485f535550504c595f455848415553544544000000000000000000000000006044820152606401610b49565b610d5d83836120e9565b6113ec600080516020612fa9833981519152336110d4565b6114315760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b80601283600381111561144657611446612850565b6004811061145657611456612dd1565b01555050565b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6114d3848484610b62565b6001600160a01b0383163b1561150c576114ef84848484612121565b61150c576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000600e82600381111561152857611528612850565b6004811061153857611538612dd1565b015492915050565b60608061155b600080516020612fa9833981519152336110d4565b6115a05760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b601760188180546115b090612c68565b80601f01602080910402602001604051908101604052809291908181526020018280546115dc90612c68565b80156116295780601f106115fe57610100808354040283529160200191611629565b820191906000526020600020905b81548152906001019060200180831161160c57829003601f168201915b5050505050915080805461163c90612c68565b80601f016020809104026020016040519081016040528092919081815260200182805461166890612c68565b80156116b55780601f1061168a576101008083540402835291602001916116b5565b820191906000526020600020905b81548152906001019060200180831161169857829003601f168201915b50505050509050915091509091565b60606116cf82611db6565b61171b5760405162461bcd60e51b815260206004820152601460248201527f44485f4e4f4e4558495354454e545f544f4b454e0000000000000000000000006044820152606401610b49565b61172361220c565b61172c8361221b565b601860405160200161174093929190612de7565b6040516020818303038152906040529050919050565b60008281526020819052604090206001015461177181611e5e565b610d5d8383611f06565b6002600a54036117cd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b49565b6002600a55600b54849060ff166118265760405162461bcd60e51b815260206004820152601060248201527f44485f4d494e545f4e4f545f4f50454e000000000000000000000000000000006044820152606401610b49565b600d5460ff16600381111561183d5761183d612850565b81600381111561184f5761184f612850565b101561189d5760405162461bcd60e51b815260206004820152601860248201527f44485f4d494e545f4e4f545f4f50454e5f544f5f524f4c4500000000000000006044820152606401610b49565b600c548490816118ac60025490565b6118b69190612dbe565b11156119045760405162461bcd60e51b815260206004820152601360248201527f44485f535550504c595f455848415553544544000000000000000000000000006044820152606401610b49565b858580600e83600381111561191b5761191b612850565b6004811061192b5761192b612dd1565b01546119379190612e87565b3410156119865760405162461bcd60e51b815260206004820152601560248201527f44485f494e53554646494349454e545f46554e445300000000000000000000006044820152606401610b49565b87876000601283600381111561199e5761199e612850565b600481106119ae576119ae612dd1565b01543360009081526016602052604090205490915081906119d0908490612dbe565b1115611a1e5760405162461bcd60e51b815260206004820152601660248201527f44485f4d494e545f4c494d49545f4558434545444544000000000000000000006044820152606401610b49565b8a89896000836003811115611a3557611a35612850565b1115611bbb576000600181856003811115611a5257611a52612850565b6003811115611a6357611a63612850565b81526020019081526020016000205403611abf5760405162461bcd60e51b815260206004820152601660248201527f44485f4d45524b4c455f524f4f545f4e4f545f534554000000000000000000006044820152606401610b49565b611b6f82828080602002602001604051908101604052809392919081815260200183836020028082843760009201829052506001935091508790506003811115611b0b57611b0b612850565b6003811115611b1c57611b1c612850565b81526020019081526020016000205433604051602001611b54919060609190911b6bffffffffffffffffffffffff1916815260140190565b6040516020818303038152906040528051906020012061225f565b611bbb5760405162461bcd60e51b815260206004820152601b60248201527f44485f524f4c455f564552494649434154494f4e5f4641494c454400000000006044820152606401610b49565b611bc5338e6120e9565b50506001600a55505050505050505050505050565b611bf2600080516020612fa9833981519152336110d4565b611c375760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b80600e83600381111561144657611446612850565b611c64600080516020612fa9833981519152336110d4565b611ca95760405162461bcd60e51b815260206004820152601660248201527522242fa1a0a62622a92fa727aa2fa7a822a920aa27a960511b6044820152606401610b49565b600b5460ff16611cc157600b805460ff191660011790555b600d805482919060ff19166001836003811115611ce057611ce0612850565b021790555050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061085957506301ffc9a760e01b6001600160e01b0319831614610859565b60006301ffc9a760e01b6001600160e01b031983161480611d8057507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806108595750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b600060025482108015610859575050600090815260066020526040902054600160e01b161590565b600081600254811015611e2c5760008181526006602052604081205490600160e01b82169003611e2a575b8060000361113a575060001901600081815260066020526040902054611e09565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f318133612275565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610dea576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611ec23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610dea576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611f9083611dde565b905080600080611fae86600090815260086020526040902080549091565b915091508415611fee57611fc3818433610bd1565b611fee57611fd183336107cf565b611fee57604051632ce44b5f60e11b815260040160405180910390fd5b8015611ff957600082555b6001600160a01b038316600081815260076020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260066020526040812091909155600160e11b851690036120a05760018601600081815260066020526040812054900361209e57600254811461209e5760008181526006602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060038054600101905550505050565b6001600160a01b03821660009081526016602052604081208054839290612111908490612dbe565b90915550610dea905082826122f3565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612156903390899088908890600401612e9e565b6020604051808303816000875af1925050508015612191575060408051601f3d908101601f1916820190925261218e91810190612eda565b60015b6121ef573d8080156121bf576040519150601f19603f3d011682016040523d82523d6000602084013e6121c4565b606091505b5080516000036121e7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60606017805461086e90612c68565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806122355750819003601f19909101908152919050565b60008261226c858461230d565b14949350505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610dea576122b1816001600160a01b0316601461235a565b6122bc83602061235a565b6040516020016122cd929190612ef7565b60408051601f198184030181529082905262461bcd60e51b8252610b49916004016127e3565b610dea82826040518060200160405280600081525061253b565b600081815b84518110156123525761233e8286838151811061233157612331612dd1565b60200260200101516125a8565b91508061234a81612f78565b915050612312565b509392505050565b60606000612369836002612e87565b612374906002612dbe565b67ffffffffffffffff81111561238c5761238c6129a2565b6040519080825280601f01601f1916602001820160405280156123b6576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106123ed576123ed612dd1565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061243857612438612dd1565b60200101906001600160f81b031916908160001a905350600061245c846002612e87565b612467906001612dbe565b90505b60018111156124ec577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106124a8576124a8612dd1565b1a60f81b8282815181106124be576124be612dd1565b60200101906001600160f81b031916908160001a90535060049490941c936124e581612f91565b905061246a565b50831561113a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b49565b61254583836125d7565b6001600160a01b0383163b15610d5d576002548281035b61256f6000868380600101945086612121565b61258c576040516368d2bf6b60e11b815260040160405180910390fd5b81811061255c5781600254146125a157600080fd5b5050505050565b60008183106125c457600082815260208490526040902061113a565b600083815260208390526040902061113a565b6002546000829003612615576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526007602090815260408083208054680100000000000000018802019055848352600690915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146126c457808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010161268c565b50816000036126ff576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025550505050565b6040805160a08101825260008082526020820181905290918201908152602001612730612742565b815260200161273d612742565b905290565b60405180608001604052806004906020820280368337509192915050565b6001600160e01b031981168114610f3157600080fd5b60006020828403121561278857600080fd5b813561113a81612760565b60005b838110156127ae578181015183820152602001612796565b50506000910152565b600081518084526127cf816020860160208601612793565b601f01601f19169290920160200192915050565b60208152600061113a60208301846127b7565b60006020828403121561280857600080fd5b5035919050565b80356001600160a01b0381168114610fcc57600080fd5b6000806040838503121561283957600080fd5b6128428361280f565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b8060005b600481101561150c57815184526020938401939091019060010161286a565b815115158152602080830151908201526040820151610160820190600481106128c257634e487b7160e01b600052602160045260246000fd5b8060408401525060608301516128db6060840182612866565b5060808301516128ee60e0840182612866565b5092915050565b60008060006060848603121561290a57600080fd5b6129138461280f565b92506129216020850161280f565b9150604084013590509250925092565b6000806040838503121561294457600080fd5b823591506129546020840161280f565b90509250929050565b60006020828403121561296f57600080fd5b61113a8261280f565b803560048110610fcc57600080fd5b60006020828403121561299957600080fd5b61113a82612978565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156129d3576129d36129a2565b604051601f8501601f19908116603f011681019082821181831017156129fb576129fb6129a2565b81604052809350858152868686011115612a1457600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612a3f57600080fd5b61113a838335602085016129b8565b60008060408385031215612a6157600080fd5b823567ffffffffffffffff80821115612a7957600080fd5b612a8586838701612a2e565b93506020850135915080821115612a9b57600080fd5b50612aa885828601612a2e565b9150509250929050565b60008060408385031215612ac557600080fd5b61284283612978565b60008060408385031215612ae157600080fd5b612aea8361280f565b915060208301358015158114612aff57600080fd5b809150509250929050565b60008060008060808587031215612b2057600080fd5b612b298561280f565b9350612b376020860161280f565b925060408501359150606085013567ffffffffffffffff811115612b5a57600080fd5b8501601f81018713612b6b57600080fd5b612b7a878235602084016129b8565b91505092959194509250565b604081526000612b9960408301856127b7565b8281036020840152612bab81856127b7565b95945050505050565b60008060008060608587031215612bca57600080fd5b612bd385612978565b935060208501359250604085013567ffffffffffffffff80821115612bf757600080fd5b818701915087601f830112612c0b57600080fd5b813581811115612c1a57600080fd5b8860208260051b8501011115612c2f57600080fd5b95989497505060200194505050565b60008060408385031215612c5157600080fd5b612c5a8361280f565b91506129546020840161280f565b600181811c90821680612c7c57607f821691505b602082108103612c9c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610d5d57600081815260208120601f850160051c81016020861015612cc95750805b601f850160051c820191505b81811015610d3057828155600101612cd5565b815167ffffffffffffffff811115612d0257612d026129a2565b612d1681612d108454612c68565b84612ca2565b602080601f831160018114612d4b5760008415612d335750858301515b600019600386901b1c1916600185901b178555610d30565b600085815260208120601f198616915b82811015612d7a57888601518255948401946001909101908401612d5b565b5085821015612d985787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8082018082111561085957610859612da8565b634e487b7160e01b600052603260045260246000fd5b600084516020612dfa8285838a01612793565b855191840191612e0d8184848a01612793565b8554920191600090612e1e81612c68565b60018281168015612e365760018114612e4b57612e77565b60ff1984168752821515830287019450612e77565b896000528560002060005b84811015612e6f57815489820152908301908701612e56565b505082870194505b50929a9950505050505050505050565b808202811582820484141761085957610859612da8565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612ed060808301846127b7565b9695505050505050565b600060208284031215612eec57600080fd5b815161113a81612760565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612f2f816017850160208801612793565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612f6c816028840160208801612793565b01602801949350505050565b600060018201612f8a57612f8a612da8565b5060010190565b600081612fa057612fa0612da8565b50600019019056fe5653a16b1626f7b9604d5ed10d6dcc3f74c41fac951cebd85b3290a4c87522aaa2646970667358221220da92159e436d4c8c7ddff4348714d7ca60c608173095f8d5895c45b894c516df64736f6c63430008110033

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

000000000000000000000000000000000000000000000000000000000000014d000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000587bea191592f934e5c92e1181adfa44f947ba24000000000000000000000000000000000000000000000000000000000000003b687474703a2f2f6c6f63616c686f73743a353030312f64616f686175732d6e66742f75732d63656e7472616c312f6170692f6d657461646174612f00000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : maxMintSupply (uint256): 333
Arg [1] : baseTokenURISegmentBefore (string): http://localhost:5001/daohaus-nft/us-central1/api/metadata/
Arg [2] : baseTokenURISegmentAfter (string):
Arg [3] : teamWalletAddress_ (address): 0x587BEA191592F934E5c92E1181AdFa44f947BA24

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000014d
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 000000000000000000000000587bea191592f934e5c92e1181adfa44f947ba24
Arg [4] : 000000000000000000000000000000000000000000000000000000000000003b
Arg [5] : 687474703a2f2f6c6f63616c686f73743a353030312f64616f686175732d6e66
Arg [6] : 742f75732d63656e7472616c312f6170692f6d657461646174612f0000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ 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.