ETH Price: $2,774.55 (+1.36%)

Token

 

Overview

Max Total Supply

19

Holders

4

Total Transfers

-

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
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:
HodlerBattleRoyale

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : BattleRoyale.sol
// SPDX-License-Identifier: MIT
// ARTWORK LICENSE: CC0
// ahodler.world - Battle Royale
// Rules:
// 8818 HODLers will start with with a health status of 0
// If a grenade is thrown at a certain HODLer the health bar status decrements by a factor of -1 for each grenade
// If a shield is being used to protect a certain HODLer the health bar status increments by a factor of +1 for each shield
// If a HODLer reaches a health bar status of -1 that HODLer drops out of the game.
// 100% of the proceeds go to the prize pool and will be split across the 3 Winners
// 30% of that pool go towards the wallet that holds the last HODLer standing
// 30% will go towards the wallet that has bought most grenades
// 5% will go towards the wallet that makes the last kill
// The Battle Royale concludes automatially on Monday, 8. May 2023 12:00:00
pragma solidity 0.8.15;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import './Hodler.sol';

contract HodlerBattleRoyale is ERC1155Supply, Ownable  {
    address public contractCreator;
    bool public battleRoyaleIsActive = false;
    bool public battleRoyaleConcluded = false;
    bool private locationSet = false;
    uint256 public deadLine = 1683547200;
    uint constant DOG_TAG = 1;
    uint constant MAX_SUPPLY = 8818;
    uint constant STRIKE_PRICE = 0.005 ether;

    address public battleField;
    mapping(address => uint) public walletHighscore;
    uint256 public currentHighscore = 0;
    address public lastHodlerStanding;
    address public mostGrenades;
    address public lastThrow;
    bool public payout = false;
    
    event ItemBought(
        address from,
        address currentHighscoreAddy,
        uint hodlerId,
        int256 amount
    );
    event HodlerDied(
        address from,
        uint hodlerId,
        bool isAlive
    );

    constructor(string memory uri) ERC1155(uri) {
        contractCreator = msg.sender;
    }

    function setBattleField(address _location) external {
        require(contractCreator == _msgSender(), "ACHTUNG: Only Contract Creator can call this function");
        require(!locationSet, "ACHTUNG: nobody can change this value anymore");
        battleField = _location;
        locationSet = true;
    }

    function setBrState(bool _bool) public {
        require(contractCreator == _msgSender(), "ACHTUNG: Only Contract Creator can call this function");
        require(!battleRoyaleIsActive, "ACHTUNG: nobody can change this value anymore");
        battleRoyaleIsActive = _bool;
    }

    function setHealthStatus(uint256 _tokenId, int256 _amount) public payable {
        interfaceAhodler hodler = interfaceAhodler(battleField);
        uint priceMod = 10;
        uint256 amount;
        require(!battleRoyaleConcluded, "ACHTUNG: Battle Royale has concluded");
        require(battleRoyaleIsActive, "ACHTUNG: Battle Royale must be active to start attacks/mints");
        require(_amount != 0, "ACHTUNG: No Shield or Grenade selected");
        require(totalSupply(DOG_TAG) < MAX_SUPPLY, "ACHTUNG: You can't kill the last hodler standing");
        _amount < 0 ? amount = uint256(_amount*-1) : amount = uint256(_amount); 
        if(amount>6){
            priceMod = 8;
            if(amount>12){
                priceMod = 7;
                if(amount>18){
                    priceMod = 6;
                    if(amount>24){priceMod = 5;}
                }  
            }
        }
        require((STRIKE_PRICE / 10 * priceMod * amount) <= msg.value, "ACHTUNG: Not enough Ether");
        hodler.setHealth(_tokenId, _amount);
        if (_amount < 0) {
            walletHighscore[msg.sender] += amount;
            if(walletHighscore[msg.sender] > currentHighscore) {
                currentHighscore = walletHighscore[msg.sender];
                mostGrenades = msg.sender;
            }
        }

        emit ItemBought(msg.sender,mostGrenades,_tokenId,_amount);

        if ( !hodler.isHodlerAlive(_tokenId) ) {
            _mint(msg.sender, DOG_TAG, 1, "");
            emit HodlerDied(msg.sender,_tokenId,hodler.isHodlerAlive(_tokenId));
        }

        if ( totalSupply(DOG_TAG) >= MAX_SUPPLY-1 ) {
            battleRoyaleConcluded = true;
            lastThrow = msg.sender;
            lastHodlerStanding = hodler.ownerOf(hodler.checkLastSurvivor());
        }
    }
    function withdraw() public {
        require(contractCreator == _msgSender(), "ACHTUNG: Only Contract Creator can call this function");
        require(block.timestamp >= deadLine, "ACHTUNG: The war is not over yet!");
        uint256 balance = address(this).balance;
        payable(msg.sender).transfer(balance);
    }
    function distributeToWinners() public {
        require(battleRoyaleConcluded, "ACHTUNG: Still too many Hodlers alive");
        require(!payout, "ACHTUNG: already paid out");
        uint256 balance = address(this).balance;
        uint256 mgSplit = balance/100*30;
        uint256 lhsSplit = balance/100*30;
        uint256 ltSplit = balance/100*5;
        payable(lastThrow).transfer(ltSplit);
        payable(lastHodlerStanding).transfer(lhsSplit);
        payable(mostGrenades).transfer(mgSplit);
        payable(contractCreator).transfer(address(this).balance);
        payout = true;
    }
}

File 2 of 14 : Hodler.sol
// SPDX-License-Identifier: MIT
// ARTWORK LICENSE: CC0
// ahodler.world - Totaler Mint, Blitzmint, 10% Royalties
// On-Chain Battle Royale
// LIVE
pragma solidity 0.8.15;
import "@openzeppelin/contracts/access/Ownable.sol";
import "erc721a/contracts/ERC721A.sol";

