ETH Price: $3,893.77 (+0.24%)

Token

METABULLS (MBULL)
 

Overview

Max Total Supply

528 MBULL

Holders

125

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 MBULL
0xae107de2b850a6f14a8582123d14bfb9ea29c4e3
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
MetaBull

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 24 : MetaBull.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./Burger.sol";

error MintingNotActive();
error AstrobullAlreadyClaimed();

/**
 * @title Metabulls
 * @author Matt Carter
 * June 6, 2022
 *
 * This contract is an implementation of chiru lab's erc721a contract and is used for minting
 * 3d metaverse bulls. To mint a metabull, an account will input tokenIds of astrobulls
 * they are using to claim; meaning the account must own each astrobull or be the staker of it,
 * and each astrobull can only be used once. The contract will store which astrobull traits to
 * give each metabull. Users will burn burgers for each metabull they mint.
 */
contract MetaBull is ERC721A, Ownable {
  using Strings for uint256;
  /// contract instances ///
  Burger public immutable BurgerContract;
  Grill2 public immutable GrillContract;
  ISUPER1155 public constant Astro =
    ISUPER1155(0x71B11Ac923C967CD5998F23F6dae0d779A6ac8Af);
  address public constant OldGrill = 0xE11AF478aF241FAb926f4c111d50139Ae003F7fd;
  /// if minting is active ///
  bool public isMinting;
  /// if tokens are revealed ///
  bool public isRevealed;
  /// the number of burgers to burn each mint ///
  uint256 public burnScalar = 2;
  /// the number of burgers burned by this contract ///
  uint256 public totalBurns;
  /// the base uri for all tokens ///
  string public URI;
  /// if an astrobull has been claimed for yet ///
  mapping(uint256 => bool) public portedIds;
  /// which astrobull traits to give each metabull ///
  mapping(uint256 => uint256) public portingMeta;
  /// the number of burgers each account has burned ///
  mapping(address => uint256) public accountBurns;

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

  /**
   * Sets the initial base uri and address for the burger contract
   * @param _URI The baseURI for each token
   * @param burgerAddr The address of the burger contract
   * @param grillAddr The address of the grill contract
   */
  constructor(
    string memory _URI,
    address burgerAddr,
    address grillAddr
  ) ERC721A("METABULLS", "MBULL") {
    URI = _URI;
    BurgerContract = Burger(burgerAddr);
    GrillContract = Grill2(grillAddr);
  }

  /// ============ INTERNAL ============ ///

  /**
   * Overrides tokens to start at index 1 instead of 0
   * @return _id The tokenId of the first token
   */
  function _startTokenId() internal pure override returns (uint256 _id) {
    _id = 1;
  }

  /// ============ OWNER ============ ///

  /**
   * Sets a new base URI for tokens
   * @param _URI The new baseURI for each token
   */
  function setURI(string memory _URI) public onlyOwner {
    URI = _URI;
  }

  /**
   * Toggles if minting is allowed.
   */
  function toggleMinting() public onlyOwner {
    isMinting = !isMinting;
  }

  /**
   * Toggles if tokens are revealed.
   */
  function toggleReveal() public onlyOwner {
    isRevealed = !isRevealed;
  }

  /**
   * Sets the quantity of burgers an account must burn to mint each metabull
   * @param _burnScalar The number of burgers to burn
   */
  function setBurnScalar(uint256 _burnScalar) public onlyOwner {
    burnScalar = _burnScalar;
  }

  /**
   * Mints `quantity` tokens to `account`
   * @param quantity The number of tokens to mint
   * @param account The address to mint the tokens to
   * @notice Each token an owner mints will point to a 0 in the portingMeta mapping
   * since it does not share traits with a minted astrobull
   */
  function ownerMint(uint256 quantity, address account) public onlyOwner {
    _safeMint(account, quantity);
  }

  /// ============ PUBLIC ============ ///

  /**
   * Mints a metabull for each astrobull input
   * @param astrobullIds An array of astrobull IDs caller is claiming metabulls for
   * @notice The caller must own each astrobull ID they are claiming for; meaning it must
   * be removed from the grill before use
   */
  function claimBull(uint256[] memory astrobullIds) public {
    if (!isMinting) {
      revert MintingNotActive();
    }
    /// @dev gets the first tokenId being minted ///
    uint256 currentIndex = _currentIndex;
    for (uint256 i = 0; i < astrobullIds.length; ++i) {
      if (!_checkOwnerShip(msg.sender, astrobullIds[i])) {
        revert CallerNotTokenOwner();
      }
      if (portedIds[astrobullIds[i]]) {
        revert AstrobullAlreadyClaimed();
      }
      /// @dev sets the astrobull traits to give each metabull being minted ///
      portingMeta[currentIndex] = astrobullIds[i];
      /// @dev sets contract state ///
      portedIds[astrobullIds[i]] = true;
      /// @dev sets the next tokenId being minted ///
      currentIndex += 1;
    }
    /// burn caller's burgers ///
    uint256 toBurn = burnScalar * astrobullIds.length;
    BurgerContract.burnBurger(msg.sender, toBurn);
    /// sets contract state ///
    totalBurns += toBurn;
    accountBurns[msg.sender] += toBurn;
    /// mint metabulls to caller ///
    _safeMint(msg.sender, astrobullIds.length);
  }

  /// ============ INTERNAL ============ ///

  /**
   * Checks if `account` is the owner or staker of `tokenId`
   * @param account The address to check ownership for
   * @param tokenId The tokenId to check ownership of
   * @return _b If `account` is the owner or staker of `tokenId`
   */
  function _checkOwnerShip(address account, uint256 tokenId)
    internal
    view
    returns (bool _b)
  {
    _b = false;
    /// @dev first checks if account owns token ///
    if (Astro.balanceOf(account, tokenId) == 1) {
      _b = true;
    }
    /// @dev next, checks if token is staked in the old grill and caller is staker ///
    else if (Astro.balanceOf(address(OldGrill), tokenId) == 1) {
      if (GrillContract.stakeStorageOld(tokenId).staker == account) {
        _b = true;
      }
    }
    /// @dev last, checks if token is staked in current grill and caller is staker ///
    else if (GrillContract.stakeStorageGetter(tokenId).staker == account) {
      _b = true;
    }
  }

  /// ============ READ-ONLY ============ ///

  /**
   * Gets a token's URI
   * @param _tokenId The tokenId to lookup
   * @return _URI The token's uri
   */
  function tokenURI(uint256 _tokenId)
    public
    view
    override
    returns (string memory _URI)
  {
    if (isRevealed) {
      _URI = string(abi.encodePacked(URI, _tokenId.toString(), ".json"));
    } else {
      _URI = URI;
    }
  }
}

File 2 of 24 : Grill2.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";

error CallerBlacklisted();
error CallerNotTokenOwner();
error CallerNotTokenStaker();
error StakingNotActive();
error ZeroEmissionRate();

/**
 * Interfaces astrobull contract
 */
interface ISUPER1155 {
  function balanceOf(address _owner, uint256 _id)
    external
    view
    returns (uint256);

  function groupBalances(uint256 groupId, address from)
    external
    view
    returns (uint256);

  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _id,
    uint256 _amount,
    bytes calldata _data
  ) external;

  function safeBatchTransferFrom(
    address _from,
    address _to,
    uint256[] memory _ids,
    uint256[] memory _amounts,
    bytes memory _data
  ) external;
}

/**
 * Interfaces old grill contract
 */
interface IGRILL {
  struct Stake {
    bool status;
    address staker;
    uint256 timestamp;
  }

  function getStake(uint256 _tokenId)
    external
    view
    returns (Stake memory _stake);

  function getIdsOfAddr(address _operator)
    external
    view
    returns (uint256[] memory _addrStakes);
}

/**
 * @title Grill2.0
 * @author Matt Carter, degendeveloper.eth
 * 6 June, 2022
 *
 * The purpose of this contract is to optimize gas consumption when adding new stakes and
 * removing previous stakes from the initial grill contract @ 0xE11AF478aF241FAb926f4c111d50139Ae003F7fd.
 *
 * Users will use this new grill contract when adding and removing stakes. This new contract
 * is also responsible for counting emission tokens and setting new emission rates.
 *
 * This contract is whitelisted to move the first grill's tokens via proxy registry in the super1155 contract.
 *
 * This contract should be set as the `proxyRegistryAddress` in the parent contract. This
 * allows the new grill to move tokens on behalf of the old grill.
 */
