Contract 0xC1ad47aeb274157E24A5f01B5857830aeF962843 3

Token Contract 
 

Contract Overview

Akumu Dragonz: AKUMU Token
Balance:
0 Ether

EtherValue:
$0.00

Token:
 
Txn Hash
Method
Block
From
To
Value
0x86462329c93b7f25bef51a0b6f5ce90285deeb8494fbaad47266541302aa8dd0Safe Transfer Fr...(pending)2022-11-27 1:52:321 day 17 hrs ago0x65156070a5775361a73b8674d1363c36d622a7e3 IN Akumu Dragonz: AKUMU Token0 Ether(Pending)(Pending)
0xfbf63be43d8e79b08cab2c780dc1f575a2a05c509f41ff75fcbdb0e4c9bfb5c1Set Approval For...160697282022-11-28 16:37:352 hrs 51 mins ago0x1dc06172093527f092f72b34249fd9e14d3056ea IN  Akumu Dragonz: AKUMU Token0 Ether0.00088476 19.18179643
0x7637aecd2b887f5199f4614e707083128caa1b5352e78de72f1a72e87e4e3068Set Approval For...160695262022-11-28 15:56:593 hrs 32 mins ago0xf6ccb25a139bc95e4811b3b0183f8b4c7d4ee93b IN  Akumu Dragonz: AKUMU Token0 Ether0.00112462 24.38204927
0x4c99af7bf2b2fb57c3a43fc04b394e6c162ebb0be7f080faa0ba9ee9263e25f4Set Approval For...160689482022-11-28 14:01:235 hrs 28 mins agoENS Name plasmnetwork.eth IN  Akumu Dragonz: AKUMU Token0 Ether0.00078463 17.01095984
0x48d92283d8b154fcd88aab42246e1931ab7217240179f5843b2d6d3335c31357Set Approval For...160657232022-11-28 3:14:3516 hrs 14 mins agoENS Name nwjns.eth IN  Akumu Dragonz: AKUMU Token0 Ether0.00053857 11.67033214
0x8e4565f2c262c5ea3fbe150be058a01560c61ddecd1ad8d5f007fa9826fa5ca1Set Approval For...160637182022-11-27 20:30:3522 hrs 58 mins agoENS Name mangoman.eth IN  Akumu Dragonz: AKUMU Token0 Ether0.00053508 11.60085255
0x5309648772115e216327386f6c654cffbdd840281fd37703bc450cc955dcc1f4Set Approval For...160619432022-11-27 14:32:471 day 4 hrs ago0x6c9273e9bf103a19ccce4c06fe7213de27493871 IN  Akumu Dragonz: AKUMU Token0 Ether0.00046084 9.98607697
0x720073b9c830ce622a4d25807acb7e3dd90858ca4d86f374a7de8be3a1bb07c7Set Approval For...160618162022-11-27 14:07:231 day 5 hrs agoENS Name hoi777.eth IN  Akumu Dragonz: AKUMU Token0 Ether0.0004605 9.97865474
0x14285dd5aff34e7dad355c39496cf436ffafdfa90885f2aa5a285e3c5f2cf301Set Approval For...160615642022-11-27 13:16:231 day 6 hrs ago0xa71f0b3a58e502aba5cf9d2154431a12507b9220 IN  Akumu Dragonz: AKUMU Token0 Ether0.00047957 10.39720413
0x2284b809ba79f45d9c37b90a9ef4cee6e21c4125fd0f4c58cccb9245206e7585Set Approval For...160615282022-11-27 13:09:111 day 6 hrs ago0x9b029a80c6699d05c4af483e0daa1a4bcacfa3d9 IN  Akumu Dragonz: AKUMU Token0 Ether0.00051526 11.17102543
0x2889bac5f9c2eb79f07520daf1932f9b5bad51c3a7171a33ecb46b235b17ef65Safe Transfer Fr...160615172022-11-27 13:06:591 day 6 hrs ago0x9b029a80c6699d05c4af483e0daa1a4bcacfa3d9 IN  Akumu Dragonz: AKUMU Token0 Ether0.00074245 11.29817795
0x298eb60929660804e82965bcdf8ee1adb6cee49ff26bfa9fe7564a4db65c5ab8Set Approval For...160615162022-11-27 13:06:471 day 6 hrs ago0xa71f0b3a58e502aba5cf9d2154431a12507b9220 IN  Akumu Dragonz: AKUMU Token0 Ether0.00058499 12.65978563
0x99e1a6303bd9db8dbb1948be508d866950d7f5071c3f95ef427eac6279ef9deeSet Approval For...160614982022-11-27 13:03:111 day 6 hrs ago0xa71f0b3a58e502aba5cf9d2154431a12507b9220 IN  Akumu Dragonz: AKUMU Token0 Ether0.00027298 11.27412388
0x2a05ea7a630aa85a6c3360ec725db9a5c001ee4c489518072f877ab44ad2ea50Safe Transfer Fr...160614572022-11-27 12:54:591 day 6 hrs ago0x9b029a80c6699d05c4af483e0daa1a4bcacfa3d9 IN  Akumu Dragonz: AKUMU Token0 Ether0.00078574 11.42631868
0x84531bf4e686cfd175d3b927bbcad8067a13ef40fc63cbe9fddae7fc1f2acb4eSet Approval For...160589172022-11-27 4:25:231 day 15 hrs ago0xb642c1a6eb9b190f95a22611103e64b5be773b47 IN  Akumu Dragonz: AKUMU Token0 Ether0.0002636 10.84922041
0x8e0c7698aa1b151161307ce5176f1a3e43dc3371fd04810f5cf32840d14b330bSet Approval For...160588872022-11-27 4:19:231 day 15 hrs ago0xb642c1a6eb9b190f95a22611103e64b5be773b47 IN  Akumu Dragonz: AKUMU Token0 Ether0.00023735 9.80297795
0x4b34c941797223b7f86389cb88df1896505e832d0e48874a5c4b05e342b0b121Set Approval For...160575872022-11-26 23:58:111 day 19 hrs agoENS Name jpegmorganfinance.eth IN  Akumu Dragonz: AKUMU Token0 Ether0.00053049 11.50117557
0x7a1a03d120ec8e2ed903d91f01955f44fa8f31959c5c7743890dbaec5867ccceSet Approval For...160572822022-11-26 22:56:591 day 20 hrs ago0xcf107356fa5cd5b7a989130a1ac26347bd47c3a7 IN  Akumu Dragonz: AKUMU Token0 Ether0.00049744 10.77904442
0x2e64122450a1a41910c0371dd635e3cd490459bca02d5fb434361e89eeeed7f6Safe Transfer Fr...160572652022-11-26 22:53:351 day 20 hrs ago0xe34f11682d0c911d1a8a7e02620b67a0662e5224 IN  Akumu Dragonz: AKUMU Token0 Ether0.00069986 10.17323595
0xb2683e44e3dcc597d6013e8a938a61c0d8b92fdcaf20e4e7cc1bf91d062e9125Set Approval For...160567152022-11-26 21:02:351 day 22 hrs ago0x06185ae247586789a90f830b755891ca09e23da1 IN  Akumu Dragonz: AKUMU Token0 Ether0.00050616 10.97382029
0x140be326b13c3ef0c17a1df8411719d49d996a1627a005c55f216471b0b61f60Set Approval For...160556132022-11-26 17:20:472 days 2 hrs ago0x1664f073da9f3c70d6874dccb186c8cbb54578a7 IN  Akumu Dragonz: AKUMU Token0 Ether0.00027539 11.33449609
0xdfa5aad056445787c070026ea24150871944686a24b11e8e18ec29de108481d7Safe Transfer Fr...160553542022-11-26 16:28:472 days 3 hrs ago0x77524f497fdce43f21deb02ec9e0bf3df0fa124a IN  Akumu Dragonz: AKUMU Token0 Ether0.00090711 10.00313257
0xdcc8272f56c560dc419dc43625670d655a9ff12466914b911aeb0127f0bb01c5Safe Transfer Fr...160553432022-11-26 16:26:352 days 3 hrs ago0x309768d6b07fd627e41794fbc2dca443d15c3d4a IN  Akumu Dragonz: AKUMU Token0 Ether0.00105555 11.63697605
0x603662b2518b6a76ab4dfc21e3d22a2a506cf086659dc20e8c2b24bf6bbd87b4Safe Transfer Fr...160553372022-11-26 16:25:232 days 3 hrs ago0x1d5fea578eab528e59f377e3ce56c2c86977cc3e IN  Akumu Dragonz: AKUMU Token0 Ether0.00099501 10.96180183
0x14fdbd399b7f4f1337511b6629e51025ab853030c5d6297fc1d7313b648faf3dSafe Transfer Fr...160553292022-11-26 16:23:472 days 3 hrs ago0xfd7ef8cc015b66ce72f91db8bfb03ea05d22b9de IN  Akumu Dragonz: AKUMU Token0 Ether0.00089579 9.87572556
[ Download CSV Export 
Latest 2 internal transactions
Parent Txn Hash Block From To Value
0xf68d4e4443850e6fa2d21ebd4c12c0e397c18a1ada92dcd469389a9309ffd13d148812282022-05-31 22:15:38180 days 21 hrs ago Akumu Dragonz: AKUMU TokenAkumu Dragonz: Deployer282.399 Ether
0x131582431660bba1f5a71122f84ef7bee8f669c93736eaaff18e4e0a0b86e272148809342022-05-31 21:04:56180 days 22 hrs ago Akumu Dragonz: AKUMU TokenAkumu Dragonz: Deployer213.278 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AkumuDragonz

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : AkumuDragonz.sol
/*

  ╗▄▄▄▄▄▄▄▄▄▄▄▄▄  ╓╥       _ _     ,▄      ,▄  ▄▄▄µ╓,,,,,╓╥▄▄▄  _ ▄─      ╓µ
  _█████████████⌐ ╫██µ _,▄▓███▌   ██▌     ███  ███████████████  ╫██⌐    ▐██▌
     ███     ▓██⌐ ╫██▌▓████▀╙__  _██▌    _███  ███_  ███__ ███  ╫██⌐    ╟██▌
 _,,,███,,,,,▓██⌐ ╫██████▄▄,     _██▌    _███  ███   ███   ███  ╫██⌐    ╟██▌
  ╙█████████████⌐ ╫██▌▀▀█████Q   _██▌    _███  ███   ███   ███  ╫██⌐    ╟██▌
   __███_    ▓██⌐ ╫██µ     ███▄  _██▌    _███  ███   ███   ███  ╫██⌐    ╟██▌
   ╓███▀     ▓██⌐ ╫██µ      ███  ╥███▄▄▄▄▄███_ ███   █▀▀   ███ .▓██▄▄▄▄▄▓██▌_
  ╙███─      ╙▀█⌐ ╫█▀       ╙██Γ ▓███████████╨ ╙██   _     ╙▀█_ ████████████

      █▀▄ █▀█ ▄▀█ █▀▀ █▀█ █▄░█ ▀█    █░█ █▄░█ █▀▀ █░█ ▄▀█ █ █▄░█ █▀▀ █▀▄
      █▄▀ █▀▄ █▀█ █▄█ █▄█ █░▀█ █▄    █▄█ █░▀█ █▄▄ █▀█ █▀█ █ █░▀█ ██▄ █▄▀

*/

// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;

import { ERC721A } from "erc721a/contracts/ERC721A.sol";
import { SignatureChecker } from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { BitMaps } from "@openzeppelin/contracts/utils/structs/BitMaps.sol";
import { ERC721Base } from "./ERC721Base.sol";
import { LoyalAkumuDragonz } from "./LoyalAkumuDragonz.sol";

/// @author frolic.eth
/// @title  Akumu Dragonz
/// @notice From the creators of Boryoku Dragonz. Akumu Dragonz can be minted
///         for free by burning their Solana Bloodmoon BOKU via the mint
///         website. Folks without Bloodmoon BOKU can mint for a fee during the
///         allowlist and public mint phases.
contract AkumuDragonz is ERC721Base, LoyalAkumuDragonz {

    enum MintPhase {
        OFF,
        MINT_PASS,
        ALLOWLIST,
        PUBLIC
    }

    struct MintPassBundle {
        uint256[] ids;
        address claimedBy;
    }

    uint256 public constant VAULT_SUPPLY = 200;
    uint256 public constant MINT_PASS_SUPPLY = 3300;

    MintPhase public currentMintPhase = MintPhase.OFF;
    address public mintSigner;
    uint256 public vaultMinted = 0;
    uint256 public mintPassMinted = 0;

    // mint pass ID => boolean
    BitMaps.BitMap internal usedMintPasses;

    event MintPhaseUpdated(MintPhase previousPhase, MintPhase newPhase);
    event MintSignerUpdated(address previousSigner, address newSigner);


    // ****************** //
    // *** INITIALIZE *** //
    // ****************** //

    constructor() ERC721Base("Akumu Dragonz", "AKUMU", 0.169 ether, 10_000) {
    }


    // ****************** //
    // *** CONDITIONS *** //
    // ****************** //

    error MintPhaseNotOpen(MintPhase expectedMintPhase);
    error InvalidMintPass();
    error MintPassAlreadyUsed(uint256 id);
    error MintSignerNotConfigured();
    error InvalidSignature();

    modifier requireMintPhase(MintPhase expectedMintPhase) {
        if (expectedMintPhase > currentMintPhase) {
            revert MintPhaseNotOpen(expectedMintPhase);
        }
        _;
    }

    modifier validateMintPass(MintPassBundle calldata mintPass, bytes memory signature) {
        if (mintPass.claimedBy != _msgSender()) {
            revert InvalidMintPass();
        }
        if (mintSigner == address(0)) {
            revert MintSignerNotConfigured();
        }
        bytes32 messageHash = ECDSA.toEthSignedMessageHash(abi.encode(mintPass));
        if (!SignatureChecker.isValidSignatureNow(mintSigner, messageHash, signature)) {
            revert InvalidSignature();
        }
        uint256 length = mintPass.ids.length;
        for (uint256 i = 0; i < length;) {
            uint256 id = mintPass.ids[i];
            if (id < 1 || id > 5000) {
                revert InvalidMintPass();
            }
            if (BitMaps.get(usedMintPasses, id)) {
                revert MintPassAlreadyUsed(id);
            }
            BitMaps.set(usedMintPasses, id);
            unchecked { ++i; }
        }
        _;
    }

    modifier validateAllowlist(bytes memory signature) {
        bytes32 messageHash = ECDSA.toEthSignedMessageHash(abi.encode(_msgSender()));
        if (!SignatureChecker.isValidSignatureNow(mintSigner, messageHash, signature)) {
            revert InvalidSignature();
        }
        _;
    }

    // Allow only one general sale mint (allowlist, public)
    modifier onlyOneGeneralSaleMint() {
        if (hasMintedInGeneralSale(_msgSender())) {
            revert MintLimitExceeded(1);
        }
        _;
        _setAux(_msgSender(), 1);
    }


    // ******************* //
    // *** BEFORE MINT *** //
    // ******************* //

    function isMintPassUsed(uint256 id) public view returns (bool) {
        return BitMaps.get(usedMintPasses, id);
    }

    function getUsedMintPasses(uint256[] memory ids) public view returns (bool[] memory results) {
        results = new bool[](ids.length);
        for (uint256 i = 0; i < ids.length; i++) {
            results[i] = BitMaps.get(usedMintPasses, ids[i]);
        }
        return results;
    }

    function hasMintedInGeneralSale(address minter) public view returns (bool) {
        return _getAux(minter) > 0;
    }

    function publicSupply() public view returns (uint256) {
        return MAX_SUPPLY - VAULT_SUPPLY - MINT_PASS_SUPPLY;
    }

    function publicMinted() public view returns (uint256) {
        return _totalMinted() - vaultMinted - mintPassMinted;
    }


    // ************ // 
    // *** MINT *** //
    // ************ //

    function vaultMint(uint256 numToBeMinted)
        external
        onlyOwner
        withinSupply(VAULT_SUPPLY, vaultMinted, numToBeMinted)
    {
        _mintMany(owner(), numToBeMinted);
        vaultMinted += numToBeMinted;
    }

    function passMint(MintPassBundle calldata mintPass, bytes memory signature)
        external
        requireMintPhase(MintPhase.MINT_PASS)
        withinSupply(MINT_PASS_SUPPLY, mintPassMinted, mintPass.ids.length)
        validateMintPass(mintPass, signature)
    {
        _mintMany(_msgSender(), mintPass.ids.length);
        mintPassMinted += mintPass.ids.length;
    }

    function allowlistMint(uint256 numToBeMinted, bytes memory signature)
        external
        payable
        requireMintPhase(MintPhase.ALLOWLIST)
        withinSupply(publicSupply(), publicMinted(), numToBeMinted)
        onlyOneGeneralSaleMint
        hasExactPayment(numToBeMinted)
        validateAllowlist(signature)
    {
        _mintMany(_msgSender(), numToBeMinted);
    }

    function publicMint(uint256 numToBeMinted)
        external
        payable
        requireMintPhase(MintPhase.PUBLIC)
        withinSupply(publicSupply(), publicMinted(), numToBeMinted)
        onlyOneGeneralSaleMint
        hasExactPayment(numToBeMinted)
    {
        _mintMany(_msgSender(), numToBeMinted);
    }


    // ****************** //
    // *** AFTER MINT *** //
    // ****************** //

    function _beforeTokenTransfers(address from, address to, uint256 tokenId, uint256 quantity) internal override(ERC721A, LoyalAkumuDragonz) {
        super._beforeTokenTransfers(from, to, tokenId, quantity);
    }


    // ************* //
    // *** ADMIN *** //
    // ************* //

    function setMintSigner(address signer) external onlyOwner {
        emit MintSignerUpdated(mintSigner, signer);
        mintSigner = signer;
    }

    function setMintPhase(MintPhase phase) external onlyOwner {
        emit MintPhaseUpdated(currentMintPhase, phase);
        currentMintPhase = phase;
    }

    // Some time after the mint, allow minting out the rest of the tokens to
    // the vault. This mostly takes care of unused mint passes.
    function vaultRemainingSupply(uint256 numToBeMinted)
        external
        onlyOwner
    {
        _mintMany(owner(), numToBeMinted);
        vaultMinted += numToBeMinted;
    }
}

File 2 of 17 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // 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 tokenId of the next token 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`
    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 => address) private _tokenApprovals;

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

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

    /**
     * @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 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 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 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 returns (uint256) {
        return _burnCounter;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    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: 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.
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view 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 auxillary 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 auxillary 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 {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        assembly { // Cast aux without masking.
            auxCasted := aux
        }
        packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    /**
     * 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 ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

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

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

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

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

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    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, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev Casts the address to uint256 without masking.
     */
    function _addressToUint256(address value) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

    /**
     * @dev Casts the boolean to uint256 without branching.
     */
    function _boolToUint256(bool value) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = address(uint160(_packedOwnershipOf(tokenId)));
        if (to == owner) revert ApprovalToCurrentOwner();

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

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

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @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 (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, 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.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _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] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.code.length != 0) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @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.
     */
    function _mint(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _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] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
            isApprovedForAll(from, _msgSenderERC721A()) ||
            getApproved(tokenId) == _msgSenderERC721A());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        delete _tokenApprovals[tokenId];

        // 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] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_NEXT_INITIALIZED;

            // 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 `_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));

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
                isApprovedForAll(from, _msgSenderERC721A()) ||
                getApproved(tokenId) == _msgSenderERC721A());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner.
        delete _tokenApprovals[tokenId];

        // 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] =
                _addressToUint256(from) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_BURNED | 
                BITMASK_NEXT_INITIALIZED;

            // 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++;
        }
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool 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))
                }
            }
        }
    }

    /**
     * @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 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 returns (string memory ptr) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), 
            // but we allocate 128 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: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

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

            // We write the string from the rightmost digit to the leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // Costs a bit more than early returning for the zero case,
            // but cheaper in terms of deployment and overall runtime costs.
            for { 
                // Initialize and perform the first pass without check.
                let temp := value
                // Move the pointer 1 byte leftwards to point to an empty character slot.
                ptr := sub(ptr, 1)
                // Write the character to the pointer. 48 is the ASCII index of '0'.
                mstore8(ptr, add(48, mod(temp, 10)))
                temp := div(temp, 10)
            } temp { 
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
            } { // Body of the for loop.
                ptr := sub(ptr, 1)
                mstore8(ptr, add(48, mod(temp, 10)))
            }
            
            let length := sub(end, ptr)
            // Move the pointer 32 bytes leftwards to make room for the length.
            ptr := sub(ptr, 32)
            // Store the length.
            mstore(ptr, length)
        }
    }
}

File 3 of 17 : SignatureChecker.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/SignatureChecker.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";
import "../Address.sol";
import "../../interfaces/IERC1271.sol";

/**
 * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
 * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like
 * Argent and Gnosis Safe.
 *
 * _Available since v4.1._
 */