contract Ahodler is ERC721A, Ownable {
    address private constant TEAMWALLET = 0x30394DD17758092e72AF2283F57aB9DeD6E93d87;
    address public contractCreator;
    string private baseURI;

    bool public started = false;
    bool public claimed = false;
    uint256 public constant MAXSUPPLY = 8818;
    uint256 public constant WALLETLIMIT = 3;
    uint256 public constant TEAMCLAIMAMOUNT = 418;

    uint256 public reichsMark = 0.18 ether;
    uint256 public attackDate = 1662011100;         // 1st of September, 5.45am GMT
    mapping(address => uint) public addressClaimed;

    int256[] public hodlers;
    address private battleRoyaleContract;
    bool public brRunning = false;

    constructor() ERC721A("aHODLer", "HODL") {
        contractCreator = msg.sender;
        hodlers.push(-1);
    }

    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }
    
    function mint(uint256 _count) external payable {
        uint256 total = totalSupply();
        uint256 minCount = 0;
        uint j;
        if(msg.sender != contractCreator) {
            require(started, "Achtung: Mint has not started yet");
            require(addressClaimed[_msgSender()] + _count <= WALLETLIMIT, "Achtung: Wallet limit, you can't mint more than that");
            if(block.timestamp > attackDate) {
                require(msg.value >= reichsMark, "Achtung: the war has started and you have not sent enough Reichsmark!");
            }
        }
        require(_count > minCount, "Achtung: You need to mint at least one");
        require(total + _count <= MAXSUPPLY, "Achtung: Mint out, no more NFTs left to mint");
        require(total <= MAXSUPPLY, "Achtung: Mint out");

        for (j = 0; j < _count; j++) {
                hodlers.push(0);
        }
        addressClaimed[_msgSender()] += _count;
        _safeMint(msg.sender, _count);
    }

    function startBR(bool _bool) external onlyOwner {
        brRunning = _bool;
    }

    function setHealth(uint256 _tokenId, int256 _amount) external {
        require(brRunning, "Battle Royale hasn't started yet!");
        require(hodlers[_tokenId] > -1, "This Hodler is already dead");
        require(battleRoyaleContract == _msgSender(), "Function can only be called by Contract");
        if(_amount < 0){
            require(!(hodlers[_tokenId]+_amount<-1),"ACHTUNG: That are too many grenades, try less");
        }
        (hodlers[_tokenId]+_amount) < 0 ? hodlers[_tokenId] = -1 : hodlers[_tokenId] = hodlers[_tokenId] + _amount;
    }

    function getHodlerPopulation() external view returns(uint _population){
        uint j;
        for (j = 0; j < hodlers.length; j++) {
            if(hodlers[j] > -1){
                _population++;
            }
        }
    }

    function checkLastSurvivor() external view returns(uint256 _winner){
        uint j;
        for (j = 0; j < hodlers.length; j++) {
            if(hodlers[j] > -1){
                _winner = j;
            }
        }
    }

    function isHodlerAlive(uint256 _tokenId) external view returns(bool _alive){
       hodlers[_tokenId] < 0 ? _alive = false : _alive = true;
    }

    function setBrContract(address _input) external onlyOwner{
       battleRoyaleContract = _input;
    }
    // -------------------------------
    function teamClaim() external onlyOwner {
        uint j;
        require(!claimed, "Achtung: Team has already claimed");
        _safeMint(TEAMWALLET, TEAMCLAIMAMOUNT);
        claimed = true;
        for (j = 0; j < TEAMCLAIMAMOUNT; j++) {
            hodlers.push(0);
        }

    }
    function setBaseURI(string memory baseURI_) external onlyOwner {
        baseURI = baseURI_;
    }
    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }
    function startBlitz(bool blitzMint) external onlyOwner {
        started = blitzMint;
    }
    function inflationCall(uint256 _newmarks) external onlyOwner {
        reichsMark = _newmarks;
    }
    function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
        require(_exists(_tokenId), 'Achtung: There is no token with that ID');
        string memory currentBaseURI = _baseURI();
        return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, _toString(_tokenId), '.json')) : '';
    }
    // ----------------------------------------------------------------- WITHDRAW
    function withdraw() public onlyOwner {
        (bool os, ) = payable(owner()).call{value: address(this).balance}("");
        require(os);
    }
    function withdrawAllToAddress(address addr) public onlyOwner {
        require(payable(addr).send(address(this).balance));
    }
}

interface interfaceAhodler{
    function setHealth(uint256 _tokenId, int256 _amount) external;
    function getHodlerPopulation() external view returns(uint _population);
    function isHodlerAlive(uint256 _tokenId) external view returns(bool _alive);
    function checkLastSurvivor() external view returns(uint256 _winner);
    function ownerOf(uint256 tokenId) external view returns (address);
}

File 3 of 14 : ERC1155Supply.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155Supply.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                uint256 id = ids[i];
                uint256 amount = amounts[i];
                uint256 supply = _totalSupply[id];
                require(supply >= amount, "ERC1155: burn amount exceeds totalSupply");
                unchecked {
                    _totalSupply[id] = supply - amount;
                }
            }
        }
    }
}