contract Grill2 is Ownable, ERC1155Holder {
  using Counters for Counters.Counter;
  uint256 internal constant MAX_INT = 2**256 - 1;
  /// contract instances ///
  ISUPER1155 public constant Parent =
    ISUPER1155(0x71B11Ac923C967CD5998F23F6dae0d779A6ac8Af);
  IGRILL public immutable OldGrill;
  /// the number of times the emission rate changes ///
  Counters.Counter internal emChanges;
  /// is adding stakes allowed ///
  bool public isStaking = true;
  /// the number of stakes added & removed by each account (this contract) ///
  mapping(address => Counters.Counter) internal stakesAddedPerAccount;
  mapping(address => Counters.Counter) internal stakesRemovedPerAccount;
  /// each Stake by tokenId (this contract) ///
  mapping(uint256 => Stake) public stakeStorage;
  /// each tokenId by index for an account (this contract) ///
  mapping(address => mapping(uint256 => uint256)) public accountStakes;
  /// each Emission by index (this contract) ///
  mapping(uint256 => Emission) public emissionStorage;
  /// the number of emission tokens earned be each account from removed stakes ///
  mapping(address => uint256) public unstakedClaims;
  /// accounts that can not add new stakes ///
  mapping(address => bool) public blacklist;
  /// list of new proxies for Parent tokens ///
  mapping(address => address) public proxies;

  /**
   * Stores information for an emission change
   * @param rate The number of seconds to earn 1 emission token
   * @param timestamp The block.timestamp this emission rate is set
   */
  struct Emission {
    uint256 rate;
    uint256 timestamp;
  }

  /**
   * Stores information for a stake
   * @param staker The address who creates this stake
   * @param timestamp The block.timestamp this stake is created
   * @param accountSlot The index for this stake in `accountStakes`
   */
  struct Stake {
    address staker;
    uint256 timestamp;
    uint256 accountSlot;
  }

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

  /**
   * Initializes contract instances and sets the initial emission rate
   * @param _grillAddr The address for the first grill contract
   * @notice `1652054400` is Mon, 09 May 2022 00:00:00 GMT
   * @notice '3600 * 24 * 45' is the number of seconds in 45 days
   */
  constructor(address _grillAddr) {
    OldGrill = IGRILL(_grillAddr);
    emissionStorage[emChanges.current()] = Emission(3600 * 24 * 45, 1652054400);
  }

  /// ============ OWNER ============ ///

  /**
   * Sets a proxy transferer for `account`s tokens
   * @param account The address whose tokens to move
   * @param operator The address being proxied as an approved operator for `account`
   * @notice The team will use this contract as a proxy for old grill tokens
   */
  function setProxyForAccount(address account, address operator)
    public
    onlyOwner
  {
    proxies[account] = operator;
  }

  /**
   * Removes a proxy transferer for `account`s tokens
   * @param account The address losing its proxy transferer
   */
  function removeProxyForAccount(address account) public onlyOwner {
    delete proxies[account];
  }

  /**
   * Allows/unallows the addition of new stakes
   */
  function toggleStaking() public onlyOwner {
    isStaking = !isStaking;
  }

  /**
   * Allows/unallows an account to add new stakes
   * @param account The address to set status for
   * @param status The status being set
   * @notice A staker is always able to remove their stakes regardless of blacklist status
   */
  function blacklistAccount(address account, bool status) public onlyOwner {
    blacklist[account] = status;
  }

  /**
   * Stops emission token counting by setting an emission rate of the max-int number of seconds
   * @notice No tokens can be earned with an emission rate this long
   * @notice To continue emissions counting, the owner must set a new emission rate
   */
  function pauseEmissions() public onlyOwner {
    _setEmissionRate(MAX_INT);
  }

  /**
   * Sets a new rate for earning emission tokens
   * @param _seconds The number of seconds a token must be staked for to earn 1 emission token
   */
  function setEmissionRate(uint256 _seconds) public onlyOwner {
    _setEmissionRate(_seconds);
  }

  /// ============ PUBLIC ============ ///

  /**
   * Stakes an array of tokenIds with this contract to earn emission tokens
   * @param tokenIds An array of tokenIds to stake
   * @param amounts An array of amounts of each tokenId to stake
   * @notice Caller must `setApprovalForAll()` to true in the parent contract using this contract's address
   * before it can move their tokens
   */
  function addStakes(uint256[] memory tokenIds, uint256[] memory amounts)
    public
  {
    if (!isStaking) {
      revert StakingNotActive();
    }
    if (blacklist[msg.sender]) {
      revert CallerBlacklisted();
    }
    /// @dev verifies caller owns each token ///
    for (uint256 i = 0; i < tokenIds.length; ++i) {
      uint256 _tokenId = tokenIds[i];
      if (Parent.balanceOf(msg.sender, _tokenId) == 0) {
        revert CallerNotTokenOwner();
      }
      /// @dev sets contract state ///
      _addStake(msg.sender, _tokenId);
    }
    /// @dev transfers tokens from caller to this contract ///
    Parent.safeBatchTransferFrom(
      msg.sender,
      address(this),
      tokenIds,
      amounts,
      "0x00"
    );
  }

  /**
   * Removes an array of tokenIds staked in this contract and/or the old one
   * @param oldTokenIds The tokenIds being unstaked from the old contract
   * @param oldAmounts The number of each token being unstaked
   * @param newTokenIds The tokenIds being unstaked from this contract
   * @param newAmounts The number of each token being unstaked
   */
  function removeStakes(
    uint256[] memory oldTokenIds,
    uint256[] memory oldAmounts,
    uint256[] memory newTokenIds,
    uint256[] memory newAmounts
  ) public {
    if (oldTokenIds.length > 0) {
      /// @dev verifies caller staked each token ///
      for (uint256 i = 0; i < oldTokenIds.length; ++i) {
        uint256 _tokenId = oldTokenIds[i];
        IGRILL.Stake memory _thisStake = OldGrill.getStake(_tokenId);
        if (_thisStake.staker != msg.sender) {
          revert CallerNotTokenStaker();
        }
        /// @dev increments emissions earned for caller ///
        unstakedClaims[msg.sender] += countEmissions(_thisStake.timestamp);
      }
      /// @dev transfers tokens from old contract to caller ///
      Parent.safeBatchTransferFrom(
        address(OldGrill),
        msg.sender,
        oldTokenIds,
        oldAmounts,
        "0x00"
      );
    }
    if (newTokenIds.length > 0) {
      /// @dev verifies caller staked each token ///
      for (uint256 i = 0; i < newTokenIds.length; ++i) {
        uint256 _tokenId = newTokenIds[i];
        if (stakeStorage[_tokenId].staker != msg.sender) {
          revert CallerNotTokenStaker();
        }
        /// @dev sets contract state ///
        _removeStake(_tokenId);
      }
      /// @dev transfers tokens from this contract to caller ///
      Parent.safeBatchTransferFrom(
        address(this),
        msg.sender,
        newTokenIds,
        newAmounts,
        "0x00"
      );
    }
  }

  /**
   * Counts the number of emission tokens a timestamp has earned
   * @param _timestamp The timestamp a token was staked
   * @return _c The number of emission tokens a stake has earned since `_timestamp`
   */
  function countEmissions(uint256 _timestamp) public view returns (uint256 _c) {
    /// @dev if timestamp is before contract creation or later than now return 0 ///
    if (
      _timestamp < emissionStorage[0].timestamp || _timestamp > block.timestamp
    ) {
      _c = 0;
    } else {
      /**
       * @dev finds the most recent emission rate _timestamp comes after
       * Example:
       *  emChanges: *0...........1............2.....................3...........*
       *  timeline:  *(deploy)....x............x.....(timestamp).....x......(now)*
       */
      uint256 minT;
      for (uint256 i = 1; i <= emChanges.current(); ++i) {
        if (emissionStorage[i].timestamp < _timestamp) {
          minT += 1;
        }
      }
      /// @dev counts all emissions earned starting from minT -> now  ///
      for (uint256 i = minT; i <= emChanges.current(); ++i) {
        uint256 tSmall = emissionStorage[i].timestamp;
        uint256 tBig = emissionStorage[i + 1].timestamp; // 0 if not set yet
        if (i == minT) {
          tSmall = _timestamp;
        }
        if (i == emChanges.current()) {
          tBig = block.timestamp;
        }
        _c += (tBig - tSmall) / emissionStorage[i].rate;
      }
    }
  }

  /// ============ INTERNAL ============ ///

  /**
   * Helper function that sets contract state when adding a stake to this contract
   * @param staker The address to make the stake for
   * @param tokenId The tokenId being staked
   */
  function _addStake(address staker, uint256 tokenId) internal {
    /// @dev increments slots filled by staker ///
    stakesAddedPerAccount[staker].increment();
    /// @dev fills new slot (account => index => tokenId) ///
    accountStakes[staker][stakesAddedPerAccount[staker].current()] = tokenId;
    /// @dev add new stake to storage ///
    stakeStorage[tokenId] = Stake(
      staker,
      block.timestamp,
      stakesAddedPerAccount[staker].current()
    );
  }

  /**
   * Helper function that sets contract state when removing a stake from this contract
   * @param tokenId The tokenId being un-staked
   * @notice This function is not called when removing stakes from the old contract
   */
  function _removeStake(uint256 tokenId) internal {
    /// @dev copies the stake being removed ///
    Stake memory _thisStake = stakeStorage[tokenId];
    /// @dev increments slots emptied by staker ///
    stakesRemovedPerAccount[_thisStake.staker].increment();
    /// @dev increments emissions earned for removing this stake ///
    unstakedClaims[_thisStake.staker] += countEmissions(_thisStake.timestamp);
    /// @dev empty staker's slot (account => index => 0) ///
    delete accountStakes[_thisStake.staker][_thisStake.accountSlot];
    /// @dev removes stake from storage ///
    delete stakeStorage[tokenId];
  }

  /**
   * Helper function that sets contract state when emission changes occur
   * @param _seconds The number of seconds a token must be staked for to earn 1 emission token
   * @notice The emission rate cannot be 0 seconds
   */
  function _setEmissionRate(uint256 _seconds) private {
    if (_seconds == 0) {
      revert ZeroEmissionRate();
    }
    emChanges.increment();
    emissionStorage[emChanges.current()] = Emission(_seconds, block.timestamp);
  }

  /**
   * Helper function that gets the number of stakes an account has active with this contract
   * @param account The address to lookup
   * @return _active The number stakes
   */
  function _activeStakesCountPerAccount(address account)
    internal
    view
    returns (uint256 _active)
  {
    _active =
      stakesAddedPerAccount[account].current() -
      stakesRemovedPerAccount[account].current();
  }

  /**
   * Helper function that gets the number of stakes an account has active with the old contract
   * @param account The address to lookup
   * @return _active The number of stakes not yet removed from the old contract
   */
  function _activeStakesCountPerAccountOld(address account)
    internal
    view
    returns (uint256 _active)
  {
    uint256[] memory oldStakes = OldGrill.getIdsOfAddr(account);
    for (uint256 i = 0; i < oldStakes.length; ++i) {
      if (Parent.balanceOf(address(OldGrill), oldStakes[i]) == 1) {
        _active += 1;
      }
    }
  }

  /// ============ READ-ONLY ============ ///

  /**
   * Gets tokenIds for `account`s active stakes in this contract
   * @param account The address to lookup
   * @return _ids Array of tokenIds
   */
  function stakedIdsPerAccount(address account)
    public
    view
    returns (uint256[] memory _ids)
  {
    _ids = new uint256[](_activeStakesCountPerAccount(account));
    /// @dev finds all slots still filled ///
    uint256 found;
    for (uint256 i = 1; i <= stakesAddedPerAccount[account].current(); ++i) {
      if (accountStakes[account][i] != 0) {
        _ids[found++] = accountStakes[account][i];
      }
    }
  }

  /**
   * Gets tokenIds for `account`s active stakes in the old contract
   * @param account The address to lookup
   * @return _ids Array of tokenIds
   */
  function stakedIdsPerAccountOld(address account)
    public
    view
    returns (uint256[] memory _ids)
  {
    /// @dev gets all tokenIds account had staked ///
    uint256[] memory oldStakes = OldGrill.getIdsOfAddr(account);
    /// @dev finds all tokenIds still active in old contract ///
    _ids = new uint256[](_activeStakesCountPerAccountOld(account));
    uint256 found;
    for (uint256 i = 0; i < oldStakes.length; ++i) {
      if (Parent.balanceOf(address(OldGrill), oldStakes[i]) == 1) {
        _ids[found++] = oldStakes[i];
      }
    }
  }

  /**
   * Gets the total number of emission changes to date
   * @return _changes The current number of changes to emission rates
   */
  function emissionChanges() external view returns (uint256 _changes) {
    _changes = emChanges.current();
  }

  /**
   * Gets the number of emission tokens `account` has earned from their active stakes
   * @param account The address to lookup
   * @return _earned The number of claims
   * @notice Uses stakes from new and old contract
   */
  function stakedClaims(address account) public view returns (uint256 _earned) {
    /// @dev counts emissions for each active stake in this contract ///
    uint256[] memory ownedIds = stakedIdsPerAccount(account);
    for (uint256 i; i < ownedIds.length; ++i) {
      _earned += countEmissions(stakeStorage[ownedIds[i]].timestamp);
    }
    /// @dev counts emissions for each active stake in old contract ///
    uint256[] memory ownedIdsOld = stakedIdsPerAccountOld(account);
    for (uint256 i; i < ownedIdsOld.length; ++i) {
      _earned += countEmissions(OldGrill.getStake(ownedIdsOld[i]).timestamp);
    }
  }

  /**
   * Gets the number of emission tokens `account` has earned from their active and removed stakes
   * @param account The address to lookup
   * @return _earned The number of emissions _operator has earned from all past and current stakes
   * @notice Uses stakes from new and old contract
   */
  function totalClaims(address account)
    external
    view
    returns (uint256 _earned)
  {
    _earned = unstakedClaims[account] + stakedClaims(account);
  }

  /**
   * Gets the Stake object from this grill contract
   * @param tokenId The tokenId to get stake for
   * @return _s The Stake object
   */
  function stakeStorageGetter(uint256 tokenId)
    public
    view
    returns (Stake memory _s)
  {
    _s = stakeStorage[tokenId];
  }

  /**
   * Gets the Stake object from the old grill contract
   * @param tokenId The tokenId to get stake for
   * @return _og The old Stake object
   */
  function stakeStorageOld(uint256 tokenId)
    public
    view
    returns (IGRILL.Stake memory _og)
  {
    _og = OldGrill.getStake(tokenId);
  }
}

File 3 of 24 : Burger.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./Grill2.sol";

error BurningNotActive();
error ClaimingNotActive();
error CallerIsNotABurner();
error InsufficientClaimsRemaining();

/**
 * @title Burgers
 * @author Matt Carter
 * June 6, 2022
 *
 * This contract is for accounts to claim emission tokens (burgers) from their grill stakes.
 * Burgers have a `tokenId` of 1 and are burnable by owner-set `burner` addresses.
 */