library SignatureChecker {
    /**
     * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
     * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.
     *
     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
     * change through time. It could return true at block N and false at block N+1 (or the opposite).
     */
    function isValidSignatureNow(
        address signer,
        bytes32 hash,
        bytes memory signature
    ) internal view returns (bool) {
        (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);
        if (error == ECDSA.RecoverError.NoError && recovered == signer) {
            return true;
        }

        (bool success, bytes memory result) = signer.staticcall(
            abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)
        );
        return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271.isValidSignature.selector);
    }
}

File 4 of 17 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 5 of 17 : BitMaps.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/BitMaps.sol)
pragma solidity ^0.8.0;

/**
 * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.
 * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].
 */
library BitMaps {
    struct BitMap {
        mapping(uint256 => uint256) _data;
    }

    /**
     * @dev Returns whether the bit at `index` is set.
     */
    function get(BitMap storage bitmap, uint256 index) internal view returns (bool) {
        uint256 bucket = index >> 8;
        uint256 mask = 1 << (index & 0xff);
        return bitmap._data[bucket] & mask != 0;
    }

    /**
     * @dev Sets the bit at `index` to the boolean `value`.
     */
    function setTo(
        BitMap storage bitmap,
        uint256 index,
        bool value
    ) internal {
        if (value) {
            set(bitmap, index);
        } else {
            unset(bitmap, index);
        }
    }

    /**
     * @dev Sets the bit at `index`.
     */
    function set(BitMap storage bitmap, uint256 index) internal {
        uint256 bucket = index >> 8;
        uint256 mask = 1 << (index & 0xff);
        bitmap._data[bucket] |= mask;
    }

    /**
     * @dev Unsets the bit at `index`.
     */
    function unset(BitMap storage bitmap, uint256 index) internal {
        uint256 bucket = index >> 8;
        uint256 mask = 1 << (index & 0xff);
        bitmap._data[bucket] &= ~mask;
    }
}

