ETH Price: $3,404.10 (+2.08%)

Pawn Bots (BOTS)
 

Overview

TokenID

3258

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Nostalgic collateral with a DeFi a Hifi.Finance Ecosystem project.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
PawnBots

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 14 : PawnBots.sol
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity >=0.8.4;

import { VRFConsumerBase } from "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { Address } from "@openzeppelin/contracts/utils/Address.sol";
import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { ERC721A } from "erc721a/contracts/ERC721A.sol";

import { IPawnBots } from "./IPawnBots.sol";

error PawnBots__AccountNotAllowed();
error PawnBots__MaxPerAccountExceeded();
error PawnBots__MintNotActive();
error PawnBots__MintNotPaused();
error PawnBots__MintPhaseMismatch();
error PawnBots__NonexistentToken();
error PawnBots__NotEnoughMftBalance();
error PawnBots__OffsetAlreadySet();
error PawnBots__RandomnessAlreadyRequested();
error PawnBots__RemainingMintsExceeded();
error PawnBots__RemainingReserveExceeded();
error PawnBots__TooEarlyToReveal();
error PawnBots__VrfRequestIdMismatch();

//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;C1.;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;,G8t;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Gt.;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;L:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;i:;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;,t;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,,,,,,,iiifffffLLLLLLGCLL;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;.f;;;,C0888888800000000000000000000GGGGGGGGCCCCCCCLLLLLCCCf;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;.f.;;LGG0GGCLLLLLLLLLLfLLfffffttt11iiiiiiiiiiiiiiiiiiiiiLCf.;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;f,;;CLCGGC1i1111ttttttt1111111iiiiiiiiiiiiii11iiiiiiiiitCf.;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;t,;LLLCGGCi;;;iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii1LL.;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;t,;CLLCGGCi;iiiiiiiiiiiiiiiiiiiiiiiiiii;iiiiiiiiiiiiiiiiLL,;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;1itLLLLGGCi;ii;iiiiiiiii;;iiiiiiiiiiiii;iiiiiiiiii;iiiiiLL,;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;LfLLLLGGCi;ii;;;iiiiiiiii;;ii;iiiiiiiiii;iii;;;ii;i;ii:if:;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;.:1f1tLLLCCC1;i;;;;iiiiii::1:,;i;iiiiiii;;;;;;;;;;i;;;...;;i;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;.::1LL;1LLCCC1;;;;;;ii;;i;.;;;;,;;;iiiii;;i;;;;;;;;;;;;.;;;;;i;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;,:,;tG1:fLCCC1;;;;;;iiiii;.;;;;.;;;iiii;;i;;;;;;;;;;;;;.;;;;:i;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;,::::11,1LCCCt;;;;;;;;i;;i,;;;;.;;;iiiiiiii;;;;;;;;;iii;::,:ti.;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;,:::,:i,;LLCCt;;;;;;;;;;;i;::::;;;;;;;;i;;;;;;;;;;;;ii;ii;;tL1.;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;,:::,:i,;LLCCf;;;;;;;;;;;;;i;;i;;;;;;;;;iiii;ii1i;;;;;;iii;1fi;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;.::::i1.;LLCCf;;;;;;;;;;;;;;;;;;;;;;;;;i1111i1111;;;;;;;i;;1fi;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;::,:1;.ifLCCf;;;;;;;;;;;;;;;;;;iiiiiiii11111111iiiiiiii;;;1f1;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;i1i;i:;tfLCCL;;;;;;;iiiiiiiiiiiiiiiiiiii11111iiiiiiiiiiii;tf1;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;f1i;iitfLCCLi;iiiiii11111111i1iiiiiiiiiiiiiiiiiiiii11111tfft;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;:f1i;i1tffCLCfiiiiiiiiiiiiii111111111111111ttttttttt1tt1t1fft;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;.1ft111tffLLLCLLfftttttttttttttttttfffffffffffLLffLL11titiffi;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;.:i11tfffLLLLLLLLLLLLLLLffffffffffffffttttt1111iiii;;;:::,.;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;.,:;itLLffffttt111ii1111iiii;,......;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;......;;;;;;;.,,:::::::,,,,,,,:::::::,,..;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;,,,,,,,,,:::::::::::::::::;;;;;;::::;;;;iii11111111i;.;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;,fLLLfft1ii;;;;;;iiiiiiii1111i;11;11;tLLLLLLLLLLLLLLLLLf,;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;ffffLLCCLLLLLLLLLLLLLCCCCCCCLiiLiiLiiLLLLLCLLLLLLLLLLfLi;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;.:tLLftLLLLGGGGGCCLLCCCCCCCLLLLC1,f1,fi:fLLLftttt11ttttfLL1;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;L088800GLCLLCCCCC:;;:CLCCCCCLLLLCt,1t,1t,tCLLLffffLCCLLLLLLt.;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;.L88888880GCCLLCCCCGi.,;CCCCCCCCCCCCf:iL:if,iCLLCCCCCCCLLLLLLLf,;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;.f0GG00000GGCLLLCCCCCCCCCCCCCCCCCCCCCC;:L;:L;:LCCCCCCCCLLLLLLLLL:;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;:LCCCGGGGCCCLLLLLCCCCCCCCCCCCCCCCCCCCC1,f1,f1,fCCCCCCCCCCCCLLLLLi;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;,fLLLLCCLLLLffLLLCCCGCCCCCCCCCCCCCCCCCf,tf,tf,tCCCCCCCCCCCCCLLLLt;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;fffLLLLLLfffLLLCCCGGCCCCCCCCCCCCCCCCL:iL:;L:iCCCCCCCCCCCCCLLLLf.;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;fffffLLLLLffLLLLCCCGCCCCCCCCCCCCCCCCC;,L;,L;:LCCCCCCCCCCCCLLLLf,;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;tGCCLLfffftitLLLLCCCCCCGCCCCCCCCCCCCCG1.ft.t1.tCCCCCCCCCCCLLLLLf:;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