contract Burger is ERC1155, Ownable {
  using Strings for uint256;
  /// contract instances ///
  Grill2 public immutable TheGrill;
  Grill2 public SpecialGrill;
  /// is claiming/burning/special grill active ///
  bool public isClaiming = false;
  bool public isBurning = false;
  bool public isSpecial = false;
  /// the number of burgers minted/burned ///
  uint256 public totalMints;
  uint256 public totalBurns;
  /// addresses allowed to burn burgers ///
  mapping(address => bool) public burners;
  /// the number of claims used by each account ///
  mapping(address => uint256) public claimsUsed;
  /// the number of burgers burned by each account ///
  mapping(address => uint256) public accountBurns;
  /// the number of burgers burned by each burner ///
  mapping(address => uint256) public burnerBurns;

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

  /**
   * Sets the initial base URI and address for the grill
   * @param _URI The baseURI for each token
   * @param aGrill The address of the astro grill contract
   */
  constructor(string memory _URI, address aGrill) ERC1155(_URI) {
    TheGrill = Grill2(aGrill);
  }

  /// ============ INTERNAL ============ ///

  /**
   * Gets the total number of burgers `account` has earned from the grill(s)
   * @param account The address to lookup
   * @return quantity The number of claims
   */
  function _totalClaimsEarned(address account)
    internal
    view
    returns (uint256 quantity)
  {
    quantity += TheGrill.totalClaims(account);
    /// @dev additionally counts special grill stakes ///
    if (isSpecial) {
      quantity += SpecialGrill.totalClaims(account);
    }
  }

  /// ============ OWNER ============ ///

  /**
   * Sets the new base URI for tokens
   * @param _URI The new base URI
   * @notice Uses the format: baselink.com/{}.json
   */
  function setURI(string memory _URI) public onlyOwner {
    _setURI(_URI);
  }

  /**
   * Toggles if claiming tokens is allowed
   */
  function toggleClaiming() public onlyOwner {
    isClaiming = !isClaiming;
  }

  /**
   * Toggles if burning tokens is allowed
   */
  function toggleBurning() public onlyOwner {
    isBurning = !isBurning;
  }

  /**
   * Approve an address to burn burgers
   * @param account The burner address
   * @param status The status of the approval
   * @notice A burner should be a contract address that correctly handles the burning of an operators tokens
   */
  function setBurner(address account, bool status) public onlyOwner {
    burners[account] = status;
  }

  /**
   * Mints `quantity` burgers to `account` without restrictions
   * @param quantity The number of tokens to mint
   * @param account The address to mint the tokens to
   */
  function ownerMint(uint256 quantity, address account) public onlyOwner {
    _mint(account, 1, quantity, "0x00");
    totalMints += quantity;
  }

  /**
   * Toggles if the special grill is running
   */
  function toggleSpecial() public onlyOwner {
    isSpecial = !isSpecial;
  }

  /**
   * Sets the special grill interface
   * @param aGrill The address of the special grill
   */
  function setSpecial(address aGrill) public onlyOwner {
    SpecialGrill = Grill2(aGrill);
  }

  /// ============ PUBLIC ============ ///

  /**
   * Mints `quantity` burgers to caller
   * @param quantity The number of burgers caller is trying to mint
   */
  function claimBurgers(uint256 quantity) public {
    if (!isClaiming) {
      revert ClaimingNotActive();
    }
    if (claimsUsed[msg.sender] + quantity > _totalClaimsEarned(msg.sender)) {
      revert InsufficientClaimsRemaining();
    }
    /// @dev mints `quantity` tokens with `tokenId` 1 to caller ///
    _mint(msg.sender, 1, quantity, "0x00");
    /// @dev sets contract state ///
    claimsUsed[msg.sender] += quantity;
    totalMints += quantity;
  }

  /**
   * Burns burgers on behalf of `account`
   * @param account The address having it's burgers burned
   * @param quantity The number of burgers to burn
   * @notice Only burners may call this function
   */
  function burnBurger(address account, uint256 quantity) public {
    if (!isBurning) {
      revert BurningNotActive();
    }
    if (!burners[msg.sender]) {
      revert CallerIsNotABurner();
    }
    /// @dev burns `quantity` tokens of `tokenId` 1 for `account` ///
    _burn(account, 1, quantity);
    /// @dev sets contract state ///
    totalBurns += quantity;
    accountBurns[account] += quantity;
    burnerBurns[msg.sender] += quantity;
  }

  /// ============ READ-ONLY ============ ///

  /**
   * Gets the balance of burgers for `account`
   * @param account The address to lookup
   * @return _balance The number of burgers
   * @notice burgers have a `tokenId` of 1
   */
  function balanceOf(address account) public view returns (uint256 _balance) {
    _balance = balanceOf(account, 1);
  }

  /**
   * Gets the total number of burgers in circulation
   * @return _totalSupply The number of burgers
   */
  function totalSupply() public view returns (uint256 _totalSupply) {
    _totalSupply = totalMints - totalBurns;
  }

  /**
   * Gets the number of claims `account` has remaining
   * @param account The address to lookup
   * @return _remaining The number of claims
   */
  function tokenClaimsLeft(address account)
    public
    view
    returns (uint256 _remaining)
  {
    _remaining = _totalClaimsEarned(account) - claimsUsed[account];
  }
}

File 4 of 24 : PhysicalBull.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./Burger.sol";

error ExceedsMaxClaims();
error InvalidTokenAmount();
error CallerIsNotTokenOwner();
error CallerNotInCommunity();

/**
 * @title Physical Bulls
 * @author Matt Carter
 * June 6, 2022
 *
 * This contract handles the payment and verification for pre-ordering physical bulls. Users
 * will pre-order physical bulls by exchanging erc20 tokens and burning burgers.
 */
contract PhysicalBull is Ownable {
  using Strings for uint256;
  using SafeERC20 for IERC20;
  /// contract instances ///
  IERC20 public erc20;
  Burger public immutable BurgerContract;
  Grill2 public immutable GrillContract;
  ISUPER1155 public constant Astro =
    ISUPER1155(0x71B11Ac923C967CD5998F23F6dae0d779A6ac8Af);
  /// if claiming is active ///
  bool public isClaiming = false;
  /// the current erc20 payment receiver ///
  address public vault;
  /// the number of physical bulls claimed ///
  uint256 public totalClaims;
  /// the max number of claims an account can make ///
  uint256 public maxClaims = 3;
  /// the number of burgers burned by this contract ///
  uint256 public totalBurns;
  /// the number of burgers to burn for 1 physical bull ///
  uint256 public burnScalar = 1;
  /// the amount of erc20 tokens to claim 1 physical bull ///
  uint256 public erc20Cost = 100000000; // 100.000000 $USDC
  /// the number of burgers each account has burned ///
  mapping(address => uint256) public accountBurns;
  /// the number of physcal bulls each account has claimed ///
  mapping(address => uint256) public accountClaims;

  /**
   * @param _vault The address to receive erc20 tokens
   * @param _erc20 The contract address of the erc20 contract to use for payments
   * @param _burger The address of the burger contract
   * @param _grill The address of the new grill contract
   */
  constructor(
    address _vault,
    address _erc20,
    address _burger,
    address _grill
  ) {
    vault = _vault;
    erc20 = IERC20(_erc20);
    BurgerContract = Burger(_burger);
    GrillContract = Grill2(_grill);
  }

  /// ============ OWNER ============ ///

  /**
   * Toggles if claiming is active
   */
  function toggleClaiming() public onlyOwner {
    isClaiming = !isClaiming;
  }

  /**
   * Sets the cost for each bull claim
   * @param _erc20Cost The number of erc20 tokens to transfer
   */
  function setERC20Cost(uint256 _erc20Cost) public onlyOwner {
    erc20Cost = _erc20Cost;
  }

  /**
   * Sets the erc20 contract address to use for payments
   * @param _erc20 The erc20 contract address
   */
  function setERC20Address(address _erc20) public onlyOwner {
    erc20 = IERC20(_erc20);
  }

  /**
   * Sets the number of burgers to burn for each bull claim
   * @param _burnScalar The number of burgers to burn
   */
  function setBurnScalar(uint256 _burnScalar) public onlyOwner {
    burnScalar = _burnScalar;
  }

  /**
   * Sets the limit for the max number of claims per account
   * @param _maxClaims The max number of claims per account
   */
  function setMaxClaims(uint256 _maxClaims) public onlyOwner {
    maxClaims = _maxClaims;
  }

  /**
   * Sets the address for receiving erc20 payments
   * @param _vault The address to receive payments
   */
  function setVault(address _vault) public onlyOwner {
    vault = _vault;
  }

  /// ============ INTERNAL ============ ///

  /**
   * Checks if `account` owns any astrobulls or has any active stakes
   * @param account The address to lookup
   * @return _b If `account` owns or is the staker of > 0 astrobulls
   * @notice Checks both old and new grill contracts for active stakes
   */
  function _checkCommunityStatus(address account)
    internal
    view
    returns (bool _b)
  {
    _b = false;
    /// @dev first check if caller owns > 0 astrobulls ///
    if (Astro.groupBalances(1, account) > 0) {
      _b = true;
    }
    /// @dev next, check if caller has any active stakes in the old grill ///
    else if (GrillContract.stakedIdsPerAccountOld(account).length > 0) {
      _b = true;
    }
    /// @dev lastly, check if caller has any active stakes in the new grill ///
    else if (GrillContract.stakedIdsPerAccount(account).length > 0) {
      _b = true;
    }
  }

  /// ============ PUBLIC ============ ///

  /**
   * Claims `quantity` number of physical bulls if caller owns > 0 astrobulls
   * @param quantity The number of bulls to claim
   * @notice Caller will send `erc20Cost` * `quantity` tokens to `vault`
   * @notice Caller must give this contract a sufficient allowance to send their erc20 tokens
   */
  function claimBulls(uint256 quantity) public {
    if (!isClaiming) {
      revert ClaimingNotActive();
    }
    if (!_checkCommunityStatus(msg.sender)) {
      revert CallerNotInCommunity();
    }
    if (accountClaims[msg.sender] + quantity > maxClaims) {
      revert ExceedsMaxClaims();
    }
    if (quantity == 0) {
      revert InvalidTokenAmount();
    }
    /// @dev sends erc20 tokens from caller to vault ///
    erc20.safeTransferFrom(msg.sender, vault, quantity * erc20Cost);
    /// @dev burns caller's burgers ///
    uint256 toBurn = burnScalar * quantity;
    BurgerContract.burnBurger(msg.sender, burnScalar * quantity);
    /// @dev sets contract state ///
    totalBurns += toBurn;
    accountBurns[msg.sender] += toBurn;
    totalClaims += quantity;
    accountClaims[msg.sender] += quantity;
  }
}

File 5 of 24 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 7 of 24 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 9 of 24 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 10 of 24 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 11 of 24 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 12 of 24 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 14 of 24 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 16 of 24 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 *
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 17 of 24 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 18 of 24 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 19 of 24 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.4;

import './IERC721A.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

