ETH Price: $2,475.79 (+0.87%)
 

Overview

Max Total Supply

400 EARLY

Holders

155

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
2 EARLY
0xf7db8f3adbffe8086c572eded8dc4352264275f0
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
EarlyMajority

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 16 : EarlyMajority.sol
// SPDX-License-Identifier: UNLICENSED

// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNXKOkkxxxkkO0KNWMMMMMMMMMMMMMMMMMMMMMMWNXKOkkxxxxkO0KXNWMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWX0xoc:;,,,,,,,,,;;coxOKXWMMMMMMMMMMMMMWNKkdl:;,,,,,,,,,,;:ldkKNMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNOdc;,,,,,,,,,,,,,,,,,,,,;:oONWMMMMMMMMNKxl;,,,,,,,,,,,,,,,,,,,,;lxKWMMMMMMMMMMMMMM
// MMMMMMMWX0KKKKKKKKKKKKKKKKKKKKK0Oxl;,,,,,,,,,,,,,,,,,,,,,,,,,,;cxO0KKKK0ko:,,,,,,,,,,,,,,,,,,,,,,,,,,:ok0KK00XWMMMMMM
// MMMMMMMWOkXXXXXXNNNNXXXXXXXXXXKxc,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:xKXX0l;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;o0XXkOWMMMMMM
// MMMMMMMWO0WMMMMMMMMMMMMMMMMMMNk:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:dOkl,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,lKWOOWMMMMMM
// MMMMMMMWO0MMMMMMMMMMMMMMMMMMNx;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,l0OOWMMMMMM
// MMMMMMMNO0MMMMMMMMMMMMMMMMMWk:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ldOWMMMMMM
// MMMMMMMNO0MMMMMMMMMNNNNXXXX0l,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:kWMMMMMM
// MMMMMMMNO0MMMMMMMMWOk000KKK0kkkkkkkkkkkkkkkkkxdl:;,,,,,,,,;:cdxkkkkkkkkkkkxdl:,,,,,,,,,;coxkkkkkko;,,,,,,,,,;kWMMMMMM
// MMMMMMMNk0MMMMMMMMNO0WMMMMMMMMMMMMMMMMMMMMWXOdc;,,,,,,,,,,,,;:okKWMMMMMWXOdc;,,,,,,,,,,,;:okKWMMWO:,,,,,,,,,;kWMMMMMM
// MMMMMMMNk0MMMMMMMMNO0MMMMMMMMMMMMMMMMMMMWXkc,,,,,,,,,,,,,,,,,,,,:xKWMMXkc;,,,,,,,,,,,,,,,,,,:dKWWO:,,,,,,,,,;kWMMMMMM
// MMMMMMMNk0MMMMMMMWNO0MMMMMMMMMMMMMMMMMMW0l,,,,,,,,,,,,,,,,,,,,,,,,ckXOl;,,,,,,,,,,,,,,,,,,,,,,:kNO:,,,,,,,,,;kWMMMMMM
// MMMMMMMNk0MMWNKOkdll0MMMMMMMMMMMMMMMMMWOc,,,,,,,,,,,,,,,,,,,,,,,,,,;:;,,,,,,,,,,,,,,,,,,,,,,,,,;dx:,,,,,,,,,;kWMMMMMM
// MMMMMMMNkOX0xl:,,,,:0MMMMMMMMW0O000000Odlllllllllc:;,,,,,,,;:cllllllllc:,,,,,,,;:cllll:,,,,,,,,,;:;,,,,,,,,,;kWMMMMMM
// MMMMMMMNxlc;,,,,,,,:0MMMMMMMMNk0WWWWWWWWWWWWWWNKko:;,,,,,,,;:okKNWWNKkl:,,,,,,,,:okKNNk;,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MMMMMMXx:,,,,,,,,,,:0MMMMMMMMNOKMMMMMMMMMMMMMNkc;,,,,,,,,,,,,,;lONNOc;,,,,,,,,,,,,,ckXk;,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MMMMW0l,,,,,,,,,,,,:0MMMMMMMMNkKMMMMMMMMMMMMXd;,,,,,,,,,,,,,,,,,;ll;,,,,,,,,,,,,,,,,;od;,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MMMWO:,,,,,,,,,,,,,:0MMMMMMWNOxKMMMMMMMMMMMWx;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;,,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MMWO:,,,,,,,,,,,,,,:0MMMWXOdc;c0MMMMMMMMWXKOl,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MMKl,,,,,,,,,,,,,,,:0MWKxc,,,,c0MMMMMMMWXkk0000000Oxl;,,,,,,:okOkl;,,,,,:oko;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MWk;,,,,,,,,,,,,,,,:0Nkc,,,,,,c0MMWNKkdoll0WMMMMMW0l,,,,,,,,,;oxl;,,,,,,,;oo;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MNd,,,,,,,,,,,,,,,,ckx;,,,,,,,c0WXxl;,,,,c0MMMMMMKc,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MXo,,,,,,,,,,,,,,,,;c;,,,,,,,,cOkc,,,,,,,c0MMWWNXx;,,,,;c:,,,,,,,,,,::,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MNd,,,,,,,,,,,,,,,,,,,,,,,,,,,:c;,,,,,,,,c0XOdlc:;,,,,,l0Kxol:;;;:okKx;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MWk;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:oc,,,,,,,,,,:OWMWWNXKKKXWWWx;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MMKl,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;;cxKWMMMMMMMMMMMMWx;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;kWMMMMMM
// MMWO:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;lOKNWMMMMMMMMMMMMMMWkc::::;;:::::::::;;:::::::::;;::::::::::kWMMMMMM
// MMMWO:,,,,,,,,,,,,,;c;,,,,,,,,;;,,,,,,,,,,;,,,,,,;dXMMMMMMMMMMMMMMMMMNXXXXXxxXXXXXXXXXxxKXXXXXXXXkxKXXXXXXXKxOWMMMMMM
// MMMMW0l,,,,,,,,,,,,:kd;,,,,,,,cxo;,,,,,,,:xd:,,,,,,dNMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMMMMMXx:,,,,,,,,,,c0Nkc,,,,,,c0NOl;,,,,,c0Kd;,,,,,oXMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMW0OWMMMMMMMWOOWMMMMMM
// MMMMMMMNxll;,,,,,,,c0WWKxc,,,,cKMWNk:,,,,:oc,,,,,,;kWMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMW0OWMMMMMMMWOOWMMMMMM
// MMMMMMMNk0N0o;,,,,,c0MMMWXkc,,c0WKxc,,,,,,,,,,,,,ckNMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMMMMMMNk0NKd;,,,,,c0MMMWKkc,,cOkc,,,,,,,,,,,,,,;ldxxxxxxKWMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMMMMMMNxol:,,,,,,,c0MWKd:,,,,:c;,,,,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMMMMWXx:,,,,,,,,,,c0Xx:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMMMW0l,,,,,,,,,,,,ckd;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,o0K00KK00000000000k0WMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMMWO:,,,,,,,,,,,,,;c;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,dXNNNNNNNNWWWNNNNWWWMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMWO:,,,,,,,,,,,,,,,,,,,,,,,,,;:,,,,,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMKl,,,,,,,,,,,,,,,,,,,,,,,,,,ckd;,,,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MWx;,,,,,,,,,,,,,,,,,,,,,,,,,,cKNOl;,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MXo,,,,,,,,,,,,,,,,,,,,,,,,,,,ckKK0xl:,,,,,,,,,,,,,,,,,,,oKXXXXXXXXXXXXXXXXXXXXXXXXXXKxOWMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MXo,,,,,,,,,,,,,,,,:l:,,,,,,,,,;;;;;;;,,,,,,,,,,,,,,,,,,,o0KKKKKKKKKKKKKKKKKKKKKKKKKKK0XMMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MXo,,,,,,,,,,,,,,,,cOx;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MWx;,,,,,,,,,,,,,,,c0NOc,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMKc,,,,,,,,,,,,,,,c0MWXkl;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMMMWOOWMMMMMM
// MMWO:,,,,,,,,,,,,,,c0WWWWXOdl:,,,,,,,,,,,,,,,,,,,,,,,,,,,xNWMMMWWMMMMMMMMMMMMMMMMMMMMMMMWWWWWWWWWOOWMMMMMMMWOOWMMMMMM
// MMMWk:,,,,,,,,,,,,,;lodddooolc;,,,,,,,,,,,,,,,,,,,,,,,,,,o0K00KKKKKKKKKKKKKKKKKKKKKKKKKKKKK000KK0OKWMMMMMMMWOOWMMMMMM
// MMMMW0l,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;xNWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWMMMMMMMMMWOOWMMMMMM
// MMMMMWXx:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMM
// MMMMMMMXxlc;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMM
// MMMMMMMNk0N0xl:;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWOOWMMMMMM
// MMMMMMMNkkKKK0kdl:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;d0KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK0x0MMMMMMM
// MMMMMMMWXKKKKKKKKKK000000000000000000000000000KKK00000000KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKNMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// ███╗   ███╗ █████╗ ██████╗ ███████╗   ██╗    ██╗██╗████████╗██╗  ██╗   ███╗   ███╗ █████╗ ███████╗ ██████╗ ███╗   ██╗
// ████╗ ████║██╔══██╗██╔══██╗██╔════╝   ██║    ██║██║╚══██╔══╝██║  ██║   ████╗ ████║██╔══██╗██╔════╝██╔═══██╗████╗  ██║
// ██╔████╔██║███████║██║  ██║█████╗     ██║ █╗ ██║██║   ██║   ███████║   ██╔████╔██║███████║███████╗██║   ██║██╔██╗ ██║
// ██║╚██╔╝██║██╔══██║██║  ██║██╔══╝     ██║███╗██║██║   ██║   ██╔══██║   ██║╚██╔╝██║██╔══██║╚════██║██║   ██║██║╚██╗██║
// ██║ ╚═╝ ██║██║  ██║██████╔╝███████╗   ╚███╔███╔╝██║   ██║   ██║  ██║   ██║ ╚═╝ ██║██║  ██║███████║╚██████╔╝██║ ╚████║
// ╚═╝     ╚═╝╚═╝  ╚═╝╚═════╝ ╚══════╝    ╚══╝╚══╝ ╚═╝   ╚═╝   ╚═╝  ╚═╝   ╚═╝     ╚═╝╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═══╝