/// @title PawnBots
/// @author Hifi
/// @notice Manages the mint and distribution of the Pawn Bots collection NFTs.
contract PawnBots is IPawnBots, ERC721A, Ownable, ReentrancyGuard, VRFConsumerBase {
    using Strings for uint256;

    /// PUBLIC STORAGE ///

    /// @dev The theoretical collection size.
    uint256 public constant COLLECTION_SIZE = 8888;

    /// @dev The MFT token contract address.
    address public constant MFT = 0xDF2C7238198Ad8B389666574f2d8bc411A4b7428;

    /// @dev The token reserve allocated for contract owner.
    uint256 public constant RESERVE_CAP = 2100;

    /// @inheritdoc IPawnBots
    uint256 public override maxPerAccount;

    /// @inheritdoc IPawnBots
    bool public override mintActive;

    /// @inheritdoc IPawnBots
    uint256 public override mintCap;

    /// @inheritdoc IPawnBots
    mapping(address => uint256) public override minted;

    /// @inheritdoc IPawnBots
    MintPhase public override mintPhase;

    /// @inheritdoc IPawnBots
    uint256 public override offset;

    /// @inheritdoc IPawnBots
    string public override provenanceHash;

    /// @inheritdoc IPawnBots
    uint256 public override reserveMinted;

    /// @inheritdoc IPawnBots
    uint256 public override revealTime;

    /// INTERNAL STORAGE ///

    /// @dev The base token URI.
    string internal baseURI;

    /// @dev The merkle root of private phase allow list.
    bytes32 internal merkleRoot;

    /// @dev The Chainlink VRF fee in LINK.
    uint256 internal immutable vrfFee;

    /// @dev The Chainlink VRF key hash.
    bytes32 internal immutable vrfKeyHash;

    /// @dev The Chainlink VRF request ID.
    bytes32 internal vrfRequestId;

    constructor(
        address chainlinkToken_,
        address vrfCoordinator_,
        uint256 vrfFee_,
        bytes32 vrfKeyHash_
    ) ERC721A("Pawn Bots", "BOTS") VRFConsumerBase(vrfCoordinator_, chainlinkToken_) {
        mintCap = COLLECTION_SIZE - RESERVE_CAP;
        vrfFee = vrfFee_;
        vrfKeyHash = vrfKeyHash_;
    }

    /// PUBLIC CONSTANT FUNCTIONS ///

    /// @dev See {ERC721A-tokenURI}.
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        if (!_exists(tokenId)) {
            revert PawnBots__NonexistentToken();
        }
        string memory mBaseURI = _baseURI();
        uint256 mOffset = offset;
        if (mOffset == 0) {
            return bytes(mBaseURI).length > 0 ? string(abi.encodePacked(mBaseURI, "box")) : "";
        } else {
            return bytes(mBaseURI).length > 0 ? string(abi.encodePacked(mBaseURI, tokenId.toString())) : "";
        }
    }

    /// PUBLIC NON-CONSTANT FUNCTIONS ///

    /// @inheritdoc IPawnBots
    function burnUnsold(uint256 burnAmount) external override onlyOwner {
        if (mintActive) {
            revert PawnBots__MintNotPaused();
        }
        if (burnAmount + totalSupply() > mintCap + reserveMinted) {
            revert PawnBots__RemainingMintsExceeded();
        }

        unchecked {
            mintCap -= burnAmount;
        }
        emit BurnUnsold(burnAmount);
    }

    /// @inheritdoc IPawnBots
    function mintPrivate(uint256 mintAmount, bytes32[] calldata merkleProof) external override nonReentrant {
        if (!mintActive) {
            revert PawnBots__MintNotActive();
        }
        if (mintPhase != MintPhase.PRIVATE) {
            revert PawnBots__MintPhaseMismatch();
        }
        if (!MerkleProof.verify(merkleProof, merkleRoot, keccak256(abi.encodePacked(msg.sender)))) {
            revert PawnBots__AccountNotAllowed();
        }
        if (mintAmount + minted[msg.sender] > maxPerAccount) {
            revert PawnBots__MaxPerAccountExceeded();
        }
        if (mintAmount + totalSupply() > mintCap + reserveMinted) {
            revert PawnBots__RemainingMintsExceeded();
        }
        if (IERC20(MFT).balanceOf(msg.sender) < 1e18) {
            revert PawnBots__NotEnoughMftBalance();
        }

        unchecked {
            minted[msg.sender] += mintAmount;
        }

        _safeMint(msg.sender, mintAmount);
        emit Mint(msg.sender, mintAmount, MintPhase.PRIVATE);
    }

    /// @inheritdoc IPawnBots
    function mintPublic(uint256 mintAmount) external override nonReentrant {
        if (!mintActive) {
            revert PawnBots__MintNotActive();
        }
        if (mintPhase != MintPhase.PUBLIC) {
            revert PawnBots__MintPhaseMismatch();
        }
        if (mintAmount + minted[msg.sender] > maxPerAccount) {
            revert PawnBots__MaxPerAccountExceeded();
        }
        if (mintAmount + totalSupply() > mintCap + reserveMinted) {
            revert PawnBots__RemainingMintsExceeded();
        }
        if (IERC20(MFT).balanceOf(msg.sender) < 1e18) {
            revert PawnBots__NotEnoughMftBalance();
        }

        unchecked {
            minted[msg.sender] += mintAmount;
        }

        _safeMint(msg.sender, mintAmount);
        emit Mint(msg.sender, mintAmount, MintPhase.PUBLIC);
    }

    /// @inheritdoc IPawnBots
    function reserve(uint256 reserveAmount, address recipient) external override onlyOwner nonReentrant {
        if (reserveAmount + reserveMinted > RESERVE_CAP) {
            revert PawnBots__RemainingReserveExceeded();
        }

        unchecked {
            reserveMinted += reserveAmount;
        }

        _safeMint(recipient, reserveAmount);
        emit Reserve(reserveAmount, recipient);
    }

    /// @inheritdoc IPawnBots
    function reveal() external override onlyOwner {
        if (block.timestamp < revealTime) {
            revert PawnBots__TooEarlyToReveal();
        }
        if (offset != 0) {
            revert PawnBots__OffsetAlreadySet();
        }
        if (vrfRequestId != 0) {
            revert PawnBots__RandomnessAlreadyRequested();
        }

        vrfRequestId = requestRandomness(vrfKeyHash, vrfFee);
    }

    /// @inheritdoc IPawnBots
    function setBaseURI(string calldata newBaseURI) external override onlyOwner {
        baseURI = newBaseURI;
        emit SetBaseURI(newBaseURI);
    }

    /// @inheritdoc IPawnBots
    function setMaxPerAccount(uint256 newMaxPerAccount) external override onlyOwner {
        maxPerAccount = newMaxPerAccount;
        emit SetMaxPerAccount(newMaxPerAccount);
    }

    /// @inheritdoc IPawnBots
    function setMerkleRoot(bytes32 newMerkleRoot) external override onlyOwner {
        merkleRoot = newMerkleRoot;
        emit SetMerkleRoot(newMerkleRoot);
    }

    /// @inheritdoc IPawnBots
    function setMintActive(bool newMintActive) external override onlyOwner {
        mintActive = newMintActive;
        emit SetMintActive(newMintActive);
    }

    /// @inheritdoc IPawnBots
    function setMintPhase(MintPhase newMintPhase) external override onlyOwner {
        mintPhase = newMintPhase;
        emit SetMintPhase(newMintPhase);
    }

    /// @inheritdoc IPawnBots
    function setProvenanceHash(string calldata newProvenanceHash) external override onlyOwner {
        provenanceHash = newProvenanceHash;
        emit SetProvenanceHash(newProvenanceHash);
    }

    /// @inheritdoc IPawnBots
    function setRevealTime(uint256 newRevealTime) external override onlyOwner {
        revealTime = newRevealTime;
        emit SetRevealTime(newRevealTime);
    }

    /// INTERNAL CONSTANT FUNCTIONS ///

    /// @dev See {ERC721A-_baseURI}.
    function _baseURI() internal view override returns (string memory) {
        return baseURI;
    }

    /// INTERNAL NON-CONSTANT FUNCTIONS ///

    /// @dev See {VRFConsumerBase-fulfillRandomness}.
    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
        if (offset != 0) {
            revert PawnBots__OffsetAlreadySet();
        }
        if (vrfRequestId != requestId) {
            revert PawnBots__VrfRequestIdMismatch();
        }

        unchecked {
            offset = (randomness % (COLLECTION_SIZE - 1)) + 1;
        }
        emit Reveal();
    }
}

File 2 of 14 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constuctor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.)
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {
  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBase expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomness the VRF output
   */
  function fulfillRandomness(bytes32 requestId, uint256 randomness) internal virtual;

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 private constant USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(bytes32 _keyHash, uint256 _fee) internal returns (bytes32 requestId) {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface internal immutable LINK;
  address private immutable vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 => uint256) /* keyHash */ /* nonce */
    private nonces;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   * @param _link address of LINK token contract
   *
   * @dev https://docs.chain.link/docs/link-token-contracts
   */
  constructor(address _vrfCoordinator, address _link) {
    vrfCoordinator = _vrfCoordinator;
    LINK = LinkTokenInterface(_link);
  }

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {
    require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
    fulfillRandomness(requestId, randomness);
  }
}

File 3 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev 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 4 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 5 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

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

File 6 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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 7 of 14 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

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

File 8 of 14 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 9 of 14 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.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 10 of 14 : IPawnBots.sol
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity >=0.8.4;