/**
 * @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 Context, ERC165, IERC721A {
    using Address for address;
    using Strings for uint256;

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _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 _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

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

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    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();
        }
    }

    /**
     * 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 See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].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 {
        _addressData[owner].aux = aux;
    }

    /**
     * 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) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr) if (curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // 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.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

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

    /**
     * @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, tokenId.toString())) : '';
    }

    /**
     * @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 See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

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

        _approve(to, tokenId, owner);
    }

    /**
     * @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 == _msgSender()) revert ApproveToCaller();

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), 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.isContract()) 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 && !_ownerships[tokenId].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 {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

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

            if (to.isContract()) {
                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 {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            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 {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // 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 {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        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 {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

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

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // 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 {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        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 Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == 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 {}
}

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

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A is IERC721, IERC721Metadata {
    /**
     * 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();

    // Compiler will pack this into a single 256bit word.
    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;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

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

File 22 of 24 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 23 of 24 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @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);
}

File 24 of 24 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @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
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_URI","type":"string"},{"internalType":"address","name":"burgerAddr","type":"address"},{"internalType":"address","name":"grillAddr","type":"address"}],"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":"AstrobullAlreadyClaimed","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CallerNotTokenOwner","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"MintingNotActive","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"Astro","outputs":[{"internalType":"contract ISUPER1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BurgerContract","outputs":[{"internalType":"contract Burger","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GrillContract","outputs":[{"internalType":"contract Grill2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OldGrill","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accountBurns","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnScalar","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"astrobullIds","type":"uint256[]"}],"name":"claimBull","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":"isMinting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"portedIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"portingMeta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"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":"uint256","name":"_burnScalar","type":"uint256"}],"name":"setBurnScalar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"_URI","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurns","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405260026009553480156200001657600080fd5b50604051620024363803806200243683398101604081905262000039916200020a565b60408051808201825260098152684d45544142554c4c5360b81b602080830191825283518085019094526005845264135095531360da1b908401528151919291620000879160029162000131565b5080516200009d90600390602084019062000131565b5050600160005550620000b033620000df565b8251620000c590600b90602086019062000131565b506001600160a01b039182166080521660a052506200034a565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200013f906200030d565b90600052602060002090601f016020900481019282620001635760008555620001ae565b82601f106200017e57805160ff1916838001178555620001ae565b82800160010185558215620001ae579182015b82811115620001ae57825182559160200191906001019062000191565b50620001bc929150620001c0565b5090565b5b80821115620001bc5760008155600101620001c1565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200020557600080fd5b919050565b6000806000606084860312156200022057600080fd5b83516001600160401b03808211156200023857600080fd5b818601915086601f8301126200024d57600080fd5b815181811115620002625762000262620001d7565b604051601f8201601f19908116603f011681019083821181831017156200028d576200028d620001d7565b81604052828152602093508984848701011115620002aa57600080fd5b600091505b82821015620002ce5784820184015181830185015290830190620002af565b82821115620002e05760008484830101525b9650620002f2915050868201620001ed565b935050506200030460408501620001ed565b90509250925092565b600181811c908216806200032257607f821691505b602082108114156200034457634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a0516120b162000385600039600081816102ab0152818161155f01526116230152600081816104a00152610d5c01526120b16000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c8063715018a611610125578063d52c57e0116100ad578063f2fde38b1161007c578063f2fde38b14610488578063f32d6fe11461049b578063f3d14025146104c2578063f51b93fc146104cb578063f7ba1ba9146104de57600080fd5b8063d52c57e014610424578063e485840014610437578063e985e9c51461045a578063edaab4f51461046d57600080fd5b80638da5cb5b116100f45780638da5cb5b146103d257806395d89b41146103e3578063a22cb465146103eb578063b88d4fde146103fe578063c87b56dd1461041157600080fd5b8063715018a614610387578063790f70be1461038f5780637d55094d146103aa5780637ec4a307146103b257600080fd5b806323b872dd116101a857806354214f691161017757806354214f691461033c5780635b8ad429146103505780636352211e14610358578063694ca01d1461036b57806370a082311461037457600080fd5b806323b872dd146102ef5780632a8092df1461030257806342842e0e146103165780634e6c8fa91461032957600080fd5b8063095ea7b3116101e4578063095ea7b31461029357806309b51a90146102a65780631141d7de146102cd57806318160ddd146102d557600080fd5b806301ffc9a71461021657806302fe53051461023e57806306fdde0314610253578063081812fc14610268575b600080fd5b61022961022436600461194b565b6104fe565b60405190151581526020015b60405180910390f35b61025161024c366004611a34565b610550565b005b61025b61059a565b6040516102359190611ad4565b61027b610276366004611ae7565b61062c565b6040516001600160a01b039091168152602001610235565b6102516102a1366004611b15565b610670565b61027b7f000000000000000000000000000000000000000000000000000000000000000081565b61025b6106f7565b60015460005403600019015b604051908152602001610235565b6102516102fd366004611b41565b610785565b60085461022990600160a01b900460ff1681565b610251610324366004611b41565b610790565b610251610337366004611ae7565b6107ab565b60085461022990600160a81b900460ff1681565b6102516107da565b61027b610366366004611ae7565b610825565b6102e1600a5481565b6102e1610382366004611b82565b610837565b610251610885565b61027b7371b11ac923c967cd5998f23f6dae0d779a6ac8af81565b6102516108bb565b6102e16103c0366004611ae7565b600d6020526000908152604090205481565b6008546001600160a01b031661027b565b61025b610906565b6102516103f9366004611bad565b610915565b61025161040c366004611be6565b6109ab565b61025b61041f366004611ae7565b6109f5565b610251610432366004611c65565b610ace565b610229610445366004611ae7565b600c6020526000908152604090205460ff1681565b610229610468366004611c8a565b610b02565b61027b73e11af478af241fab926f4c111d50139ae003f7fd81565b610251610496366004611b82565b610b30565b61027b7f000000000000000000000000000000000000000000000000000000000000000081565b6102e160095481565b6102516104d9366004611cb8565b610bcb565b6102e16104ec366004611b82565b600e6020526000908152604090205481565b60006001600160e01b031982166380ac58cd60e01b148061052f57506001600160e01b03198216635b5e139f60e01b145b8061054a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6008546001600160a01b031633146105835760405162461bcd60e51b815260040161057a90611d5d565b60405180910390fd5b805161059690600b90602084019061189c565b5050565b6060600280546105a990611d92565b80601f01602080910402602001604051908101604052809291908181526020018280546105d590611d92565b80156106225780601f106105f757610100808354040283529160200191610622565b820191906000526020600020905b81548152906001019060200180831161060557829003601f168201915b5050505050905090565b600061063782610e08565b610654576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061067b82610825565b9050806001600160a01b0316836001600160a01b031614156106b05760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216146106e7576106ca8133610b02565b6106e7576040516367d9dca160e11b815260040160405180910390fd5b6106f2838383610e41565b505050565b600b805461070490611d92565b80601f016020809104026020016040519081016040528092919081815260200182805461073090611d92565b801561077d5780601f106107525761010080835404028352916020019161077d565b820191906000526020600020905b81548152906001019060200180831161076057829003601f168201915b505050505081565b6106f2838383610e9d565b6106f2838383604051806020016040528060008152506109ab565b6008546001600160a01b031633146107d55760405162461bcd60e51b815260040161057a90611d5d565b600955565b6008546001600160a01b031633146108045760405162461bcd60e51b815260040161057a90611d5d565b6008805460ff60a81b198116600160a81b9182900460ff1615909102179055565b60006108308261108a565b5192915050565b60006001600160a01b038216610860576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b031633146108af5760405162461bcd60e51b815260040161057a90611d5d565b6108b960006111ac565b565b6008546001600160a01b031633146108e55760405162461bcd60e51b815260040161057a90611d5d565b6008805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6060600380546105a990611d92565b6001600160a01b03821633141561093f5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6109b6848484610e9d565b6001600160a01b0383163b156109ef576109d2848484846111fe565b6109ef576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600854606090600160a81b900460ff1615610a3c57600b610a15836112f6565b604051602001610a26929190611de9565b6040516020818303038152906040529050919050565b600b8054610a4990611d92565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7590611d92565b8015610ac25780601f10610a9757610100808354040283529160200191610ac2565b820191906000526020600020905b815481529060010190602001808311610aa557829003601f168201915b50505050509050919050565b6008546001600160a01b03163314610af85760405162461bcd60e51b815260040161057a90611d5d565b61059681836113f3565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6008546001600160a01b03163314610b5a5760405162461bcd60e51b815260040161057a90611d5d565b6001600160a01b038116610bbf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161057a565b610bc8816111ac565b50565b600854600160a01b900460ff16610bf5576040516373020e4b60e01b815260040160405180910390fd5b60008054905b8251811015610d2b57610c2733848381518110610c1a57610c1a611ea4565b602002602001015161140d565b610c445760405163b23b68b760e01b815260040160405180910390fd5b600c6000848381518110610c5a57610c5a611ea4565b60209081029190910181015182528101919091526040016000205460ff1615610c965760405163e8b6f10560e01b815260040160405180910390fd5b828181518110610ca857610ca8611ea4565b6020026020010151600d6000848152602001908152602001600020819055506001600c6000858481518110610cdf57610cdf611ea4565b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550600182610d199190611ed0565b9150610d2481611ee8565b9050610bfb565b5060008251600954610d3d9190611f03565b604051632cde1a3960e11b8152336004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906359bc347290604401600060405180830381600087803b158015610da857600080fd5b505af1158015610dbc573d6000803e3d6000fd5b5050505080600a6000828254610dd29190611ed0565b9091555050336000908152600e602052604081208054839290610df6908490611ed0565b925050819055506106f23384516113f3565b600081600111158015610e1c575060005482105b801561054a575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610ea88261108a565b9050836001600160a01b031681600001516001600160a01b031614610edf5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480610efd5750610efd8533610b02565b80610f18575033610f0d8461062c565b6001600160a01b0316145b905080610f3857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416610f5f57604051633a954ecd60e21b815260040160405180910390fd5b610f6b60008487610e41565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661103f57600054821461103f57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b604080516060810182526000808252602082018190529181019190915281806001116111935760005481101561119357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906111915780516001600160a01b031615611128579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff161515928101929092521561118c579392505050565b611128565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611233903390899088908890600401611f22565b602060405180830381600087803b15801561124d57600080fd5b505af192505050801561127d575060408051601f3d908101601f1916820190925261127a91810190611f5f565b60015b6112d8573d8080156112ab576040519150601f19603f3d011682016040523d82523d6000602084013e6112b0565b606091505b5080516112d0576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60608161131a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611344578061132e81611ee8565b915061133d9050600a83611f92565b915061131e565b6000816001600160401b0381111561135e5761135e61196f565b6040519080825280601f01601f191660200182016040528015611388576020820181803683370190505b5090505b84156112ee5761139d600183611fa6565b91506113aa600a86611fbd565b6113b5906030611ed0565b60f81b8183815181106113ca576113ca611ea4565b60200101906001600160f81b031916908160001a9053506113ec600a86611f92565b945061138c565b6105968282604051806020016040528060008152506116d8565b604051627eeac760e11b81526001600160a01b0383166004820152602481018290526000907371b11ac923c967cd5998f23f6dae0d779a6ac8af9062fdd58e9060440160206040518083038186803b15801561146857600080fd5b505afa15801561147c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a09190611fd1565b600114156114b05750600161054a565b604051627eeac760e11b815273e11af478af241fab926f4c111d50139ae003f7fd6004820152602481018390527371b11ac923c967cd5998f23f6dae0d779a6ac8af9062fdd58e9060440160206040518083038186803b15801561151357600080fd5b505afa158015611527573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154b9190611fd1565b6001141561161757826001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166345e4a118846040518263ffffffff1660e01b81526004016115ab91815260200190565b60606040518083038186803b1580156115c357600080fd5b505afa1580156115d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fb9190611fea565b602001516001600160a01b03161415611612575060015b61054a565b826001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313dd4b0846040518263ffffffff1660e01b815260040161166f91815260200190565b60606040518083038186803b15801561168757600080fd5b505afa15801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf9190612037565b516001600160a01b0316141561054a5750600192915050565b6000546001600160a01b03841661170157604051622e076360e81b815260040160405180910390fd5b8261171f5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600490925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15611847575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461181060008784806001019550876111fe565b61182d576040516368d2bf6b60e11b815260040160405180910390fd5b8082106117c557826000541461184257600080fd5b61188c565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210611848575b5060009081556109ef9085838684565b8280546118a890611d92565b90600052602060002090601f0160209004810192826118ca5760008555611910565b82601f106118e357805160ff1916838001178555611910565b82800160010185558215611910579182015b828111156119105782518255916020019190600101906118f5565b5061191c929150611920565b5090565b5b8082111561191c5760008155600101611921565b6001600160e01b031981168114610bc857600080fd5b60006020828403121561195d57600080fd5b813561196881611935565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156119a7576119a761196f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156119d5576119d561196f565b604052919050565b60006001600160401b038311156119f6576119f661196f565b611a09601f8401601f19166020016119ad565b9050828152838383011115611a1d57600080fd5b828260208301376000602084830101529392505050565b600060208284031215611a4657600080fd5b81356001600160401b03811115611a5c57600080fd5b8201601f81018413611a6d57600080fd5b6112ee848235602084016119dd565b60005b83811015611a97578181015183820152602001611a7f565b838111156109ef5750506000910152565b60008151808452611ac0816020860160208601611a7c565b601f01601f19169290920160200192915050565b6020815260006119686020830184611aa8565b600060208284031215611af957600080fd5b5035919050565b6001600160a01b0381168114610bc857600080fd5b60008060408385031215611b2857600080fd5b8235611b3381611b00565b946020939093013593505050565b600080600060608486031215611b5657600080fd5b8335611b6181611b00565b92506020840135611b7181611b00565b929592945050506040919091013590565b600060208284031215611b9457600080fd5b813561196881611b00565b8015158114610bc857600080fd5b60008060408385031215611bc057600080fd5b8235611bcb81611b00565b91506020830135611bdb81611b9f565b809150509250929050565b60008060008060808587031215611bfc57600080fd5b8435611c0781611b00565b93506020850135611c1781611b00565b92506040850135915060608501356001600160401b03811115611c3957600080fd5b8501601f81018713611c4a57600080fd5b611c59878235602084016119dd565b91505092959194509250565b60008060408385031215611c7857600080fd5b823591506020830135611bdb81611b00565b60008060408385031215611c9d57600080fd5b8235611ca881611b00565b91506020830135611bdb81611b00565b60006020808385031215611ccb57600080fd5b82356001600160401b0380821115611ce257600080fd5b818501915085601f830112611cf657600080fd5b813581811115611d0857611d0861196f565b8060051b9150611d198483016119ad565b8181529183018401918481019088841115611d3357600080fd5b938501935b83851015611d5157843582529385019390850190611d38565b98975050505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c90821680611da657607f821691505b60208210811415611dc757634e487b7160e01b600052602260045260246000fd5b50919050565b60008151611ddf818560208601611a7c565b9290920192915050565b600080845481600182811c915080831680611e0557607f831692505b6020808410821415611e2557634e487b7160e01b86526022600452602486fd5b818015611e395760018114611e4a57611e77565b60ff19861689528489019650611e77565b60008b81526020902060005b86811015611e6f5781548b820152908501908301611e56565b505084890196505b505050505050611e9b611e8a8286611dcd565b64173539b7b760d91b815260050190565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115611ee357611ee3611eba565b500190565b6000600019821415611efc57611efc611eba565b5060010190565b6000816000190483118215151615611f1d57611f1d611eba565b500290565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611f5590830184611aa8565b9695505050505050565b600060208284031215611f7157600080fd5b815161196881611935565b634e487b7160e01b600052601260045260246000fd5b600082611fa157611fa1611f7c565b500490565b600082821015611fb857611fb8611eba565b500390565b600082611fcc57611fcc611f7c565b500690565b600060208284031215611fe357600080fd5b5051919050565b600060608284031215611ffc57600080fd5b612004611985565b825161200f81611b9f565b8152602083015161201f81611b00565b60208201526040928301519281019290925250919050565b60006060828403121561204957600080fd5b612051611985565b825161205c81611b00565b815260208381015190820152604092830151928101929092525091905056fea2646970667358221220b9246af2c5aa80b8047b7eccb1aa9abc9630669a8f7f350d52378c71c7ba03d864736f6c63430008090033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000029ef5b777a0fb28c55c31e9f765bfbe42f15b86600000000000000000000000090dd49e039b6c1343cdd59c7032c51a9f769823f00000000000000000000000000000000000000000000000000000000000000246d656469612e617374726f6672656e732e636f6d2f4d65746142756c6c2f302e6a736f6e00000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102115760003560e01c8063715018a611610125578063d52c57e0116100ad578063f2fde38b1161007c578063f2fde38b14610488578063f32d6fe11461049b578063f3d14025146104c2578063f51b93fc146104cb578063f7ba1ba9146104de57600080fd5b8063d52c57e014610424578063e485840014610437578063e985e9c51461045a578063edaab4f51461046d57600080fd5b80638da5cb5b116100f45780638da5cb5b146103d257806395d89b41146103e3578063a22cb465146103eb578063b88d4fde146103fe578063c87b56dd1461041157600080fd5b8063715018a614610387578063790f70be1461038f5780637d55094d146103aa5780637ec4a307146103b257600080fd5b806323b872dd116101a857806354214f691161017757806354214f691461033c5780635b8ad429146103505780636352211e14610358578063694ca01d1461036b57806370a082311461037457600080fd5b806323b872dd146102ef5780632a8092df1461030257806342842e0e146103165780634e6c8fa91461032957600080fd5b8063095ea7b3116101e4578063095ea7b31461029357806309b51a90146102a65780631141d7de146102cd57806318160ddd146102d557600080fd5b806301ffc9a71461021657806302fe53051461023e57806306fdde0314610253578063081812fc14610268575b600080fd5b61022961022436600461194b565b6104fe565b60405190151581526020015b60405180910390f35b61025161024c366004611a34565b610550565b005b61025b61059a565b6040516102359190611ad4565b61027b610276366004611ae7565b61062c565b6040516001600160a01b039091168152602001610235565b6102516102a1366004611b15565b610670565b61027b7f00000000000000000000000090dd49e039b6c1343cdd59c7032c51a9f769823f81565b61025b6106f7565b60015460005403600019015b604051908152602001610235565b6102516102fd366004611b41565b610785565b60085461022990600160a01b900460ff1681565b610251610324366004611b41565b610790565b610251610337366004611ae7565b6107ab565b60085461022990600160a81b900460ff1681565b6102516107da565b61027b610366366004611ae7565b610825565b6102e1600a5481565b6102e1610382366004611b82565b610837565b610251610885565b61027b7371b11ac923c967cd5998f23f6dae0d779a6ac8af81565b6102516108bb565b6102e16103c0366004611ae7565b600d6020526000908152604090205481565b6008546001600160a01b031661027b565b61025b610906565b6102516103f9366004611bad565b610915565b61025161040c366004611be6565b6109ab565b61025b61041f366004611ae7565b6109f5565b610251610432366004611c65565b610ace565b610229610445366004611ae7565b600c6020526000908152604090205460ff1681565b610229610468366004611c8a565b610b02565b61027b73e11af478af241fab926f4c111d50139ae003f7fd81565b610251610496366004611b82565b610b30565b61027b7f00000000000000000000000029ef5b777a0fb28c55c31e9f765bfbe42f15b86681565b6102e160095481565b6102516104d9366004611cb8565b610bcb565b6102e16104ec366004611b82565b600e6020526000908152604090205481565b60006001600160e01b031982166380ac58cd60e01b148061052f57506001600160e01b03198216635b5e139f60e01b145b8061054a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6008546001600160a01b031633146105835760405162461bcd60e51b815260040161057a90611d5d565b60405180910390fd5b805161059690600b90602084019061189c565b5050565b6060600280546105a990611d92565b80601f01602080910402602001604051908101604052809291908181526020018280546105d590611d92565b80156106225780601f106105f757610100808354040283529160200191610622565b820191906000526020600020905b81548152906001019060200180831161060557829003601f168201915b5050505050905090565b600061063782610e08565b610654576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061067b82610825565b9050806001600160a01b0316836001600160a01b031614156106b05760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216146106e7576106ca8133610b02565b6106e7576040516367d9dca160e11b815260040160405180910390fd5b6106f2838383610e41565b505050565b600b805461070490611d92565b80601f016020809104026020016040519081016040528092919081815260200182805461073090611d92565b801561077d5780601f106107525761010080835404028352916020019161077d565b820191906000526020600020905b81548152906001019060200180831161076057829003601f168201915b505050505081565b6106f2838383610e9d565b6106f2838383604051806020016040528060008152506109ab565b6008546001600160a01b031633146107d55760405162461bcd60e51b815260040161057a90611d5d565b600955565b6008546001600160a01b031633146108045760405162461bcd60e51b815260040161057a90611d5d565b6008805460ff60a81b198116600160a81b9182900460ff1615909102179055565b60006108308261108a565b5192915050565b60006001600160a01b038216610860576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b031633146108af5760405162461bcd60e51b815260040161057a90611d5d565b6108b960006111ac565b565b6008546001600160a01b031633146108e55760405162461bcd60e51b815260040161057a90611d5d565b6008805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6060600380546105a990611d92565b6001600160a01b03821633141561093f5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6109b6848484610e9d565b6001600160a01b0383163b156109ef576109d2848484846111fe565b6109ef576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600854606090600160a81b900460ff1615610a3c57600b610a15836112f6565b604051602001610a26929190611de9565b6040516020818303038152906040529050919050565b600b8054610a4990611d92565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7590611d92565b8015610ac25780601f10610a9757610100808354040283529160200191610ac2565b820191906000526020600020905b815481529060010190602001808311610aa557829003601f168201915b50505050509050919050565b6008546001600160a01b03163314610af85760405162461bcd60e51b815260040161057a90611d5d565b61059681836113f3565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6008546001600160a01b03163314610b5a5760405162461bcd60e51b815260040161057a90611d5d565b6001600160a01b038116610bbf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161057a565b610bc8816111ac565b50565b600854600160a01b900460ff16610bf5576040516373020e4b60e01b815260040160405180910390fd5b60008054905b8251811015610d2b57610c2733848381518110610c1a57610c1a611ea4565b602002602001015161140d565b610c445760405163b23b68b760e01b815260040160405180910390fd5b600c6000848381518110610c5a57610c5a611ea4565b60209081029190910181015182528101919091526040016000205460ff1615610c965760405163e8b6f10560e01b815260040160405180910390fd5b828181518110610ca857610ca8611ea4565b6020026020010151600d6000848152602001908152602001600020819055506001600c6000858481518110610cdf57610cdf611ea4565b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550600182610d199190611ed0565b9150610d2481611ee8565b9050610bfb565b5060008251600954610d3d9190611f03565b604051632cde1a3960e11b8152336004820152602481018290529091507f00000000000000000000000029ef5b777a0fb28c55c31e9f765bfbe42f15b8666001600160a01b0316906359bc347290604401600060405180830381600087803b158015610da857600080fd5b505af1158015610dbc573d6000803e3d6000fd5b5050505080600a6000828254610dd29190611ed0565b9091555050336000908152600e602052604081208054839290610df6908490611ed0565b925050819055506106f23384516113f3565b600081600111158015610e1c575060005482105b801561054a575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610ea88261108a565b9050836001600160a01b031681600001516001600160a01b031614610edf5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480610efd5750610efd8533610b02565b80610f18575033610f0d8461062c565b6001600160a01b0316145b905080610f3857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416610f5f57604051633a954ecd60e21b815260040160405180910390fd5b610f6b60008487610e41565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661103f57600054821461103f57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b604080516060810182526000808252602082018190529181019190915281806001116111935760005481101561119357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906111915780516001600160a01b031615611128579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff161515928101929092521561118c579392505050565b611128565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611233903390899088908890600401611f22565b602060405180830381600087803b15801561124d57600080fd5b505af192505050801561127d575060408051601f3d908101601f1916820190925261127a91810190611f5f565b60015b6112d8573d8080156112ab576040519150601f19603f3d011682016040523d82523d6000602084013e6112b0565b606091505b5080516112d0576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60608161131a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611344578061132e81611ee8565b915061133d9050600a83611f92565b915061131e565b6000816001600160401b0381111561135e5761135e61196f565b6040519080825280601f01601f191660200182016040528015611388576020820181803683370190505b5090505b84156112ee5761139d600183611fa6565b91506113aa600a86611fbd565b6113b5906030611ed0565b60f81b8183815181106113ca576113ca611ea4565b60200101906001600160f81b031916908160001a9053506113ec600a86611f92565b945061138c565b6105968282604051806020016040528060008152506116d8565b604051627eeac760e11b81526001600160a01b0383166004820152602481018290526000907371b11ac923c967cd5998f23f6dae0d779a6ac8af9062fdd58e9060440160206040518083038186803b15801561146857600080fd5b505afa15801561147c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a09190611fd1565b600114156114b05750600161054a565b604051627eeac760e11b815273e11af478af241fab926f4c111d50139ae003f7fd6004820152602481018390527371b11ac923c967cd5998f23f6dae0d779a6ac8af9062fdd58e9060440160206040518083038186803b15801561151357600080fd5b505afa158015611527573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154b9190611fd1565b6001141561161757826001600160a01b03167f00000000000000000000000090dd49e039b6c1343cdd59c7032c51a9f769823f6001600160a01b03166345e4a118846040518263ffffffff1660e01b81526004016115ab91815260200190565b60606040518083038186803b1580156115c357600080fd5b505afa1580156115d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fb9190611fea565b602001516001600160a01b03161415611612575060015b61054a565b826001600160a01b03167f00000000000000000000000090dd49e039b6c1343cdd59c7032c51a9f769823f6001600160a01b031663313dd4b0846040518263ffffffff1660e01b815260040161166f91815260200190565b60606040518083038186803b15801561168757600080fd5b505afa15801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf9190612037565b516001600160a01b0316141561054a5750600192915050565b6000546001600160a01b03841661170157604051622e076360e81b815260040160405180910390fd5b8261171f5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600490925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15611847575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461181060008784806001019550876111fe565b61182d576040516368d2bf6b60e11b815260040160405180910390fd5b8082106117c557826000541461184257600080fd5b61188c565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210611848575b5060009081556109ef9085838684565b8280546118a890611d92565b90600052602060002090601f0160209004810192826118ca5760008555611910565b82601f106118e357805160ff1916838001178555611910565b82800160010185558215611910579182015b828111156119105782518255916020019190600101906118f5565b5061191c929150611920565b5090565b5b8082111561191c5760008155600101611921565b6001600160e01b031981168114610bc857600080fd5b60006020828403121561195d57600080fd5b813561196881611935565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156119a7576119a761196f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156119d5576119d561196f565b604052919050565b60006001600160401b038311156119f6576119f661196f565b611a09601f8401601f19166020016119ad565b9050828152838383011115611a1d57600080fd5b828260208301376000602084830101529392505050565b600060208284031215611a4657600080fd5b81356001600160401b03811115611a5c57600080fd5b8201601f81018413611a6d57600080fd5b6112ee848235602084016119dd565b60005b83811015611a97578181015183820152602001611a7f565b838111156109ef5750506000910152565b60008151808452611ac0816020860160208601611a7c565b601f01601f19169290920160200192915050565b6020815260006119686020830184611aa8565b600060208284031215611af957600080fd5b5035919050565b6001600160a01b0381168114610bc857600080fd5b60008060408385031215611b2857600080fd5b8235611b3381611b00565b946020939093013593505050565b600080600060608486031215611b5657600080fd5b8335611b6181611b00565b92506020840135611b7181611b00565b929592945050506040919091013590565b600060208284031215611b9457600080fd5b813561196881611b00565b8015158114610bc857600080fd5b60008060408385031215611bc057600080fd5b8235611bcb81611b00565b91506020830135611bdb81611b9f565b809150509250929050565b60008060008060808587031215611bfc57600080fd5b8435611c0781611b00565b93506020850135611c1781611b00565b92506040850135915060608501356001600160401b03811115611c3957600080fd5b8501601f81018713611c4a57600080fd5b611c59878235602084016119dd565b91505092959194509250565b60008060408385031215611c7857600080fd5b823591506020830135611bdb81611b00565b60008060408385031215611c9d57600080fd5b8235611ca881611b00565b91506020830135611bdb81611b00565b60006020808385031215611ccb57600080fd5b82356001600160401b0380821115611ce257600080fd5b818501915085601f830112611cf657600080fd5b813581811115611d0857611d0861196f565b8060051b9150611d198483016119ad565b8181529183018401918481019088841115611d3357600080fd5b938501935b83851015611d5157843582529385019390850190611d38565b98975050505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c90821680611da657607f821691505b60208210811415611dc757634e487b7160e01b600052602260045260246000fd5b50919050565b60008151611ddf818560208601611a7c565b9290920192915050565b600080845481600182811c915080831680611e0557607f831692505b6020808410821415611e2557634e487b7160e01b86526022600452602486fd5b818015611e395760018114611e4a57611e77565b60ff19861689528489019650611e77565b60008b81526020902060005b86811015611e6f5781548b820152908501908301611e56565b505084890196505b505050505050611e9b611e8a8286611dcd565b64173539b7b760d91b815260050190565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115611ee357611ee3611eba565b500190565b6000600019821415611efc57611efc611eba565b5060010190565b6000816000190483118215151615611f1d57611f1d611eba565b500290565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611f5590830184611aa8565b9695505050505050565b600060208284031215611f7157600080fd5b815161196881611935565b634e487b7160e01b600052601260045260246000fd5b600082611fa157611fa1611f7c565b500490565b600082821015611fb857611fb8611eba565b500390565b600082611fcc57611fcc611f7c565b500690565b600060208284031215611fe357600080fd5b5051919050565b600060608284031215611ffc57600080fd5b612004611985565b825161200f81611b9f565b8152602083015161201f81611b00565b60208201526040928301519281019290925250919050565b60006060828403121561204957600080fd5b612051611985565b825161205c81611b00565b815260208381015190820152604092830151928101929092525091905056fea2646970667358221220b9246af2c5aa80b8047b7eccb1aa9abc9630669a8f7f350d52378c71c7ba03d864736f6c63430008090033

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000029ef5b777a0fb28c55c31e9f765bfbe42f15b86600000000000000000000000090dd49e039b6c1343cdd59c7032c51a9f769823f00000000000000000000000000000000000000000000000000000000000000246d656469612e617374726f6672656e732e636f6d2f4d65746142756c6c2f302e6a736f6e00000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _URI (string): media.astrofrens.com/MetaBull/0.json
Arg [1] : burgerAddr (address): 0x29ef5b777A0FB28c55C31e9F765bfBE42f15B866
Arg [2] : grillAddr (address): 0x90DD49e039B6C1343cDd59c7032c51a9f769823F

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000029ef5b777a0fb28c55c31e9f765bfbe42f15b866
Arg [2] : 00000000000000000000000090dd49e039b6c1343cdd59c7032c51a9f769823f
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000024
Arg [4] : 6d656469612e617374726f6672656e732e636f6d2f4d65746142756c6c2f302e
Arg [5] : 6a736f6e00000000000000000000000000000000000000000000000000000000


Deployed Bytecode Sourcemap

857:5709:20:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3057:300:22;;;;;;:::i;:::-;;:::i;:::-;;;565:14:24;;558:22;540:41;;528:2;513:18;3057:300:22;;;;;;;;2769:74:20;;;;;;:::i;:::-;;:::i;:::-;;6087:98:22;;;:::i;:::-;;;;;;;:::i;7544:200::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;3250:32:24;;;3232:51;;3220:2;3205:18;7544:200:22;3086:203:24;7120:363:22;;;;;;:::i;:::-;;:::i;999:37:20:-;;;;;1539:17;;;:::i;2319:306:22:-;2620:1:20;2578:12:22;2372:7;2562:13;:28;-1:-1:-1;;2562:46:22;2319:306;;;4119:25:24;;;4107:2;4092:18;2319:306:22;3973:177:24;8383:164:22;;;;;;:::i;:::-;;:::i;1249:21:20:-;;;;;-1:-1:-1;;;1249:21:20;;;;;;8613:179:22;;;;;;:::i;:::-;;:::i;3246:96:20:-;;;;;;:::i;:::-;;:::i;1307:22::-;;;;;-1:-1:-1;;;1307:22:20;;;;;;3023:76;;;:::i;5902:123:22:-;;;;;;:::i;:::-;;:::i;1472:25:20:-;;;;;;3416:203:22;;;;;;:::i;:::-;;:::i;1668:101:0:-;;;:::i;1040:93:20:-;;1090:42;1040:93;;2895:75;;;:::i;1711:46::-;;;;;;:::i;:::-;;;;;;;;;;;;;;1036:85:0;1108:6;;-1:-1:-1;;;;;1108:6:0;1036:85;;6249:102:22;;;:::i;7811:282::-;;;;;;:::i;:::-;;:::i;8858:360::-;;;;;;:::i;:::-;;:::i;6322:242:20:-;;;;;;:::i;:::-;;:::i;3648:110::-;;;;;;:::i;:::-;;:::i;1611:41::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;8159:162:22;;;;;;:::i;:::-;;:::i;1137:77:20:-;;1172:42;1137:77;;1918:198:0;;;;;;:::i;:::-;;:::i;957:38:20:-;;;;;1383:29;;;;;;4081:1088;;;;;;:::i;:::-;;:::i;1817:47::-;;;;;;:::i;:::-;;;;;;;;;;;;;;3057:300:22;3159:4;-1:-1:-1;;;;;;3194:40:22;;-1:-1:-1;;;3194:40:22;;:104;;-1:-1:-1;;;;;;;3250:48:22;;-1:-1:-1;;;3250:48:22;3194:104;:156;;;-1:-1:-1;;;;;;;;;;937:40:16;;;3314:36:22;3175:175;3057:300;-1:-1:-1;;3057:300:22:o;2769:74:20:-;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;;;;;;;;;2828:10:20;;::::1;::::0;:3:::1;::::0;:10:::1;::::0;::::1;::::0;::::1;:::i;:::-;;2769:74:::0;:::o;6087:98:22:-;6141:13;6173:5;6166:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6087:98;:::o;7544:200::-;7612:7;7636:16;7644:7;7636;:16::i;:::-;7631:64;;7661:34;;-1:-1:-1;;;7661:34:22;;;;;;;;;;;7631:64;-1:-1:-1;7713:24:22;;;;:15;:24;;;;;;-1:-1:-1;;;;;7713:24:22;;7544:200::o;7120:363::-;7192:13;7208:24;7224:7;7208:15;:24::i;:::-;7192:40;;7252:5;-1:-1:-1;;;;;7246:11:22;:2;-1:-1:-1;;;;;7246:11:22;;7242:48;;;7266:24;;-1:-1:-1;;;7266:24:22;;;;;;;;;;;7242:48;719:10:13;-1:-1:-1;;;;;7305:21:22;;;7301:137;;7332:37;7349:5;719:10:13;8159:162:22;:::i;7332:37::-;7328:110;;7392:35;;-1:-1:-1;;;7392:35:22;;;;;;;;;;;7328:110;7448:28;7457:2;7461:7;7470:5;7448:8;:28::i;:::-;7182:301;7120:363;;:::o;1539:17:20:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;8383:164:22:-;8512:28;8522:4;8528:2;8532:7;8512:9;:28::i;8613:179::-;8746:39;8763:4;8769:2;8773:7;8746:39;;;;;;;;;;;;:16;:39::i;3246:96:20:-;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;3313:10:20::1;:24:::0;3246:96::o;3023:76::-;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;3084:10:20::1;::::0;;-1:-1:-1;;;;3070:24:20;::::1;-1:-1:-1::0;;;3084:10:20;;;::::1;;;3083:11;3070:24:::0;;::::1;;::::0;;3023:76::o;5902:123:22:-;5966:7;5992:21;6005:7;5992:12;:21::i;:::-;:26;;5902:123;-1:-1:-1;;5902:123:22:o;3416:203::-;3480:7;-1:-1:-1;;;;;3503:19:22;;3499:60;;3531:28;;-1:-1:-1;;;3531:28:22;;;;;;;;;;;3499:60;-1:-1:-1;;;;;;3584:19:22;;;;;:12;:19;;;;;:27;-1:-1:-1;;;;;3584:27:22;;3416:203::o;1668:101:0:-;1108:6;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;1732:30:::1;1759:1;1732:18;:30::i;:::-;1668:101::o:0;2895:75:20:-;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;2956:9:20::1;::::0;;-1:-1:-1;;;;2943:22:20;::::1;-1:-1:-1::0;;;2956:9:20;;;::::1;;;2955:10;2943:22:::0;;::::1;;::::0;;2895:75::o;6249:102:22:-;6305:13;6337:7;6330:14;;;;;:::i;7811:282::-;-1:-1:-1;;;;;7909:24:22;;719:10:13;7909:24:22;7905:54;;;7942:17;;-1:-1:-1;;;7942:17:22;;;;;;;;;;;7905:54;719:10:13;7970:32:22;;;;:18;:32;;;;;;;;-1:-1:-1;;;;;7970:42:22;;;;;;;;;;;;:53;;-1:-1:-1;;7970:53:22;;;;;;;;;;8038:48;;540:41:24;;;7970:42:22;;719:10:13;8038:48:22;;513:18:24;8038:48:22;;;;;;;7811:282;;:::o;8858:360::-;9019:28;9029:4;9035:2;9039:7;9019:9;:28::i;:::-;-1:-1:-1;;;;;9061:13:22;;1465:19:12;:23;9057:155:22;;9082:56;9113:4;9119:2;9123:7;9132:5;9082:30;:56::i;:::-;9078:134;;9161:40;;-1:-1:-1;;;9161:40:22;;;;;;;;;;;9078:134;8858:360;;;;:::o;6322:242:20:-;6436:10;;6404:18;;-1:-1:-1;;;6436:10:20;;;;6432:128;;;6487:3;6492:19;:8;:17;:19::i;:::-;6470:51;;;;;;;;;:::i;:::-;;;;;;;;;;;;;6456:66;;6322:242;;;:::o;6432:128::-;6550:3;6543:10;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6322:242;;;:::o;3648:110::-;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;3725:28:20::1;3735:7;3744:8;3725:9;:28::i;8159:162:22:-:0;-1:-1:-1;;;;;8279:25:22;;;8256:4;8279:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;8159:162::o;1918:198:0:-;1108:6;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;2006:22:0;::::1;1998:73;;;::::0;-1:-1:-1;;;1998:73:0;;10980:2:24;1998:73:0::1;::::0;::::1;10962:21:24::0;11019:2;10999:18;;;10992:30;11058:34;11038:18;;;11031:62;-1:-1:-1;;;11109:18:24;;;11102:36;11155:19;;1998:73:0::1;10778:402:24::0;1998:73:0::1;2081:28;2100:8;2081:18;:28::i;:::-;1918:198:::0;:::o;4081:1088:20:-;4149:9;;-1:-1:-1;;;4149:9:20;;;;4144:56;;4175:18;;-1:-1:-1;;;4175:18:20;;;;;;;;;;;4144:56;4258:20;4281:13;;;4300:542;4324:12;:19;4320:1;:23;4300:542;;;4363:44;4379:10;4391:12;4404:1;4391:15;;;;;;;;:::i;:::-;;;;;;;4363;:44::i;:::-;4358:98;;4426:21;;-1:-1:-1;;;4426:21:20;;;;;;;;;;;4358:98;4467:9;:26;4477:12;4490:1;4477:15;;;;;;;;:::i;:::-;;;;;;;;;;;;4467:26;;;;;;;;;;-1:-1:-1;4467:26:20;;;;4463:83;;;4512:25;;-1:-1:-1;;;4512:25:20;;;;;;;;;;;4463:83;4661:12;4674:1;4661:15;;;;;;;;:::i;:::-;;;;;;;4633:11;:25;4645:12;4633:25;;;;;;;;;;;:43;;;;4752:4;4723:9;:26;4733:12;4746:1;4733:15;;;;;;;;:::i;:::-;;;;;;;4723:26;;;;;;;;;;;;:33;;;;;;;;;;;;;;;;;;4834:1;4818:17;;;;;:::i;:::-;;-1:-1:-1;4345:3:20;;;:::i;:::-;;;4300:542;;;;4881:14;4911:12;:19;4898:10;;:32;;;;:::i;:::-;4936:45;;-1:-1:-1;;;4936:45:20;;4962:10;4936:45;;;12069:51:24;12136:18;;;12129:34;;;4881:49:20;;-1:-1:-1;4936:14:20;-1:-1:-1;;;;;4936:25:20;;;;12042:18:24;;4936:45:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5033:6;5019:10;;:20;;;;;;;:::i;:::-;;;;-1:-1:-1;;5058:10:20;5045:24;;;;:12;:24;;;;;:34;;5073:6;;5045:24;:34;;5073:6;;5045:34;:::i;:::-;;;;;;;;5122:42;5132:10;5144:12;:19;5122:9;:42::i;9464:172:22:-;9521:4;9563:7;2620:1:20;9544:26:22;;:53;;;;;9584:13;;9574:7;:23;9544:53;:85;;;;-1:-1:-1;;9602:20:22;;;;:11;:20;;;;;:27;-1:-1:-1;;;9602:27:22;;;;9601:28;;9464:172::o;18445:189::-;18555:24;;;;:15;:24;;;;;;:29;;-1:-1:-1;;;;;;18555:29:22;-1:-1:-1;;;;;18555:29:22;;;;;;;;;18599:28;;18555:24;;18599:28;;;;;;;18445:189;;;:::o;13520:2082::-;13630:35;13668:21;13681:7;13668:12;:21::i;:::-;13630:59;;13726:4;-1:-1:-1;;;;;13704:26:22;:13;:18;;;-1:-1:-1;;;;;13704:26:22;;13700:67;;13739:28;;-1:-1:-1;;;13739:28:22;;;;;;;;;;;13700:67;13778:22;719:10:13;-1:-1:-1;;;;;13804:20:22;;;;:72;;-1:-1:-1;13840:36:22;13857:4;719:10:13;8159:162:22;:::i;13840:36::-;13804:124;;;-1:-1:-1;719:10:13;13892:20:22;13904:7;13892:11;:20::i;:::-;-1:-1:-1;;;;;13892:36:22;;13804:124;13778:151;;13945:17;13940:66;;13971:35;;-1:-1:-1;;;13971:35:22;;;;;;;;;;;13940:66;-1:-1:-1;;;;;14020:16:22;;14016:52;;14045:23;;-1:-1:-1;;;14045:23:22;;;;;;;;;;;14016:52;14184:35;14201:1;14205:7;14214:4;14184:8;:35::i;:::-;-1:-1:-1;;;;;14509:18:22;;;;;;;:12;:18;;;;;;;;:31;;-1:-1:-1;;14509:31:22;;;-1:-1:-1;;;;;14509:31:22;;;-1:-1:-1;;14509:31:22;;;;;;;14554:16;;;;;;;;;:29;;;;;;;;-1:-1:-1;14554:29:22;;;;;;;;;;;14632:20;;;:11;:20;;;;;;14666:18;;-1:-1:-1;;;;;;14698:49:22;;;;-1:-1:-1;;;14731:15:22;14698:49;;;;;;;;;;15017:11;;15076:24;;;;;15118:13;;14632:20;;15076:24;;15118:13;15114:377;;15325:13;;15310:11;:28;15306:171;;15362:20;;15430:28;;;;-1:-1:-1;;;;;15404:54:22;-1:-1:-1;;;15404:54:22;-1:-1:-1;;;;;;15404:54:22;;;-1:-1:-1;;;;;15362:20:22;;15404:54;;;;15306:171;14485:1016;;;15535:7;15531:2;-1:-1:-1;;;;;15516:27:22;15525:4;-1:-1:-1;;;;;15516:27:22;;;;;;;;;;;13620:1982;;13520:2082;;;:::o;4759:1086::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;4869:7:22;;2620:1:20;4915:23:22;4911:870;;4951:13;;4944:4;:20;4940:841;;;4984:31;5018:17;;;:11;:17;;;;;;;;;4984:51;;;;;;;;;-1:-1:-1;;;;;4984:51:22;;;;-1:-1:-1;;;4984:51:22;;-1:-1:-1;;;;;4984:51:22;;;;;;;;-1:-1:-1;;;4984:51:22;;;;;;;;;;;;;;5053:714;;5102:14;;-1:-1:-1;;;;;5102:28:22;;5098:99;;5165:9;4759:1086;-1:-1:-1;;;4759:1086:22:o;5098:99::-;-1:-1:-1;;;5533:6:22;5577:17;;;;:11;:17;;;;;;;;;5565:29;;;;;;;;;-1:-1:-1;;;;;5565:29:22;;;;;-1:-1:-1;;;5565:29:22;;-1:-1:-1;;;;;5565:29:22;;;;;;;;-1:-1:-1;;;5565:29:22;;;;;;;;;;;;;5624:28;5620:107;;5691:9;4759:1086;-1:-1:-1;;;4759:1086:22:o;5620:107::-;5494:255;;;4966:815;4940:841;5807:31;;-1:-1:-1;;;5807:31:22;;;;;;;;;;;2270:187:0;2362:6;;;-1:-1:-1;;;;;2378:17:0;;;-1:-1:-1;;;;;;2378:17:0;;;;;;;2410:40;;2362:6;;;2378:17;2362:6;;2410:40;;2343:16;;2410:40;2333:124;2270:187;:::o;19115:650:22:-;19293:72;;-1:-1:-1;;;19293:72:22;;19273:4;;-1:-1:-1;;;;;19293:36:22;;;;;:72;;719:10:13;;19344:4:22;;19350:7;;19359:5;;19293:72;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19293:72:22;;;;;;;;-1:-1:-1;;19293:72:22;;;;;;;;;;;;:::i;:::-;;;19289:470;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19524:13:22;;19520:229;;19569:40;;-1:-1:-1;;;19569:40:22;;;;;;;;;;;19520:229;19709:6;19703:13;19694:6;19690:2;19686:15;19679:38;19289:470;-1:-1:-1;;;;;;19411:55:22;-1:-1:-1;;;19411:55:22;;-1:-1:-1;19289:470:22;19115:650;;;;;;:::o;328:703:15:-;384:13;601:10;597:51;;-1:-1:-1;;627:10:15;;;;;;;;;;;;-1:-1:-1;;;627:10:15;;;;;328:703::o;597:51::-;672:5;657:12;711:75;718:9;;711:75;;743:8;;;;:::i;:::-;;-1:-1:-1;765:10:15;;-1:-1:-1;773:2:15;765:10;;:::i;:::-;;;711:75;;;795:19;827:6;-1:-1:-1;;;;;817:17:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;817:17:15;;795:39;;844:150;851:10;;844:150;;877:11;887:1;877:11;;:::i;:::-;;-1:-1:-1;945:10:15;953:2;945:5;:10;:::i;:::-;932:24;;:2;:24;:::i;:::-;919:39;;902:6;909;902:14;;;;;;;;:::i;:::-;;;;:56;-1:-1:-1;;;;;902:56:15;;;;;;;;-1:-1:-1;972:11:15;981:2;972:11;;:::i;:::-;;;844:150;;9715:102:22;9783:27;9793:2;9797:8;9783:27;;;;;;;;;;;;:9;:27::i;5466:692:20:-;5649:33;;-1:-1:-1;;;5649:33:20;;-1:-1:-1;;;;;12087:32:24;;5649:33:20;;;12069:51:24;12136:18;;;12129:34;;;5560:7:20;;1090:42;;5649:15;;12042:18:24;;5649:33:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5686:1;5649:38;5645:509;;;-1:-1:-1;5702:4:20;5645:509;;;5814:43;;-1:-1:-1;;;5814:43:20;;1172:42;5814:43;;;12069:51:24;12136:18;;;12129:34;;;1090:42:20;;5814:15;;12042:18:24;;5814:43:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5861:1;5814:48;5810:344;;;5925:7;-1:-1:-1;;;;;5876:56:20;:13;-1:-1:-1;;;;;5876:29:20;;5906:7;5876:38;;;;;;;;;;;;;4119:25:24;;4107:2;4092:18;;3973:177;5876:38:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:45;;;-1:-1:-1;;;;;5876:56:20;;5872:90;;;-1:-1:-1;5949:4:20;5872:90;5810:344;;;6121:7;-1:-1:-1;;;;;6069:59:20;:13;-1:-1:-1;;;;;6069:32:20;;6102:7;6069:41;;;;;;;;;;;;;4119:25:24;;4107:2;4092:18;;3973:177;6069:41:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:48;-1:-1:-1;;;;;6069:59:20;;6065:89;;;-1:-1:-1;6143:4:20;5466:692;;;;:::o;10177:1708:22:-;10295:20;10318:13;-1:-1:-1;;;;;10345:16:22;;10341:48;;10370:19;;-1:-1:-1;;;10370:19:22;;;;;;;;;;;10341:48;10403:13;10399:44;;10425:18;;-1:-1:-1;;;10425:18:22;;;;;;;;;;;10399:44;-1:-1:-1;;;;;10786:16:22;;;;;;:12;:16;;;;;;;;:44;;-1:-1:-1;;10844:49:22;;-1:-1:-1;;;;;10786:44:22;;;;;;;10844:49;;;;-1:-1:-1;;10786:44:22;;;;;;10844:49;;;;;;;;;;;;;;;;10908:25;;;:11;:25;;;;;;:35;;-1:-1:-1;;;;;;10957:66:22;;;-1:-1:-1;;;11007:15:22;10957:66;;;;;;;;;;;;;10908:25;;11101:23;;;;1465:19:12;:23;11139:618:22;;11178:308;11208:38;;11233:12;;-1:-1:-1;;;;;11208:38:22;;;11225:1;;11208:38;;11225:1;;11208:38;11273:69;11312:1;11316:2;11320:14;;;;;;11336:5;11273:30;:69::i;:::-;11268:172;;11377:40;;-1:-1:-1;;;11377:40:22;;;;;;;;;;;11268:172;11481:3;11466:12;:18;11178:308;;11565:12;11548:13;;:29;11544:43;;11579:8;;;11544:43;11139:618;;;11626:117;11656:40;;11681:14;;;;;-1:-1:-1;;;;;11656:40:22;;;11673:1;;11656:40;;11673:1;;11656:40;11738:3;11723:12;:18;11626:117;;11139:618;-1:-1:-1;11770:13:22;:28;;;11818:60;;11851:2;11855:12;11869:8;11818:60;:::i;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:131:24;-1:-1:-1;;;;;;88:32:24;;78:43;;68:71;;135:1;132;125:12;150:245;208:6;261:2;249:9;240:7;236:23;232:32;229:52;;;277:1;274;267:12;229:52;316:9;303:23;335:30;359:5;335:30;:::i;:::-;384:5;150:245;-1:-1:-1;;;150:245:24:o;592:127::-;653:10;648:3;644:20;641:1;634:31;684:4;681:1;674:15;708:4;705:1;698:15;724:251;796:2;790:9;838:2;826:15;;-1:-1:-1;;;;;856:34:24;;892:22;;;853:62;850:88;;;918:18;;:::i;:::-;954:2;947:22;724:251;:::o;980:275::-;1051:2;1045:9;1116:2;1097:13;;-1:-1:-1;;1093:27:24;1081:40;;-1:-1:-1;;;;;1136:34:24;;1172:22;;;1133:62;1130:88;;;1198:18;;:::i;:::-;1234:2;1227:22;980:275;;-1:-1:-1;980:275:24:o;1260:407::-;1325:5;-1:-1:-1;;;;;1351:6:24;1348:30;1345:56;;;1381:18;;:::i;:::-;1419:57;1464:2;1443:15;;-1:-1:-1;;1439:29:24;1470:4;1435:40;1419:57;:::i;:::-;1410:66;;1499:6;1492:5;1485:21;1539:3;1530:6;1525:3;1521:16;1518:25;1515:45;;;1556:1;1553;1546:12;1515:45;1605:6;1600:3;1593:4;1586:5;1582:16;1569:43;1659:1;1652:4;1643:6;1636:5;1632:18;1628:29;1621:40;1260:407;;;;;:::o;1672:451::-;1741:6;1794:2;1782:9;1773:7;1769:23;1765:32;1762:52;;;1810:1;1807;1800:12;1762:52;1850:9;1837:23;-1:-1:-1;;;;;1875:6:24;1872:30;1869:50;;;1915:1;1912;1905:12;1869:50;1938:22;;1991:4;1983:13;;1979:27;-1:-1:-1;1969:55:24;;2020:1;2017;2010:12;1969:55;2043:74;2109:7;2104:2;2091:16;2086:2;2082;2078:11;2043:74;:::i;2128:258::-;2200:1;2210:113;2224:6;2221:1;2218:13;2210:113;;;2300:11;;;2294:18;2281:11;;;2274:39;2246:2;2239:10;2210:113;;;2341:6;2338:1;2335:13;2332:48;;;-1:-1:-1;;2376:1:24;2358:16;;2351:27;2128:258::o;2391:269::-;2444:3;2482:5;2476:12;2509:6;2504:3;2497:19;2525:63;2581:6;2574:4;2569:3;2565:14;2558:4;2551:5;2547:16;2525:63;:::i;:::-;2642:2;2621:15;-1:-1:-1;;2617:29:24;2608:39;;;;2649:4;2604:50;;2391:269;-1:-1:-1;;2391:269:24:o;2665:231::-;2814:2;2803:9;2796:21;2777:4;2834:56;2886:2;2875:9;2871:18;2863:6;2834:56;:::i;2901:180::-;2960:6;3013:2;3001:9;2992:7;2988:23;2984:32;2981:52;;;3029:1;3026;3019:12;2981:52;-1:-1:-1;3052:23:24;;2901:180;-1:-1:-1;2901:180:24:o;3294:131::-;-1:-1:-1;;;;;3369:31:24;;3359:42;;3349:70;;3415:1;3412;3405:12;3430:315;3498:6;3506;3559:2;3547:9;3538:7;3534:23;3530:32;3527:52;;;3575:1;3572;3565:12;3527:52;3614:9;3601:23;3633:31;3658:5;3633:31;:::i;:::-;3683:5;3735:2;3720:18;;;;3707:32;;-1:-1:-1;;;3430:315:24:o;4155:456::-;4232:6;4240;4248;4301:2;4289:9;4280:7;4276:23;4272:32;4269:52;;;4317:1;4314;4307:12;4269:52;4356:9;4343:23;4375:31;4400:5;4375:31;:::i;:::-;4425:5;-1:-1:-1;4482:2:24;4467:18;;4454:32;4495:33;4454:32;4495:33;:::i;:::-;4155:456;;4547:7;;-1:-1:-1;;;4601:2:24;4586:18;;;;4573:32;;4155:456::o;4616:247::-;4675:6;4728:2;4716:9;4707:7;4703:23;4699:32;4696:52;;;4744:1;4741;4734:12;4696:52;4783:9;4770:23;4802:31;4827:5;4802:31;:::i;5095:118::-;5181:5;5174:13;5167:21;5160:5;5157:32;5147:60;;5203:1;5200;5193:12;5218:382;5283:6;5291;5344:2;5332:9;5323:7;5319:23;5315:32;5312:52;;;5360:1;5357;5350:12;5312:52;5399:9;5386:23;5418:31;5443:5;5418:31;:::i;:::-;5468:5;-1:-1:-1;5525:2:24;5510:18;;5497:32;5538:30;5497:32;5538:30;:::i;:::-;5587:7;5577:17;;;5218:382;;;;;:::o;5605:795::-;5700:6;5708;5716;5724;5777:3;5765:9;5756:7;5752:23;5748:33;5745:53;;;5794:1;5791;5784:12;5745:53;5833:9;5820:23;5852:31;5877:5;5852:31;:::i;:::-;5902:5;-1:-1:-1;5959:2:24;5944:18;;5931:32;5972:33;5931:32;5972:33;:::i;:::-;6024:7;-1:-1:-1;6078:2:24;6063:18;;6050:32;;-1:-1:-1;6133:2:24;6118:18;;6105:32;-1:-1:-1;;;;;6149:30:24;;6146:50;;;6192:1;6189;6182:12;6146:50;6215:22;;6268:4;6260:13;;6256:27;-1:-1:-1;6246:55:24;;6297:1;6294;6287:12;6246:55;6320:74;6386:7;6381:2;6368:16;6363:2;6359;6355:11;6320:74;:::i;:::-;6310:84;;;5605:795;;;;;;;:::o;6405:315::-;6473:6;6481;6534:2;6522:9;6513:7;6509:23;6505:32;6502:52;;;6550:1;6547;6540:12;6502:52;6586:9;6573:23;6563:33;;6646:2;6635:9;6631:18;6618:32;6659:31;6684:5;6659:31;:::i;6725:388::-;6793:6;6801;6854:2;6842:9;6833:7;6829:23;6825:32;6822:52;;;6870:1;6867;6860:12;6822:52;6909:9;6896:23;6928:31;6953:5;6928:31;:::i;:::-;6978:5;-1:-1:-1;7035:2:24;7020:18;;7007:32;7048:33;7007:32;7048:33;:::i;7341:946::-;7425:6;7456:2;7499;7487:9;7478:7;7474:23;7470:32;7467:52;;;7515:1;7512;7505:12;7467:52;7555:9;7542:23;-1:-1:-1;;;;;7625:2:24;7617:6;7614:14;7611:34;;;7641:1;7638;7631:12;7611:34;7679:6;7668:9;7664:22;7654:32;;7724:7;7717:4;7713:2;7709:13;7705:27;7695:55;;7746:1;7743;7736:12;7695:55;7782:2;7769:16;7804:2;7800;7797:10;7794:36;;;7810:18;;:::i;:::-;7856:2;7853:1;7849:10;7839:20;;7879:28;7903:2;7899;7895:11;7879:28;:::i;:::-;7941:15;;;8011:11;;;8007:20;;;7972:12;;;;8039:19;;;8036:39;;;8071:1;8068;8061:12;8036:39;8095:11;;;;8115:142;8131:6;8126:3;8123:15;8115:142;;;8197:17;;8185:30;;8148:12;;;;8235;;;;8115:142;;;8276:5;7341:946;-1:-1:-1;;;;;;;;7341:946:24:o;8292:356::-;8494:2;8476:21;;;8513:18;;;8506:30;8572:34;8567:2;8552:18;;8545:62;8639:2;8624:18;;8292:356::o;8653:380::-;8732:1;8728:12;;;;8775;;;8796:61;;8850:4;8842:6;8838:17;8828:27;;8796:61;8903:2;8895:6;8892:14;8872:18;8869:38;8866:161;;;8949:10;8944:3;8940:20;8937:1;8930:31;8984:4;8981:1;8974:15;9012:4;9009:1;9002:15;8866:161;;8653:380;;;:::o;9164:185::-;9206:3;9244:5;9238:12;9259:52;9304:6;9299:3;9292:4;9285:5;9281:16;9259:52;:::i;:::-;9327:16;;;;;9164:185;-1:-1:-1;;9164:185:24:o;9472:1301::-;9749:3;9778:1;9811:6;9805:13;9841:3;9863:1;9891:9;9887:2;9883:18;9873:28;;9951:2;9940:9;9936:18;9973;9963:61;;10017:4;10009:6;10005:17;9995:27;;9963:61;10043:2;10091;10083:6;10080:14;10060:18;10057:38;10054:165;;;-1:-1:-1;;;10118:33:24;;10174:4;10171:1;10164:15;10204:4;10125:3;10192:17;10054:165;10235:18;10262:104;;;;10380:1;10375:320;;;;10228:467;;10262:104;-1:-1:-1;;10295:24:24;;10283:37;;10340:16;;;;-1:-1:-1;10262:104:24;;10375:320;9111:1;9104:14;;;9148:4;9135:18;;10470:1;10484:165;10498:6;10495:1;10492:13;10484:165;;;10576:14;;10563:11;;;10556:35;10619:16;;;;10513:10;;10484:165;;;10488:3;;10678:6;10673:3;10669:16;10662:23;;10228:467;;;;;;;10711:56;10736:30;10762:3;10754:6;10736:30;:::i;:::-;-1:-1:-1;;;9414:20:24;;9459:1;9450:11;;9354:113;10711:56;10704:63;9472:1301;-1:-1:-1;;;;;9472:1301:24:o;11185:127::-;11246:10;11241:3;11237:20;11234:1;11227:31;11277:4;11274:1;11267:15;11301:4;11298:1;11291:15;11317:127;11378:10;11373:3;11369:20;11366:1;11359:31;11409:4;11406:1;11399:15;11433:4;11430:1;11423:15;11449:128;11489:3;11520:1;11516:6;11513:1;11510:13;11507:39;;;11526:18;;:::i;:::-;-1:-1:-1;11562:9:24;;11449:128::o;11582:135::-;11621:3;-1:-1:-1;;11642:17:24;;11639:43;;;11662:18;;:::i;:::-;-1:-1:-1;11709:1:24;11698:13;;11582:135::o;11722:168::-;11762:7;11828:1;11824;11820:6;11816:14;11813:1;11810:21;11805:1;11798:9;11791:17;11787:45;11784:71;;;11835:18;;:::i;:::-;-1:-1:-1;11875:9:24;;11722:168::o;12174:500::-;-1:-1:-1;;;;;12443:15:24;;;12425:34;;12495:15;;12490:2;12475:18;;12468:43;12542:2;12527:18;;12520:34;;;12590:3;12585:2;12570:18;;12563:31;;;12368:4;;12611:57;;12648:19;;12640:6;12611:57;:::i;:::-;12603:65;12174:500;-1:-1:-1;;;;;;12174:500:24:o;12679:249::-;12748:6;12801:2;12789:9;12780:7;12776:23;12772:32;12769:52;;;12817:1;12814;12807:12;12769:52;12849:9;12843:16;12868:30;12892:5;12868:30;:::i;12933:127::-;12994:10;12989:3;12985:20;12982:1;12975:31;13025:4;13022:1;13015:15;13049:4;13046:1;13039:15;13065:120;13105:1;13131;13121:35;;13136:18;;:::i;:::-;-1:-1:-1;13170:9:24;;13065:120::o;13190:125::-;13230:4;13258:1;13255;13252:8;13249:34;;;13263:18;;:::i;:::-;-1:-1:-1;13300:9:24;;13190:125::o;13320:112::-;13352:1;13378;13368:35;;13383:18;;:::i;:::-;-1:-1:-1;13417:9:24;;13320:112::o;13437:184::-;13507:6;13560:2;13548:9;13539:7;13535:23;13531:32;13528:52;;;13576:1;13573;13566:12;13528:52;-1:-1:-1;13599:16:24;;13437:184;-1:-1:-1;13437:184:24:o;13626:539::-;13719:6;13772:2;13760:9;13751:7;13747:23;13743:32;13740:52;;;13788:1;13785;13778:12;13740:52;13814:22;;:::i;:::-;13866:9;13860:16;13885:30;13907:7;13885:30;:::i;:::-;13924:22;;13991:2;13976:18;;13970:25;14004:33;13970:25;14004:33;:::i;:::-;14064:2;14053:14;;14046:31;14130:2;14115:18;;;14109:25;14093:14;;;14086:49;;;;-1:-1:-1;14057:5:24;13626:539;-1:-1:-1;13626:539:24:o;14170:469::-;14263:6;14316:2;14304:9;14295:7;14291:23;14287:32;14284:52;;;14332:1;14329;14322:12;14284:52;14358:22;;:::i;:::-;14410:9;14404:16;14429:33;14454:7;14429:33;:::i;:::-;14471:22;;14546:2;14531:18;;;14525:25;14509:14;;;14502:49;14604:2;14589:18;;;14583:25;14567:14;;;14560:49;;;;-1:-1:-1;14478:5:24;14170:469;-1:-1:-1;14170:469:24:o

Swarm Source

ipfs://b9246af2c5aa80b8047b7eccb1aa9abc9630669a8f7f350d52378c71c7ba03d8
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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