pragma solidity ^0.8.16;

import 'erc721a/contracts/extensions/ERC721ABurnable.sol';
import 'erc721a/contracts/extensions/ERC721AQueryable.sol';
import "./mason/utils/AccessControl.sol";
import "./mason/utils/Claimable.sol";
import "./mason/utils/EIP712Common.sol";
import "./mason/utils/Ownable.sol";
import "./mason/utils/Payable.sol";
import "./mason/utils/Toggleable.sol";
import "erc721a/contracts/ERC721A.sol";

error ExceedsMaxPerWallet();
error ExceedsMaxSupply();
error InsufficientPayment();
error TokensAlreadyClaimed();

contract EarlyMajority is ERC721ABurnable, ERC721AQueryable, Ownable, Payable, AccessControl, Toggleable, EIP712Common, Claimable {

  uint256 public MAX_PER_WALLET;
  uint256 public MAX_SUPPLY;
  uint256 public PRICE;

  address private royaltyAddress;
  uint256 private royaltyPercent;

  constructor (
    string memory _tokenName,
    string memory _tokenSymbol,
    string memory _customBaseURI,
    uint256 _tokenPrice,
    uint256 _tokensForSale,
    address _royaltyAddress,
    uint256 _royaltyPercent
  ) ERC721A(_tokenName, _tokenSymbol) {
    customBaseURI = _customBaseURI;

    MAX_SUPPLY = _tokensForSale;
    PRICE = _tokenPrice;
    MAX_PER_WALLET = 3;

    royaltyAddress = _royaltyAddress;
    royaltyPercent = _royaltyPercent;

    _setRoyalties(_royaltyAddress, _royaltyPercent);
  }

  /** MINTING **/

  function mint(uint256 _count) external payable noContracts requireActiveSale {
    if(_totalMinted() + _count > MAX_SUPPLY) revert ExceedsMaxSupply();
    if(msg.value < PRICE * _count) revert InsufficientPayment();

    if(_numberMinted(msg.sender) + _count > MAX_PER_WALLET + _getAux(msg.sender)) revert ExceedsMaxPerWallet();

    _mint(msg.sender, _count);
  }

  function ownerMint(uint64 _count, address _recipient) external onlyOwner {
    if(_totalMinted() + _count > MAX_SUPPLY) revert ExceedsMaxSupply();

    _mint(_recipient, _count);
    _setAux(_recipient, _count);
  }

  function whitelistMint(uint256 _discountedPrice, uint256 _count, bytes calldata _signature) external payable requiresDiscount(_signature, _discountedPrice) requireActiveWhitelist noContracts {
    if(_totalMinted() + _count > MAX_SUPPLY) revert ExceedsMaxSupply();

    if(_numberMinted(msg.sender) + _count > MAX_PER_WALLET + _getAux(msg.sender)) revert ExceedsMaxPerWallet();
    if(msg.value < _discountedPrice * _count) revert InsufficientPayment();

    _mint(msg.sender, _count);
  }

  function claim(uint64 _count, bytes calldata _signature) external payable requiresClaim(_signature, _count) requireActiveClaiming noContracts {
    if(_totalMinted() + 1 > MAX_SUPPLY) revert ExceedsMaxSupply();

    if (hasUnclaimedTokens(msg.sender)) {
      _updateClaimCount(msg.sender, _count);
    } else {
      revert TokensAlreadyClaimed();
    }

    _mint(msg.sender, _count);
    _setAux(msg.sender, _count);
  }

  /** MINTING LIMITS **/
  function allowedMintCount(address _minter) public view returns (uint256) {
    return MAX_PER_WALLET + _getAux(_minter) - _numberMinted(_minter);
  }

  /** WHITELIST **/

  function checkWhitelist(uint256 _discountedPrice, bytes calldata _signature) public view requiresDiscount(_signature, _discountedPrice) returns (bool) {
    return true;
  }

   /** ADMIN **/
  function setMaxPerWallet(uint256 _max) external onlyOwner() {
    MAX_PER_WALLET = _max;
  }

  function setPrice(uint256 _tokenPrice) external onlyOwner {
    PRICE = _tokenPrice;
  }

  /** URI HANDLING **/

  string private customBaseURI;

  function baseTokenURI() public view returns (string memory) {
    return customBaseURI;
  }

  function setBaseURI(string memory customBaseURI_) external onlyOwner {
    customBaseURI = customBaseURI_;
  }

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

  function _startTokenId() internal view virtual override returns (uint256) {
    return 1;
  }

  /** PAYOUT **/
  function _setRoyalties(address _receiver, uint256 _percentage) internal {
    royaltyAddress = _receiver;
    royaltyPercent = _percentage;
  }

  function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (
    address receiver,
    uint256 royaltyAmount
  ) {
    receiver = royaltyAddress;

    royaltyAmount = _salePrice * royaltyPercent / 10000;
  }
}