/// @title IPawnBots
/// @author Hifi
interface IPawnBots {
    /// ENUMS ///

    enum MintPhase {
        PRIVATE,
        PUBLIC
    }

    /// EVENTS ///

    /// @notice Emitted when unsold tokens are burned.
    /// @param burnAmount The amount of tokens burned.
    event BurnUnsold(uint256 burnAmount);

    /// @notice Emitted when a user account mints new tokens.
    /// @param minter The minter account address.
    /// @param mintAmount The amount of minted tokens.
    /// @param phase The mint phase.
    event Mint(address indexed minter, uint256 mintAmount, MintPhase phase);

    /// @notice Emitted when reserved tokens are minted.
    /// @param reserveAmount The amount of reserved tokens minted.
    /// @param recipient The recipient of reserved tokens minted.
    event Reserve(uint256 reserveAmount, address recipient);

    /// @notice Emitted when the collection metadata is revealed.
    event Reveal();

    /// @notice Emitted when base URI is set.
    /// @param newBaseURI The new base URI.
    event SetBaseURI(string newBaseURI);

    /// @notice Emitted when the per-account mint limit is set.
    /// @param newMaxPerAccount The new per-account mint limit.
    event SetMaxPerAccount(uint256 newMaxPerAccount);

    /// @notice Emitted when Merkle root is set.
    /// @param newMerkleRoot The new Merkle root.
    event SetMerkleRoot(bytes32 newMerkleRoot);

    /// @notice Emitted when the mint state is set.
    /// @param newMintActive The new mint state.
    event SetMintActive(bool newMintActive);

    /// @notice Emitted when the mint phase is set.
    /// @param newMintPhase The new mint phase.
    event SetMintPhase(MintPhase newMintPhase);

    /// @notice Emitted when provenance hash is set.
    /// @param newProvenanceHash The new provenance hash.
    event SetProvenanceHash(string newProvenanceHash);

    /// @notice Emitted when reveal timestamp is set.
    /// @param newRevealTime The new reveal timestamp.
    event SetRevealTime(uint256 newRevealTime);

    /// PUBLIC CONSTANT FUNCTIONS ///

    /// @notice The per-account mint limit.
    function maxPerAccount() external view returns (uint256);

    /// @notice The state of the mint.
    function mintActive() external view returns (bool);

    /// @notice The token mint cap.
    function mintCap() external view returns (uint256);

    /// @notice The total amount of tokens minted by a given user account.
    /// @param account The user account address.
    function minted(address account) external view returns (uint256);

    /// @notice The current mint phase.
    function mintPhase() external view returns (MintPhase);

    /// @notice The offset that determines how each token ID corresponds to a token URI post-reveal.
    function offset() external view returns (uint256);

    /// @notice The provenance hash of post-reveal art.
    function provenanceHash() external view returns (string memory);

    /// @notice The total amount of reserved tokens minted.
    function reserveMinted() external view returns (uint256);

    /// @notice The timestamp from which the collection metadata can be revealed.
    function revealTime() external view returns (uint256);

    /// PUBLIC NON-CONSTANT FUNCTIONS ///

    /// @notice Burn unsold tokens.
    ///
    /// @dev Emits a {BurnUnsold} event.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    /// - Can only be called when token mint is paused.
    /// - `burnAmount` cannot exceed remaining mints.
    ///
    /// @param burnAmount The amount of tokens to burn.
    function burnUnsold(uint256 burnAmount) external;

    /// @notice Mint new tokens during the private phase of the mint.
    ///
    /// @dev Emits a {Mint} event.
    ///
    /// @dev Requirements:
    /// - Can only be called when token mint is active.
    /// - Can only be called when private mint phase is set.
    /// - Caller account must be allowed to mint.
    /// - `mintAmount` cannot exceed caller's per-account mint limit.
    /// - `mintAmount` cannot exceed remaining mints.
    /// - Can only be called when caller has enough MFT balance to be eligible.
    ///
    /// @param mintAmount The amount of tokens to mint.
    /// @param merkleProof The merkle proof of caller being allowed to mint.
    function mintPrivate(uint256 mintAmount, bytes32[] calldata merkleProof) external;

    /// @notice Mint new tokens during the public phase of the mint.
    ///
    /// @dev Emits a {Mint} event.
    ///
    /// @dev Requirements:
    /// - Can only be called when token mint is active.
    /// - Can only be called when public mint phase is set.
    /// - `mintAmount` cannot exceed caller's per-account mint limit.
    /// - `mintAmount` cannot exceed remaining mints.
    /// - Can only be called when caller has enough MFT balance to be eligible.
    ///
    /// @param mintAmount The amount of tokens to mint.
    function mintPublic(uint256 mintAmount) external;

    /// @notice Mint reserved tokens.
    ///
    /// @dev Emits a {Reserve} event.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    /// - `reserveAmount` cannot exceed remaining reserve.
    ///
    /// @param reserveAmount The amount of reserved tokens to mint.
    /// @param recipient The recipient of reserved tokens to mint.
    function reserve(uint256 reserveAmount, address recipient) external;

    /// @notice Reveal the collection metadata.
    ///
    /// @dev Emits a {Reveal} event indirectly through a transaction initiated by the VRF Coordinator.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    /// - Can only be called after `revealTime` has passed.
    /// - Can only be called once during the contract's lifetime.
    function reveal() external;

    /// @notice Set the base URI.
    ///
    /// @dev Emits a {SetBaseURI} event.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    ///
    /// @param newBaseURI The new base URI.
    function setBaseURI(string calldata newBaseURI) external;

    /// @notice Set the per-account mint limit.
    ///
    /// @dev Emits a {SetMaxPerAccount} event.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    ///
    /// @param newMaxPerAccount The new per-account mint limit.
    function setMaxPerAccount(uint256 newMaxPerAccount) external;

    /// @notice Set the Merkle root of private phase allow list.
    ///
    /// @dev Emits a {SetMerkleRoot} event.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    ///
    /// @param newMerkleRoot The new Merkle root.
    function setMerkleRoot(bytes32 newMerkleRoot) external;

    /// @notice Set the state of the mint.
    ///
    /// @dev Emits a {SetMintActive} event.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    ///
    /// @param newMintActive The new mint state.
    function setMintActive(bool newMintActive) external;

    /// @notice Set the mint phase.
    ///
    /// @dev Emits a {SetMintPhase} event.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    ///
    /// @param newMintPhase The new mint phase.
    function setMintPhase(MintPhase newMintPhase) external;

    /// @notice Set the provenance hash of post-reveal art.
    ///
    /// @dev Emits a {SetProvenanceHash} event.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    ///
    /// @param newProvenanceHash The new provenance hash.
    function setProvenanceHash(string calldata newProvenanceHash) external;

    /// @notice Set the timestamp from which the collection metadata can be revealed.
    ///
    /// @dev Emits a {SetRevealTime} event.
    ///
    /// @dev Requirements:
    /// - Can only be called by the owner.
    ///
    /// @param newRevealTime The new reveal time.
    function setRevealTime(uint256 newRevealTime) external;
}

File 11 of 14 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