File 4 of 14 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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: address zero is not a valid owner");
        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 token 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: caller is not token 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}.
     *
     * 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 _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`
     *
     * Emits a {TransferSingle} event.
     *
     * 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}.
     *
     * Emits a {TransferBatch} event.
     *
     * 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 an {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 `ids` and `amounts` 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 5 of 14 : 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 6 of 14 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant BITMASK_BURNED = 1 << 224;
    
    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225;

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

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See `_packedOwnershipOf` implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

    // Mapping from token ID to approved address.
    mapping(uint256 => address) private _tokenApprovals;

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

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

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

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count. 
     * To get the total number of tokens minted, please see `_totalMinted`.
     */
    function totalSupply() public view override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to `_startTokenId()`
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view returns (uint256) {
        return _burnCounter;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes of the XOR of
        // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165
        // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

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

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) & BITMASK_ADDRESS_DATA_ENTRY;
    }

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

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> BITPOS_AUX);
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        assembly { // Cast aux without masking.
            auxCasted := aux
        }
        packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP);
        ownership.burned = packed & BITMASK_BURNED != 0;
    }

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

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

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

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

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

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

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

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

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

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

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

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

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

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

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

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

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

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

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

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

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

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_NEXT_INITIALIZED;

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

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

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] =
                _addressToUint256(from) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_BURNED | 
                BITMASK_NEXT_INITIALIZED;

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function _toString(uint256 value) internal pure returns (string memory ptr) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), 
            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length, 
            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 14 : 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 11 of 14 : 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 12 of 14 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 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 13 of 14 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

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

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

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

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

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

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

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

    // ==============================
    //            IERC721
    // ==============================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"hodlerId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isAlive","type":"bool"}],"name":"HodlerDied","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"currentHighscoreAddy","type":"address"},{"indexed":false,"internalType":"uint256","name":"hodlerId","type":"uint256"},{"indexed":false,"internalType":"int256","name":"amount","type":"int256"}],"name":"ItemBought","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":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"battleField","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"battleRoyaleConcluded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"battleRoyaleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractCreator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentHighscore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deadLine","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeToWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHodlerStanding","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastThrow","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mostGrenades","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payout","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","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":"address","name":"_location","type":"address"}],"name":"setBattleField","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_bool","type":"bool"}],"name":"setBrState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"int256","name":"_amount","type":"int256"}],"name":"setHealthStatus","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletHighscore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526005805462ffffff60a01b19169055636458e4406006556000600955600c805460ff60a01b191690553480156200003a57600080fd5b5060405162002bc238038062002bc28339810160408190526200005d9162000108565b8062000069816200008e565b506200007533620000a0565b50600580546001600160a01b031916331790556200033f565b60026200009c828262000273565b5050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156200011c57600080fd5b82516001600160401b03808211156200013457600080fd5b818501915085601f8301126200014957600080fd5b8151818111156200015e576200015e620000f2565b604051601f8201601f19908116603f01168101908382118183101715620001895762000189620000f2565b816040528281528886848701011115620001a257600080fd5b600093505b82841015620001c65784840186015181850187015292850192620001a7565b82841115620001d85760008684830101525b98975050505050505050565b600181811c90821680620001f957607f821691505b6020821081036200021a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200026e57600081815260208120601f850160051c81016020861015620002495750805b601f850160051c820191505b818110156200026a5782815560010162000255565b5050505b505050565b81516001600160401b038111156200028f576200028f620000f2565b620002a781620002a08454620001e4565b8462000220565b602080601f831160018114620002df5760008415620002c65750858301515b600019600386901b1c1916600185901b1785556200026a565b600085815260208120601f198616915b828110156200031057888601518255948401946001909101908401620002ef565b50858210156200032f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b612873806200034f6000396000f3fe6080604052600436106101c15760003560e01c806363bd1d4a116100f7578063a22cb46511610095578063c09647ea11610064578063c09647ea14610524578063e985e9c514610545578063f242432a1461058e578063f2fde38b146105ae57600080fd5b8063a22cb465146104a1578063aac604bc146104c1578063bd85b039146104e1578063bef3a0831461050e57600080fd5b806384dbabfe116100d157806384dbabfe14610430578063856956091461044357806387a95778146104635780638da5cb5b1461048357600080fd5b806363bd1d4a146103e4578063715018a61461040557806377f8d49d1461041a57600080fd5b80633ccfd60b116101645780634f558e791161013e5780634f558e7914610353578063585c8487146103825780635c3cc3fe146103af57806360bcd00f146103cf57600080fd5b80633ccfd60b146102f05780633df0c3b9146103055780634e1273f41461032657600080fd5b80630e89341c116101a05780630e89341c146102615780631e2f73b11461028e57806323ab4692146102ae5780632eb2c2d6146102ce57600080fd5b8062fdd58e146101c657806301ffc9a7146101f95780630670562314610229575b600080fd5b3480156101d257600080fd5b506101e66101e1366004611dec565b6105ce565b6040519081526020015b60405180910390f35b34801561020557600080fd5b50610219610214366004611e2e565b610664565b60405190151581526020016101f0565b34801561023557600080fd5b50600b54610249906001600160a01b031681565b6040516001600160a01b0390911681526020016101f0565b34801561026d57600080fd5b5061028161027c366004611e52565b6106b6565b6040516101f09190611eb8565b34801561029a57600080fd5b50600554610249906001600160a01b031681565b3480156102ba57600080fd5b50600a54610249906001600160a01b031681565b3480156102da57600080fd5b506102ee6102e9366004612017565b61074a565b005b3480156102fc57600080fd5b506102ee610796565b34801561031157600080fd5b5060055461021990600160a01b900460ff1681565b34801561033257600080fd5b506103466103413660046120c5565b61084f565b6040516101f091906121cd565b34801561035f57600080fd5b5061021961036e366004611e52565b600090815260036020526040902054151590565b34801561038e57600080fd5b506101e661039d3660046121e0565b60086020526000908152604090205481565b3480156103bb57600080fd5b506102ee6103ca3660046121e0565b610979565b3480156103db57600080fd5b506102ee610a03565b3480156103f057600080fd5b50600c5461021990600160a01b900460ff1681565b34801561041157600080fd5b506102ee610c16565b34801561042657600080fd5b506101e660095481565b6102ee61043e3660046121fd565b610c7c565b34801561044f57600080fd5b50600c54610249906001600160a01b031681565b34801561046f57600080fd5b50600754610249906001600160a01b031681565b34801561048f57600080fd5b506004546001600160a01b0316610249565b3480156104ad57600080fd5b506102ee6104bc36600461222d565b6112f8565b3480156104cd57600080fd5b506102ee6104dc366004612266565b611303565b3480156104ed57600080fd5b506101e66104fc366004611e52565b60009081526003602052604090205490565b34801561051a57600080fd5b506101e660065481565b34801561053057600080fd5b5060055461021990600160a81b900460ff1681565b34801561055157600080fd5b50610219610560366004612283565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561059a57600080fd5b506102ee6105a93660046122b1565b611375565b3480156105ba57600080fd5b506102ee6105c93660046121e0565b6113ba565b60006001600160a01b03831661063e5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061069557506001600160e01b031982166303a24d0760e21b145b806106b057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600280546106c59061231a565b80601f01602080910402602001604051908101604052809291908181526020018280546106f19061231a565b801561073e5780601f106107135761010080835404028352916020019161073e565b820191906000526020600020905b81548152906001019060200180831161072157829003601f168201915b50505050509050919050565b6001600160a01b03851633148061076657506107668533610560565b6107825760405162461bcd60e51b815260040161063590612354565b61078f8585858585611485565b5050505050565b6005546001600160a01b031633146107c05760405162461bcd60e51b8152600401610635906123a3565b60065442101561081c5760405162461bcd60e51b815260206004820152602160248201527f41434854554e473a2054686520776172206973206e6f74206f766572207965746044820152602160f81b6064820152608401610635565b6040514790339082156108fc029083906000818181858888f1935050505015801561084b573d6000803e3d6000fd5b5050565b606081518351146108b45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610635565b6000835167ffffffffffffffff8111156108d0576108d0611ecb565b6040519080825280602002602001820160405280156108f9578160200160208202803683370190505b50905060005b84518110156109715761094485828151811061091d5761091d6123f8565b6020026020010151858381518110610937576109376123f8565b60200260200101516105ce565b828281518110610956576109566123f8565b602090810291909101015261096a81612424565b90506108ff565b509392505050565b6005546001600160a01b031633146109a35760405162461bcd60e51b8152600401610635906123a3565b600554600160b01b900460ff16156109cd5760405162461bcd60e51b81526004016106359061243d565b600780546001600160a01b039092166001600160a01b03199092169190911790556005805460ff60b01b1916600160b01b179055565b600554600160a81b900460ff16610a6a5760405162461bcd60e51b815260206004820152602560248201527f41434854554e473a205374696c6c20746f6f206d616e7920486f646c65727320604482015264616c69766560d81b6064820152608401610635565b600c54600160a01b900460ff1615610ac45760405162461bcd60e51b815260206004820152601960248201527f41434854554e473a20616c72656164792070616964206f7574000000000000006044820152606401610635565b476000610ad260648361248a565b610add90601e6124ac565b90506000610aec60648461248a565b610af790601e6124ac565b90506000610b0660648561248a565b610b119060056124ac565b600c546040519192506001600160a01b03169082156108fc029083906000818181858888f19350505050158015610b4c573d6000803e3d6000fd5b50600a546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015610b87573d6000803e3d6000fd5b50600b546040516001600160a01b039091169084156108fc029085906000818181858888f19350505050158015610bc2573d6000803e3d6000fd5b506005546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610bfc573d6000803e3d6000fd5b5050600c805460ff60a01b1916600160a01b179055505050565b6004546001600160a01b03163314610c705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610635565b610c7a6000611670565b565b6007546005546001600160a01b0390911690600a90600090600160a81b900460ff1615610cf75760405162461bcd60e51b8152602060048201526024808201527f41434854554e473a20426174746c6520526f79616c652068617320636f6e636c6044820152631d59195960e21b6064820152608401610635565b600554600160a01b900460ff16610d765760405162461bcd60e51b815260206004820152603c60248201527f41434854554e473a20426174746c6520526f79616c65206d757374206265206160448201527f637469766520746f2073746172742061747461636b732f6d696e7473000000006064820152608401610635565b83600003610dd55760405162461bcd60e51b815260206004820152602660248201527f41434854554e473a204e6f20536869656c64206f72204772656e6164652073656044820152651b1958dd195960d21b6064820152608401610635565b600160005260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c5461227211610e6a5760405162461bcd60e51b815260206004820152603060248201527f41434854554e473a20596f752063616e2774206b696c6c20746865206c61737460448201526f20686f646c6572207374616e64696e6760801b6064820152608401610635565b60008412610e7a57508280610e8a565b610e86846000196124cb565b9050805b506006811115610ec05760089150600c811115610ec057600791506012811115610ec057600691506018811115610ec057600591505b348183610ed5600a6611c37937e0800061248a565b610edf91906124ac565b610ee991906124ac565b1115610f375760405162461bcd60e51b815260206004820152601960248201527f41434854554e473a204e6f7420656e6f756768204574686572000000000000006044820152606401610635565b6040516338aaa09d60e01b815260048101869052602481018590526001600160a01b038416906338aaa09d90604401600060405180830381600087803b158015610f8057600080fd5b505af1158015610f94573d6000803e3d6000fd5b505050506000841215611005573360009081526008602052604081208054839290610fc0908490612550565b90915550506009543360009081526008602052604090205411156110055733600081815260086020526040902054600955600b80546001600160a01b03191690911790555b600b54604080513381526001600160a01b0390921660208301528101869052606081018590527f839addad4015ebc388eeef379933be23a67469946852fd491900cdacf4e115e69060800160405180910390a16040516304df781d60e11b8152600481018690526001600160a01b038416906309bef03a90602401602060405180830381865afa15801561109d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c19190612568565b61119e576110e133600180604051806020016040528060008152506116c2565b7f8ce70df25bb487a9f6e7ffa568276b814fcdfeb0d6266c57cd73393e0c4906e53386856001600160a01b03166309bef03a896040518263ffffffff1660e01b815260040161113291815260200190565b602060405180830381865afa15801561114f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111739190612568565b604080516001600160a01b039094168452602084019290925215159082015260600160405180910390a15b6111ab6001612272612585565b600160005260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c541061078f576005805460ff60a81b1916600160a81b179055600c80546001600160a01b03191633179055604080516325402a5360e11b815290516001600160a01b03851691636352211e918391634a8054a69160048083019260209291908290030181865afa15801561124e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611272919061259c565b6040518263ffffffff1660e01b815260040161129091815260200190565b602060405180830381865afa1580156112ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d191906125b5565b600a80546001600160a01b0319166001600160a01b03929092169190911790555050505050565b61084b3383836117e5565b6005546001600160a01b0316331461132d5760405162461bcd60e51b8152600401610635906123a3565b600554600160a01b900460ff16156113575760405162461bcd60e51b81526004016106359061243d565b60058054911515600160a01b0260ff60a01b19909216919091179055565b6001600160a01b03851633148061139157506113918533610560565b6113ad5760405162461bcd60e51b815260040161063590612354565b61078f85858585856118c5565b6004546001600160a01b031633146114145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610635565b6001600160a01b0381166114795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610635565b61148281611670565b50565b81518351146114e75760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610635565b6001600160a01b03841661150d5760405162461bcd60e51b8152600401610635906125d2565b3361151c8187878787876119fd565b60005b845181101561160257600085828151811061153c5761153c6123f8565b60200260200101519050600085838151811061155a5761155a6123f8565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156115aa5760405162461bcd60e51b815260040161063590612617565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906115e7908490612550565b92505081905550505050806115fb90612424565b905061151f565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611652929190612661565b60405180910390a4611668818787878787611b76565b505050505050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0384166117225760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610635565b33600061172e85611cd1565b9050600061173b85611cd1565b905061174c836000898585896119fd565b6000868152602081815260408083206001600160a01b038b1684529091528120805487929061177c908490612550565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46117dc83600089898989611d1c565b50505050505050565b816001600160a01b0316836001600160a01b0316036118585760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610635565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166118eb5760405162461bcd60e51b8152600401610635906125d2565b3360006118f785611cd1565b9050600061190485611cd1565b90506119148389898585896119fd565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156119555760405162461bcd60e51b815260040161063590612617565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611992908490612550565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46119f2848a8a8a8a8a611d1c565b505050505050505050565b6001600160a01b038516611a845760005b8351811015611a8257828181518110611a2957611a296123f8565b602002602001015160036000868481518110611a4757611a476123f8565b602002602001015181526020019081526020016000206000828254611a6c9190612550565b90915550611a7b905081612424565b9050611a0e565b505b6001600160a01b0384166116685760005b83518110156117dc576000848281518110611ab257611ab26123f8565b602002602001015190506000848381518110611ad057611ad06123f8565b6020026020010151905060006003600084815260200190815260200160002054905081811015611b535760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610635565b60009283526003602052604090922091039055611b6f81612424565b9050611a95565b6001600160a01b0384163b156116685760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611bba908990899088908890889060040161268f565b6020604051808303816000875af1925050508015611bf5575060408051601f3d908101601f19168201909252611bf2918101906126ed565b60015b611ca157611c0161270a565b806308c379a003611c3a5750611c15612726565b80611c205750611c3c565b8060405162461bcd60e51b81526004016106359190611eb8565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610635565b6001600160e01b0319811663bc197c8160e01b146117dc5760405162461bcd60e51b8152600401610635906127b0565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611d0b57611d0b6123f8565b602090810291909101015292915050565b6001600160a01b0384163b156116685760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611d6090899089908890889088906004016127f8565b6020604051808303816000875af1925050508015611d9b575060408051601f3d908101601f19168201909252611d98918101906126ed565b60015b611da757611c0161270a565b6001600160e01b0319811663f23a6e6160e01b146117dc5760405162461bcd60e51b8152600401610635906127b0565b6001600160a01b038116811461148257600080fd5b60008060408385031215611dff57600080fd5b8235611e0a81611dd7565b946020939093013593505050565b6001600160e01b03198116811461148257600080fd5b600060208284031215611e4057600080fd5b8135611e4b81611e18565b9392505050565b600060208284031215611e6457600080fd5b5035919050565b6000815180845260005b81811015611e9157602081850181015186830182015201611e75565b81811115611ea3576000602083870101525b50601f01601f19169290920160200192915050565b602081526000611e4b6020830184611e6b565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611f0757611f07611ecb565b6040525050565b600067ffffffffffffffff821115611f2857611f28611ecb565b5060051b60200190565b600082601f830112611f4357600080fd5b81356020611f5082611f0e565b604051611f5d8282611ee1565b83815260059390931b8501820192828101915086841115611f7d57600080fd5b8286015b84811015611f985780358352918301918301611f81565b509695505050505050565b600082601f830112611fb457600080fd5b813567ffffffffffffffff811115611fce57611fce611ecb565b604051611fe5601f8301601f191660200182611ee1565b818152846020838601011115611ffa57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561202f57600080fd5b853561203a81611dd7565b9450602086013561204a81611dd7565b9350604086013567ffffffffffffffff8082111561206757600080fd5b61207389838a01611f32565b9450606088013591508082111561208957600080fd5b61209589838a01611f32565b935060808801359150808211156120ab57600080fd5b506120b888828901611fa3565b9150509295509295909350565b600080604083850312156120d857600080fd5b823567ffffffffffffffff808211156120f057600080fd5b818501915085601f83011261210457600080fd5b8135602061211182611f0e565b60405161211e8282611ee1565b83815260059390931b850182019282810191508984111561213e57600080fd5b948201945b8386101561216557853561215681611dd7565b82529482019490820190612143565b9650508601359250508082111561217b57600080fd5b5061218885828601611f32565b9150509250929050565b600081518084526020808501945080840160005b838110156121c2578151875295820195908201906001016121a6565b509495945050505050565b602081526000611e4b6020830184612192565b6000602082840312156121f257600080fd5b8135611e4b81611dd7565b6000806040838503121561221057600080fd5b50508035926020909101359150565b801515811461148257600080fd5b6000806040838503121561224057600080fd5b823561224b81611dd7565b9150602083013561225b8161221f565b809150509250929050565b60006020828403121561227857600080fd5b8135611e4b8161221f565b6000806040838503121561229657600080fd5b82356122a181611dd7565b9150602083013561225b81611dd7565b600080600080600060a086880312156122c957600080fd5b85356122d481611dd7565b945060208601356122e481611dd7565b93506040860135925060608601359150608086013567ffffffffffffffff81111561230e57600080fd5b6120b888828901611fa3565b600181811c9082168061232e57607f821691505b60208210810361234e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b60208082526035908201527f41434854554e473a204f6e6c7920436f6e74726163742043726561746f72206360408201527430b71031b0b636103a3434b990333ab731ba34b7b760591b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124365761243661240e565b5060010190565b6020808252602d908201527f41434854554e473a206e6f626f64792063616e206368616e676520746869732060408201526c76616c756520616e796d6f726560981b606082015260800190565b6000826124a757634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156124c6576124c661240e565b500290565b60006001600160ff1b03818413828413808216868404861116156124f1576124f161240e565b600160ff1b60008712828116878305891216156125105761251061240e565b6000871292508782058712848416161561252c5761252c61240e565b878505871281841616156125425761254261240e565b505050929093029392505050565b600082198211156125635761256361240e565b500190565b60006020828403121561257a57600080fd5b8151611e4b8161221f565b6000828210156125975761259761240e565b500390565b6000602082840312156125ae57600080fd5b5051919050565b6000602082840312156125c757600080fd5b8151611e4b81611dd7565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006126746040830185612192565b82810360208401526126868185612192565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906126bb90830186612192565b82810360608401526126cd8186612192565b905082810360808401526126e18185611e6b565b98975050505050505050565b6000602082840312156126ff57600080fd5b8151611e4b81611e18565b600060033d11156127235760046000803e5060005160e01c5b90565b600060443d10156127345790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561276457505050505090565b828501915081518181111561277c5750505050505090565b843d87010160208285010111156127965750505050505090565b6127a560208286010187611ee1565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061283290830184611e6b565b97965050505050505056fea2646970667358221220b5c5079d68e77aebb9557f671ff5c1c7efece15d4efca82cf6ec394f3fa2ba3364736f6c634300080f00330000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000007468747470733a2f2f6d686e376273756a6b766569777033726d696675796c66637864706d707977336c377275336c6a68746d6a7573766261646468612e617277656176652e6e65742f59647677796f6c565349735f6357494c54437969754e374834747466343032744a35735453565167474d34000000000000000000000000

Deployed Bytecode

0x6080604052600436106101c15760003560e01c806363bd1d4a116100f7578063a22cb46511610095578063c09647ea11610064578063c09647ea14610524578063e985e9c514610545578063f242432a1461058e578063f2fde38b146105ae57600080fd5b8063a22cb465146104a1578063aac604bc146104c1578063bd85b039146104e1578063bef3a0831461050e57600080fd5b806384dbabfe116100d157806384dbabfe14610430578063856956091461044357806387a95778146104635780638da5cb5b1461048357600080fd5b806363bd1d4a146103e4578063715018a61461040557806377f8d49d1461041a57600080fd5b80633ccfd60b116101645780634f558e791161013e5780634f558e7914610353578063585c8487146103825780635c3cc3fe146103af57806360bcd00f146103cf57600080fd5b80633ccfd60b146102f05780633df0c3b9146103055780634e1273f41461032657600080fd5b80630e89341c116101a05780630e89341c146102615780631e2f73b11461028e57806323ab4692146102ae5780632eb2c2d6146102ce57600080fd5b8062fdd58e146101c657806301ffc9a7146101f95780630670562314610229575b600080fd5b3480156101d257600080fd5b506101e66101e1366004611dec565b6105ce565b6040519081526020015b60405180910390f35b34801561020557600080fd5b50610219610214366004611e2e565b610664565b60405190151581526020016101f0565b34801561023557600080fd5b50600b54610249906001600160a01b031681565b6040516001600160a01b0390911681526020016101f0565b34801561026d57600080fd5b5061028161027c366004611e52565b6106b6565b6040516101f09190611eb8565b34801561029a57600080fd5b50600554610249906001600160a01b031681565b3480156102ba57600080fd5b50600a54610249906001600160a01b031681565b3480156102da57600080fd5b506102ee6102e9366004612017565b61074a565b005b3480156102fc57600080fd5b506102ee610796565b34801561031157600080fd5b5060055461021990600160a01b900460ff1681565b34801561033257600080fd5b506103466103413660046120c5565b61084f565b6040516101f091906121cd565b34801561035f57600080fd5b5061021961036e366004611e52565b600090815260036020526040902054151590565b34801561038e57600080fd5b506101e661039d3660046121e0565b60086020526000908152604090205481565b3480156103bb57600080fd5b506102ee6103ca3660046121e0565b610979565b3480156103db57600080fd5b506102ee610a03565b3480156103f057600080fd5b50600c5461021990600160a01b900460ff1681565b34801561041157600080fd5b506102ee610c16565b34801561042657600080fd5b506101e660095481565b6102ee61043e3660046121fd565b610c7c565b34801561044f57600080fd5b50600c54610249906001600160a01b031681565b34801561046f57600080fd5b50600754610249906001600160a01b031681565b34801561048f57600080fd5b506004546001600160a01b0316610249565b3480156104ad57600080fd5b506102ee6104bc36600461222d565b6112f8565b3480156104cd57600080fd5b506102ee6104dc366004612266565b611303565b3480156104ed57600080fd5b506101e66104fc366004611e52565b60009081526003602052604090205490565b34801561051a57600080fd5b506101e660065481565b34801561053057600080fd5b5060055461021990600160a81b900460ff1681565b34801561055157600080fd5b50610219610560366004612283565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561059a57600080fd5b506102ee6105a93660046122b1565b611375565b3480156105ba57600080fd5b506102ee6105c93660046121e0565b6113ba565b60006001600160a01b03831661063e5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061069557506001600160e01b031982166303a24d0760e21b145b806106b057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600280546106c59061231a565b80601f01602080910402602001604051908101604052809291908181526020018280546106f19061231a565b801561073e5780601f106107135761010080835404028352916020019161073e565b820191906000526020600020905b81548152906001019060200180831161072157829003601f168201915b50505050509050919050565b6001600160a01b03851633148061076657506107668533610560565b6107825760405162461bcd60e51b815260040161063590612354565b61078f8585858585611485565b5050505050565b6005546001600160a01b031633146107c05760405162461bcd60e51b8152600401610635906123a3565b60065442101561081c5760405162461bcd60e51b815260206004820152602160248201527f41434854554e473a2054686520776172206973206e6f74206f766572207965746044820152602160f81b6064820152608401610635565b6040514790339082156108fc029083906000818181858888f1935050505015801561084b573d6000803e3d6000fd5b5050565b606081518351146108b45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610635565b6000835167ffffffffffffffff8111156108d0576108d0611ecb565b6040519080825280602002602001820160405280156108f9578160200160208202803683370190505b50905060005b84518110156109715761094485828151811061091d5761091d6123f8565b6020026020010151858381518110610937576109376123f8565b60200260200101516105ce565b828281518110610956576109566123f8565b602090810291909101015261096a81612424565b90506108ff565b509392505050565b6005546001600160a01b031633146109a35760405162461bcd60e51b8152600401610635906123a3565b600554600160b01b900460ff16156109cd5760405162461bcd60e51b81526004016106359061243d565b600780546001600160a01b039092166001600160a01b03199092169190911790556005805460ff60b01b1916600160b01b179055565b600554600160a81b900460ff16610a6a5760405162461bcd60e51b815260206004820152602560248201527f41434854554e473a205374696c6c20746f6f206d616e7920486f646c65727320604482015264616c69766560d81b6064820152608401610635565b600c54600160a01b900460ff1615610ac45760405162461bcd60e51b815260206004820152601960248201527f41434854554e473a20616c72656164792070616964206f7574000000000000006044820152606401610635565b476000610ad260648361248a565b610add90601e6124ac565b90506000610aec60648461248a565b610af790601e6124ac565b90506000610b0660648561248a565b610b119060056124ac565b600c546040519192506001600160a01b03169082156108fc029083906000818181858888f19350505050158015610b4c573d6000803e3d6000fd5b50600a546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015610b87573d6000803e3d6000fd5b50600b546040516001600160a01b039091169084156108fc029085906000818181858888f19350505050158015610bc2573d6000803e3d6000fd5b506005546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610bfc573d6000803e3d6000fd5b5050600c805460ff60a01b1916600160a01b179055505050565b6004546001600160a01b03163314610c705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610635565b610c7a6000611670565b565b6007546005546001600160a01b0390911690600a90600090600160a81b900460ff1615610cf75760405162461bcd60e51b8152602060048201526024808201527f41434854554e473a20426174746c6520526f79616c652068617320636f6e636c6044820152631d59195960e21b6064820152608401610635565b600554600160a01b900460ff16610d765760405162461bcd60e51b815260206004820152603c60248201527f41434854554e473a20426174746c6520526f79616c65206d757374206265206160448201527f637469766520746f2073746172742061747461636b732f6d696e7473000000006064820152608401610635565b83600003610dd55760405162461bcd60e51b815260206004820152602660248201527f41434854554e473a204e6f20536869656c64206f72204772656e6164652073656044820152651b1958dd195960d21b6064820152608401610635565b600160005260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c5461227211610e6a5760405162461bcd60e51b815260206004820152603060248201527f41434854554e473a20596f752063616e2774206b696c6c20746865206c61737460448201526f20686f646c6572207374616e64696e6760801b6064820152608401610635565b60008412610e7a57508280610e8a565b610e86846000196124cb565b9050805b506006811115610ec05760089150600c811115610ec057600791506012811115610ec057600691506018811115610ec057600591505b348183610ed5600a6611c37937e0800061248a565b610edf91906124ac565b610ee991906124ac565b1115610f375760405162461bcd60e51b815260206004820152601960248201527f41434854554e473a204e6f7420656e6f756768204574686572000000000000006044820152606401610635565b6040516338aaa09d60e01b815260048101869052602481018590526001600160a01b038416906338aaa09d90604401600060405180830381600087803b158015610f8057600080fd5b505af1158015610f94573d6000803e3d6000fd5b505050506000841215611005573360009081526008602052604081208054839290610fc0908490612550565b90915550506009543360009081526008602052604090205411156110055733600081815260086020526040902054600955600b80546001600160a01b03191690911790555b600b54604080513381526001600160a01b0390921660208301528101869052606081018590527f839addad4015ebc388eeef379933be23a67469946852fd491900cdacf4e115e69060800160405180910390a16040516304df781d60e11b8152600481018690526001600160a01b038416906309bef03a90602401602060405180830381865afa15801561109d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c19190612568565b61119e576110e133600180604051806020016040528060008152506116c2565b7f8ce70df25bb487a9f6e7ffa568276b814fcdfeb0d6266c57cd73393e0c4906e53386856001600160a01b03166309bef03a896040518263ffffffff1660e01b815260040161113291815260200190565b602060405180830381865afa15801561114f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111739190612568565b604080516001600160a01b039094168452602084019290925215159082015260600160405180910390a15b6111ab6001612272612585565b600160005260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c541061078f576005805460ff60a81b1916600160a81b179055600c80546001600160a01b03191633179055604080516325402a5360e11b815290516001600160a01b03851691636352211e918391634a8054a69160048083019260209291908290030181865afa15801561124e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611272919061259c565b6040518263ffffffff1660e01b815260040161129091815260200190565b602060405180830381865afa1580156112ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d191906125b5565b600a80546001600160a01b0319166001600160a01b03929092169190911790555050505050565b61084b3383836117e5565b6005546001600160a01b0316331461132d5760405162461bcd60e51b8152600401610635906123a3565b600554600160a01b900460ff16156113575760405162461bcd60e51b81526004016106359061243d565b60058054911515600160a01b0260ff60a01b19909216919091179055565b6001600160a01b03851633148061139157506113918533610560565b6113ad5760405162461bcd60e51b815260040161063590612354565b61078f85858585856118c5565b6004546001600160a01b031633146114145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610635565b6001600160a01b0381166114795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610635565b61148281611670565b50565b81518351146114e75760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610635565b6001600160a01b03841661150d5760405162461bcd60e51b8152600401610635906125d2565b3361151c8187878787876119fd565b60005b845181101561160257600085828151811061153c5761153c6123f8565b60200260200101519050600085838151811061155a5761155a6123f8565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156115aa5760405162461bcd60e51b815260040161063590612617565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906115e7908490612550565b92505081905550505050806115fb90612424565b905061151f565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611652929190612661565b60405180910390a4611668818787878787611b76565b505050505050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0384166117225760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610635565b33600061172e85611cd1565b9050600061173b85611cd1565b905061174c836000898585896119fd565b6000868152602081815260408083206001600160a01b038b1684529091528120805487929061177c908490612550565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46117dc83600089898989611d1c565b50505050505050565b816001600160a01b0316836001600160a01b0316036118585760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610635565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166118eb5760405162461bcd60e51b8152600401610635906125d2565b3360006118f785611cd1565b9050600061190485611cd1565b90506119148389898585896119fd565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156119555760405162461bcd60e51b815260040161063590612617565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611992908490612550565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46119f2848a8a8a8a8a611d1c565b505050505050505050565b6001600160a01b038516611a845760005b8351811015611a8257828181518110611a2957611a296123f8565b602002602001015160036000868481518110611a4757611a476123f8565b602002602001015181526020019081526020016000206000828254611a6c9190612550565b90915550611a7b905081612424565b9050611a0e565b505b6001600160a01b0384166116685760005b83518110156117dc576000848281518110611ab257611ab26123f8565b602002602001015190506000848381518110611ad057611ad06123f8565b6020026020010151905060006003600084815260200190815260200160002054905081811015611b535760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610635565b60009283526003602052604090922091039055611b6f81612424565b9050611a95565b6001600160a01b0384163b156116685760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611bba908990899088908890889060040161268f565b6020604051808303816000875af1925050508015611bf5575060408051601f3d908101601f19168201909252611bf2918101906126ed565b60015b611ca157611c0161270a565b806308c379a003611c3a5750611c15612726565b80611c205750611c3c565b8060405162461bcd60e51b81526004016106359190611eb8565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610635565b6001600160e01b0319811663bc197c8160e01b146117dc5760405162461bcd60e51b8152600401610635906127b0565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611d0b57611d0b6123f8565b602090810291909101015292915050565b6001600160a01b0384163b156116685760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611d6090899089908890889088906004016127f8565b6020604051808303816000875af1925050508015611d9b575060408051601f3d908101601f19168201909252611d98918101906126ed565b60015b611da757611c0161270a565b6001600160e01b0319811663f23a6e6160e01b146117dc5760405162461bcd60e51b8152600401610635906127b0565b6001600160a01b038116811461148257600080fd5b60008060408385031215611dff57600080fd5b8235611e0a81611dd7565b946020939093013593505050565b6001600160e01b03198116811461148257600080fd5b600060208284031215611e4057600080fd5b8135611e4b81611e18565b9392505050565b600060208284031215611e6457600080fd5b5035919050565b6000815180845260005b81811015611e9157602081850181015186830182015201611e75565b81811115611ea3576000602083870101525b50601f01601f19169290920160200192915050565b602081526000611e4b6020830184611e6b565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611f0757611f07611ecb565b6040525050565b600067ffffffffffffffff821115611f2857611f28611ecb565b5060051b60200190565b600082601f830112611f4357600080fd5b81356020611f5082611f0e565b604051611f5d8282611ee1565b83815260059390931b8501820192828101915086841115611f7d57600080fd5b8286015b84811015611f985780358352918301918301611f81565b509695505050505050565b600082601f830112611fb457600080fd5b813567ffffffffffffffff811115611fce57611fce611ecb565b604051611fe5601f8301601f191660200182611ee1565b818152846020838601011115611ffa57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561202f57600080fd5b853561203a81611dd7565b9450602086013561204a81611dd7565b9350604086013567ffffffffffffffff8082111561206757600080fd5b61207389838a01611f32565b9450606088013591508082111561208957600080fd5b61209589838a01611f32565b935060808801359150808211156120ab57600080fd5b506120b888828901611fa3565b9150509295509295909350565b600080604083850312156120d857600080fd5b823567ffffffffffffffff808211156120f057600080fd5b818501915085601f83011261210457600080fd5b8135602061211182611f0e565b60405161211e8282611ee1565b83815260059390931b850182019282810191508984111561213e57600080fd5b948201945b8386101561216557853561215681611dd7565b82529482019490820190612143565b9650508601359250508082111561217b57600080fd5b5061218885828601611f32565b9150509250929050565b600081518084526020808501945080840160005b838110156121c2578151875295820195908201906001016121a6565b509495945050505050565b602081526000611e4b6020830184612192565b6000602082840312156121f257600080fd5b8135611e4b81611dd7565b6000806040838503121561221057600080fd5b50508035926020909101359150565b801515811461148257600080fd5b6000806040838503121561224057600080fd5b823561224b81611dd7565b9150602083013561225b8161221f565b809150509250929050565b60006020828403121561227857600080fd5b8135611e4b8161221f565b6000806040838503121561229657600080fd5b82356122a181611dd7565b9150602083013561225b81611dd7565b600080600080600060a086880312156122c957600080fd5b85356122d481611dd7565b945060208601356122e481611dd7565b93506040860135925060608601359150608086013567ffffffffffffffff81111561230e57600080fd5b6120b888828901611fa3565b600181811c9082168061232e57607f821691505b60208210810361234e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b60208082526035908201527f41434854554e473a204f6e6c7920436f6e74726163742043726561746f72206360408201527430b71031b0b636103a3434b990333ab731ba34b7b760591b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124365761243661240e565b5060010190565b6020808252602d908201527f41434854554e473a206e6f626f64792063616e206368616e676520746869732060408201526c76616c756520616e796d6f726560981b606082015260800190565b6000826124a757634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156124c6576124c661240e565b500290565b60006001600160ff1b03818413828413808216868404861116156124f1576124f161240e565b600160ff1b60008712828116878305891216156125105761251061240e565b6000871292508782058712848416161561252c5761252c61240e565b878505871281841616156125425761254261240e565b505050929093029392505050565b600082198211156125635761256361240e565b500190565b60006020828403121561257a57600080fd5b8151611e4b8161221f565b6000828210156125975761259761240e565b500390565b6000602082840312156125ae57600080fd5b5051919050565b6000602082840312156125c757600080fd5b8151611e4b81611dd7565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006126746040830185612192565b82810360208401526126868185612192565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906126bb90830186612192565b82810360608401526126cd8186612192565b905082810360808401526126e18185611e6b565b98975050505050505050565b6000602082840312156126ff57600080fd5b8151611e4b81611e18565b600060033d11156127235760046000803e5060005160e01c5b90565b600060443d10156127345790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561276457505050505090565b828501915081518181111561277c5750505050505090565b843d87010160208285010111156127965750505050505090565b6127a560208286010187611ee1565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061283290830184611e6b565b97965050505050505056fea2646970667358221220b5c5079d68e77aebb9557f671ff5c1c7efece15d4efca82cf6ec394f3fa2ba3364736f6c634300080f0033

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

0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000007468747470733a2f2f6d686e376273756a6b766569777033726d696675796c66637864706d707977336c377275336c6a68746d6a7573766261646468612e617277656176652e6e65742f59647677796f6c565349735f6357494c54437969754e374834747466343032744a35735453565167474d34000000000000000000000000

-----Decoded View---------------
Arg [0] : uri (string): https://mhn7bsujkveiwp3rmifuylfcxdpmpyw3l7ru3ljhtmjusvbaddha.arweave.net/YdvwyolVSIs_cWILTCyiuN7H4ttf402tJ5sTSVQgGM4

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000074
Arg [2] : 68747470733a2f2f6d686e376273756a6b766569777033726d696675796c6663
Arg [3] : 7864706d707977336c377275336c6a68746d6a7573766261646468612e617277
Arg [4] : 656176652e6e65742f59647677796f6c565349735f6357494c54437969754e37
Arg [5] : 4834747466343032744a35735453565167474d34000000000000000000000000


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.