File 2 of 16 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.2
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

        _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]`.
        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.
            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 aliged.
            // 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 3 of 16 : Toggleable.sol
// SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.13;

import "./Ownable.sol";

error SaleNotActive();
error WhitelistNotActive();

abstract contract Toggleable is Ownable {

  bool public saleIsActive = false;
  bool public whitelistIsActive = false;

  function flipWhitelistState() external onlyOwner {
    whitelistIsActive = !whitelistIsActive;
  }

  function flipSaleState() external onlyOwner {
    saleIsActive = !saleIsActive;
  }

  modifier requireActiveSale {
    if(!saleIsActive) revert SaleNotActive();
    _;
  }

  modifier requireActiveWhitelist {
    if(!whitelistIsActive) revert WhitelistNotActive();
    _;
  }
}

File 4 of 16 : Payable.sol
// SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.16;

import "./Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";

abstract contract Payable is Ownable {

  address private _paymentRecipient;

  constructor() {
   _paymentRecipient = owner();
  }

  function setPaymentRecipient(address recipient) external onlyOwner {
    _paymentRecipient = recipient;
  }

  function release() external virtual onlyOwner {
    uint256 balance = address(this).balance;
    Address.sendValue(payable(_paymentRecipient), balance);
  }
}

File 5 of 16 : Ownable.sol
abstract contract Ownable {
    address private _owner;

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

    error CallerIsNotTheOwner();
    error NewOwnerIsZeroAddress();

    constructor() {
        _transferOwnership(msg.sender);
    }

    function owner() public view virtual returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
      if(owner() != msg.sender) revert CallerIsNotTheOwner();
      _;
    }

    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    function transferOwnership(address newOwner) public virtual onlyOwner {
      if(newOwner == address(0)) revert NewOwnerIsZeroAddress();
      _transferOwnership(newOwner);
    }

    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 6 of 16 : EIP712Common.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "./ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./Ownable.sol";

error InvalidSignature();
error NoSigningKey();

contract EIP712Common is Ownable {
  using ECDSA for bytes32;

  // The key used to sign whitelist signatures.
  address signingKey = address(0);

  // Domain Separator is the EIP-712 defined structure that defines what contract
  // and chain these signatures can be used for.  This ensures people can't take
  // a signature used to mint on one contract and use it for another, or a signature
  // from testnet to replay on mainnet.
  // It has to be created in the constructor so we can dynamically grab the chainId.
  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#definition-of-domainseparator
  bytes32 public CLAIM_DOMAIN_SEPARATOR;
  bytes32 public WHITELIST_DOMAIN_SEPARATOR;
  bytes32 public DISCOUNT_DOMAIN_SEPARATOR;

  // The typehash for the data type specified in the structured data
  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-typehash
  // This should match whats in the client side whitelist signing code
  // https://github.com/msfeldstein/EIP712-whitelisting/blob/main/test/signWhitelist.ts#L22
  bytes32 public constant CLAIM_TYPEHASH =
    keccak256("Minter(address wallet,uint256 count)");

  bytes32 public constant WHITELIST_TYPEHASH =
    keccak256("Minter(address wallet)");

  bytes32 public constant DISCOUNT_TYPEHASH =
    keccak256("Minter(address wallet,uint256 count)");

  constructor() {
    CLAIM_DOMAIN_SEPARATOR = keccak256(
      abi.encode(
        keccak256(
          "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        ),
        keccak256(bytes("ClaimToken")),
        keccak256(bytes("1")),
        block.chainid,
        address(this)
      )
    );

    WHITELIST_DOMAIN_SEPARATOR = keccak256(
      abi.encode(
        keccak256(
          "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        ),
        keccak256(bytes("WhitelistToken")),
        keccak256(bytes("1")),
        block.chainid,
        address(this)
      )
    );

    DISCOUNT_DOMAIN_SEPARATOR = keccak256(
      abi.encode(
        keccak256(
          "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        ),
        keccak256(bytes("DiscountToken")),
        keccak256(bytes("1")),
        block.chainid,
        address(this)
      )
    );
  }

  function setSigningAddress(address newSigningKey) public onlyOwner {
      signingKey = newSigningKey;
  }

  modifier requiresClaim(bytes calldata signature, uint256 count) {
      if(signingKey == address(0)) revert NoSigningKey();

      bytes32 digest = keccak256(
          abi.encodePacked(
              "\x19\x01",
              CLAIM_DOMAIN_SEPARATOR,
              keccak256(abi.encode(
                  CLAIM_TYPEHASH,
                  msg.sender,
                  count))
          )
      );

      address recoveredAddress = digest.recover(signature);
      if(recoveredAddress != signingKey) revert InvalidSignature();
      _;
  }

  modifier requiresDiscount(bytes calldata signature, uint256 value) {
      if(signingKey == address(0)) revert NoSigningKey();

      bytes32 digest = keccak256(
          abi.encodePacked(
              "\x19\x01",
              DISCOUNT_DOMAIN_SEPARATOR,
              keccak256(abi.encode(
                  CLAIM_TYPEHASH,
                  msg.sender,
                  value))
          )
      );

      address recoveredAddress = digest.recover(signature);
      if(recoveredAddress != signingKey) revert InvalidSignature();
      _;
  }

  modifier requiresWhitelist(bytes calldata signature) {
    if(signingKey == address(0)) revert NoSigningKey();

    bytes32 digest = keccak256(
      abi.encodePacked(
        "\x19\x01",
        WHITELIST_DOMAIN_SEPARATOR,
        keccak256(abi.encode(WHITELIST_TYPEHASH, msg.sender))
      )
    );

    address recoveredAddress = digest.recover(signature);
    if(recoveredAddress != signingKey) revert InvalidSignature();
    _;
  }
}

File 7 of 16 : Claimable.sol
pragma solidity ^0.8.13;

import "./EIP712Common.sol";
import "./Ownable.sol";

error ClaimingNotActive();

abstract contract Claimable is Ownable, EIP712Common{

  mapping(address => uint256) private claimCounts;

  bool public claimingIsActive = false;

  function flipClaimState() external onlyOwner {
    claimingIsActive = !claimingIsActive;
  }

  function tokensClaimed(address minter) public view returns (uint256) {
    return claimCounts[minter];
  }

  function checkClaimlist(uint256 count, bytes calldata signature) public view requiresClaim(signature, count) returns (bool) {
    return true;
  }

  function hasUnclaimedTokens(address minter) public view returns (bool) {
    return claimCounts[minter] == 0;
  }

  function _updateClaimCount(address minter, uint256 count) internal {
    claimCounts[minter] += count;
  }

  modifier requireActiveClaiming {
    if(!claimingIsActive) revert ClaimingNotActive();
    _;
  }
}

File 8 of 16 : AccessControl.sol
// SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.15;

error ContractsCannotMint();

abstract contract AccessControl {
  modifier noContracts {
    if(msg.sender != tx.origin) revert ContractsCannotMint();
    _;
  }
}

File 9 of 16 : ERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.2
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

File 10 of 16 : ERC721ABurnable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.2
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

pragma solidity ^0.8.4;

import '../IERC721A.sol';

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

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

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

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

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

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

pragma solidity ^0.8.4;

import '../IERC721A.sol';

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

File 13 of 16 : IERC721A.sol
// SPDX-License-Identifier: MIT
// 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();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * 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 14 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

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

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

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

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

File 16 of 16 : ECDSA.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Gas optimized ECDSA wrapper.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)
/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)
library ECDSA {
    function recover(bytes32 hash, bytes calldata signature) internal view returns (address result) {
        assembly {
            if eq(signature.length, 65) {
                // Copy the free memory pointer so that we can restore it later.
                let m := mload(0x40)
                // Directly copy `r` and `s` from the calldata.
                calldatacopy(0x40, signature.offset, 0x40)

                // If `s` in lower half order, such that the signature is not malleable.
                // prettier-ignore
                if iszero(gt(mload(0x60), 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0)) {
                    mstore(0x00, hash)
                    // Compute `v` and store it in the scratch space.
                    mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40))))
                    pop(
                        staticcall(
                            gas(), // Amount of gas left for the transaction.
                            0x01, // Address of `ecrecover`.
                            0x00, // Start of input.
                            0x80, // Size of input.
                            0x40, // Start of output.
                            0x20 // Size of output.
                        )
                    )
                    // Restore the zero slot.
                    mstore(0x60, 0)
                    // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.
                    result := mload(sub(0x60, returndatasize()))
                }
                // Restore the free memory pointer.
                mstore(0x40, m)
            }
        }
    }

    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal view returns (address result) {
        assembly {
            // Copy the free memory pointer so that we can restore it later.
            let m := mload(0x40)
            // prettier-ignore
            let s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)

            // If `s` in lower half order, such that the signature is not malleable.
            // prettier-ignore
            if iszero(gt(s, 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0)) {
                mstore(0x00, hash)
                mstore(0x20, add(shr(255, vs), 27))
                mstore(0x40, r)
                mstore(0x60, s)
                pop(
                    staticcall(
                        gas(), // Amount of gas left for the transaction.
                        0x01, // Address of `ecrecover`.
                        0x00, // Start of input.
                        0x80, // Size of input.
                        0x40, // Start of output.
                        0x20 // Size of output.
                    )
                )
                // Restore the zero slot.
                mstore(0x60, 0)
                // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.
                result := mload(sub(0x60, returndatasize()))
            }
            // Restore the free memory pointer.
            mstore(0x40, m)
        }
    }

    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {
        assembly {
            // Store into scratch space for keccak256.
            mstore(0x20, hash)
            mstore(0x00, "\x00\x00\x00\x00\x19Ethereum Signed Message:\n32")
            // 0x40 - 0x04 = 0x3c
            result := keccak256(0x04, 0x3c)
        }
    }

    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {
        assembly {
            // We need at most 128 bytes for Ethereum signed message header.
            // The max length of the ASCII reprenstation of a uint256 is 78 bytes.
            // The length of "\x19Ethereum Signed Message:\n" is 26 bytes (i.e. 0x1a).
            // The next multiple of 32 above 78 + 26 is 128 (i.e. 0x80).

            // Instead of allocating, we temporarily copy the 128 bytes before the
            // start of `s` data to some variables.
            let m3 := mload(sub(s, 0x60))
            let m2 := mload(sub(s, 0x40))
            let m1 := mload(sub(s, 0x20))
            // The length of `s` is in bytes.
            let sLength := mload(s)

            let ptr := add(s, 0x20)

            // `end` marks the end of the memory which we will compute the keccak256 of.
            let end := add(ptr, sLength)

            // Convert the length of the bytes to ASCII decimal representation
            // and store it into the memory.
            // prettier-ignore
            for { let temp := sLength } 1 {} {
                ptr := sub(ptr, 1)
                mstore8(ptr, add(48, mod(temp, 10)))
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            // Copy the header over to the memory.
            mstore(sub(ptr, 0x20), "\x00\x00\x00\x00\x00\x00\x19Ethereum Signed Message:\n")
            // Compute the keccak256 of the memory.
            result := keccak256(sub(ptr, 0x1a), sub(end, sub(ptr, 0x1a)))

            // Restore the previous memory.
            mstore(s, sLength)
            mstore(sub(s, 0x20), m1)
            mstore(sub(s, 0x40), m2)
            mstore(sub(s, 0x60), m3)
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"string","name":"_customBaseURI","type":"string"},{"internalType":"uint256","name":"_tokenPrice","type":"uint256"},{"internalType":"uint256","name":"_tokensForSale","type":"uint256"},{"internalType":"address","name":"_royaltyAddress","type":"address"},{"internalType":"uint256","name":"_royaltyPercent","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CallerIsNotTheOwner","type":"error"},{"inputs":[],"name":"ClaimingNotActive","type":"error"},{"inputs":[],"name":"ContractsCannotMint","type":"error"},{"inputs":[],"name":"ExceedsMaxPerWallet","type":"error"},{"inputs":[],"name":"ExceedsMaxSupply","type":"error"},{"inputs":[],"name":"InsufficientPayment","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoSigningKey","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"SaleNotActive","type":"error"},{"inputs":[],"name":"TokensAlreadyClaimed","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"},{"inputs":[],"name":"WhitelistNotActive","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"CLAIM_DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CLAIM_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"allowedMintCount","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":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"checkClaimlist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountedPrice","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"checkWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_count","type":"uint64"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimingIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipClaimState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipWhitelistState","outputs":[],"stateMutability":"nonpayable","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":"minter","type":"address"}],"name":"hasUnclaimedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_count","type":"uint64"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"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":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"customBaseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_max","type":"uint256"}],"name":"setMaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"setPaymentRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigningKey","type":"address"}],"name":"setSigningAddress","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":[{"internalType":"address","name":"minter","type":"address"}],"name":"tokensClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountedPrice","type":"uint256"},{"internalType":"uint256","name":"_count","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"}]

60806040526009805461ffff60a01b19169055600a80546001600160a01b0319169055600f805460ff191690553480156200003957600080fd5b506040516200384b3803806200384b8339810160408190526200005c9162000436565b868660026200006c838262000598565b5060036200007b828262000598565b50506001600055506200008e336200031f565b6008546001600160a01b0316600980546001600160a01b0319166001600160a01b0392909216919091179055604080518082018252600a81526921b630b4b6aa37b5b2b760b11b6020918201528151808301835260018152603160f81b9082015281516000805160206200382b833981519152918101919091527f1a5ffc51a62587b65b913137cec30fb0c9d9d6a475b2e58ca97b8b470cb94172918101919091526000805160206200380b83398151915260608201524660808201523060a082015260c00160408051808303601f190181528282528051602091820120600b558282018252600e83526d2bb434ba32b634b9ba2a37b5b2b760911b928101929092528051808201825260018152603160f81b9083015280516000805160206200382b833981519152928101929092527fb31abde365a4931cba9a0ea66b4737a15e8eb9a0649f549f4857db08880a9049908201526000805160206200380b83398151915260608201524660808201523060a082015260c00160408051808303601f190181528282528051602091820120600c558282018252600d83526c2234b9b1b7bab73a2a37b5b2b760991b928101929092528051808201825260018152603160f81b9083015280516000805160206200382b833981519152928101929092527f61fc6457b41a933c12cc7fbb026b428372d84fecb547defb6b1cf69e53e6c85d908201526000805160206200380b83398151915260608201524660808201523060a082015260c00160408051601f198184030181529190528051602090910120600d556015620002e2868262000598565b50601183905560128490556003601055601380546001600160a01b0319166001600160a01b03841617905560148190555050505050505062000664565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200039957600080fd5b81516001600160401b0380821115620003b657620003b662000371565b604051601f8301601f19908116603f01168101908282118183101715620003e157620003e162000371565b81604052838152602092508683858801011115620003fe57600080fd5b600091505b8382101562000422578582018301518183018401529082019062000403565b600093810190920192909252949350505050565b600080600080600080600060e0888a0312156200045257600080fd5b87516001600160401b03808211156200046a57600080fd5b620004788b838c0162000387565b985060208a01519150808211156200048f57600080fd5b6200049d8b838c0162000387565b975060408a0151915080821115620004b457600080fd5b50620004c38a828b0162000387565b60608a015160808b015160a08c0151929850909650945090506001600160a01b0381168114620004f257600080fd5b8092505060c0880151905092959891949750929550565b600181811c908216806200051e57607f821691505b6020821081036200053f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200059357600081815260208120601f850160051c810160208610156200056e5750805b601f850160051c820191505b818110156200058f578281556001016200057a565b5050505b505050565b81516001600160401b03811115620005b457620005b462000371565b620005cc81620005c5845462000509565b8462000545565b602080601f831160018114620006045760008415620005eb5750858301515b600019600386901b1c1916600185901b1785556200058f565b600085815260208120601f198616915b82811015620006355788860151825594840194600190910190840162000614565b5085821015620006545787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61319780620006746000396000f3fe6080604052600436106103555760003560e01c806370a08231116101bb578063b3feb36d116100f7578063db1354d211610095578063eb8d24441161006f578063eb8d2444146109db578063ec596b72146109fc578063f2fde38b14610a0f578063f6fa26ab14610a2f57600080fd5b8063db1354d21461095c578063e268e4d314610972578063e985e9c51461099257600080fd5b8063bece913b116100d1578063bece913b146108da578063c23dc68f146108fa578063c87b56dd14610927578063d547cfb71461094757600080fd5b8063b3feb36d14610863578063b88d4fde1461089a578063bb660c0a146108ba57600080fd5b80638da5cb5b1161016457806399a2557a1161013e57806399a2557a146107fa5780639c79e5271461081a578063a0712d6814610830578063a22cb4651461084357600080fd5b80638da5cb5b146107a757806391b7f5ed146107c557806395d89b41146107e557600080fd5b80638462151c116101955780638462151c1461074f57806386d1a69f1461077c5780638d859f3e1461079157600080fd5b806370a0823114610707578063715018a61461072757806379bffd8d1461073c57600080fd5b80632a55205a116102955780635bbb2177116102335780636352211e1161020d5780636352211e146106bc5780636b0509b1146104c75780636d4a450a146106dc5780636d60e6c1146106f257600080fd5b80635bbb217714610625578063624601b6146106525780636301dccf1461068857600080fd5b806334918dfd1161026f57806334918dfd146105b057806342842e0e146105c557806342966c68146105e557806355f804b31461060557600080fd5b80632a55205a1461053b57806331beb6051461057a57806332cb6b0c1461059a57600080fd5b806311d44fb6116103025780631fe70d6f116102dc5780631fe70d6f146104a6578063212e9a0f146104c757806323b872dd146104fb5780632983c4b81461051b57600080fd5b806311d44fb61461044957806318160ddd146104695780631c88ce001461048657600080fd5b8063081812fc11610333578063081812fc146103cb578063095ea7b3146104035780630f2cdd6c1461042557600080fd5b806301ffc9a71461035a57806306fdde031461038f57806307cf3a77146103b1575b600080fd5b34801561036657600080fd5b5061037a6103753660046128ff565b610a44565b60405190151581526020015b60405180910390f35b34801561039b57600080fd5b506103a4610ae1565b604051610386919061296c565b3480156103bd57600080fd5b50600f5461037a9060ff1681565b3480156103d757600080fd5b506103eb6103e636600461297f565b610b73565b6040516001600160a01b039091168152602001610386565b34801561040f57600080fd5b5061042361041e3660046129b4565b610bd0565b005b34801561043157600080fd5b5061043b60105481565b604051908152602001610386565b34801561045557600080fd5b5061037a610464366004612a27565b610c96565b34801561047557600080fd5b50600154600054036000190161043b565b34801561049257600080fd5b506104236104a1366004612a8b565b610db0565b3480156104b257600080fd5b5060095461037a90600160a81b900460ff1681565b3480156104d357600080fd5b5061043b7f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca81565b34801561050757600080fd5b50610423610516366004612ab5565b610e87565b34801561052757600080fd5b50610423610536366004612af1565b61105d565b34801561054757600080fd5b5061055b610556366004612b0c565b6110c6565b604080516001600160a01b039093168352602083019190915201610386565b34801561058657600080fd5b50610423610595366004612af1565b6110fc565b3480156105a657600080fd5b5061043b60115481565b3480156105bc57600080fd5b50610423611165565b3480156105d157600080fd5b506104236105e0366004612ab5565b6111db565b3480156105f157600080fd5b5061042361060036600461297f565b6111fb565b34801561061157600080fd5b50610423610620366004612bba565b611209565b34801561063157600080fd5b50610645610640366004612c03565b61124f565b6040516103869190612c78565b34801561065e57600080fd5b5061043b61066d366004612af1565b6001600160a01b03166000908152600e602052604090205490565b34801561069457600080fd5b5061043b7f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b3480156106c857600080fd5b506103eb6106d736600461297f565b61131b565b3480156106e857600080fd5b5061043b600b5481565b3480156106fe57600080fd5b50610423611326565b34801561071357600080fd5b5061043b610722366004612af1565b611374565b34801561073357600080fd5b506104236113dc565b61042361074a366004612cf5565b611422565b34801561075b57600080fd5b5061076f61076a366004612af1565b611673565b6040516103869190612d2f565b34801561078857600080fd5b50610423611777565b34801561079d57600080fd5b5061043b60125481565b3480156107b357600080fd5b506008546001600160a01b03166103eb565b3480156107d157600080fd5b506104236107e036600461297f565b6117c9565b3480156107f157600080fd5b506103a4611808565b34801561080657600080fd5b5061076f610815366004612d67565b611817565b34801561082657600080fd5b5061043b600d5481565b61042361083e36600461297f565b6119b8565b34801561084f57600080fd5b5061042361085e366004612d9a565b611af5565b34801561086f57600080fd5b5061037a61087e366004612af1565b6001600160a01b03166000908152600e60205260409020541590565b3480156108a657600080fd5b506104236108b5366004612dd6565b611ba3565b3480156108c657600080fd5b5061043b6108d5366004612af1565b611bed565b3480156108e657600080fd5b5061037a6108f5366004612a27565b611c30565b34801561090657600080fd5b5061091a61091536600461297f565b611caa565b6040516103869190612e52565b34801561093357600080fd5b506103a461094236600461297f565b611d32565b34801561095357600080fd5b506103a4611dce565b34801561096857600080fd5b5061043b600c5481565b34801561097e57600080fd5b5061042361098d36600461297f565b611ddd565b34801561099e57600080fd5b5061037a6109ad366004612e97565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156109e757600080fd5b5060095461037a90600160a01b900460ff1681565b610423610a0a366004612eb3565b611e1c565b348015610a1b57600080fd5b50610423610a2a366004612af1565b612067565b348015610a3b57600080fd5b506104236120ea565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480610aa757507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b80610adb57507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b606060028054610af090612f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1c90612f06565b8015610b695780601f10610b3e57610100808354040283529160200191610b69565b820191906000526020600020905b815481529060010190602001808311610b4c57829003601f168201915b5050505050905090565b6000610b7e82612160565b610bb4576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610bdb8261131b565b9050336001600160a01b03821614610c2d57610bf781336109ad565b610c2d576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600a546000908390839086906001600160a01b0316610cc857604051637560f33160e11b815260040160405180910390fd5b600d54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca6020820152339181019190915260608101839052600091906080015b60405160208183030381529060405280519060200120604051602001610d4992919061190160f01b81526002810192909252602282015260420190565b60408051601f19818403018152919052805160209091012090506000610d70828686612195565b600a549091506001600160a01b03808316911614610da157604051638baa579f60e01b815260040160405180910390fd5b50600198975050505050505050565b33610dc36008546001600160a01b031690565b6001600160a01b031614610dea57604051633e8be92f60e01b815260040160405180910390fd5b6011548267ffffffffffffffff16610e056000546000190190565b610e0f9190612f56565b1115610e2e5760405163c30436e960e01b815260040160405180910390fd5b610e42818367ffffffffffffffff16612204565b6001600160a01b03166000908152600560205260409020805477ffffffffffffffffffffffffffffffffffffffffffffffff1660c09290921b919091179055565b5050565b6000610e9282612335565b9050836001600160a01b0316816001600160a01b031614610edf576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054610f0b8187335b6001600160a01b039081169116811491141790565b610f3657610f1986336109ad565b610f3657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610f76576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015610f8157600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611013576001840160008181526004602052604081205490036110115760005481146110115760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b336110706008546001600160a01b031690565b6001600160a01b03161461109757604051633e8be92f60e01b815260040160405180910390fd5b6009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6013546014546001600160a01b0390911690600090612710906110e99085612f69565b6110f39190612f88565b90509250929050565b3361110f6008546001600160a01b031690565b6001600160a01b03161461113657604051633e8be92f60e01b815260040160405180910390fd5b600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b336111786008546001600160a01b031690565b6001600160a01b03161461119f57604051633e8be92f60e01b815260040160405180910390fd5b600980547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116600160a01b9182900460ff1615909102179055565b6111f683838360405180602001604052806000815250611ba3565b505050565b6112068160016123bd565b50565b3361121c6008546001600160a01b031690565b6001600160a01b03161461124357604051633e8be92f60e01b815260040160405180910390fd5b6015610e838282612ff0565b60608160008167ffffffffffffffff81111561126d5761126d612b2e565b6040519080825280602002602001820160405280156112bf57816020015b60408051608081018252600080825260208083018290529282018190526060820152825260001990920191018161128b5790505b50905060005b828114611312576112ed8686838181106112e1576112e16130b0565b90506020020135611caa565b8282815181106112ff576112ff6130b0565b60209081029190910101526001016112c5565b50949350505050565b6000610adb82612335565b336113396008546001600160a01b031690565b6001600160a01b03161461136057604051633e8be92f60e01b815260040160405180910390fd5b600f805460ff19811660ff90911615179055565b60006001600160a01b0382166113b6576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b336113ef6008546001600160a01b031690565b6001600160a01b03161461141657604051633e8be92f60e01b815260040160405180910390fd5b6114206000612520565b565b600a548290829067ffffffffffffffff8616906001600160a01b031661145b57604051637560f33160e11b815260040160405180910390fd5b600b54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca602082015233918101919091526060810183905260009190608001604051602081830303815290604052805190602001206040516020016114db92919061190160f01b81526002810192909252602282015260420190565b60408051601f19818403018152919052805160209091012090506000611502828686612195565b600a549091506001600160a01b0380831691161461153357604051638baa579f60e01b815260040160405180910390fd5b600f5460ff1661156f576040517f43e287e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33321461158f5760405163d9d552c960e01b815260040160405180910390fd5b601154600054600019016115a4906001612f56565b11156115c35760405163c30436e960e01b815260040160405180910390fd5b336000908152600e60205260409020546115f0576115eb338967ffffffffffffffff1661257f565b611622565b6040517fa4f8192900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611636338967ffffffffffffffff16612204565b336000908152600560205260409020805477ffffffffffffffffffffffffffffffffffffffffffffffff1660c08a901b1790555050505050505050565b6060600080600061168385611374565b905060008167ffffffffffffffff8111156116a0576116a0612b2e565b6040519080825280602002602001820160405280156116c9578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b83861461176b57611704816125b0565b915081604001516117635781516001600160a01b03161561172457815194505b876001600160a01b0316856001600160a01b0316036117635780838780600101985081518110611756576117566130b0565b6020026020010181815250505b6001016116f4565b50909695505050505050565b3361178a6008546001600160a01b031690565b6001600160a01b0316146117b157604051633e8be92f60e01b815260040160405180910390fd5b6009544790611206906001600160a01b03168261262f565b336117dc6008546001600160a01b031690565b6001600160a01b03161461180357604051633e8be92f60e01b815260040160405180910390fd5b601255565b606060038054610af090612f06565b6060818310611852576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061185e60005490565b9050600185101561186e57600194505b8084111561187a578093505b600061188587611374565b9050848610156118a4578585038181101561189e578091505b506118a8565b5060005b60008167ffffffffffffffff8111156118c3576118c3612b2e565b6040519080825280602002602001820160405280156118ec578160200160208202803683370190505b509050816000036119025793506119b192505050565b600061190d88611caa565b90506000816040015161191e575080515b885b8881141580156119305750848714155b156119a55761193e816125b0565b9250826040015161199d5782516001600160a01b03161561195e57825191505b8a6001600160a01b0316826001600160a01b03160361199d5780848880600101995081518110611990576119906130b0565b6020026020010181815250505b600101611920565b50505092835250909150505b9392505050565b3332146119d85760405163d9d552c960e01b815260040160405180910390fd5b600954600160a01b900460ff16611a1b576040517fb7b2409700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60115481611a2c6000546000190190565b611a369190612f56565b1115611a555760405163c30436e960e01b815260040160405180910390fd5b80601254611a639190612f69565b341015611a835760405163cd1c886760e01b815260040160405180910390fd5b33600090815260056020526040902054601054611aa39160c01c90612f56565b33600090815260056020526040908190205483911c67ffffffffffffffff16611acc9190612f56565b1115611aeb5760405163c0e54d7360e01b815260040160405180910390fd5b6112063382612204565b336001600160a01b03831603611b37576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611bae848484610e87565b6001600160a01b0383163b15611be757611bca8484848461274d565b611be7576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6001600160a01b038116600090815260056020526040808220546010549181901c67ffffffffffffffff1691611c269160c01c90612f56565b610adb91906130c6565b600a546000908390839086906001600160a01b0316611c6257604051637560f33160e11b815260040160405180910390fd5b600b54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca602082015233918101919091526060810183905260009190608001610d0c565b6040805160808101825260008082526020820181905291810182905260608101919091526040805160808101825260008082526020820181905291810182905260608101919091526001831080611d0357506000548310155b15611d0e5792915050565b611d17836125b0565b9050806040015115611d295792915050565b6119b183612839565b6060611d3d82612160565b611d73576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611d7d611dce565b90508051600003611d9d57604051806020016040528060008152506119b1565b80611da7846128b1565b604051602001611db89291906130d9565b6040516020818303038152906040529392505050565b606060158054610af090612f06565b33611df06008546001600160a01b031690565b6001600160a01b031614611e1757604051633e8be92f60e01b815260040160405180910390fd5b601055565b600a548290829086906001600160a01b0316611e4b57604051637560f33160e11b815260040160405180910390fd5b600d54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca60208201523391810191909152606081018390526000919060800160405160208183030381529060405280519060200120604051602001611ecb92919061190160f01b81526002810192909252602282015260420190565b60408051601f19818403018152919052805160209091012090506000611ef2828686612195565b600a549091506001600160a01b03808316911614611f2357604051638baa579f60e01b815260040160405180910390fd5b600954600160a81b900460ff16611f66576040517f04cc9ce200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b333214611f865760405163d9d552c960e01b815260040160405180910390fd5b60115488611f976000546000190190565b611fa19190612f56565b1115611fc05760405163c30436e960e01b815260040160405180910390fd5b33600090815260056020526040902054601054611fe09160c01c90612f56565b3360009081526005602052604090819020548a911c67ffffffffffffffff166120099190612f56565b11156120285760405163c0e54d7360e01b815260040160405180910390fd5b612032888a612f69565b3410156120525760405163cd1c886760e01b815260040160405180910390fd5b61205c3389612204565b505050505050505050565b3361207a6008546001600160a01b031690565b6001600160a01b0316146120a157604051633e8be92f60e01b815260040160405180910390fd5b6001600160a01b0381166120e1576040517f7448fbae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61120681612520565b336120fd6008546001600160a01b031690565b6001600160a01b03161461212457604051633e8be92f60e01b815260040160405180910390fd5b600980547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff8116600160a81b9182900460ff1615909102179055565b600081600111158015612174575060005482105b8015610adb575050600090815260046020526040902054600160e01b161590565b6000604182036119b1576040516040846040377f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0606051116121fa5784600052604084013560001a602052602060406080600060015afa5060006060523d6060035191505b6040529392505050565b6000805490829003612242576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146122f157808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016122b9565b508160000361232c576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b6000818060011161238b5760005481101561238b5760008181526004602052604081205490600160e01b82169003612389575b806000036119b1575060001901600081815260046020526040902054612368565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006123c883612335565b9050806000806123e686600090815260066020526040902080549091565b915091508415612426576123fb818433610ef6565b6124265761240983336109ad565b61242657604051632ce44b5f60e11b815260040160405180910390fd5b801561243157600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260046020526040812091909155600160e11b851690036124d8576001860160008181526004602052604081205490036124d65760005481146124d65760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166000908152600e6020526040812080548392906125a7908490612f56565b90915550505050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610adb90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b804710156126845760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126d1576040519150601f19603f3d011682016040523d82523d6000602084013e6126d6565b606091505b50509050806111f65760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161267b565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612782903390899088908890600401613108565b6020604051808303816000875af19250505080156127bd575060408051601f3d908101601f191682019092526127ba91810190613144565b60015b61281b573d8080156127eb576040519150601f19603f3d011682016040523d82523d6000602084013e6127f0565b606091505b508051600003612813576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152610adb61286983612335565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604080516080019081905280825b600183039250600a81066030018353600a9004806128bf5750819003601f19909101908152919050565b6001600160e01b03198116811461120657600080fd5b60006020828403121561291157600080fd5b81356119b1816128e9565b60005b8381101561293757818101518382015260200161291f565b50506000910152565b6000815180845261295881602086016020860161291c565b601f01601f19169290920160200192915050565b6020815260006119b16020830184612940565b60006020828403121561299157600080fd5b5035919050565b80356001600160a01b03811681146129af57600080fd5b919050565b600080604083850312156129c757600080fd5b6129d083612998565b946020939093013593505050565b60008083601f8401126129f057600080fd5b50813567ffffffffffffffff811115612a0857600080fd5b602083019150836020828501011115612a2057600080fd5b9250929050565b600080600060408486031215612a3c57600080fd5b83359250602084013567ffffffffffffffff811115612a5a57600080fd5b612a66868287016129de565b9497909650939450505050565b803567ffffffffffffffff811681146129af57600080fd5b60008060408385031215612a9e57600080fd5b612aa783612a73565b91506110f360208401612998565b600080600060608486031215612aca57600080fd5b612ad384612998565b9250612ae160208501612998565b9150604084013590509250925092565b600060208284031215612b0357600080fd5b6119b182612998565b60008060408385031215612b1f57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612b5f57612b5f612b2e565b604051601f8501601f19908116603f01168101908282118183101715612b8757612b87612b2e565b81604052809350858152868686011115612ba057600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612bcc57600080fd5b813567ffffffffffffffff811115612be357600080fd5b8201601f81018413612bf457600080fd5b61283184823560208401612b44565b60008060208385031215612c1657600080fd5b823567ffffffffffffffff80821115612c2e57600080fd5b818501915085601f830112612c4257600080fd5b813581811115612c5157600080fd5b8660208260051b8501011115612c6657600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b8181101561176b57612ce28385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101612c94565b600080600060408486031215612d0a57600080fd5b612d1384612a73565b9250602084013567ffffffffffffffff811115612a5a57600080fd5b6020808252825182820181905260009190848201906040850190845b8181101561176b57835183529284019291840191600101612d4b565b600080600060608486031215612d7c57600080fd5b612d8584612998565b95602085013595506040909401359392505050565b60008060408385031215612dad57600080fd5b612db683612998565b915060208301358015158114612dcb57600080fd5b809150509250929050565b60008060008060808587031215612dec57600080fd5b612df585612998565b9350612e0360208601612998565b925060408501359150606085013567ffffffffffffffff811115612e2657600080fd5b8501601f81018713612e3757600080fd5b612e4687823560208401612b44565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610adb565b60008060408385031215612eaa57600080fd5b612aa783612998565b60008060008060608587031215612ec957600080fd5b8435935060208501359250604085013567ffffffffffffffff811115612eee57600080fd5b612efa878288016129de565b95989497509550505050565b600181811c90821680612f1a57607f821691505b602082108103612f3a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610adb57610adb612f40565b6000816000190483118215151615612f8357612f83612f40565b500290565b600082612fa557634e487b7160e01b600052601260045260246000fd5b500490565b601f8211156111f657600081815260208120601f850160051c81016020861015612fd15750805b601f850160051c820191505b8181101561105557828155600101612fdd565b815167ffffffffffffffff81111561300a5761300a612b2e565b61301e816130188454612f06565b84612faa565b602080601f831160018114613053576000841561303b5750858301515b600019600386901b1c1916600185901b178555611055565b600085815260208120601f198616915b8281101561308257888601518255948401946001909101908401613063565b50858210156130a05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b81810381811115610adb57610adb612f40565b600083516130eb81846020880161291c565b8351908301906130ff81836020880161291c565b01949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261313a6080830184612940565b9695505050505050565b60006020828403121561315657600080fd5b81516119b1816128e956fea2646970667358221220253fcc9c14cb18bb5b22563b1b6a18065804760cd9ce8a6685bf25bd34ed813664736f6c63430008100033c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc68b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000004f7df1a6d97000000000000000000000000000000000000000000000000000000000000000009c4000000000000000000000000d4db4d54ba0228d7934c021417c73ae0949d557800000000000000000000000000000000000000000000000000000000000002bc00000000000000000000000000000000000000000000000000000000000000234561726c79204d616a6f72697479204469676974616c204d656d626572204261646765000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054541524c59000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f617277656176652e6e65742f6a4e674a31453774466f5f672d676348747a795161686b306654422d49444372632d4d544f6f795631726f2f

Deployed Bytecode

0x6080604052600436106103555760003560e01c806370a08231116101bb578063b3feb36d116100f7578063db1354d211610095578063eb8d24441161006f578063eb8d2444146109db578063ec596b72146109fc578063f2fde38b14610a0f578063f6fa26ab14610a2f57600080fd5b8063db1354d21461095c578063e268e4d314610972578063e985e9c51461099257600080fd5b8063bece913b116100d1578063bece913b146108da578063c23dc68f146108fa578063c87b56dd14610927578063d547cfb71461094757600080fd5b8063b3feb36d14610863578063b88d4fde1461089a578063bb660c0a146108ba57600080fd5b80638da5cb5b1161016457806399a2557a1161013e57806399a2557a146107fa5780639c79e5271461081a578063a0712d6814610830578063a22cb4651461084357600080fd5b80638da5cb5b146107a757806391b7f5ed146107c557806395d89b41146107e557600080fd5b80638462151c116101955780638462151c1461074f57806386d1a69f1461077c5780638d859f3e1461079157600080fd5b806370a0823114610707578063715018a61461072757806379bffd8d1461073c57600080fd5b80632a55205a116102955780635bbb2177116102335780636352211e1161020d5780636352211e146106bc5780636b0509b1146104c75780636d4a450a146106dc5780636d60e6c1146106f257600080fd5b80635bbb217714610625578063624601b6146106525780636301dccf1461068857600080fd5b806334918dfd1161026f57806334918dfd146105b057806342842e0e146105c557806342966c68146105e557806355f804b31461060557600080fd5b80632a55205a1461053b57806331beb6051461057a57806332cb6b0c1461059a57600080fd5b806311d44fb6116103025780631fe70d6f116102dc5780631fe70d6f146104a6578063212e9a0f146104c757806323b872dd146104fb5780632983c4b81461051b57600080fd5b806311d44fb61461044957806318160ddd146104695780631c88ce001461048657600080fd5b8063081812fc11610333578063081812fc146103cb578063095ea7b3146104035780630f2cdd6c1461042557600080fd5b806301ffc9a71461035a57806306fdde031461038f57806307cf3a77146103b1575b600080fd5b34801561036657600080fd5b5061037a6103753660046128ff565b610a44565b60405190151581526020015b60405180910390f35b34801561039b57600080fd5b506103a4610ae1565b604051610386919061296c565b3480156103bd57600080fd5b50600f5461037a9060ff1681565b3480156103d757600080fd5b506103eb6103e636600461297f565b610b73565b6040516001600160a01b039091168152602001610386565b34801561040f57600080fd5b5061042361041e3660046129b4565b610bd0565b005b34801561043157600080fd5b5061043b60105481565b604051908152602001610386565b34801561045557600080fd5b5061037a610464366004612a27565b610c96565b34801561047557600080fd5b50600154600054036000190161043b565b34801561049257600080fd5b506104236104a1366004612a8b565b610db0565b3480156104b257600080fd5b5060095461037a90600160a81b900460ff1681565b3480156104d357600080fd5b5061043b7f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca81565b34801561050757600080fd5b50610423610516366004612ab5565b610e87565b34801561052757600080fd5b50610423610536366004612af1565b61105d565b34801561054757600080fd5b5061055b610556366004612b0c565b6110c6565b604080516001600160a01b039093168352602083019190915201610386565b34801561058657600080fd5b50610423610595366004612af1565b6110fc565b3480156105a657600080fd5b5061043b60115481565b3480156105bc57600080fd5b50610423611165565b3480156105d157600080fd5b506104236105e0366004612ab5565b6111db565b3480156105f157600080fd5b5061042361060036600461297f565b6111fb565b34801561061157600080fd5b50610423610620366004612bba565b611209565b34801561063157600080fd5b50610645610640366004612c03565b61124f565b6040516103869190612c78565b34801561065e57600080fd5b5061043b61066d366004612af1565b6001600160a01b03166000908152600e602052604090205490565b34801561069457600080fd5b5061043b7f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b3480156106c857600080fd5b506103eb6106d736600461297f565b61131b565b3480156106e857600080fd5b5061043b600b5481565b3480156106fe57600080fd5b50610423611326565b34801561071357600080fd5b5061043b610722366004612af1565b611374565b34801561073357600080fd5b506104236113dc565b61042361074a366004612cf5565b611422565b34801561075b57600080fd5b5061076f61076a366004612af1565b611673565b6040516103869190612d2f565b34801561078857600080fd5b50610423611777565b34801561079d57600080fd5b5061043b60125481565b3480156107b357600080fd5b506008546001600160a01b03166103eb565b3480156107d157600080fd5b506104236107e036600461297f565b6117c9565b3480156107f157600080fd5b506103a4611808565b34801561080657600080fd5b5061076f610815366004612d67565b611817565b34801561082657600080fd5b5061043b600d5481565b61042361083e36600461297f565b6119b8565b34801561084f57600080fd5b5061042361085e366004612d9a565b611af5565b34801561086f57600080fd5b5061037a61087e366004612af1565b6001600160a01b03166000908152600e60205260409020541590565b3480156108a657600080fd5b506104236108b5366004612dd6565b611ba3565b3480156108c657600080fd5b5061043b6108d5366004612af1565b611bed565b3480156108e657600080fd5b5061037a6108f5366004612a27565b611c30565b34801561090657600080fd5b5061091a61091536600461297f565b611caa565b6040516103869190612e52565b34801561093357600080fd5b506103a461094236600461297f565b611d32565b34801561095357600080fd5b506103a4611dce565b34801561096857600080fd5b5061043b600c5481565b34801561097e57600080fd5b5061042361098d36600461297f565b611ddd565b34801561099e57600080fd5b5061037a6109ad366004612e97565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156109e757600080fd5b5060095461037a90600160a01b900460ff1681565b610423610a0a366004612eb3565b611e1c565b348015610a1b57600080fd5b50610423610a2a366004612af1565b612067565b348015610a3b57600080fd5b506104236120ea565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480610aa757507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b80610adb57507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b606060028054610af090612f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1c90612f06565b8015610b695780601f10610b3e57610100808354040283529160200191610b69565b820191906000526020600020905b815481529060010190602001808311610b4c57829003601f168201915b5050505050905090565b6000610b7e82612160565b610bb4576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610bdb8261131b565b9050336001600160a01b03821614610c2d57610bf781336109ad565b610c2d576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600a546000908390839086906001600160a01b0316610cc857604051637560f33160e11b815260040160405180910390fd5b600d54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca6020820152339181019190915260608101839052600091906080015b60405160208183030381529060405280519060200120604051602001610d4992919061190160f01b81526002810192909252602282015260420190565b60408051601f19818403018152919052805160209091012090506000610d70828686612195565b600a549091506001600160a01b03808316911614610da157604051638baa579f60e01b815260040160405180910390fd5b50600198975050505050505050565b33610dc36008546001600160a01b031690565b6001600160a01b031614610dea57604051633e8be92f60e01b815260040160405180910390fd5b6011548267ffffffffffffffff16610e056000546000190190565b610e0f9190612f56565b1115610e2e5760405163c30436e960e01b815260040160405180910390fd5b610e42818367ffffffffffffffff16612204565b6001600160a01b03166000908152600560205260409020805477ffffffffffffffffffffffffffffffffffffffffffffffff1660c09290921b919091179055565b5050565b6000610e9282612335565b9050836001600160a01b0316816001600160a01b031614610edf576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054610f0b8187335b6001600160a01b039081169116811491141790565b610f3657610f1986336109ad565b610f3657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610f76576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015610f8157600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611013576001840160008181526004602052604081205490036110115760005481146110115760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b336110706008546001600160a01b031690565b6001600160a01b03161461109757604051633e8be92f60e01b815260040160405180910390fd5b6009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6013546014546001600160a01b0390911690600090612710906110e99085612f69565b6110f39190612f88565b90509250929050565b3361110f6008546001600160a01b031690565b6001600160a01b03161461113657604051633e8be92f60e01b815260040160405180910390fd5b600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b336111786008546001600160a01b031690565b6001600160a01b03161461119f57604051633e8be92f60e01b815260040160405180910390fd5b600980547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116600160a01b9182900460ff1615909102179055565b6111f683838360405180602001604052806000815250611ba3565b505050565b6112068160016123bd565b50565b3361121c6008546001600160a01b031690565b6001600160a01b03161461124357604051633e8be92f60e01b815260040160405180910390fd5b6015610e838282612ff0565b60608160008167ffffffffffffffff81111561126d5761126d612b2e565b6040519080825280602002602001820160405280156112bf57816020015b60408051608081018252600080825260208083018290529282018190526060820152825260001990920191018161128b5790505b50905060005b828114611312576112ed8686838181106112e1576112e16130b0565b90506020020135611caa565b8282815181106112ff576112ff6130b0565b60209081029190910101526001016112c5565b50949350505050565b6000610adb82612335565b336113396008546001600160a01b031690565b6001600160a01b03161461136057604051633e8be92f60e01b815260040160405180910390fd5b600f805460ff19811660ff90911615179055565b60006001600160a01b0382166113b6576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b336113ef6008546001600160a01b031690565b6001600160a01b03161461141657604051633e8be92f60e01b815260040160405180910390fd5b6114206000612520565b565b600a548290829067ffffffffffffffff8616906001600160a01b031661145b57604051637560f33160e11b815260040160405180910390fd5b600b54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca602082015233918101919091526060810183905260009190608001604051602081830303815290604052805190602001206040516020016114db92919061190160f01b81526002810192909252602282015260420190565b60408051601f19818403018152919052805160209091012090506000611502828686612195565b600a549091506001600160a01b0380831691161461153357604051638baa579f60e01b815260040160405180910390fd5b600f5460ff1661156f576040517f43e287e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33321461158f5760405163d9d552c960e01b815260040160405180910390fd5b601154600054600019016115a4906001612f56565b11156115c35760405163c30436e960e01b815260040160405180910390fd5b336000908152600e60205260409020546115f0576115eb338967ffffffffffffffff1661257f565b611622565b6040517fa4f8192900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611636338967ffffffffffffffff16612204565b336000908152600560205260409020805477ffffffffffffffffffffffffffffffffffffffffffffffff1660c08a901b1790555050505050505050565b6060600080600061168385611374565b905060008167ffffffffffffffff8111156116a0576116a0612b2e565b6040519080825280602002602001820160405280156116c9578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b83861461176b57611704816125b0565b915081604001516117635781516001600160a01b03161561172457815194505b876001600160a01b0316856001600160a01b0316036117635780838780600101985081518110611756576117566130b0565b6020026020010181815250505b6001016116f4565b50909695505050505050565b3361178a6008546001600160a01b031690565b6001600160a01b0316146117b157604051633e8be92f60e01b815260040160405180910390fd5b6009544790611206906001600160a01b03168261262f565b336117dc6008546001600160a01b031690565b6001600160a01b03161461180357604051633e8be92f60e01b815260040160405180910390fd5b601255565b606060038054610af090612f06565b6060818310611852576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061185e60005490565b9050600185101561186e57600194505b8084111561187a578093505b600061188587611374565b9050848610156118a4578585038181101561189e578091505b506118a8565b5060005b60008167ffffffffffffffff8111156118c3576118c3612b2e565b6040519080825280602002602001820160405280156118ec578160200160208202803683370190505b509050816000036119025793506119b192505050565b600061190d88611caa565b90506000816040015161191e575080515b885b8881141580156119305750848714155b156119a55761193e816125b0565b9250826040015161199d5782516001600160a01b03161561195e57825191505b8a6001600160a01b0316826001600160a01b03160361199d5780848880600101995081518110611990576119906130b0565b6020026020010181815250505b600101611920565b50505092835250909150505b9392505050565b3332146119d85760405163d9d552c960e01b815260040160405180910390fd5b600954600160a01b900460ff16611a1b576040517fb7b2409700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60115481611a2c6000546000190190565b611a369190612f56565b1115611a555760405163c30436e960e01b815260040160405180910390fd5b80601254611a639190612f69565b341015611a835760405163cd1c886760e01b815260040160405180910390fd5b33600090815260056020526040902054601054611aa39160c01c90612f56565b33600090815260056020526040908190205483911c67ffffffffffffffff16611acc9190612f56565b1115611aeb5760405163c0e54d7360e01b815260040160405180910390fd5b6112063382612204565b336001600160a01b03831603611b37576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611bae848484610e87565b6001600160a01b0383163b15611be757611bca8484848461274d565b611be7576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6001600160a01b038116600090815260056020526040808220546010549181901c67ffffffffffffffff1691611c269160c01c90612f56565b610adb91906130c6565b600a546000908390839086906001600160a01b0316611c6257604051637560f33160e11b815260040160405180910390fd5b600b54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca602082015233918101919091526060810183905260009190608001610d0c565b6040805160808101825260008082526020820181905291810182905260608101919091526040805160808101825260008082526020820181905291810182905260608101919091526001831080611d0357506000548310155b15611d0e5792915050565b611d17836125b0565b9050806040015115611d295792915050565b6119b183612839565b6060611d3d82612160565b611d73576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611d7d611dce565b90508051600003611d9d57604051806020016040528060008152506119b1565b80611da7846128b1565b604051602001611db89291906130d9565b6040516020818303038152906040529392505050565b606060158054610af090612f06565b33611df06008546001600160a01b031690565b6001600160a01b031614611e1757604051633e8be92f60e01b815260040160405180910390fd5b601055565b600a548290829086906001600160a01b0316611e4b57604051637560f33160e11b815260040160405180910390fd5b600d54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca60208201523391810191909152606081018390526000919060800160405160208183030381529060405280519060200120604051602001611ecb92919061190160f01b81526002810192909252602282015260420190565b60408051601f19818403018152919052805160209091012090506000611ef2828686612195565b600a549091506001600160a01b03808316911614611f2357604051638baa579f60e01b815260040160405180910390fd5b600954600160a81b900460ff16611f66576040517f04cc9ce200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b333214611f865760405163d9d552c960e01b815260040160405180910390fd5b60115488611f976000546000190190565b611fa19190612f56565b1115611fc05760405163c30436e960e01b815260040160405180910390fd5b33600090815260056020526040902054601054611fe09160c01c90612f56565b3360009081526005602052604090819020548a911c67ffffffffffffffff166120099190612f56565b11156120285760405163c0e54d7360e01b815260040160405180910390fd5b612032888a612f69565b3410156120525760405163cd1c886760e01b815260040160405180910390fd5b61205c3389612204565b505050505050505050565b3361207a6008546001600160a01b031690565b6001600160a01b0316146120a157604051633e8be92f60e01b815260040160405180910390fd5b6001600160a01b0381166120e1576040517f7448fbae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61120681612520565b336120fd6008546001600160a01b031690565b6001600160a01b03161461212457604051633e8be92f60e01b815260040160405180910390fd5b600980547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff8116600160a81b9182900460ff1615909102179055565b600081600111158015612174575060005482105b8015610adb575050600090815260046020526040902054600160e01b161590565b6000604182036119b1576040516040846040377f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0606051116121fa5784600052604084013560001a602052602060406080600060015afa5060006060523d6060035191505b6040529392505050565b6000805490829003612242576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146122f157808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016122b9565b508160000361232c576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b6000818060011161238b5760005481101561238b5760008181526004602052604081205490600160e01b82169003612389575b806000036119b1575060001901600081815260046020526040902054612368565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006123c883612335565b9050806000806123e686600090815260066020526040902080549091565b915091508415612426576123fb818433610ef6565b6124265761240983336109ad565b61242657604051632ce44b5f60e11b815260040160405180910390fd5b801561243157600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260046020526040812091909155600160e11b851690036124d8576001860160008181526004602052604081205490036124d65760005481146124d65760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166000908152600e6020526040812080548392906125a7908490612f56565b90915550505050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610adb90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b804710156126845760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126d1576040519150601f19603f3d011682016040523d82523d6000602084013e6126d6565b606091505b50509050806111f65760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161267b565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612782903390899088908890600401613108565b6020604051808303816000875af19250505080156127bd575060408051601f3d908101601f191682019092526127ba91810190613144565b60015b61281b573d8080156127eb576040519150601f19603f3d011682016040523d82523d6000602084013e6127f0565b606091505b508051600003612813576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152610adb61286983612335565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604080516080019081905280825b600183039250600a81066030018353600a9004806128bf5750819003601f19909101908152919050565b6001600160e01b03198116811461120657600080fd5b60006020828403121561291157600080fd5b81356119b1816128e9565b60005b8381101561293757818101518382015260200161291f565b50506000910152565b6000815180845261295881602086016020860161291c565b601f01601f19169290920160200192915050565b6020815260006119b16020830184612940565b60006020828403121561299157600080fd5b5035919050565b80356001600160a01b03811681146129af57600080fd5b919050565b600080604083850312156129c757600080fd5b6129d083612998565b946020939093013593505050565b60008083601f8401126129f057600080fd5b50813567ffffffffffffffff811115612a0857600080fd5b602083019150836020828501011115612a2057600080fd5b9250929050565b600080600060408486031215612a3c57600080fd5b83359250602084013567ffffffffffffffff811115612a5a57600080fd5b612a66868287016129de565b9497909650939450505050565b803567ffffffffffffffff811681146129af57600080fd5b60008060408385031215612a9e57600080fd5b612aa783612a73565b91506110f360208401612998565b600080600060608486031215612aca57600080fd5b612ad384612998565b9250612ae160208501612998565b9150604084013590509250925092565b600060208284031215612b0357600080fd5b6119b182612998565b60008060408385031215612b1f57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612b5f57612b5f612b2e565b604051601f8501601f19908116603f01168101908282118183101715612b8757612b87612b2e565b81604052809350858152868686011115612ba057600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612bcc57600080fd5b813567ffffffffffffffff811115612be357600080fd5b8201601f81018413612bf457600080fd5b61283184823560208401612b44565b60008060208385031215612c1657600080fd5b823567ffffffffffffffff80821115612c2e57600080fd5b818501915085601f830112612c4257600080fd5b813581811115612c5157600080fd5b8660208260051b8501011115612c6657600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b8181101561176b57612ce28385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101612c94565b600080600060408486031215612d0a57600080fd5b612d1384612a73565b9250602084013567ffffffffffffffff811115612a5a57600080fd5b6020808252825182820181905260009190848201906040850190845b8181101561176b57835183529284019291840191600101612d4b565b600080600060608486031215612d7c57600080fd5b612d8584612998565b95602085013595506040909401359392505050565b60008060408385031215612dad57600080fd5b612db683612998565b915060208301358015158114612dcb57600080fd5b809150509250929050565b60008060008060808587031215612dec57600080fd5b612df585612998565b9350612e0360208601612998565b925060408501359150606085013567ffffffffffffffff811115612e2657600080fd5b8501601f81018713612e3757600080fd5b612e4687823560208401612b44565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610adb565b60008060408385031215612eaa57600080fd5b612aa783612998565b60008060008060608587031215612ec957600080fd5b8435935060208501359250604085013567ffffffffffffffff811115612eee57600080fd5b612efa878288016129de565b95989497509550505050565b600181811c90821680612f1a57607f821691505b602082108103612f3a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610adb57610adb612f40565b6000816000190483118215151615612f8357612f83612f40565b500290565b600082612fa557634e487b7160e01b600052601260045260246000fd5b500490565b601f8211156111f657600081815260208120601f850160051c81016020861015612fd15750805b601f850160051c820191505b8181101561105557828155600101612fdd565b815167ffffffffffffffff81111561300a5761300a612b2e565b61301e816130188454612f06565b84612faa565b602080601f831160018114613053576000841561303b5750858301515b600019600386901b1c1916600185901b178555611055565b600085815260208120601f198616915b8281101561308257888601518255948401946001909101908401613063565b50858210156130a05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b81810381811115610adb57610adb612f40565b600083516130eb81846020880161291c565b8351908301906130ff81836020880161291c565b01949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261313a6080830184612940565b9695505050505050565b60006020828403121561315657600080fd5b81516119b1816128e956fea2646970667358221220253fcc9c14cb18bb5b22563b1b6a18065804760cd9ce8a6685bf25bd34ed813664736f6c63430008100033

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

00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000004f7df1a6d97000000000000000000000000000000000000000000000000000000000000000009c4000000000000000000000000d4db4d54ba0228d7934c021417c73ae0949d557800000000000000000000000000000000000000000000000000000000000002bc00000000000000000000000000000000000000000000000000000000000000234561726c79204d616a6f72697479204469676974616c204d656d626572204261646765000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054541524c59000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f617277656176652e6e65742f6a4e674a31453774466f5f672d676348747a795161686b306654422d49444372632d4d544f6f795631726f2f

-----Decoded View---------------
Arg [0] : _tokenName (string): Early Majority Digital Member Badge
Arg [1] : _tokenSymbol (string): EARLY
Arg [2] : _customBaseURI (string): https://arweave.net/jNgJ1E7tFo_g-gcHtzyQahk0fTB-IDCrc-MTOoyV1ro/
Arg [3] : _tokenPrice (uint256): 358000000000000000
Arg [4] : _tokensForSale (uint256): 2500
Arg [5] : _royaltyAddress (address): 0xD4Db4d54ba0228d7934C021417C73ae0949d5578
Arg [6] : _royaltyPercent (uint256): 700

-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [3] : 00000000000000000000000000000000000000000000000004f7df1a6d970000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000009c4
Arg [5] : 000000000000000000000000d4db4d54ba0228d7934c021417c73ae0949d5578
Arg [6] : 00000000000000000000000000000000000000000000000000000000000002bc
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000023
Arg [8] : 4561726c79204d616a6f72697479204469676974616c204d656d626572204261
Arg [9] : 6467650000000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [11] : 4541524c59000000000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [13] : 68747470733a2f2f617277656176652e6e65742f6a4e674a31453774466f5f67
Arg [14] : 2d676348747a795161686b306654422d49444372632d4d544f6f795631726f2f


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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