File 12 of 14 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract VRFRequestIDBase {
  /**
   * @notice returns the seed which is actually input to the VRF coordinator
   *
   * @dev To prevent repetition of VRF output due to repetition of the
   * @dev user-supplied seed, that seed is combined in a hash with the
   * @dev user-specific nonce, and the address of the consuming contract. The
   * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
   * @dev the final seed, but the nonce does protect against repetition in
   * @dev requests which are included in a single block.
   *
   * @param _userSeed VRF seed input provided by user
   * @param _requester Address of the requesting contract
   * @param _nonce User-specific nonce at the time of the request
   */
  function makeVRFInputSeed(
    bytes32 _keyHash,
    uint256 _userSeed,
    address _requester,
    uint256 _nonce
  ) internal pure returns (uint256) {
    return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
  }

  /**
   * @notice Returns the id for this request
   * @param _keyHash The serviceAgreement ID to be used for this request
   * @param _vRFInputSeed The seed to be passed directly to the VRF
   * @return The id for this request
   *
   * @dev Note that _vRFInputSeed is not the seed passed by the consuming
   * @dev contract, but the one generated by makeVRFInputSeed
   */
  function makeRequestId(bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {
    return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
  }
}

File 13 of 14 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 14 of 14 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"chainlinkToken_","type":"address"},{"internalType":"address","name":"vrfCoordinator_","type":"address"},{"internalType":"uint256","name":"vrfFee_","type":"uint256"},{"internalType":"bytes32","name":"vrfKeyHash_","type":"bytes32"}],"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":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"PawnBots__AccountNotAllowed","type":"error"},{"inputs":[],"name":"PawnBots__MaxPerAccountExceeded","type":"error"},{"inputs":[],"name":"PawnBots__MintNotActive","type":"error"},{"inputs":[],"name":"PawnBots__MintNotPaused","type":"error"},{"inputs":[],"name":"PawnBots__MintPhaseMismatch","type":"error"},{"inputs":[],"name":"PawnBots__NonexistentToken","type":"error"},{"inputs":[],"name":"PawnBots__NotEnoughMftBalance","type":"error"},{"inputs":[],"name":"PawnBots__OffsetAlreadySet","type":"error"},{"inputs":[],"name":"PawnBots__RandomnessAlreadyRequested","type":"error"},{"inputs":[],"name":"PawnBots__RemainingMintsExceeded","type":"error"},{"inputs":[],"name":"PawnBots__RemainingReserveExceeded","type":"error"},{"inputs":[],"name":"PawnBots__TooEarlyToReveal","type":"error"},{"inputs":[],"name":"PawnBots__VrfRequestIdMismatch","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"burnAmount","type":"uint256"}],"name":"BurnUnsold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"},{"indexed":false,"internalType":"enum IPawnBots.MintPhase","name":"phase","type":"uint8"}],"name":"Mint","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":"uint256","name":"reserveAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"Reserve","type":"event"},{"anonymous":false,"inputs":[],"name":"Reveal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newBaseURI","type":"string"}],"name":"SetBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMaxPerAccount","type":"uint256"}],"name":"SetMaxPerAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"SetMerkleRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"newMintActive","type":"bool"}],"name":"SetMintActive","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum IPawnBots.MintPhase","name":"newMintPhase","type":"uint8"}],"name":"SetMintPhase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newProvenanceHash","type":"string"}],"name":"SetProvenanceHash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRevealTime","type":"uint256"}],"name":"SetRevealTime","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":"COLLECTION_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESERVE_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"burnAmount","type":"uint256"}],"name":"burnUnsold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerAccount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPhase","outputs":[{"internalType":"enum IPawnBots.MintPhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mintPrivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"offset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"provenanceHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reserveAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealTime","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxPerAccount","type":"uint256"}],"name":"setMaxPerAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"newMintActive","type":"bool"}],"name":"setMintActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IPawnBots.MintPhase","name":"newMintPhase","type":"uint8"}],"name":"setMintPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newProvenanceHash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRevealTime","type":"uint256"}],"name":"setRevealTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040523480156200001257600080fd5b5060405162002c1538038062002c158339810160408190526200003591620001ff565b60408051808201825260098152685061776e20426f747360b81b602080830191825283518085019094526004845263424f545360e01b9084015281518693889392909162000086916002916200013c565b5080516200009c9060039060208401906200013c565b50506000805550620000ae33620000ea565b60016009556001600160a01b0391821660a05216608052620000d56108346122b862000247565b600d5560c09190915260e05250620002aa9050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200014a906200026d565b90600052602060002090601f0160209004810192826200016e5760008555620001b9565b82601f106200018957805160ff1916838001178555620001b9565b82800160010185558215620001b9579182015b82811115620001b95782518255916020019190600101906200019c565b50620001c7929150620001cb565b5090565b5b80821115620001c75760008155600101620001cc565b80516001600160a01b0381168114620001fa57600080fd5b919050565b600080600080608085870312156200021657600080fd5b6200022185620001e2565b93506200023160208601620001e2565b6040860151606090960151949790965092505050565b6000828210156200026857634e487b7160e01b600052601160045260246000fd5b500390565b600181811c908216806200028257607f821691505b60208210811415620002a457634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05161292a620002eb6000396000610ec301526000610ee4015260008181610cf10152611bfd01526000611bce015261292a6000f3fe608060405234801561001057600080fd5b50600436106102de5760003560e01c80637cb6475911610186578063bf613202116100e3578063d555654411610097578063ee1cc94411610071578063ee1cc944146105c7578063efd0cbf9146105da578063f2fde38b146105ed57600080fd5b8063d555654414610579578063d8258d9514610582578063e985e9c51461058b57600080fd5b8063c6ab67a3116100c8578063c6ab67a31461054b578063c87b56dd14610553578063cd2275d31461056657600080fd5b8063bf6132021461052f578063c1e285071461053857600080fd5b8063a475b5dd1161013a578063b7c0007d1161011f578063b7c0007d1461050a578063b88d4fde14610513578063ba829d711461052657600080fd5b8063a475b5dd146104ef578063ac8154de146104f757600080fd5b806394985ddd1161016b57806394985ddd146104c157806395d89b41146104d4578063a22cb465146104dc57600080fd5b80637cb647591461049d5780638da5cb5b146104b057600080fd5b806325fd90f31161023f57806355f804b3116101f357806370a08231116101cd57806370a0823114610479578063715018a61461048c57806376c71ca11461049457600080fd5b806355f804b3146104385780636352211e1461044b57806369ebbe2e1461045e57600080fd5b806342842e0e1161022457806342842e0e146104095780634c1303ad1461041c5780634c81433f1461042f57600080fd5b806325fd90f3146103e957806331c07bbf146103f657600080fd5b8063109695231161029657806318160ddd1161027b57806318160ddd146103a05780631e7269c5146103b657806323b872dd146103d657600080fd5b8063109695231461037357806317881cbf1461038657600080fd5b806306fdde03116102c757806306fdde0314610320578063081812fc14610335578063095ea7b31461036057600080fd5b806301ffc9a7146102e357806303339bcb1461030b575b600080fd5b6102f66102f1366004612253565b610600565b60405190151581526020015b60405180910390f35b61031e61031936600461228c565b610652565b005b610328610783565b6040516103029190612310565b610348610343366004612323565b610815565b6040516001600160a01b039091168152602001610302565b61031e61036e36600461233c565b610859565b61031e610381366004612366565b610956565b600f546103939060ff1681565b6040516103029190612410565b600154600054035b604051908152602001610302565b6103a86103c436600461241e565b600e6020526000908152604090205481565b61031e6103e4366004612439565b6109e8565b600c546102f69060ff1681565b61031e610404366004612475565b6109f8565b61031e610417366004612439565b610a9d565b61031e61042a366004612323565b610ab8565b6103a860125481565b61031e610446366004612366565b610b35565b610348610459366004612323565b610bbb565b61034873df2c7238198ad8b389666574f2d8bc411a4b742881565b6103a861048736600461241e565b610bc6565b61031e610c15565b6103a8600d5481565b61031e6104ab366004612323565b610c69565b6008546001600160a01b0316610348565b61031e6104cf366004612496565b610ce6565b610328610d6c565b61031e6104ea3660046124c6565b610d7b565b61031e610e11565b61031e610505366004612323565b610f0d565b6103a861083481565b61031e610521366004612513565b610ff2565b6103a860135481565b6103a8600b5481565b61031e610546366004612323565b61103c565b6103286110b9565b610328610561366004612323565b611147565b61031e6105743660046125ef565b611204565b6103a860105481565b6103a86122b881565b6102f661059936600461266e565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b61031e6105d5366004612698565b6114dc565b61031e6105e8366004612323565b611565565b61031e6105fb36600461241e565b6117a9565b60006301ffc9a760e01b6001600160e01b03198316148061063157506380ac58cd60e01b6001600160e01b03198316145b8061064c5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6008546001600160a01b0316331461069f5760405162461bcd60e51b815260206004820181905260248201526000805160206128fe83398151915260448201526064015b60405180910390fd5b600260095414156106f25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610696565b60026009556012546108349061070890846126cb565b111561072757604051630430d4d560e31b815260040160405180910390fd5b60128054830190556107398183611879565b604080518381526001600160a01b03831660208201527fe07b37f6900c87d3cd8286132ac5338a36554df47294fd99f8246898a28d0e18910160405180910390a150506001600955565b606060028054610792906126e3565b80601f01602080910402602001604051908101604052809291908181526020018280546107be906126e3565b801561080b5780601f106107e05761010080835404028352916020019161080b565b820191906000526020600020905b8154815290600101906020018083116107ee57829003601f168201915b5050505050905090565b600061082082611893565b61083d576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610864826118ba565b9050806001600160a01b0316836001600160a01b031614156108995760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216146108ed576001600160a01b038116600090815260076020908152604080832033845290915290205460ff166108ed576040516367d9dca160e11b815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6008546001600160a01b0316331461099e5760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b6109aa601183836121a4565b507f6760362308ca665d8ad5234d7f09a8ac815ee45be8350cad464cb1e4eadd34ee82826040516109dc92919061271e565b60405180910390a15050565b6109f3838383611922565b505050565b6008546001600160a01b03163314610a405760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b600f805482919060ff191660018381811115610a5e57610a5e6123d8565b02179055507f47621e9ccf7ebe854eb1011a629933211171e1c06fe991fef611bafbdae1994781604051610a929190612410565b60405180910390a150565b6109f383838360405180602001604052806000815250610ff2565b6008546001600160a01b03163314610b005760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b600b8190556040518181527f598688b36a76ae127134b4ccadb980f6ee03d2673852286b5eca91bf411a9da190602001610a92565b6008546001600160a01b03163314610b7d5760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b610b89601483836121a4565b507f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa82826040516109dc92919061271e565b600061064c826118ba565b60006001600160a01b038216610bef576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610c5d5760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b610c676000611af0565b565b6008546001600160a01b03163314610cb15760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b60158190556040518181527f914960aef5e033ce5cae8a7992d4b7a6f0f9741227b66acb67c605b7019f8a4690602001610a92565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d5e5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610696565b610d688282611b4f565b5050565b606060038054610792906126e3565b6001600160a01b038216331415610da55760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b03163314610e595760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b601354421015610e7c57604051630bfa01e360e41b815260040160405180910390fd5b60105415610e9d576040516378a1f93760e11b815260040160405180910390fd5b60165415610ebe576040516384049d1360e01b815260040160405180910390fd5b610f087f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611bca565b601655565b6008546001600160a01b03163314610f555760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b600c5460ff1615610f79576040516331265e8560e21b815260040160405180910390fd5b601254600d54610f8991906126cb565b60015460005403610f9a90836126cb565b1115610fb957604051635218146960e01b815260040160405180910390fd5b600d805482900390556040518181527f53b473a43fb77f7bf8d1542c780b0ddd21b4803bfe6e2f156329101b0481e1b990602001610a92565b610ffd848484611922565b6001600160a01b0383163b156110365761101984848484611d55565b611036576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6008546001600160a01b031633146110845760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b60138190556040518181527fd3c27564aa5824adeda19a9566eef46a5885ecd23d94587892f87a30f3720c1690602001610a92565b601180546110c6906126e3565b80601f01602080910402602001604051908101604052809291908181526020018280546110f2906126e3565b801561113f5780601f106111145761010080835404028352916020019161113f565b820191906000526020600020905b81548152906001019060200180831161112257829003601f168201915b505050505081565b606061115282611893565b61116f57604051636d23a94560e11b815260040160405180910390fd5b6000611179611e4c565b601054909150806111cb5760008251116111a257604051806020016040528060008152506111c3565b816040516020016111b3919061274d565b6040516020818303038152906040525b949350505050565b60008251116111e957604051806020016040528060008152506111c3565b816111f385611e5b565b6040516020016111b3929190612774565b600260095414156112575760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610696565b6002600955600c5460ff1661127f5760405163902bc9f160e01b815260040160405180910390fd5b6000600f5460ff166001811115611298576112986123d8565b146112b65760405163447d275d60e01b815260040160405180910390fd5b61132b828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506015546040516bffffffffffffffffffffffff193360601b166020820152909250603401905060405160208183030381529060405280519060200120611f71565b61134857604051630ceaa9b160e21b815260040160405180910390fd5b600b54336000908152600e602052604090205461136590856126cb565b1115611384576040516318ab8a5b60e11b815260040160405180910390fd5b601254600d5461139491906126cb565b600154600054036113a590856126cb565b11156113c457604051635218146960e01b815260040160405180910390fd5b6040516370a0823160e01b8152336004820152670de0b6b3a76400009073df2c7238198ad8b389666574f2d8bc411a4b7428906370a082319060240160206040518083038186803b15801561141857600080fd5b505afa15801561142c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145091906127a3565b101561146f5760405163fd287c5160e01b815260040160405180910390fd5b336000818152600e6020526040902080548501905561148e9084611879565b336001600160a01b03167f29600984795369456176b31dad545cb35585021faea93dcc568a467a737ad4258460006040516114ca9291906127bc565b60405180910390a25050600160095550565b6008546001600160a01b031633146115245760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b600c805460ff19168215159081179091556040519081527f10dd3df47a7d67c5514698acca91f99855d07a108b93cbdb437697823b0c5e5790602001610a92565b600260095414156115b85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610696565b6002600955600c5460ff166115e05760405163902bc9f160e01b815260040160405180910390fd5b6001600f5460ff1660018111156115f9576115f96123d8565b146116175760405163447d275d60e01b815260040160405180910390fd5b600b54336000908152600e602052604090205461163490836126cb565b1115611653576040516318ab8a5b60e11b815260040160405180910390fd5b601254600d5461166391906126cb565b6001546000540361167490836126cb565b111561169357604051635218146960e01b815260040160405180910390fd5b6040516370a0823160e01b8152336004820152670de0b6b3a76400009073df2c7238198ad8b389666574f2d8bc411a4b7428906370a082319060240160206040518083038186803b1580156116e757600080fd5b505afa1580156116fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171f91906127a3565b101561173e5760405163fd287c5160e01b815260040160405180910390fd5b336000818152600e6020526040902080548301905561175d9082611879565b336001600160a01b03167f29600984795369456176b31dad545cb35585021faea93dcc568a467a737ad4258260016040516117999291906127bc565b60405180910390a2506001600955565b6008546001600160a01b031633146117f15760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b6001600160a01b03811661186d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610696565b61187681611af0565b50565b610d68828260405180602001604052806000815250611f87565b600080548210801561064c575050600090815260046020526040902054600160e01b161590565b60008160005481101561190957600081815260046020526040902054600160e01b8116611907575b806119005750600019016000818152600460205260409020546118e2565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b600061192d826118ba565b9050836001600160a01b0316816001600160a01b0316146119605760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061199c57506001600160a01b038516600090815260076020908152604080832033845290915290205460ff165b806119b75750336119ac84610815565b6001600160a01b0316145b9050806119d757604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0384166119fe57604051633a954ecd60e21b815260040160405180910390fd5b6000838152600660209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b038881168452600583528184208054600019019055871683528083208054600101905585835260049091529020600160e11b4260a01b861781179091558216611aa85760018301600081815260046020526040902054611aa6576000548114611aa65760008181526004602052604090208390555b505b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60105415611b70576040516378a1f93760e11b815260040160405180910390fd5b8160165414611b9257604051634cb61eaf60e11b815260040160405180910390fd5b6122b781066001016010556040517f66b9f0d2f5af4125e8098bf5f1efc517ed46a70d8638734d186af310e2f8bc7590600090a15050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001611c3a929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611c67939291906127e6565b602060405180830381600087803b158015611c8157600080fd5b505af1158015611c95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cb99190612817565b506000838152600a6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611d159060016126cb565b6000858152600a60205260409020556111c38482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611d8a903390899088908890600401612834565b602060405180830381600087803b158015611da457600080fd5b505af1925050508015611dd4575060408051601f3d908101601f19168201909252611dd191810190612870565b60015b611e2f573d808015611e02576040519150601f19603f3d011682016040523d82523d6000602084013e611e07565b606091505b508051611e27576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060148054610792906126e3565b606081611e7f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611ea95780611e938161288d565b9150611ea29050600a836128a8565b9150611e83565b60008167ffffffffffffffff811115611ec457611ec46124fd565b6040519080825280601f01601f191660200182016040528015611eee576020820181803683370190505b5090505b84156111c357611f036001836128bc565b9150611f10600a866128d3565b611f1b9060306126cb565b60f81b818381518110611f3057611f306128e7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611f6a600a866128a8565b9450611ef2565b600082611f7e85846120f8565b14949350505050565b6000546001600160a01b038416611fb057604051622e076360e81b815260040160405180910390fd5b82611fce5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03841660008181526005602090815260408083208054680100000000000000018902019055848352600490915290204260a01b86176001861460e11b1790558190818501903b156120a3575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461206c6000878480600101955087611d55565b612089576040516368d2bf6b60e11b815260040160405180910390fd5b80821061202157826000541461209e57600080fd5b6120e8565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106120a4575b5060009081556110369085838684565b600081815b845181101561219c57600085828151811061211a5761211a6128e7565b6020026020010151905080831161215c576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612189565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806121948161288d565b9150506120fd565b509392505050565b8280546121b0906126e3565b90600052602060002090601f0160209004810192826121d25760008555612218565b82601f106121eb5782800160ff19823516178555612218565b82800160010185558215612218579182015b828111156122185782358255916020019190600101906121fd565b50612224929150612228565b5090565b5b808211156122245760008155600101612229565b6001600160e01b03198116811461187657600080fd5b60006020828403121561226557600080fd5b81356119008161223d565b80356001600160a01b038116811461228757600080fd5b919050565b6000806040838503121561229f57600080fd5b823591506122af60208401612270565b90509250929050565b60005b838110156122d35781810151838201526020016122bb565b838111156110365750506000910152565b600081518084526122fc8160208601602086016122b8565b601f01601f19169290920160200192915050565b60208152600061190060208301846122e4565b60006020828403121561233557600080fd5b5035919050565b6000806040838503121561234f57600080fd5b61235883612270565b946020939093013593505050565b6000806020838503121561237957600080fd5b823567ffffffffffffffff8082111561239157600080fd5b818501915085601f8301126123a557600080fd5b8135818111156123b457600080fd5b8660208285010111156123c657600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052602160045260246000fd5b6002811061240c57634e487b7160e01b600052602160045260246000fd5b9052565b6020810161064c82846123ee565b60006020828403121561243057600080fd5b61190082612270565b60008060006060848603121561244e57600080fd5b61245784612270565b925061246560208501612270565b9150604084013590509250925092565b60006020828403121561248757600080fd5b81356002811061190057600080fd5b600080604083850312156124a957600080fd5b50508035926020909101359150565b801515811461187657600080fd5b600080604083850312156124d957600080fd5b6124e283612270565b915060208301356124f2816124b8565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561252957600080fd5b61253285612270565b935061254060208601612270565b925060408501359150606085013567ffffffffffffffff8082111561256457600080fd5b818701915087601f83011261257857600080fd5b81358181111561258a5761258a6124fd565b604051601f8201601f19908116603f011681019083821181831017156125b2576125b26124fd565b816040528281528a60208487010111156125cb57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060006040848603121561260457600080fd5b83359250602084013567ffffffffffffffff8082111561262357600080fd5b818601915086601f83011261263757600080fd5b81358181111561264657600080fd5b8760208260051b850101111561265b57600080fd5b6020830194508093505050509250925092565b6000806040838503121561268157600080fd5b61268a83612270565b91506122af60208401612270565b6000602082840312156126aa57600080fd5b8135611900816124b8565b634e487b7160e01b600052601160045260246000fd5b600082198211156126de576126de6126b5565b500190565b600181811c908216806126f757607f821691505b6020821081141561271857634e487b7160e01b600052602260045260246000fd5b50919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6000825161275f8184602087016122b8565b620c4def60eb1b920191825250600301919050565b600083516127868184602088016122b8565b83519083019061279a8183602088016122b8565b01949350505050565b6000602082840312156127b557600080fd5b5051919050565b8281526040810161190060208301846123ee565b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038416815282602082015260606040820152600061280e60608301846122e4565b95945050505050565b60006020828403121561282957600080fd5b8151611900816124b8565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261286660808301846122e4565b9695505050505050565b60006020828403121561288257600080fd5b81516119008161223d565b60006000198214156128a1576128a16126b5565b5060010190565b6000826128b7576128b76127d0565b500490565b6000828210156128ce576128ce6126b5565b500390565b6000826128e2576128e26127d0565b500690565b634e487b7160e01b600052603260045260246000fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a164736f6c6343000809000a000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79520000000000000000000000000000000000000000000000001bc16d674ec80000aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102de5760003560e01c80637cb6475911610186578063bf613202116100e3578063d555654411610097578063ee1cc94411610071578063ee1cc944146105c7578063efd0cbf9146105da578063f2fde38b146105ed57600080fd5b8063d555654414610579578063d8258d9514610582578063e985e9c51461058b57600080fd5b8063c6ab67a3116100c8578063c6ab67a31461054b578063c87b56dd14610553578063cd2275d31461056657600080fd5b8063bf6132021461052f578063c1e285071461053857600080fd5b8063a475b5dd1161013a578063b7c0007d1161011f578063b7c0007d1461050a578063b88d4fde14610513578063ba829d711461052657600080fd5b8063a475b5dd146104ef578063ac8154de146104f757600080fd5b806394985ddd1161016b57806394985ddd146104c157806395d89b41146104d4578063a22cb465146104dc57600080fd5b80637cb647591461049d5780638da5cb5b146104b057600080fd5b806325fd90f31161023f57806355f804b3116101f357806370a08231116101cd57806370a0823114610479578063715018a61461048c57806376c71ca11461049457600080fd5b806355f804b3146104385780636352211e1461044b57806369ebbe2e1461045e57600080fd5b806342842e0e1161022457806342842e0e146104095780634c1303ad1461041c5780634c81433f1461042f57600080fd5b806325fd90f3146103e957806331c07bbf146103f657600080fd5b8063109695231161029657806318160ddd1161027b57806318160ddd146103a05780631e7269c5146103b657806323b872dd146103d657600080fd5b8063109695231461037357806317881cbf1461038657600080fd5b806306fdde03116102c757806306fdde0314610320578063081812fc14610335578063095ea7b31461036057600080fd5b806301ffc9a7146102e357806303339bcb1461030b575b600080fd5b6102f66102f1366004612253565b610600565b60405190151581526020015b60405180910390f35b61031e61031936600461228c565b610652565b005b610328610783565b6040516103029190612310565b610348610343366004612323565b610815565b6040516001600160a01b039091168152602001610302565b61031e61036e36600461233c565b610859565b61031e610381366004612366565b610956565b600f546103939060ff1681565b6040516103029190612410565b600154600054035b604051908152602001610302565b6103a86103c436600461241e565b600e6020526000908152604090205481565b61031e6103e4366004612439565b6109e8565b600c546102f69060ff1681565b61031e610404366004612475565b6109f8565b61031e610417366004612439565b610a9d565b61031e61042a366004612323565b610ab8565b6103a860125481565b61031e610446366004612366565b610b35565b610348610459366004612323565b610bbb565b61034873df2c7238198ad8b389666574f2d8bc411a4b742881565b6103a861048736600461241e565b610bc6565b61031e610c15565b6103a8600d5481565b61031e6104ab366004612323565b610c69565b6008546001600160a01b0316610348565b61031e6104cf366004612496565b610ce6565b610328610d6c565b61031e6104ea3660046124c6565b610d7b565b61031e610e11565b61031e610505366004612323565b610f0d565b6103a861083481565b61031e610521366004612513565b610ff2565b6103a860135481565b6103a8600b5481565b61031e610546366004612323565b61103c565b6103286110b9565b610328610561366004612323565b611147565b61031e6105743660046125ef565b611204565b6103a860105481565b6103a86122b881565b6102f661059936600461266e565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b61031e6105d5366004612698565b6114dc565b61031e6105e8366004612323565b611565565b61031e6105fb36600461241e565b6117a9565b60006301ffc9a760e01b6001600160e01b03198316148061063157506380ac58cd60e01b6001600160e01b03198316145b8061064c5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6008546001600160a01b0316331461069f5760405162461bcd60e51b815260206004820181905260248201526000805160206128fe83398151915260448201526064015b60405180910390fd5b600260095414156106f25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610696565b60026009556012546108349061070890846126cb565b111561072757604051630430d4d560e31b815260040160405180910390fd5b60128054830190556107398183611879565b604080518381526001600160a01b03831660208201527fe07b37f6900c87d3cd8286132ac5338a36554df47294fd99f8246898a28d0e18910160405180910390a150506001600955565b606060028054610792906126e3565b80601f01602080910402602001604051908101604052809291908181526020018280546107be906126e3565b801561080b5780601f106107e05761010080835404028352916020019161080b565b820191906000526020600020905b8154815290600101906020018083116107ee57829003601f168201915b5050505050905090565b600061082082611893565b61083d576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610864826118ba565b9050806001600160a01b0316836001600160a01b031614156108995760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216146108ed576001600160a01b038116600090815260076020908152604080832033845290915290205460ff166108ed576040516367d9dca160e11b815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6008546001600160a01b0316331461099e5760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b6109aa601183836121a4565b507f6760362308ca665d8ad5234d7f09a8ac815ee45be8350cad464cb1e4eadd34ee82826040516109dc92919061271e565b60405180910390a15050565b6109f3838383611922565b505050565b6008546001600160a01b03163314610a405760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b600f805482919060ff191660018381811115610a5e57610a5e6123d8565b02179055507f47621e9ccf7ebe854eb1011a629933211171e1c06fe991fef611bafbdae1994781604051610a929190612410565b60405180910390a150565b6109f383838360405180602001604052806000815250610ff2565b6008546001600160a01b03163314610b005760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b600b8190556040518181527f598688b36a76ae127134b4ccadb980f6ee03d2673852286b5eca91bf411a9da190602001610a92565b6008546001600160a01b03163314610b7d5760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b610b89601483836121a4565b507f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa82826040516109dc92919061271e565b600061064c826118ba565b60006001600160a01b038216610bef576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610c5d5760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b610c676000611af0565b565b6008546001600160a01b03163314610cb15760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b60158190556040518181527f914960aef5e033ce5cae8a7992d4b7a6f0f9741227b66acb67c605b7019f8a4690602001610a92565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614610d5e5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610696565b610d688282611b4f565b5050565b606060038054610792906126e3565b6001600160a01b038216331415610da55760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b03163314610e595760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b601354421015610e7c57604051630bfa01e360e41b815260040160405180910390fd5b60105415610e9d576040516378a1f93760e11b815260040160405180910390fd5b60165415610ebe576040516384049d1360e01b815260040160405180910390fd5b610f087faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4457f0000000000000000000000000000000000000000000000001bc16d674ec80000611bca565b601655565b6008546001600160a01b03163314610f555760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b600c5460ff1615610f79576040516331265e8560e21b815260040160405180910390fd5b601254600d54610f8991906126cb565b60015460005403610f9a90836126cb565b1115610fb957604051635218146960e01b815260040160405180910390fd5b600d805482900390556040518181527f53b473a43fb77f7bf8d1542c780b0ddd21b4803bfe6e2f156329101b0481e1b990602001610a92565b610ffd848484611922565b6001600160a01b0383163b156110365761101984848484611d55565b611036576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6008546001600160a01b031633146110845760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b60138190556040518181527fd3c27564aa5824adeda19a9566eef46a5885ecd23d94587892f87a30f3720c1690602001610a92565b601180546110c6906126e3565b80601f01602080910402602001604051908101604052809291908181526020018280546110f2906126e3565b801561113f5780601f106111145761010080835404028352916020019161113f565b820191906000526020600020905b81548152906001019060200180831161112257829003601f168201915b505050505081565b606061115282611893565b61116f57604051636d23a94560e11b815260040160405180910390fd5b6000611179611e4c565b601054909150806111cb5760008251116111a257604051806020016040528060008152506111c3565b816040516020016111b3919061274d565b6040516020818303038152906040525b949350505050565b60008251116111e957604051806020016040528060008152506111c3565b816111f385611e5b565b6040516020016111b3929190612774565b600260095414156112575760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610696565b6002600955600c5460ff1661127f5760405163902bc9f160e01b815260040160405180910390fd5b6000600f5460ff166001811115611298576112986123d8565b146112b65760405163447d275d60e01b815260040160405180910390fd5b61132b828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506015546040516bffffffffffffffffffffffff193360601b166020820152909250603401905060405160208183030381529060405280519060200120611f71565b61134857604051630ceaa9b160e21b815260040160405180910390fd5b600b54336000908152600e602052604090205461136590856126cb565b1115611384576040516318ab8a5b60e11b815260040160405180910390fd5b601254600d5461139491906126cb565b600154600054036113a590856126cb565b11156113c457604051635218146960e01b815260040160405180910390fd5b6040516370a0823160e01b8152336004820152670de0b6b3a76400009073df2c7238198ad8b389666574f2d8bc411a4b7428906370a082319060240160206040518083038186803b15801561141857600080fd5b505afa15801561142c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145091906127a3565b101561146f5760405163fd287c5160e01b815260040160405180910390fd5b336000818152600e6020526040902080548501905561148e9084611879565b336001600160a01b03167f29600984795369456176b31dad545cb35585021faea93dcc568a467a737ad4258460006040516114ca9291906127bc565b60405180910390a25050600160095550565b6008546001600160a01b031633146115245760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b600c805460ff19168215159081179091556040519081527f10dd3df47a7d67c5514698acca91f99855d07a108b93cbdb437697823b0c5e5790602001610a92565b600260095414156115b85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610696565b6002600955600c5460ff166115e05760405163902bc9f160e01b815260040160405180910390fd5b6001600f5460ff1660018111156115f9576115f96123d8565b146116175760405163447d275d60e01b815260040160405180910390fd5b600b54336000908152600e602052604090205461163490836126cb565b1115611653576040516318ab8a5b60e11b815260040160405180910390fd5b601254600d5461166391906126cb565b6001546000540361167490836126cb565b111561169357604051635218146960e01b815260040160405180910390fd5b6040516370a0823160e01b8152336004820152670de0b6b3a76400009073df2c7238198ad8b389666574f2d8bc411a4b7428906370a082319060240160206040518083038186803b1580156116e757600080fd5b505afa1580156116fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171f91906127a3565b101561173e5760405163fd287c5160e01b815260040160405180910390fd5b336000818152600e6020526040902080548301905561175d9082611879565b336001600160a01b03167f29600984795369456176b31dad545cb35585021faea93dcc568a467a737ad4258260016040516117999291906127bc565b60405180910390a2506001600955565b6008546001600160a01b031633146117f15760405162461bcd60e51b815260206004820181905260248201526000805160206128fe8339815191526044820152606401610696565b6001600160a01b03811661186d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610696565b61187681611af0565b50565b610d68828260405180602001604052806000815250611f87565b600080548210801561064c575050600090815260046020526040902054600160e01b161590565b60008160005481101561190957600081815260046020526040902054600160e01b8116611907575b806119005750600019016000818152600460205260409020546118e2565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b600061192d826118ba565b9050836001600160a01b0316816001600160a01b0316146119605760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061199c57506001600160a01b038516600090815260076020908152604080832033845290915290205460ff165b806119b75750336119ac84610815565b6001600160a01b0316145b9050806119d757604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0384166119fe57604051633a954ecd60e21b815260040160405180910390fd5b6000838152600660209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b038881168452600583528184208054600019019055871683528083208054600101905585835260049091529020600160e11b4260a01b861781179091558216611aa85760018301600081815260046020526040902054611aa6576000548114611aa65760008181526004602052604090208390555b505b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60105415611b70576040516378a1f93760e11b815260040160405180910390fd5b8160165414611b9257604051634cb61eaf60e11b815260040160405180910390fd5b6122b781066001016010556040517f66b9f0d2f5af4125e8098bf5f1efc517ed46a70d8638734d186af310e2f8bc7590600090a15050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001611c3a929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611c67939291906127e6565b602060405180830381600087803b158015611c8157600080fd5b505af1158015611c95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cb99190612817565b506000838152600a6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611d159060016126cb565b6000858152600a60205260409020556111c38482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611d8a903390899088908890600401612834565b602060405180830381600087803b158015611da457600080fd5b505af1925050508015611dd4575060408051601f3d908101601f19168201909252611dd191810190612870565b60015b611e2f573d808015611e02576040519150601f19603f3d011682016040523d82523d6000602084013e611e07565b606091505b508051611e27576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060148054610792906126e3565b606081611e7f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611ea95780611e938161288d565b9150611ea29050600a836128a8565b9150611e83565b60008167ffffffffffffffff811115611ec457611ec46124fd565b6040519080825280601f01601f191660200182016040528015611eee576020820181803683370190505b5090505b84156111c357611f036001836128bc565b9150611f10600a866128d3565b611f1b9060306126cb565b60f81b818381518110611f3057611f306128e7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611f6a600a866128a8565b9450611ef2565b600082611f7e85846120f8565b14949350505050565b6000546001600160a01b038416611fb057604051622e076360e81b815260040160405180910390fd5b82611fce5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03841660008181526005602090815260408083208054680100000000000000018902019055848352600490915290204260a01b86176001861460e11b1790558190818501903b156120a3575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461206c6000878480600101955087611d55565b612089576040516368d2bf6b60e11b815260040160405180910390fd5b80821061202157826000541461209e57600080fd5b6120e8565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106120a4575b5060009081556110369085838684565b600081815b845181101561219c57600085828151811061211a5761211a6128e7565b6020026020010151905080831161215c576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612189565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806121948161288d565b9150506120fd565b509392505050565b8280546121b0906126e3565b90600052602060002090601f0160209004810192826121d25760008555612218565b82601f106121eb5782800160ff19823516178555612218565b82800160010185558215612218579182015b828111156122185782358255916020019190600101906121fd565b50612224929150612228565b5090565b5b808211156122245760008155600101612229565b6001600160e01b03198116811461187657600080fd5b60006020828403121561226557600080fd5b81356119008161223d565b80356001600160a01b038116811461228757600080fd5b919050565b6000806040838503121561229f57600080fd5b823591506122af60208401612270565b90509250929050565b60005b838110156122d35781810151838201526020016122bb565b838111156110365750506000910152565b600081518084526122fc8160208601602086016122b8565b601f01601f19169290920160200192915050565b60208152600061190060208301846122e4565b60006020828403121561233557600080fd5b5035919050565b6000806040838503121561234f57600080fd5b61235883612270565b946020939093013593505050565b6000806020838503121561237957600080fd5b823567ffffffffffffffff8082111561239157600080fd5b818501915085601f8301126123a557600080fd5b8135818111156123b457600080fd5b8660208285010111156123c657600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052602160045260246000fd5b6002811061240c57634e487b7160e01b600052602160045260246000fd5b9052565b6020810161064c82846123ee565b60006020828403121561243057600080fd5b61190082612270565b60008060006060848603121561244e57600080fd5b61245784612270565b925061246560208501612270565b9150604084013590509250925092565b60006020828403121561248757600080fd5b81356002811061190057600080fd5b600080604083850312156124a957600080fd5b50508035926020909101359150565b801515811461187657600080fd5b600080604083850312156124d957600080fd5b6124e283612270565b915060208301356124f2816124b8565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561252957600080fd5b61253285612270565b935061254060208601612270565b925060408501359150606085013567ffffffffffffffff8082111561256457600080fd5b818701915087601f83011261257857600080fd5b81358181111561258a5761258a6124fd565b604051601f8201601f19908116603f011681019083821181831017156125b2576125b26124fd565b816040528281528a60208487010111156125cb57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060006040848603121561260457600080fd5b83359250602084013567ffffffffffffffff8082111561262357600080fd5b818601915086601f83011261263757600080fd5b81358181111561264657600080fd5b8760208260051b850101111561265b57600080fd5b6020830194508093505050509250925092565b6000806040838503121561268157600080fd5b61268a83612270565b91506122af60208401612270565b6000602082840312156126aa57600080fd5b8135611900816124b8565b634e487b7160e01b600052601160045260246000fd5b600082198211156126de576126de6126b5565b500190565b600181811c908216806126f757607f821691505b6020821081141561271857634e487b7160e01b600052602260045260246000fd5b50919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6000825161275f8184602087016122b8565b620c4def60eb1b920191825250600301919050565b600083516127868184602088016122b8565b83519083019061279a8183602088016122b8565b01949350505050565b6000602082840312156127b557600080fd5b5051919050565b8281526040810161190060208301846123ee565b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038416815282602082015260606040820152600061280e60608301846122e4565b95945050505050565b60006020828403121561282957600080fd5b8151611900816124b8565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261286660808301846122e4565b9695505050505050565b60006020828403121561288257600080fd5b81516119008161223d565b60006000198214156128a1576128a16126b5565b5060010190565b6000826128b7576128b76127d0565b500490565b6000828210156128ce576128ce6126b5565b500390565b6000826128e2576128e26127d0565b500690565b634e487b7160e01b600052603260045260246000fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a164736f6c6343000809000a

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

000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79520000000000000000000000000000000000000000000000001bc16d674ec80000aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

-----Decoded View---------------
Arg [0] : chainlinkToken_ (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [1] : vrfCoordinator_ (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [2] : vrfFee_ (uint256): 2000000000000000000
Arg [3] : vrfKeyHash_ (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [1] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [2] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [3] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445


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

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