File 6 of 17 : ERC721Base.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;

import { ERC721A } from "erc721a/contracts/ERC721A.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC2981, IERC165 } from "@openzeppelin/contracts/interfaces/IERC2981.sol";
import { IRenderer } from "./IRenderer.sol";

/// @author frolic.eth
/// @title  ERC721 base contract
/// @notice ERC721-specific functionality to keep the actual NFT contract more
///         readable and focused on the mint/project mechanics.
abstract contract ERC721Base is ERC721A, Ownable, IERC2981 {

    uint256 public immutable PRICE;
    uint256 public immutable MAX_SUPPLY;
    uint256 public immutable ROYALTY = 500;

    IRenderer public renderer;
    string public baseTokenURI;

    event Initialized();
    event RendererUpdated(IRenderer previousRenderer, IRenderer newRenderer);
    event BaseTokenURIUpdated(string previousBaseTokenURI, string newBaseTokenURI);


    // ****************** //
    // *** INITIALIZE *** //
    // ****************** //

    constructor(string memory name, string memory symbol, uint256 price, uint256 maxSupply) ERC721A(name, symbol) {
        PRICE = price;
        MAX_SUPPLY = maxSupply;
        emit Initialized();
    }

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

    function totalMinted() public view returns (uint256) {
        return _totalMinted();
    }


    // ****************** //
    // *** CONDITIONS *** //
    // ****************** //

    error MintLimitExceeded(uint256 limit);
    error MintSupplyExceeded(uint256 supply);
    error WrongPayment();

    modifier withinMintLimit(uint256 limit, uint256 numToBeMinted) {
        if (_numberMinted(_msgSender()) + numToBeMinted > limit) {
            revert MintLimitExceeded(limit);
        }
        _;
    }

    modifier withinSupply(uint256 supply, uint256 numMinted, uint256 numToBeMinted) {
        if (numMinted + numToBeMinted > supply) {
            revert MintSupplyExceeded(supply);
        }
        _;
    }

    modifier withinMaxSupply(uint256 numToBeMinted) {
        if (_totalMinted() + numToBeMinted > MAX_SUPPLY) {
            revert MintSupplyExceeded(MAX_SUPPLY);
        }
        _;
    }

    modifier hasExactPayment(uint256 numToBeMinted) {
        if (msg.value != PRICE * numToBeMinted) {
            revert WrongPayment();
        }
        _;
    }


    // ************ //
    // *** MINT *** //
    // ************ //

    function _mintMany(address to, uint256 numToBeMinted) internal {
        _mintMany(to, numToBeMinted, "");
    }

    function _mintMany(address to, uint256 numToBeMinted, bytes memory data)
        internal
        withinMaxSupply(numToBeMinted)
    {
        uint256 batchSize = 10;
        uint256 length = numToBeMinted / batchSize;
        for (uint256 i = 0; i < length;) {
            _safeMint(to, batchSize, data);
            unchecked { ++i; }
        }
        if (numToBeMinted % batchSize > 0) {
            _safeMint(to, numToBeMinted % batchSize, data);
        }
    }


    // ****************** //
    // *** AFTER MINT *** //
    // ****************** //

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

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        if (address(renderer) != address(0)) {
            return renderer.tokenURI(tokenId);
        }
        return super.tokenURI(tokenId);
    }


    // ***************** //
    // *** ROYALTIES *** //
    // ***************** //

    function supportsInterface(bytes4 _interfaceId) public view override(ERC721A, IERC165) returns (bool) {
        return _interfaceId == type(IERC2981).interfaceId || super.supportsInterface(_interfaceId);
    }

    function royaltyInfo(uint256, uint256 salePrice) external view returns (address, uint256) {
        return (address(this), (salePrice * ROYALTY) / 10000);
    }


    // ************* //
    // *** ADMIN *** //
    // ************* //

    function setRenderer(IRenderer _renderer) external onlyOwner {
        emit RendererUpdated(renderer, _renderer);
        renderer = _renderer;
    }

    function setBaseTokenURI(string calldata _baseTokenURI) external onlyOwner {
        emit BaseTokenURIUpdated(baseTokenURI, _baseTokenURI);
        baseTokenURI = _baseTokenURI;
    }

    function withdrawAll() external {
        require(address(this).balance > 0, "Zero balance");
        (bool sent,) = owner().call{value: address(this).balance}("");
        require(sent, "Failed to withdraw");
    }

    function withdrawAllERC20(IERC20 token) external {
        token.transfer(owner(), token.balanceOf(address(this)));
    }

    // Can be run any time after mint to optimize gas for future transfers
    function normalizeOwnership(uint256 startTokenId, uint256 quantity) external {
        for (uint256 i = 0; i < quantity; i++) {
            _initializeOwnershipAt(startTokenId + i);
        }
    }
}

