ETH Price: $3,597.47 (+3.93%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...160980012022-12-02 15:24:47763 days ago1669994687IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0004010916.59668608
Set Approval For...160043442022-11-19 13:25:11776 days ago1668864311IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0005632512.22376242
Set Approval For...158930052022-11-04 0:15:47792 days ago1667520947IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0006857114.88123581
Set Approval For...156256182022-09-27 15:35:11829 days ago1664292911IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0014732231.97162483
Set Approval For...155960142022-09-23 12:21:47833 days ago1663935707IN
0x0C51c3C7...4aD023Fa2
0 ETH0.000514611.18826544
Set Approval For...155500382022-09-17 1:28:59840 days ago1663378139IN
0x0C51c3C7...4aD023Fa2
0 ETH0.000396788.62659242
Set Approval For...155167542022-09-11 20:14:14845 days ago1662927254IN
0x0C51c3C7...4aD023Fa2
0 ETH0.000414719
Set Approval For...155067712022-09-10 4:24:05846 days ago1662783845IN
0x0C51c3C7...4aD023Fa2
0 ETH0.000334337.26900246
Set Approval For...154984662022-09-08 19:44:20848 days ago1662666260IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0022046247.93176228
Set Approval For...154903432022-09-07 12:39:06849 days ago1662554346IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0003781715.70307342
Mint154794362022-09-05 18:37:32851 days ago1662403052IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0003244112.47958417
Set Approval For...154644712022-09-03 9:08:02853 days ago1662196082IN
0x0C51c3C7...4aD023Fa2
0 ETH0.000279496.06547437
Set Approval For...154542322022-09-01 17:42:29855 days ago1662054149IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0008770819.06913817
Mint154487032022-08-31 20:32:22856 days ago1661977942IN
0x0C51c3C7...4aD023Fa2
0 ETH0.000422616.25651042
Mint154487032022-08-31 20:32:22856 days ago1661977942IN
0x0C51c3C7...4aD023Fa2
0 ETH0.000422616.25651042
Mint154472582022-08-31 14:58:37856 days ago1661957917IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0009546536.7232951
Set Approval For...154469682022-08-31 13:51:53856 days ago1661953913IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0014383631.27229415
Set Approval For...154464232022-08-31 11:36:44856 days ago1661945804IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0008491218.42766664
Set Approval For...154464232022-08-31 11:36:44856 days ago1661945804IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0008475818.42766664
Set Approval For...154463822022-08-31 11:25:55856 days ago1661945155IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0005540712.04637493
Set Approval For...154463162022-08-31 11:12:23856 days ago1661944343IN
0x0C51c3C7...4aD023Fa2
0 ETH0.000456389.92253231
Mint154463002022-08-31 11:09:25856 days ago1661944165IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0003529113.57571868
Set Approval For...154462422022-08-31 10:58:19856 days ago1661943499IN
0x0C51c3C7...4aD023Fa2
0 ETH0.000830618.0585069
Set Approval For...154462382022-08-31 10:55:56856 days ago1661943356IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0005826312.66729181
Set Approval For...154462242022-08-31 10:53:21856 days ago1661943201IN
0x0C51c3C7...4aD023Fa2
0 ETH0.0006393713.90093465
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Monobirds

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-08-24
*/

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


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


// ERC721A Contracts v4.2.2
// 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;

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

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

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

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

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

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

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

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

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

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

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

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

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


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

pragma solidity ^0.8.4;


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

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Reference type for token approval.
    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 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 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 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 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`.
                )

                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 0x80 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 32-byte word to store the length,
            // and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80.
            str := add(mload(0x40), 0x80)
            // Update the free memory pointer to allocate.
            mstore(0x40, str)

            // 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: contracts/Monobirds.sol



pragma solidity 0.8.16;



contract Monobirds is ERC721A
{
    uint public constant COLLECTION_SIZE = 10000;
    uint public constant BATCH_SIZE = 5;

    constructor() ERC721A("Monobirds", "MONO") 
    {
        _mint(msg.sender, 20);
    }

    function mint(uint256 quantity) public 
    {        
        require(quantity <= BATCH_SIZE, "Can't mint so many at once");
        require(totalSupply() + quantity <= COLLECTION_SIZE, "Can't mint more than in the collection");

        _mint(msg.sender, quantity);
    }

    function tokenURI(uint tokenId) public view override(ERC721A) returns (string memory)
    {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        return string(abi.encodePacked("https://monobirds.com/json/",Strings.toString(tokenId),".json"));
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"BATCH_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COLLECTION_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051806040016040528060098152602001684d6f6e6f626972647360b81b815250604051806040016040528060048152602001634d4f4e4f60e01b815250816002908162000062919062000214565b50600362000071828262000214565b50506000805550620000853360146200008b565b620002e0565b6000805490829003620000b15760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083906000805160206200134a8339815191528180a4600183015b8181146200014057808360006000805160206200134a833981519152600080a460010162000117565b50816000036200016257604051622e076360e81b815260040160405180910390fd5b60005550505050565b505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200019b57607f821691505b602082108103620001bc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200016b57600081815260208120601f850160051c81016020861015620001eb5750805b601f850160051c820191505b818110156200020c57828155600101620001f7565b505050505050565b81516001600160401b0381111562000230576200023062000170565b620002488162000241845462000186565b84620001c2565b602080601f831160018114620002805760008415620002675750858301515b600019600386901b1c1916600185901b1785556200020c565b600085815260208120601f198616915b82811015620002b15788860151825594840194600190910190840162000290565b5085821015620002d05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61105a80620002f06000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80636352211e116100a2578063a22cb46511610071578063a22cb46514610212578063b88d4fde14610225578063c87b56dd14610238578063d8258d951461024b578063e985e9c51461025457600080fd5b80636352211e146101d157806370a08231146101e457806395d89b41146101f7578063a0712d68146101ff57600080fd5b806318160ddd116100de57806318160ddd1461018d57806323b872dd146101a357806342842e0e146101b657806349faa4d4146101c957600080fd5b806301ffc9a71461011057806306fdde0314610138578063081812fc1461014d578063095ea7b314610178575b600080fd5b61012361011e366004610bfc565b610267565b60405190151581526020015b60405180910390f35b6101406102b9565b60405161012f9190610c69565b61016061015b366004610c7c565b61034b565b6040516001600160a01b03909116815260200161012f565b61018b610186366004610cb1565b61038f565b005b600154600054035b60405190815260200161012f565b61018b6101b1366004610cdb565b61042f565b61018b6101c4366004610cdb565b6105c7565b610195600581565b6101606101df366004610c7c565b6105e7565b6101956101f2366004610d17565b6105f2565b610140610641565b61018b61020d366004610c7c565b610650565b61018b610220366004610d32565b61072b565b61018b610233366004610d84565b610797565b610140610246366004610c7c565b6107e1565b61019561271081565b610123610262366004610e60565b610838565b60006301ffc9a760e01b6001600160e01b03198316148061029857506380ac58cd60e01b6001600160e01b03198316145b806102b35750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600280546102c890610e93565b80601f01602080910402602001604051908101604052809291908181526020018280546102f490610e93565b80156103415780601f1061031657610100808354040283529160200191610341565b820191906000526020600020905b81548152906001019060200180831161032457829003601f168201915b5050505050905090565b600061035682610866565b610373576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061039a826105e7565b9050336001600160a01b038216146103d3576103b68133610838565b6103d3576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061043a8261088d565b9050836001600160a01b0316816001600160a01b03161461046d5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176104ba5761049d8633610838565b6104ba57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166104e157604051633a954ecd60e21b815260040160405180910390fd5b80156104ec57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b8416900361057e5760018401600081815260046020526040812054900361057c57600054811461057c5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6105e283838360405180602001604052806000815250610797565b505050565b60006102b38261088d565b60006001600160a01b03821661061b576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6060600380546102c890610e93565b60058111156106a65760405162461bcd60e51b815260206004820152601a60248201527f43616e2774206d696e7420736f206d616e79206174206f6e636500000000000060448201526064015b60405180910390fd5b612710816106b76001546000540390565b6106c19190610ee3565b111561071e5760405162461bcd60e51b815260206004820152602660248201527f43616e2774206d696e74206d6f7265207468616e20696e2074686520636f6c6c60448201526532b1ba34b7b760d11b606482015260840161069d565b61072833826108fb565b50565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6107a284848461042f565b6001600160a01b0383163b156107db576107be848484846109f9565b6107db576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606107ec82610866565b61080957604051630a14c4b560e41b815260040160405180910390fd5b61081282610ae5565b6040516020016108229190610ef6565b6040516020818303038152906040529050919050565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b60008054821080156102b3575050600090815260046020526040902054600160e01b161590565b6000816000548110156108e25760008181526004602052604081205490600160e01b821690036108e0575b806000036108d95750600019016000818152600460205260409020546108b8565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b60008054908290036109205760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146109cf57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101610997565b50816000036109f057604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290610a2e903390899088908890600401610f4a565b6020604051808303816000875af1925050508015610a69575060408051601f3d908101601f19168201909252610a6691810190610f87565b60015b610ac7573d808015610a97576040519150601f19603f3d011682016040523d82523d6000602084013e610a9c565b606091505b508051600003610abf576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606081600003610b0c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610b365780610b2081610fa4565b9150610b2f9050600a83610fd3565b9150610b10565b60008167ffffffffffffffff811115610b5157610b51610d6e565b6040519080825280601f01601f191660200182016040528015610b7b576020820181803683370190505b5090505b8415610add57610b90600183610fe7565b9150610b9d600a86610ffa565b610ba8906030610ee3565b60f81b818381518110610bbd57610bbd61100e565b60200101906001600160f81b031916908160001a905350610bdf600a86610fd3565b9450610b7f565b6001600160e01b03198116811461072857600080fd5b600060208284031215610c0e57600080fd5b81356108d981610be6565b60005b83811015610c34578181015183820152602001610c1c565b50506000910152565b60008151808452610c55816020860160208601610c19565b601f01601f19169290920160200192915050565b6020815260006108d96020830184610c3d565b600060208284031215610c8e57600080fd5b5035919050565b80356001600160a01b0381168114610cac57600080fd5b919050565b60008060408385031215610cc457600080fd5b610ccd83610c95565b946020939093013593505050565b600080600060608486031215610cf057600080fd5b610cf984610c95565b9250610d0760208501610c95565b9150604084013590509250925092565b600060208284031215610d2957600080fd5b6108d982610c95565b60008060408385031215610d4557600080fd5b610d4e83610c95565b915060208301358015158114610d6357600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610d9a57600080fd5b610da385610c95565b9350610db160208601610c95565b925060408501359150606085013567ffffffffffffffff80821115610dd557600080fd5b818701915087601f830112610de957600080fd5b813581811115610dfb57610dfb610d6e565b604051601f8201601f19908116603f01168101908382118183101715610e2357610e23610d6e565b816040528281528a6020848701011115610e3c57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610e7357600080fd5b610e7c83610c95565b9150610e8a60208401610c95565b90509250929050565b600181811c90821680610ea757607f821691505b602082108103610ec757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102b3576102b3610ecd565b7f68747470733a2f2f6d6f6e6f62697264732e636f6d2f6a736f6e2f0000000000815260008251610f2e81601b850160208701610c19565b64173539b7b760d91b601b939091019283015250602001919050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090610f7d90830184610c3d565b9695505050505050565b600060208284031215610f9957600080fd5b81516108d981610be6565b600060018201610fb657610fb6610ecd565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082610fe257610fe2610fbd565b500490565b818103818111156102b3576102b3610ecd565b60008261100957611009610fbd565b500690565b634e487b7160e01b600052603260045260246000fdfea26469706673582212206c930a8e01777ccdaa6949f0a58e7b5128cef14eef9570b3188e9b4e8bb738ff64736f6c63430008100033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80636352211e116100a2578063a22cb46511610071578063a22cb46514610212578063b88d4fde14610225578063c87b56dd14610238578063d8258d951461024b578063e985e9c51461025457600080fd5b80636352211e146101d157806370a08231146101e457806395d89b41146101f7578063a0712d68146101ff57600080fd5b806318160ddd116100de57806318160ddd1461018d57806323b872dd146101a357806342842e0e146101b657806349faa4d4146101c957600080fd5b806301ffc9a71461011057806306fdde0314610138578063081812fc1461014d578063095ea7b314610178575b600080fd5b61012361011e366004610bfc565b610267565b60405190151581526020015b60405180910390f35b6101406102b9565b60405161012f9190610c69565b61016061015b366004610c7c565b61034b565b6040516001600160a01b03909116815260200161012f565b61018b610186366004610cb1565b61038f565b005b600154600054035b60405190815260200161012f565b61018b6101b1366004610cdb565b61042f565b61018b6101c4366004610cdb565b6105c7565b610195600581565b6101606101df366004610c7c565b6105e7565b6101956101f2366004610d17565b6105f2565b610140610641565b61018b61020d366004610c7c565b610650565b61018b610220366004610d32565b61072b565b61018b610233366004610d84565b610797565b610140610246366004610c7c565b6107e1565b61019561271081565b610123610262366004610e60565b610838565b60006301ffc9a760e01b6001600160e01b03198316148061029857506380ac58cd60e01b6001600160e01b03198316145b806102b35750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600280546102c890610e93565b80601f01602080910402602001604051908101604052809291908181526020018280546102f490610e93565b80156103415780601f1061031657610100808354040283529160200191610341565b820191906000526020600020905b81548152906001019060200180831161032457829003601f168201915b5050505050905090565b600061035682610866565b610373576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061039a826105e7565b9050336001600160a01b038216146103d3576103b68133610838565b6103d3576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061043a8261088d565b9050836001600160a01b0316816001600160a01b03161461046d5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176104ba5761049d8633610838565b6104ba57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166104e157604051633a954ecd60e21b815260040160405180910390fd5b80156104ec57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b8416900361057e5760018401600081815260046020526040812054900361057c57600054811461057c5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6105e283838360405180602001604052806000815250610797565b505050565b60006102b38261088d565b60006001600160a01b03821661061b576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6060600380546102c890610e93565b60058111156106a65760405162461bcd60e51b815260206004820152601a60248201527f43616e2774206d696e7420736f206d616e79206174206f6e636500000000000060448201526064015b60405180910390fd5b612710816106b76001546000540390565b6106c19190610ee3565b111561071e5760405162461bcd60e51b815260206004820152602660248201527f43616e2774206d696e74206d6f7265207468616e20696e2074686520636f6c6c60448201526532b1ba34b7b760d11b606482015260840161069d565b61072833826108fb565b50565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6107a284848461042f565b6001600160a01b0383163b156107db576107be848484846109f9565b6107db576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606107ec82610866565b61080957604051630a14c4b560e41b815260040160405180910390fd5b61081282610ae5565b6040516020016108229190610ef6565b6040516020818303038152906040529050919050565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b60008054821080156102b3575050600090815260046020526040902054600160e01b161590565b6000816000548110156108e25760008181526004602052604081205490600160e01b821690036108e0575b806000036108d95750600019016000818152600460205260409020546108b8565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b60008054908290036109205760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146109cf57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101610997565b50816000036109f057604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290610a2e903390899088908890600401610f4a565b6020604051808303816000875af1925050508015610a69575060408051601f3d908101601f19168201909252610a6691810190610f87565b60015b610ac7573d808015610a97576040519150601f19603f3d011682016040523d82523d6000602084013e610a9c565b606091505b508051600003610abf576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606081600003610b0c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610b365780610b2081610fa4565b9150610b2f9050600a83610fd3565b9150610b10565b60008167ffffffffffffffff811115610b5157610b51610d6e565b6040519080825280601f01601f191660200182016040528015610b7b576020820181803683370190505b5090505b8415610add57610b90600183610fe7565b9150610b9d600a86610ffa565b610ba8906030610ee3565b60f81b818381518110610bbd57610bbd61100e565b60200101906001600160f81b031916908160001a905350610bdf600a86610fd3565b9450610b7f565b6001600160e01b03198116811461072857600080fd5b600060208284031215610c0e57600080fd5b81356108d981610be6565b60005b83811015610c34578181015183820152602001610c1c565b50506000910152565b60008151808452610c55816020860160208601610c19565b601f01601f19169290920160200192915050565b6020815260006108d96020830184610c3d565b600060208284031215610c8e57600080fd5b5035919050565b80356001600160a01b0381168114610cac57600080fd5b919050565b60008060408385031215610cc457600080fd5b610ccd83610c95565b946020939093013593505050565b600080600060608486031215610cf057600080fd5b610cf984610c95565b9250610d0760208501610c95565b9150604084013590509250925092565b600060208284031215610d2957600080fd5b6108d982610c95565b60008060408385031215610d4557600080fd5b610d4e83610c95565b915060208301358015158114610d6357600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610d9a57600080fd5b610da385610c95565b9350610db160208601610c95565b925060408501359150606085013567ffffffffffffffff80821115610dd557600080fd5b818701915087601f830112610de957600080fd5b813581811115610dfb57610dfb610d6e565b604051601f8201601f19908116603f01168101908382118183101715610e2357610e23610d6e565b816040528281528a6020848701011115610e3c57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610e7357600080fd5b610e7c83610c95565b9150610e8a60208401610c95565b90509250929050565b600181811c90821680610ea757607f821691505b602082108103610ec757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102b3576102b3610ecd565b7f68747470733a2f2f6d6f6e6f62697264732e636f6d2f6a736f6e2f0000000000815260008251610f2e81601b850160208701610c19565b64173539b7b760d91b601b939091019283015250602001919050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090610f7d90830184610c3d565b9695505050505050565b600060208284031215610f9957600080fd5b81516108d981610be6565b600060018201610fb657610fb6610ecd565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082610fe257610fe2610fbd565b500490565b818103818111156102b3576102b3610ecd565b60008261100957611009610fbd565b500690565b634e487b7160e01b600052603260045260246000fdfea26469706673582212206c930a8e01777ccdaa6949f0a58e7b5128cef14eef9570b3188e9b4e8bb738ff64736f6c63430008100033

Deployed Bytecode Sourcemap

53567:797:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20906:639;;;;;;:::i;:::-;;:::i;:::-;;;565:14:1;;558:22;540:41;;528:2;513:18;20906:639:0;;;;;;;;21808:100;;;:::i;:::-;;;;;;;:::i;28291:218::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1697:32:1;;;1679:51;;1667:2;1652:18;28291:218:0;1533:203:1;27732:400:0;;;;;;:::i;:::-;;:::i;:::-;;17559:323;17833:12;;17620:7;17817:13;:28;17559:323;;;2324:25:1;;;2312:2;2297:18;17559:323:0;2178:177:1;31930:2817:0;;;;;;:::i;:::-;;:::i;34843:185::-;;;;;;:::i;:::-;;:::i;53656:35::-;;53690:1;53656:35;;23201:152;;;;;;:::i;:::-;;:::i;18743:233::-;;;;;;:::i;:::-;;:::i;21984:104::-;;;:::i;53797:278::-;;;;;;:::i;:::-;;:::i;28849:234::-;;;;;;:::i;:::-;;:::i;35626:399::-;;;;;;:::i;:::-;;:::i;54083:278::-;;;;;;:::i;:::-;;:::i;53605:44::-;;53644:5;53605:44;;29240:164;;;;;;:::i;:::-;;:::i;20906:639::-;20991:4;-1:-1:-1;;;;;;;;;21315:25:0;;;;:102;;-1:-1:-1;;;;;;;;;;21392:25:0;;;21315:102;:179;;;-1:-1:-1;;;;;;;;;;21469:25:0;;;21315:179;21295:199;20906:639;-1:-1:-1;;20906:639:0:o;21808:100::-;21862:13;21895:5;21888:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21808:100;:::o;28291:218::-;28367:7;28392:16;28400:7;28392;:16::i;:::-;28387:64;;28417:34;;-1:-1:-1;;;28417:34:0;;;;;;;;;;;28387:64;-1:-1:-1;28471:24:0;;;;:15;:24;;;;;:30;-1:-1:-1;;;;;28471:30:0;;28291:218::o;27732:400::-;27813:13;27829:16;27837:7;27829;:16::i;:::-;27813:32;-1:-1:-1;51787:10:0;-1:-1:-1;;;;;27862:28:0;;;27858:175;;27910:44;27927:5;51787:10;29240:164;:::i;27910:44::-;27905:128;;27982:35;;-1:-1:-1;;;27982:35:0;;;;;;;;;;;27905:128;28045:24;;;;:15;:24;;;;;;:35;;-1:-1:-1;;;;;;28045:35:0;-1:-1:-1;;;;;28045:35:0;;;;;;;;;28096:28;;28045:24;;28096:28;;;;;;;27802:330;27732:400;;:::o;31930:2817::-;32064:27;32094;32113:7;32094:18;:27::i;:::-;32064:57;;32179:4;-1:-1:-1;;;;;32138:45:0;32154:19;-1:-1:-1;;;;;32138:45:0;;32134:86;;32192:28;;-1:-1:-1;;;32192:28:0;;;;;;;;;;;32134:86;32234:27;31038:24;;;:15;:24;;;;;31266:26;;51787:10;30663:30;;;-1:-1:-1;;;;;30356:28:0;;30641:20;;;30638:56;32420:180;;32513:43;32530:4;51787:10;29240:164;:::i;32513:43::-;32508:92;;32565:35;;-1:-1:-1;;;32565:35:0;;;;;;;;;;;32508:92;-1:-1:-1;;;;;32617:16:0;;32613:52;;32642:23;;-1:-1:-1;;;32642:23:0;;;;;;;;;;;32613:52;32814:15;32811:160;;;32954:1;32933:19;32926:30;32811:160;-1:-1:-1;;;;;33351:24:0;;;;;;;:18;:24;;;;;;33349:26;;-1:-1:-1;;33349:26:0;;;33420:22;;;;;;;;;33418:24;;-1:-1:-1;33418:24:0;;;26590:11;26565:23;26561:41;26548:63;-1:-1:-1;;;26548:63:0;33713:26;;;;:17;:26;;;;;:175;;;;-1:-1:-1;;;34008:47:0;;:52;;34004:627;;34113:1;34103:11;;34081:19;34236:30;;;:17;:30;;;;;;:35;;34232:384;;34374:13;;34359:11;:28;34355:242;;34521:30;;;;:17;:30;;;;;:52;;;34355:242;34062:569;34004:627;34678:7;34674:2;-1:-1:-1;;;;;34659:27:0;34668:4;-1:-1:-1;;;;;34659:27:0;;;;;;;;;;;32053:2694;;;31930:2817;;;:::o;34843:185::-;34981:39;34998:4;35004:2;35008:7;34981:39;;;;;;;;;;;;:16;:39::i;:::-;34843:185;;;:::o;23201:152::-;23273:7;23316:27;23335:7;23316:18;:27::i;18743:233::-;18815:7;-1:-1:-1;;;;;18839:19:0;;18835:60;;18867:28;;-1:-1:-1;;;18867:28:0;;;;;;;;;;;18835:60;-1:-1:-1;;;;;;18913:25:0;;;;;:18;:25;;;;;;12902:13;18913:55;;18743:233::o;21984:104::-;22040:13;22073:7;22066:14;;;;;:::i;53797:278::-;53690:1;53869:8;:22;;53861:61;;;;-1:-1:-1;;;53861:61:0;;5363:2:1;53861:61:0;;;5345:21:1;5402:2;5382:18;;;5375:30;5441:28;5421:18;;;5414:56;5487:18;;53861:61:0;;;;;;;;;53644:5;53957:8;53941:13;17833:12;;17620:7;17817:13;:28;;17559:323;53941:13;:24;;;;:::i;:::-;:43;;53933:94;;;;-1:-1:-1;;;53933:94:0;;5980:2:1;53933:94:0;;;5962:21:1;6019:2;5999:18;;;5992:30;6058:34;6038:18;;;6031:62;-1:-1:-1;;;6109:18:1;;;6102:36;6155:19;;53933:94:0;5778:402:1;53933:94:0;54040:27;54046:10;54058:8;54040:5;:27::i;:::-;53797:278;:::o;28849:234::-;51787:10;28944:39;;;;:18;:39;;;;;;;;-1:-1:-1;;;;;28944:49:0;;;;;;;;;;;;:60;;-1:-1:-1;;28944:60:0;;;;;;;;;;29020:55;;540:41:1;;;28944:49:0;;51787:10;29020:55;;513:18:1;29020:55:0;;;;;;;28849:234;;:::o;35626:399::-;35793:31;35806:4;35812:2;35816:7;35793:12;:31::i;:::-;-1:-1:-1;;;;;35839:14:0;;;:19;35835:183;;35878:56;35909:4;35915:2;35919:7;35928:5;35878:30;:56::i;:::-;35873:145;;35962:40;;-1:-1:-1;;;35962:40:0;;;;;;;;;;;35873:145;35626:399;;;;:::o;54083:278::-;54154:13;54190:16;54198:7;54190;:16::i;:::-;54185:59;;54215:29;;-1:-1:-1;;;54215:29:0;;;;;;;;;;;54185:59;54318:25;54335:7;54318:16;:25::i;:::-;54271:81;;;;;;;;:::i;:::-;;;;;;;;;;;;;54257:96;;54083:278;;;:::o;29240:164::-;-1:-1:-1;;;;;29361:25:0;;;29337:4;29361:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;29240:164::o;29662:282::-;29727:4;29817:13;;29807:7;:23;29764:153;;;;-1:-1:-1;;29868:26:0;;;;:17;:26;;;;;;-1:-1:-1;;;29868:44:0;:49;;29662:282::o;24356:1275::-;24423:7;24458;24560:13;;24553:4;:20;24549:1015;;;24598:14;24615:23;;;:17;:23;;;;;;;-1:-1:-1;;;24704:24:0;;:29;;24700:845;;25369:113;25376:6;25386:1;25376:11;25369:113;;-1:-1:-1;;;25447:6:0;25429:25;;;;:17;:25;;;;;;25369:113;;;25515:6;24356:1275;-1:-1:-1;;;24356:1275:0:o;24700:845::-;24575:989;24549:1015;25592:31;;-1:-1:-1;;;25592:31:0;;;;;;;;;;;39287:2720;39360:20;39383:13;;;39411;;;39407:44;;39433:18;;-1:-1:-1;;;39433:18:0;;;;;;;;;;;39407:44;-1:-1:-1;;;;;39939:22:0;;;;;;:18;:22;;;;13040:2;39939:22;;;:71;;39977:32;39965:45;;39939:71;;;40253:31;;;:17;:31;;;;;-1:-1:-1;27021:15:0;;26995:24;26991:46;26590:11;26565:23;26561:41;26558:52;26548:63;;40253:173;;40488:23;;;;40253:31;;39939:22;;41253:25;39939:22;;41106:335;41521:1;41507:12;41503:20;41461:346;41562:3;41553:7;41550:16;41461:346;;41780:7;41770:8;41767:1;41740:25;41737:1;41734;41729:59;41615:1;41602:15;41461:346;;;41465:77;41840:8;41852:1;41840:13;41836:45;;41862:19;;-1:-1:-1;;;41862:19:0;;;;;;;;;;;41836:45;41898:13;:19;-1:-1:-1;34843:185:0;;;:::o;38109:716::-;38293:88;;-1:-1:-1;;;38293:88:0;;38272:4;;-1:-1:-1;;;;;38293:45:0;;;;;:88;;51787:10;;38360:4;;38366:7;;38375:5;;38293:88;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38293:88:0;;;;;;;;-1:-1:-1;;38293:88:0;;;;;;;;;;;;:::i;:::-;;;38289:529;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38576:6;:13;38593:1;38576:18;38572:235;;38622:40;;-1:-1:-1;;;38622:40:0;;;;;;;;;;;38572:235;38765:6;38759:13;38750:6;38746:2;38742:15;38735:38;38289:529;-1:-1:-1;;;;;;38452:64:0;-1:-1:-1;;;38452:64:0;;-1:-1:-1;38289:529:0;38109:716;;;;;;:::o;430:723::-;486:13;707:5;716:1;707:10;703:53;;-1:-1:-1;;734:10:0;;;;;;;;;;;;-1:-1:-1;;;734:10:0;;;;;430:723::o;703:53::-;781:5;766:12;822:78;829:9;;822:78;;855:8;;;;:::i;:::-;;-1:-1:-1;878:10:0;;-1:-1:-1;886:2:0;878:10;;:::i;:::-;;;822:78;;;910:19;942:6;932:17;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;932:17:0;;910:39;;960:154;967:10;;960:154;;994:11;1004:1;994:11;;:::i;:::-;;-1:-1:-1;1063:10:0;1071:2;1063:5;:10;:::i;:::-;1050:24;;:2;:24;:::i;:::-;1037:39;;1020:6;1027;1020:14;;;;;;;;:::i;:::-;;;;:56;-1:-1:-1;;;;;1020:56:0;;;;;;;;-1:-1:-1;1091:11:0;1100:2;1091:11;;:::i;:::-;;;960:154;;14:131:1;-1:-1:-1;;;;;;88:32:1;;78:43;;68:71;;135:1;132;125:12;150:245;208:6;261:2;249:9;240:7;236:23;232:32;229:52;;;277:1;274;267:12;229:52;316:9;303:23;335:30;359:5;335:30;:::i;592:250::-;677:1;687:113;701:6;698:1;695:13;687:113;;;777:11;;;771:18;758:11;;;751:39;723:2;716:10;687:113;;;-1:-1:-1;;834:1:1;816:16;;809:27;592:250::o;847:271::-;889:3;927:5;921:12;954:6;949:3;942:19;970:76;1039:6;1032:4;1027:3;1023:14;1016:4;1009:5;1005:16;970:76;:::i;:::-;1100:2;1079:15;-1:-1:-1;;1075:29:1;1066:39;;;;1107:4;1062:50;;847:271;-1:-1:-1;;847:271:1:o;1123:220::-;1272:2;1261:9;1254:21;1235:4;1292:45;1333:2;1322:9;1318:18;1310:6;1292:45;:::i;1348:180::-;1407:6;1460:2;1448:9;1439:7;1435:23;1431:32;1428:52;;;1476:1;1473;1466:12;1428:52;-1:-1:-1;1499:23:1;;1348:180;-1:-1:-1;1348:180:1:o;1741:173::-;1809:20;;-1:-1:-1;;;;;1858:31:1;;1848:42;;1838:70;;1904:1;1901;1894:12;1838:70;1741:173;;;:::o;1919:254::-;1987:6;1995;2048:2;2036:9;2027:7;2023:23;2019:32;2016:52;;;2064:1;2061;2054:12;2016:52;2087:29;2106:9;2087:29;:::i;:::-;2077:39;2163:2;2148:18;;;;2135:32;;-1:-1:-1;;;1919:254:1:o;2360:328::-;2437:6;2445;2453;2506:2;2494:9;2485:7;2481:23;2477:32;2474:52;;;2522:1;2519;2512:12;2474:52;2545:29;2564:9;2545:29;:::i;:::-;2535:39;;2593:38;2627:2;2616:9;2612:18;2593:38;:::i;:::-;2583:48;;2678:2;2667:9;2663:18;2650:32;2640:42;;2360:328;;;;;:::o;2693:186::-;2752:6;2805:2;2793:9;2784:7;2780:23;2776:32;2773:52;;;2821:1;2818;2811:12;2773:52;2844:29;2863:9;2844:29;:::i;2884:347::-;2949:6;2957;3010:2;2998:9;2989:7;2985:23;2981:32;2978:52;;;3026:1;3023;3016:12;2978:52;3049:29;3068:9;3049:29;:::i;:::-;3039:39;;3128:2;3117:9;3113:18;3100:32;3175:5;3168:13;3161:21;3154:5;3151:32;3141:60;;3197:1;3194;3187:12;3141:60;3220:5;3210:15;;;2884:347;;;;;:::o;3236:127::-;3297:10;3292:3;3288:20;3285:1;3278:31;3328:4;3325:1;3318:15;3352:4;3349:1;3342:15;3368:1138;3463:6;3471;3479;3487;3540:3;3528:9;3519:7;3515:23;3511:33;3508:53;;;3557:1;3554;3547:12;3508:53;3580:29;3599:9;3580:29;:::i;:::-;3570:39;;3628:38;3662:2;3651:9;3647:18;3628:38;:::i;:::-;3618:48;;3713:2;3702:9;3698:18;3685:32;3675:42;;3768:2;3757:9;3753:18;3740:32;3791:18;3832:2;3824:6;3821:14;3818:34;;;3848:1;3845;3838:12;3818:34;3886:6;3875:9;3871:22;3861:32;;3931:7;3924:4;3920:2;3916:13;3912:27;3902:55;;3953:1;3950;3943:12;3902:55;3989:2;3976:16;4011:2;4007;4004:10;4001:36;;;4017:18;;:::i;:::-;4092:2;4086:9;4060:2;4146:13;;-1:-1:-1;;4142:22:1;;;4166:2;4138:31;4134:40;4122:53;;;4190:18;;;4210:22;;;4187:46;4184:72;;;4236:18;;:::i;:::-;4276:10;4272:2;4265:22;4311:2;4303:6;4296:18;4351:7;4346:2;4341;4337;4333:11;4329:20;4326:33;4323:53;;;4372:1;4369;4362:12;4323:53;4428:2;4423;4419;4415:11;4410:2;4402:6;4398:15;4385:46;4473:1;4468:2;4463;4455:6;4451:15;4447:24;4440:35;4494:6;4484:16;;;;;;;3368:1138;;;;;;;:::o;4511:260::-;4579:6;4587;4640:2;4628:9;4619:7;4615:23;4611:32;4608:52;;;4656:1;4653;4646:12;4608:52;4679:29;4698:9;4679:29;:::i;:::-;4669:39;;4727:38;4761:2;4750:9;4746:18;4727:38;:::i;:::-;4717:48;;4511:260;;;;;:::o;4776:380::-;4855:1;4851:12;;;;4898;;;4919:61;;4973:4;4965:6;4961:17;4951:27;;4919:61;5026:2;5018:6;5015:14;4995:18;4992:38;4989:161;;5072:10;5067:3;5063:20;5060:1;5053:31;5107:4;5104:1;5097:15;5135:4;5132:1;5125:15;4989:161;;4776:380;;;:::o;5516:127::-;5577:10;5572:3;5568:20;5565:1;5558:31;5608:4;5605:1;5598:15;5632:4;5629:1;5622:15;5648:125;5713:9;;;5734:10;;;5731:36;;;5747:18;;:::i;6185:620::-;6548:29;6543:3;6536:42;6518:3;6607:6;6601:13;6623:75;6691:6;6686:2;6681:3;6677:12;6670:4;6662:6;6658:17;6623:75;:::i;:::-;-1:-1:-1;;;6757:2:1;6717:16;;;;6749:11;;;6742:28;-1:-1:-1;6794:4:1;6786:13;;6185:620;-1:-1:-1;6185:620:1:o;6810:489::-;-1:-1:-1;;;;;7079:15:1;;;7061:34;;7131:15;;7126:2;7111:18;;7104:43;7178:2;7163:18;;7156:34;;;7226:3;7221:2;7206:18;;7199:31;;;7004:4;;7247:46;;7273:19;;7265:6;7247:46;:::i;:::-;7239:54;6810:489;-1:-1:-1;;;;;;6810:489:1:o;7304:249::-;7373:6;7426:2;7414:9;7405:7;7401:23;7397:32;7394:52;;;7442:1;7439;7432:12;7394:52;7474:9;7468:16;7493:30;7517:5;7493:30;:::i;7558:135::-;7597:3;7618:17;;;7615:43;;7638:18;;:::i;:::-;-1:-1:-1;7685:1:1;7674:13;;7558:135::o;7698:127::-;7759:10;7754:3;7750:20;7747:1;7740:31;7790:4;7787:1;7780:15;7814:4;7811:1;7804:15;7830:120;7870:1;7896;7886:35;;7901:18;;:::i;:::-;-1:-1:-1;7935:9:1;;7830:120::o;7955:128::-;8022:9;;;8043:11;;;8040:37;;;8057:18;;:::i;8088:112::-;8120:1;8146;8136:35;;8151:18;;:::i;:::-;-1:-1:-1;8185:9:1;;8088:112::o;8205:127::-;8266:10;8261:3;8257:20;8254:1;8247:31;8297:4;8294:1;8287:15;8321:4;8318:1;8311:15

Swarm Source

ipfs://6c930a8e01777ccdaa6949f0a58e7b5128cef14eef9570b3188e9b4e8bb738ff

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.