File 7 of 17 : LoyalAkumuDragonz.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;

import { SignatureChecker } from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { BitMaps } from "@openzeppelin/contracts/utils/structs/BitMaps.sol";
import { ERC721Base } from "./ERC721Base.sol";

/// @author frolic.eth
/// @title  Akumu Dragonz loyalty
/// @notice Inspired by Corruptions' insight score, this calculates a loyalty
///         score based on how long an NFT has been owned by the current owner.
///         This is a more user-friendly and marketplace-friendly version of
///         staking. We'll use this score later to award long-term holders.
/// @dev    See https://etherscan.io/address/0x5bdf397bb2912859dbd8011f320a222f79a28d2e#code
abstract contract LoyalAkumuDragonz is ERC721Base {

    uint256 public constant LOYALTY_MAX_MULTIPLIER = 24;
    uint256 public loyaltyStartTimestamp;
    // token ID => loyalty
    mapping (uint256 => uint256) public savedLoyalty;

    error LoyaltyAlreadyStarted();

    function startLoyalty()
        external
        onlyOwner
    {
        if (loyaltyStartTimestamp != 0) {
            revert LoyaltyAlreadyStarted();
        }
        loyaltyStartTimestamp = block.timestamp;
    }

    function loyalty(uint256 tokenId) public view returns (uint256) {
        if (loyaltyStartTimestamp == 0) {
            return 0;
        }

        uint256 start = _ownershipOf(tokenId).startTimestamp;
        if (start == 0) {
            return 0;
        }
        if (start < loyaltyStartTimestamp) {
            start = loyaltyStartTimestamp;
        }

        uint256 delta = block.timestamp - start;
        uint256 multiplier = delta / 690_000;
        if (multiplier > LOYALTY_MAX_MULTIPLIER) {
            multiplier = LOYALTY_MAX_MULTIPLIER;
        }
        uint256 total = savedLoyalty[tokenId] + (delta * (multiplier + 1) / 10_000);
        if (total < 1) {
            total = 1;
        }
        return total;
    }

    function saveLoyalty(uint256 tokenId) private {
        savedLoyalty[tokenId] = loyalty(tokenId);
    }

    function _beforeTokenTransfers(address from, address to, uint256 tokenId, uint256 quantity) internal virtual override {
        super._beforeTokenTransfers(from, to, tokenId, quantity);

        for (uint currTokenId = tokenId; currTokenId < tokenId + quantity; currTokenId++) {
            saveLoyalty(currTokenId);
        }
    }
}

File 8 of 17 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of an ERC721A compliant contract.
 */
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();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

    /**
     * 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();

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     *
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);

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

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

    // ==============================
    //            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`.
     *
     * 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 calldata data
    ) external;

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

    /**
     * @dev Transfers `tokenId` token 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);
}

File 9 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 10 of 17 : IERC1271.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC1271 standard signature validation method for
 * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
 *
 * _Available since v4.1._
 */
interface IERC1271 {
    /**
     * @dev Should return whether the signature provided is valid for the provided data
     * @param hash      Hash of the data to be signed
     * @param signature Signature byte array associated with _data
     */
    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}

File 11 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

File 12 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 13 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 14 of 17 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 15 of 17 : IRenderer.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;

/// @author frolic.eth
/// @title  Upgradeable renderer interface
/// @notice This leaves room for us to change how we return token metadata and
///         unlocks future capability like fully on-chain storage.
interface IRenderer {
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "ds-test/=lib/ds-test/src/",
    "erc721a/=lib/erc721a/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "src/=src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "none"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london"
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidMintPass","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"LoyaltyAlreadyStarted","type":"error"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"MintLimitExceeded","type":"error"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"MintPassAlreadyUsed","type":"error"},{"inputs":[{"internalType":"enum AkumuDragonz.MintPhase","name":"expectedMintPhase","type":"uint8"}],"name":"MintPhaseNotOpen","type":"error"},{"inputs":[],"name":"MintSignerNotConfigured","type":"error"},{"inputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"name":"MintSupplyExceeded","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","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":"WrongPayment","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":false,"internalType":"string","name":"previousBaseTokenURI","type":"string"},{"indexed":false,"internalType":"string","name":"newBaseTokenURI","type":"string"}],"name":"BaseTokenURIUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum AkumuDragonz.MintPhase","name":"previousPhase","type":"uint8"},{"indexed":false,"internalType":"enum AkumuDragonz.MintPhase","name":"newPhase","type":"uint8"}],"name":"MintPhaseUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousSigner","type":"address"},{"indexed":false,"internalType":"address","name":"newSigner","type":"address"}],"name":"MintSignerUpdated","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":false,"internalType":"contract IRenderer","name":"previousRenderer","type":"address"},{"indexed":false,"internalType":"contract IRenderer","name":"newRenderer","type":"address"}],"name":"RendererUpdated","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":"LOYALTY_MAX_MULTIPLIER","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":"MINT_PASS_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":"ROYALTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VAULT_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numToBeMinted","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"allowlistMint","outputs":[],"stateMutability":"payable","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":[],"name":"currentMintPhase","outputs":[{"internalType":"enum AkumuDragonz.MintPhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"getUsedMintPasses","outputs":[{"internalType":"bool[]","name":"results","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"hasMintedInGeneralSale","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":"id","type":"uint256"}],"name":"isMintPassUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"loyalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"loyaltyStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPassMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTokenId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"normalizeOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"claimedBy","type":"address"}],"internalType":"struct AkumuDragonz.MintPassBundle","name":"mintPass","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"passMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numToBeMinted","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"contract IRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"savedLoyalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum AkumuDragonz.MintPhase","name":"phase","type":"uint8"}],"name":"setMintPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"setMintSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRenderer","name":"_renderer","type":"address"}],"name":"setRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startLoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","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":[{"internalType":"uint256","name":"numToBeMinted","type":"uint256"}],"name":"vaultMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numToBeMinted","type":"uint256"}],"name":"vaultRemainingSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawAllERC20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040526101f460c052600d805460ff191690556000600e819055600f553480156200002b57600080fd5b506040518060400160405280600d81526020016c20b5bab6ba90223930b3b7b73d60991b81525060405180604001604052806005815260200164414b554d5560d81b815250670258689ac70a800061271083838160029080519060200190620000969291906200014e565b508051620000ac9060039060208401906200014e565b5050600160005550620000bf33620000fc565b608082905260a08190526040517f5daa87a0e9463431830481fd4b6e3403442dfb9a12b9c07597e9f61d50b633c890600090a15050505062000230565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200015c90620001f4565b90600052602060002090601f016020900481019282620001805760008555620001cb565b82601f106200019b57805160ff1916838001178555620001cb565b82800160010185558215620001cb579182015b82811115620001cb578251825591602001919060010190620001ae565b50620001d9929150620001dd565b5090565b5b80821115620001d95760008155600101620001de565b600181811c908216806200020957607f821691505b6020821081036200022a57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c0516133826200028a600039600081816106f40152610db001526000818161051e015281816111ca0152818161245401526124a001526000818161074801528181610c500152610eb001526133826000f3fe6080604052600436106102ff5760003560e01c8063715018a611610190578063a96499d3116100dc578063d7f7a74211610095578063e985e9c51161006f578063e985e9c514610929578063eef0dc7c14610949578063f17af48d14610969578063f2fde38b1461098e57600080fd5b8063d7f7a742146108de578063e4e57ea2146108f3578063e84a97281461090957600080fd5b8063a96499d314610826578063ab4c705214610846578063b5108bf114610873578063b88d4fde14610889578063c87b56dd146108a9578063d547cfb7146108c957600080fd5b80638d859f3e1161014957806395d89b411161012357806395d89b41146107c3578063a22cb465146107d8578063a2309ff8146107f8578063a4f4f8af1461081157600080fd5b80638d859f3e146107365780638da5cb5b1461076a5780638eb31bc71461078857600080fd5b8063715018a61461066b5780637b49d39d14610680578063853828b6146106ad578063857abbd4146106c25780638704a208146106e25780638ada6b0f1461071657600080fd5b806330176e131161024f57806352f0832a116102085780636352211e116101e25780636352211e146105eb57806369938b1a1461060b57806370a082311461062b57806370df623c1461064b57600080fd5b806352f0832a1461059657806356d3163d146105b65780635e84d723146105d657600080fd5b806330176e13146104cc57806331c07bbf146104ec57806332cb6b0c1461050c57806342842e0e1461054057806349545348146105605780635061ede11461058057600080fd5b806315c8f106116102bc578063200d070b11610296578063200d070b1461044557806323b872dd1461045a5780632a55205a1461047a5780632db11544146104b957600080fd5b806315c8f106146103ff57806317fc5d511461041257806318160ddd1461042857600080fd5b806301ffc9a71461030457806305e17ee41461033957806306fdde031461035c578063081812fc1461037e578063095ea7b3146103b65780630dd250e1146103d8575b600080fd5b34801561031057600080fd5b5061032461031f36600461292a565b6109ae565b60405190151581526020015b60405180910390f35b34801561034557600080fd5b5061034e601881565b604051908152602001610330565b34801561036857600080fd5b506103716109d9565b604051610330919061299f565b34801561038a57600080fd5b5061039e6103993660046129b2565b610a6b565b6040516001600160a01b039091168152602001610330565b3480156103c257600080fd5b506103d66103d13660046129f0565b610aaf565b005b3480156103e457600080fd5b50600d546103f29060ff1681565b6040516103309190612a54565b6103d661040d366004612b25565b610b81565b34801561041e57600080fd5b5061034e600e5481565b34801561043457600080fd5b50600154600054036000190161034e565b34801561045157600080fd5b506103d6610d43565b34801561046657600080fd5b506103d6610475366004612b6b565b610d94565b34801561048657600080fd5b5061049a610495366004612bac565b610da4565b604080516001600160a01b039093168352602083019190915201610330565b6103d66104c73660046129b2565b610deb565b3480156104d857600080fd5b506103d66104e7366004612bce565b610f0e565b3480156104f857600080fd5b506103d6610507366004612c3f565b610f80565b34801561051857600080fd5b5061034e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054c57600080fd5b506103d661055b366004612b6b565b611012565b34801561056c57600080fd5b5061034e61057b3660046129b2565b61102d565b34801561058c57600080fd5b5061034e600f5481565b3480156105a257600080fd5b506103d66105b1366004612bac565b6110fc565b3480156105c257600080fd5b506103d66105d1366004612c60565b61112b565b3480156105e257600080fd5b5061034e6111be565b3480156105f757600080fd5b5061039e6106063660046129b2565b6111fd565b34801561061757600080fd5b506103d66106263660046129b2565b611208565b34801561063757600080fd5b5061034e610646366004612c60565b611267565b34801561065757600080fd5b506103246106663660046129b2565b6112b5565b34801561067757600080fd5b506103d66112d8565b34801561068c57600080fd5b506106a061069b366004612c7d565b61130e565b6040516103309190612d16565b3480156106b957600080fd5b506103d66113de565b3480156106ce57600080fd5b506103d66106dd366004612c60565b6114c9565b3480156106ee57600080fd5b5061034e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561072257600080fd5b5060095461039e906001600160a01b031681565b34801561074257600080fd5b5061034e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561077657600080fd5b506008546001600160a01b031661039e565b34801561079457600080fd5b506103246107a3366004612c60565b6001600160a01b031660009081526005602052604090205460c01c151590565b3480156107cf57600080fd5b506103716115c5565b3480156107e457600080fd5b506103d66107f3366004612d6a565b6115d4565b34801561080457600080fd5b506000546000190161034e565b34801561081d57600080fd5b5061034e611669565b34801561083257600080fd5b506103d6610841366004612da3565b611688565b34801561085257600080fd5b5061034e6108613660046129b2565b600c6020526000908152604090205481565b34801561087f57600080fd5b5061034e600b5481565b34801561089557600080fd5b506103d66108a4366004612e04565b6118e6565b3480156108b557600080fd5b506103716108c43660046129b2565b611930565b3480156108d557600080fd5b506103716119be565b3480156108ea57600080fd5b5061034e60c881565b3480156108ff57600080fd5b5061034e610ce481565b34801561091557600080fd5b506103d6610924366004612c60565b611a4c565b34801561093557600080fd5b50610324610944366004612e6f565b611aea565b34801561095557600080fd5b506103d66109643660046129b2565b611b18565b34801561097557600080fd5b50600d5461039e9061010090046001600160a01b031681565b34801561099a57600080fd5b506103d66109a9366004612c60565b611bae565b60006001600160e01b0319821663152a902d60e11b14806109d357506109d382611c46565b92915050565b6060600280546109e890612e9d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1490612e9d565b8015610a615780601f10610a3657610100808354040283529160200191610a61565b820191906000526020600020905b815481529060010190602001808311610a4457829003601f168201915b5050505050905090565b6000610a7682611c94565b610a93576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610aba82611cc9565b9050806001600160a01b0316836001600160a01b031603610aee5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610b2557610b088133611aea565b610b25576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600d5460029060ff166003811115610b9b57610b9b612a1c565b816003811115610bad57610bad612a1c565b1115610bd75780604051631f1556bb60e11b8152600401610bce9190612a54565b60405180910390fd5b610bdf6111be565b610be7611669565b8482610bf38284612ee7565b1115610c155760405163abdee1e960e01b815260048101849052602401610bce565b3360009081526005602052604090205460c01c15610c4957604051637e0311c360e11b815260016004820152602401610bce565b85610c74817f0000000000000000000000000000000000000000000000000000000000000000612eff565b3414610c935760405163788a686f60e01b815260040160405180910390fd5b604080513360208201528791600091610cbc91015b604051602081830303815290604052611d3f565b600d54909150610cdb9061010090046001600160a01b03168284611d7a565b610cf857604051638baa579f60e01b815260040160405180910390fd5b610d02338a611ec6565b505050610d3b610d0f3390565b6001600160a01b0316600090815260056020526040902080546001600160c01b0316600160c01b179055565b505050505050565b6008546001600160a01b03163314610d6d5760405162461bcd60e51b8152600401610bce90612f1e565b600b5415610d8e576040516311c2c33160e31b815260040160405180910390fd5b42600b55565b610d9f838383611ee0565b505050565b60008030612710610dd57f000000000000000000000000000000000000000000000000000000000000000086612eff565b610ddf9190612f69565b915091505b9250929050565b600d5460039060ff1681811115610e0457610e04612a1c565b816003811115610e1657610e16612a1c565b1115610e375780604051631f1556bb60e11b8152600401610bce9190612a54565b610e3f6111be565b610e47611669565b8382610e538284612ee7565b1115610e755760405163abdee1e960e01b815260048101849052602401610bce565b3360009081526005602052604090205460c01c15610ea957604051637e0311c360e11b815260016004820152602401610bce565b84610ed4817f0000000000000000000000000000000000000000000000000000000000000000612eff565b3414610ef35760405163788a686f60e01b815260040160405180910390fd5b610efd3387611ec6565b50610f0733610d0f565b5050505050565b6008546001600160a01b03163314610f385760405162461bcd60e51b8152600401610bce90612f1e565b7f19c1a81f34d9a8d208a44017474815e9089aff4b57e461c08509577eea2c3900600a8383604051610f6c93929190612fa6565b60405180910390a1610d9f600a838361287b565b6008546001600160a01b03163314610faa5760405162461bcd60e51b8152600401610bce90612f1e565b600d546040517facd459c1a6312237f0ca9b96d819d3cf9f1e5e8569e6fbc841bde0d090dcbdab91610fe39160ff909116908490613063565b60405180910390a1600d805482919060ff1916600183600381111561100a5761100a612a1c565b021790555050565b610d9f838383604051806020016040528060008152506118e6565b6000600b5460000361104157506000919050565b600061104c83612092565b602001516001600160401b031690508060000361106c5750600092915050565b600b5481101561107b5750600b545b6000611087824261307e565b90506000611098620a875083612f69565b905060188111156110a7575060185b60006127106110b7836001612ee7565b6110c19085612eff565b6110cb9190612f69565b6000878152600c60205260409020546110e49190612ee7565b905060018110156110f3575060015b95945050505050565b60005b81811015610d9f576111196111148285612ee7565b6120f5565b8061112381613095565b9150506110ff565b6008546001600160a01b031633146111555760405162461bcd60e51b8152600401610bce90612f1e565b600954604080516001600160a01b03928316815291831660208301527f10e9b6d73105db46c6a41a698f35efb8e1688178fe274b7b21f0bdc792de3ea5910160405180910390a1600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ce46111ee60c87f000000000000000000000000000000000000000000000000000000000000000061307e565b6111f8919061307e565b905090565b60006109d382611cc9565b6008546001600160a01b031633146112325760405162461bcd60e51b8152600401610bce90612f1e565b61124d6112476008546001600160a01b031690565b82611ec6565b80600e600082825461125f9190612ee7565b909155505050565b60006001600160a01b038216611290576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b600881901c600090815260106020526040812054600160ff84161b1615156109d3565b6008546001600160a01b031633146113025760405162461bcd60e51b8152600401610bce90612f1e565b61130c6000612125565b565b606081516001600160401b0381111561132957611329612a62565b604051908082528060200260200182016040528015611352578160200160208202803683370190505b50905060005b82518110156113d8576113a46010848381518110611378576113786130ae565b6020026020010151600881901c600090815260208390526040902054600160ff83161b16151592915050565b8282815181106113b6576113b66130ae565b91151560209283029190910190910152806113d081613095565b915050611358565b50919050565b6000471161141d5760405162461bcd60e51b815260206004820152600c60248201526b5a65726f2062616c616e636560a01b6044820152606401610bce565b60006114316008546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d806000811461147b576040519150601f19603f3d011682016040523d82523d6000602084013e611480565b606091505b50509050806114c65760405162461bcd60e51b81526020600482015260126024820152714661696c656420746f20776974686472617760701b6044820152606401610bce565b50565b806001600160a01b031663a9059cbb6114ea6008546001600160a01b031690565b6040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa15801561152e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155291906130c4565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561159d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c191906130dd565b5050565b6060600380546109e890612e9d565b336001600160a01b038316036115fd5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000600f54600e5461167e6000546000190190565b6111ee919061307e565b600d5460019060ff1660038111156116a2576116a2612a1c565b8160038111156116b4576116b4612a1c565b11156116d55780604051631f1556bb60e11b8152600401610bce9190612a54565b600f54610ce4906116e685806130fa565b9050826116f38284612ee7565b11156117155760405163abdee1e960e01b815260048101849052602401610bce565b8585336117286040840160208501612c60565b6001600160a01b03161461174f5760405163334ebc8b60e01b815260040160405180910390fd5b600d5461010090046001600160a01b031661177d57604051632f979ae160e01b815260040160405180910390fd5b600061179383604051602001610ca89190613143565b600d549091506117b29061010090046001600160a01b03168284611d7a565b6117cf57604051638baa579f60e01b815260040160405180910390fd5b60006117db84806130fa565b9050905060005b818110156118a25760006117f686806130fa565b83818110611806576118066130ae565b905060200201359050600181108061181f575061138881115b1561183d5760405163334ebc8b60e01b815260040160405180910390fd5b600881901c600090815260106020526040902054600160ff83161b161561187a57604051638e970e6f60e01b815260048101829052602401610bce565b600881901c60009081526010602052604090208054600160ff84161b179055506001016117e2565b506118b8336118b18c806130fa565b9050611ec6565b6118c28a806130fa565b9050600f60008282546118d59190612ee7565b909155505050505050505050505050565b6118f1848484611ee0565b6001600160a01b0383163b1561192a5761190d84848484612177565b61192a576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6009546060906001600160a01b0316156119b55760095460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd90602401600060405180830381865afa15801561198d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109d391908101906131e5565b6109d382612263565b600a80546119cb90612e9d565b80601f01602080910402602001604051908101604052809291908181526020018280546119f790612e9d565b8015611a445780601f10611a1957610100808354040283529160200191611a44565b820191906000526020600020905b815481529060010190602001808311611a2757829003601f168201915b505050505081565b6008546001600160a01b03163314611a765760405162461bcd60e51b8152600401610bce90612f1e565b600d54604080516001600160a01b036101009093048316815291831660208301527ff1a1a44dd0ea738bef9da978a1f3794d0d148ca63678243b1bdb8a4bccbe3b40910160405180910390a1600d80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6008546001600160a01b03163314611b425760405162461bcd60e51b8152600401610bce90612f1e565b600e5460c8908282611b548284612ee7565b1115611b765760405163abdee1e960e01b815260048101849052602401610bce565b611b91611b8b6008546001600160a01b031690565b85611ec6565b83600e6000828254611ba39190612ee7565b909155505050505050565b6008546001600160a01b03163314611bd85760405162461bcd60e51b8152600401610bce90612f1e565b6001600160a01b038116611c3d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bce565b6114c681612125565b60006301ffc9a760e01b6001600160e01b031983161480611c7757506380ac58cd60e01b6001600160e01b03198316145b806109d35750506001600160e01b031916635b5e139f60e01b1490565b600081600111158015611ca8575060005482105b80156109d3575050600090815260046020526040902054600160e01b161590565b60008180600111611d2657600054811015611d265760008181526004602052604081205490600160e01b82169003611d24575b80600003611d1d575060001901600081815260046020526040902054611cfc565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b6000611d4b82516122e6565b82604051602001611d5d929190613252565b604051602081830303815290604052805190602001209050919050565b6000806000611d8985856123e6565b90925090506000816004811115611da257611da2612a1c565b148015611dc05750856001600160a01b0316826001600160a01b0316145b15611dd057600192505050611d1d565b600080876001600160a01b0316631626ba7e60e01b8888604051602401611df89291906132ad565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051611e3691906132c6565b600060405180830381855afa9150503d8060008114611e71576040519150601f19603f3d011682016040523d82523d6000602084013e611e76565b606091505b5091509150818015611e89575080516020145b8015611eba57508051630b135d3f60e11b90611eae90830160209081019084016132e2565b6001600160e01b031916145b98975050505050505050565b6115c1828260405180602001604052806000815250612451565b6000611eeb82611cc9565b9050836001600160a01b0316816001600160a01b031614611f1e5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480611f3c5750611f3c8533611aea565b80611f57575033611f4c84610a6b565b6001600160a01b0316145b905080611f7757604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416611f9e57604051633a954ecd60e21b815260040160405180910390fd5b611fab8585856001612521565b600083815260066020908152604080832080546001600160a01b03191690556001600160a01b038881168452600583528184208054600019019055871683528083208054600101905585835260049091528120600160e11b4260a01b871781179091558316900361204c5760018301600081815260046020526040812054900361204a57600054811461204a5760008181526004602052604090208390555b505b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610f07565b60408051606081018252600080825260208201819052918101919091526109d36120bb83611cc9565b604080516060810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b90921615159082015290565b60008181526004602052604081205490036114c65761211381611cc9565b60008281526004602052604090205550565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906121ac9033908990889088906004016132ff565b6020604051808303816000875af19250505080156121e7575060408051601f3d908101601f191682019092526121e4918101906132e2565b60015b612245573d808015612215576040519150601f19603f3d011682016040523d82523d6000602084013e61221a565b606091505b50805160000361223d576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606061226e82611c94565b61228b57604051630a14c4b560e41b815260040160405180910390fd5b600061229561252d565b905080516000036122b55760405180602001604052806000815250611d1d565b806122bf8461253c565b6040516020016122d0929190613332565b6040516020818303038152906040529392505050565b60608160000361230d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612337578061232181613095565b91506123309050600a83612f69565b9150612311565b6000816001600160401b0381111561235157612351612a62565b6040519080825280601f01601f19166020018201604052801561237b576020820181803683370190505b5090505b841561225b5761239060018361307e565b915061239d600a86613361565b6123a8906030612ee7565b60f81b8183815181106123bd576123bd6130ae565b60200101906001600160f81b031916908160001a9053506123df600a86612f69565b945061237f565b600080825160410361241c5760208301516040840151606085015160001a6124108782858561258b565b94509450505050610de4565b8251604003612445576020830151604084015161243a868383612678565b935093505050610de4565b50600090506002610de4565b817f0000000000000000000000000000000000000000000000000000000000000000816124816000546000190190565b61248b9190612ee7565b11156124cc5760405163abdee1e960e01b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602401610bce565b600a60006124da8286612f69565b905060005b818110156124fa576124f28784876126b1565b6001016124df565b5060006125078387613361565b1115610d3b57610d3b8661251b8488613361565b866126b1565b61192a84848484612832565b6060600a80546109e890612e9d565b604080516080810191829052607f0190826030600a8206018353600a90045b801561257957600183039250600a81066030018353600a900461255b565b50819003601f19909101908152919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156125c2575060009050600361266f565b8460ff16601b141580156125da57508460ff16601c14155b156125eb575060009050600461266f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561263f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166126685760006001925092505061266f565b9150600090505b94509492505050565b6000806001600160ff1b0383168161269560ff86901c601b612ee7565b90506126a38782888561258b565b935093505050935093915050565b6000546001600160a01b0384166126da57604051622e076360e81b815260040160405180910390fd5b826000036126fb5760405163b562e8dd60e01b815260040160405180910390fd5b6127086000858386612521565b6001600160a01b03841660008181526005602090815260408083208054680100000000000000018902019055848352600490915290204260a01b86176001861460e11b1790558190818501903b156127dd575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46127a66000878480600101955087612177565b6127c3576040516368d2bf6b60e11b815260040160405180910390fd5b80821061275b5782600054146127d857600080fd5b612822565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106127de575b50600090815561192a9085838684565b815b61283e8284612ee7565b811015610f075761284e81612860565b8061285881613095565b915050612834565b6128698161102d565b6000918252600c602052604090912055565b82805461288790612e9d565b90600052602060002090601f0160209004810192826128a957600085556128ef565b82601f106128c25782800160ff198235161785556128ef565b828001600101855582156128ef579182015b828111156128ef5782358255916020019190600101906128d4565b506128fb9291506128ff565b5090565b5b808211156128fb5760008155600101612900565b6001600160e01b0319811681146114c657600080fd5b60006020828403121561293c57600080fd5b8135611d1d81612914565b60005b8381101561296257818101518382015260200161294a565b8381111561192a5750506000910152565b6000815180845261298b816020860160208601612947565b601f01601f19169290920160200192915050565b602081526000611d1d6020830184612973565b6000602082840312156129c457600080fd5b5035919050565b6001600160a01b03811681146114c657600080fd5b80356129eb816129cb565b919050565b60008060408385031215612a0357600080fd5b8235612a0e816129cb565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60048110612a5057634e487b7160e01b600052602160045260246000fd5b9052565b602081016109d38284612a32565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612aa057612aa0612a62565b604052919050565b60006001600160401b03821115612ac157612ac1612a62565b50601f01601f191660200190565b600082601f830112612ae057600080fd5b8135612af3612aee82612aa8565b612a78565b818152846020838601011115612b0857600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612b3857600080fd5b8235915060208301356001600160401b03811115612b5557600080fd5b612b6185828601612acf565b9150509250929050565b600080600060608486031215612b8057600080fd5b8335612b8b816129cb565b92506020840135612b9b816129cb565b929592945050506040919091013590565b60008060408385031215612bbf57600080fd5b50508035926020909101359150565b60008060208385031215612be157600080fd5b82356001600160401b0380821115612bf857600080fd5b818501915085601f830112612c0c57600080fd5b813581811115612c1b57600080fd5b866020828501011115612c2d57600080fd5b60209290920196919550909350505050565b600060208284031215612c5157600080fd5b813560048110611d1d57600080fd5b600060208284031215612c7257600080fd5b8135611d1d816129cb565b60006020808385031215612c9057600080fd5b82356001600160401b0380821115612ca757600080fd5b818501915085601f830112612cbb57600080fd5b813581811115612ccd57612ccd612a62565b8060051b9150612cde848301612a78565b8181529183018401918481019088841115612cf857600080fd5b938501935b83851015611eba57843582529385019390850190612cfd565b6020808252825182820181905260009190848201906040850190845b81811015612d50578351151583529284019291840191600101612d32565b50909695505050505050565b80151581146114c657600080fd5b60008060408385031215612d7d57600080fd5b8235612d88816129cb565b91506020830135612d9881612d5c565b809150509250929050565b60008060408385031215612db657600080fd5b82356001600160401b0380821115612dcd57600080fd5b9084019060408287031215612de157600080fd5b90925060208401359080821115612df757600080fd5b50612b6185828601612acf565b60008060008060808587031215612e1a57600080fd5b8435612e25816129cb565b93506020850135612e35816129cb565b92506040850135915060608501356001600160401b03811115612e5757600080fd5b612e6387828801612acf565b91505092959194509250565b60008060408385031215612e8257600080fd5b8235612e8d816129cb565b91506020830135612d98816129cb565b600181811c90821680612eb157607f821691505b6020821081036113d857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115612efa57612efa612ed1565b500190565b6000816000190483118215151615612f1957612f19612ed1565b500290565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601260045260246000fd5b600082612f7857612f78612f53565b500490565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600080855481600182811c915080831680612fc657607f831692505b60208084108203612fe557634e487b7160e01b86526022600452602486fd5b6040880184905260608801828015613004576001811461301557613040565b60ff19871682528282019750613040565b60008d81526020902060005b8781101561303a57815484820152908601908401613021565b83019850505b5050878603818901525050505050613059818587612f7d565b9695505050505050565b604081016130718285612a32565b611d1d6020830184612a32565b60008282101561309057613090612ed1565b500390565b6000600182016130a7576130a7612ed1565b5060010190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156130d657600080fd5b5051919050565b6000602082840312156130ef57600080fd5b8151611d1d81612d5c565b6000808335601e1984360301811261311157600080fd5b8301803591506001600160401b0382111561312b57600080fd5b6020019150600581901b3603821315610de457600080fd5b6020815260008235601e1984360301811261315d57600080fd5b830180356001600160401b0381111561317557600080fd5b8060051b80360386131561318857600080fd5b60406020860152606085018290526001600160fb1b038211156131aa57600080fd5b8060208401608087013760808186010192505050600081526131ce602085016129e0565b6001600160a01b0381166040850152509392505050565b6000602082840312156131f757600080fd5b81516001600160401b0381111561320d57600080fd5b8201601f8101841361321e57600080fd5b805161322c612aee82612aa8565b81815285602083850101111561324157600080fd5b6110f3826020830160208601612947565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161328a81601a850160208801612947565b8351908301906132a181601a840160208801612947565b01601a01949350505050565b82815260406020820152600061225b6040830184612973565b600082516132d8818460208701612947565b9190910192915050565b6000602082840312156132f457600080fd5b8151611d1d81612914565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061305990830184612973565b60008351613344818460208801612947565b835190830190613358818360208801612947565b01949350505050565b60008261337057613370612f53565b50069056fea164736f6c634300080d000a

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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