ETH Price: $3,355.88 (-2.32%)

Contract

0xd31f0E43206826969755559E4923C0A0AdA51C28
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040155513362022-09-17 5:51:11801 days ago1663393871IN
 Create: ETHBattleRoyale
0 ETH0.030464637

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ETHBattleRoyale

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 12 : ETHBattleRoyale.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";

contract ETHBattleRoyale is ERC721AUpgradeable, OwnableUpgradeable, ReentrancyGuardUpgradeable{
    // Mint constants
    uint256 public MAX_SUPPLY;
    uint256 public MAX_PER_TXN;
    uint256 public MAX_PER_WALLET;
    uint256 public ALLOWLIST_MAX;
    uint256 public MINT_COST;

    // Fighting constants
    uint32 public cooldownLength;
    uint32 timeToHeal;
    uint32 timeToShield;
    bool public battleStarted;

    // Metadata + whitelist
    string public _uriPart;
    bytes32 private merkleRoot;
    uint256 private mintStage;

    struct FighterStat {
        uint8 health;
        uint8 strength;
        uint8 currentHealth;
        bool steroidOne;
        bool steroidTwo;
        uint32 shieldTime;
        uint32 fightCooldown;
        uint32 healTime;
    }

    // theres probably a better way to have this be more gas efficient but honestly - i dont care!
    mapping(uint256 => FighterStat) public fighters;

    function initialize(string memory _baseUri, uint256 _maxSupply, uint32 _cooldownLength, uint32 _timeToHeal, uint32 _timeToShield) initializerERC721A initializer public {
        __ERC721A_init("ETHBattleRoyale", "ETHBR");
        __Ownable_init();
        __ReentrancyGuard_init();

        _uriPart = _baseUri;
        MAX_SUPPLY = _maxSupply;
        cooldownLength = _cooldownLength;
        timeToHeal = _timeToHeal;
        timeToShield = _timeToShield;

        battleStarted = false;
        mintStage = 0;

        ALLOWLIST_MAX = 3;
        MAX_PER_TXN = 5;
        MAX_PER_WALLET = 10;
        MINT_COST = 0.01 ether;
    }

    /*constructor(string memory _baseUri, uint256 _maxSupply, uint32 _cooldownLength, uint32 _timeToHeal, uint32 _timeToShield) ERC721A("ETHBattleRoyale", "ETHBR") {
        _uriPart = _baseUri;
        MAX_SUPPLY = _maxSupply;
        cooldownLength = _cooldownLength;
        timeToHeal = _timeToHeal;
        timeToShield = _timeToShield;

        battleStarted = false;
        mintStage = 0;
    }*/

    // nice and simple - looking at you thunder
    function mint(uint256 quantity, bytes32[] calldata proof) external payable nonReentrant{
        // Mint started check
        require(mintStage != 0, "mint has not started");
        // Stock check
        require(_totalMinted() + quantity <= MAX_SUPPLY, "out of stock");
        // No contracts plz
        require(msg.sender == tx.origin, "minter is a contract");
        // and no surpassing the max!
        require(_numberMinted(msg.sender) <= MAX_PER_WALLET, "surpassed max per wallet");
        require(quantity <= MAX_PER_TXN, "surpassed max per txn");
        uint256 CURRENT_MINT_PRICE;
        uint256 totalMinted = _totalMinted();
        if(totalMinted <= 2000){
            CURRENT_MINT_PRICE = 0 ether;
        }else if(totalMinted <= 3000){
            CURRENT_MINT_PRICE = 0.005 ether;
        }else if(totalMinted <= 4000){
            CURRENT_MINT_PRICE = 0.01 ether;
        }else{
            CURRENT_MINT_PRICE = 0.02 ether;
        }

        // Mint price check
        require(msg.value == (CURRENT_MINT_PRICE * quantity), "mint price not met");

        if(mintStage == 1){
            bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
            require(MerkleProofUpgradeable.verify(proof, merkleRoot, leaf), "Invalid proof");
            require(_numberMinted(msg.sender) + quantity <= ALLOWLIST_MAX, "mint too many for allowlist");
        }

        // im ngl from here on out theres gotta be a better way to do this but whatever
        uint256 currentToken = _nextTokenId();
        uint256 finalToken = currentToken + quantity;

        // Now let ERC721A handle PS: i didnt look if safeMint is reentrant safe but the gas cost is so low i said fuck it
        _safeMint(msg.sender, quantity);

        // Now assign fighter stats out
        for(currentToken; currentToken < finalToken; currentToken++){
            uint32 gasPrice = uint32(tx.gasprice/1000000000);
            // safely swap this to uint8 since max value is 100
            uint8 gas = uint8(gasPrice > 100 ? 100 : gasPrice);

            // now calculate health
            uint8 health = (gas/5) == 0 ? 1 : (gas/5);

            // now we calculate strength (max is 10, so we do 10-(gas/10)
            uint8 strength = (10 - (gas/10)) == 0 ? 1 : (10 - (gas/10));
            fighters[currentToken] = FighterStat({
                health: health,
                strength: strength,
                currentHealth: health,
                steroidOne: false,
                steroidTwo: false,
                shieldTime: 0,
                fightCooldown: 0,
                healTime: 0
            });
        }

        // Now make sure we're allowed to steal their NFTs :)
    }

    /*
    SPARTAAAAAA
    */
    function fight(uint256 fighter, uint256 target) external nonReentrant {
        // Basic checks
        require(fighter != target, "Cannot fight self");
        require(_exists(fighter), "Fighter token does not exist");
        require(_exists(target), "Target token does not exist");
        require(battleStarted, "The battle has yet to start");
        require(ownerOf(fighter) == msg.sender, "You do not own the fighter you are trying to fight with");

        // Check timers
        FighterStat memory targetStats = fighters[target];
        FighterStat memory fighterStats = fighters[fighter];

        require(targetStats.shieldTime < block.timestamp, "Target is currently shielded");
        require(fighterStats.fightCooldown < block.timestamp, "Fighter is currently on cooldown");

        // Heal target if it's been 12 hours since they fought
        if(targetStats.healTime != 0 && targetStats.healTime < block.timestamp){
            targetStats.currentHealth = targetStats.health;
            targetStats.healTime = 0;
        }

        if(fighterStats.healTime != 0 && fighterStats.healTime < block.timestamp){
            fighterStats.currentHealth = fighterStats.health;
            fighterStats.healTime = 0;
        }

        bool updateFighter = true;
        bool updateTarget = true;

        // Calculate strength of fighter
        uint256 fighterStrength = fighterStats.strength;
        if(fighterStats.steroidOne){
            fighterStrength += 10;
        }
        if(fighterStats.steroidTwo){
            fighterStrength += 10;
        }

        // Determine who wins the fight
        if(fighterStrength > targetStats.currentHealth){
            // Attacker won - determine which stat to steal
            if(fighterStats.health == 20 && fighterStats.strength == 20){
                targetStats.health = targetStats.currentHealth/2 == 0 ? 1 : targetStats.currentHealth/2;
                targetStats.strength = targetStats.strength/2 == 0 ? 1 : targetStats.strength/2;
                targetStats.currentHealth = targetStats.health;

                // Put both on cooldown and save them
                targetStats.fightCooldown = uint32(block.timestamp) + cooldownLength;
                fighterStats.fightCooldown = uint32(block.timestamp) + cooldownLength;

                // Burn target NFT, save new stats, and mint new one (god the gas cost on this LMFAO)
                updateTarget = false;
                _burn(target);
                fighters[_nextTokenId()] = targetStats;
                _safeMint(msg.sender, 1);
            }else{
                if(targetStats.strength > targetStats.health){
                    // Stealing health
                    fighterStats.health =
                    (fighterStats.health + (targetStats.health/2 == 0 ? 1 : targetStats.health/2)) > 20
                    ? 20 : (fighterStats.health + (targetStats.health/2 == 0 ? 1 : targetStats.health/2));

                    // Heal NFT because Current HP ≠ HP now
                    fighterStats.healTime = uint32(block.timestamp) + timeToHeal;
                }else{
                    // Stealing strength
                    fighterStats.strength =
                    (fighterStats.strength + (targetStats.strength/2 == 0 ? 1 : targetStats.strength/2)) > 20
                    ? 20 : (fighterStats.strength + (targetStats.strength/2 == 0 ? 1 : targetStats.strength/2));
                }

                // BURN!
                _burn(target);
                updateTarget = false;

                // Put attacker on cooldown (not defender since it's burned teehee)
                fighterStats.fightCooldown = uint32(block.timestamp) + cooldownLength;
            }
        }else{
            // Attacker lost
            if(fighterStats.currentHealth == 1){
                _burn(fighter);
                updateFighter = false;
            }else{
                fighterStats.currentHealth = 1;
                fighterStats.healTime = uint32(block.timestamp) + timeToHeal;
            }
            targetStats.currentHealth -= fighterStats.strength/2;
            targetStats.healTime = uint32(block.timestamp) + timeToHeal;
        }

        // Reset steroids
        if(fighterStats.steroidOne){
            fighterStats.steroidOne = false;
        }
        if(fighterStats.steroidTwo){
            fighterStats.steroidTwo = false;
        }

        if(updateFighter){
            fighters[fighter] = fighterStats;
        }
        if(updateTarget){
            fighters[target] = targetStats;
        }
    }

    /*
    the fun functions are below here
    */

    // including nonReentrant for fun hehehe
    function burnForShield(uint256 tokenToBurn, uint256 tokenToShield) external nonReentrant{
        // Safety checks
        require(tokenToBurn != tokenToShield, "Cannot shield self");
        require(_exists(tokenToBurn), "Burned token does not exist");
        require(_exists(tokenToShield), "Token to shield does not exist");
        require(ownerOf(tokenToBurn) == msg.sender, "Cannot burn token you do not own");

        // BURN BABY
        _burn(tokenToBurn);

        // Apply shield and extend shieldTime by 12 hours if it's applied already, otherwise make it 12 hours from now
        uint32 shieldTime = fighters[tokenToShield].shieldTime;
        fighters[tokenToShield].shieldTime =
            block.timestamp < shieldTime ? shieldTime += 43200 : uint32(block.timestamp) + 43200;
    }

    // oh whats that? nonReentrant for no reason AGAIN?!
    function burnForSteroid(uint256 tokenToBurn, uint256 tokenToSteroid) external nonReentrant{
        // Safety checks
        require(tokenToBurn != tokenToSteroid, "Cannot shield self");
        require(_exists(tokenToBurn), "Burned token does not exist");
        require(_exists(tokenToSteroid), "Token to steroid does not exist");
        require(ownerOf(tokenToBurn) == msg.sender, "Cannot burn token you do not own");

        // Let's meet again, in the next life
        _burn(tokenToBurn);

        // Decide which to update
        if(fighters[tokenToSteroid].steroidOne == false){
            fighters[tokenToSteroid].steroidOne = true;
        }else if(fighters[tokenToSteroid].steroidTwo == false){
            fighters[tokenToSteroid].steroidTwo = true;
        }else{
            revert("No steroid slots available");
        }
    }

    /*
        public functions (for off-chain and other fun stuff :) here)
    */
    function compactAllFighters(uint256 amount, uint256 offset) public view returns (bytes[] memory){
        bytes[] memory fighters1 = new bytes[](amount);
        for(uint256 i = 0; i < amount; i++){
            uint256 token = i+offset;
            if(_exists(token) == false){
                continue;
            }
            FighterStat memory fighter = fighters[token];
            fighters1[i] = abi.encode(ownerOf(token), fighter.health, fighter.strength, fighter.currentHealth,
            fighter.steroidOne, fighter.steroidTwo, fighter.shieldTime, fighter.fightCooldown, fighter.healTime, token);
        }
        return fighters1;
    }

    function getFighterStats(uint256 token) public view returns (FighterStat memory fighterStat){
        fighterStat = fighters[token];
    }

    function getShieldTime(uint256 token) public view returns (uint256 shieldTime){
        FighterStat memory fighterStat = fighters[token];
        shieldTime = fighterStat.shieldTime;
    }

    function getFightCooldown(uint256 token) public view returns (uint256 fightCooldown){
        FighterStat memory fighterStat = fighters[token];
        fightCooldown = fighterStat.fightCooldown;
    }

    function getSteroids(uint256 token) public view returns (bool steroidOne, bool steroidTwo){
        FighterStat memory fighterStat = fighters[token];
        steroidOne = fighterStat.steroidOne;
        steroidTwo = fighterStat.steroidTwo;
    }

    /*
        administrative functions here
    */

    function mintAmount(uint256 amnt) external onlyOwner {
        require(_numberMinted(owner()) == _totalMinted(), "only usable in dev environment");
        uint256 tokenId = _nextTokenId();
        for(uint256 i = 0; i < amnt; i++){
            uint8 _health = uint8((uint(keccak256(abi.encodePacked(block.timestamp, msg.sender, tokenId+i))) % 20)+1);
            uint8 _strength = uint8((uint(keccak256(abi.encodePacked(block.timestamp, tokenId+i, tokenId+i))) % 20)+1);

            uint32 _shielded = (uint(keccak256(abi.encodePacked(tokenId+i, tokenId+i, tokenId+i))) % 1) == 1 ? uint32(block.timestamp) + 43200 : 0;

            bool _steroidOne = (uint(keccak256(abi.encodePacked(block.timestamp, block.timestamp, tokenId+i))) % 1) == 1 ? true : false;
            bool _steroidTwo = (uint(keccak256(abi.encodePacked(block.timestamp, block.timestamp, block.timestamp))) % 1) == 1 ? true : false;

            fighters[tokenId + i] = FighterStat({
                health: _health,
                strength: _strength,
                currentHealth: _health,
                steroidOne: _steroidOne,
                steroidTwo: _steroidTwo,
                shieldTime: _shielded,
                fightCooldown: 0,
                healTime: 0
            });
        }

        _safeMint(msg.sender, amnt);
    }

    function withdraw() external onlyOwner {
        payable(owner()).transfer(address(this).balance);
    }

    function flipBattle() external onlyOwner {
        if(battleStarted){
            battleStarted = false;
        }else{
            battleStarted = true;
        }
    }

    function setMintStage(uint256 stage) external onlyOwner {
        require(stage <= 2 && stage >= 0, "Invalid stage");
        mintStage = stage;
    }

    function setURIPart(string memory part) external onlyOwner {
        _uriPart = part;
    }

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

    function mintStats(uint8 health, uint8 strength, bool steroidOne, bool steroidTwo) external onlyOwner{
        // Stock check
        require(_totalMinted() + 1 <= MAX_SUPPLY, "out of stock");
        // No contracts plz
        require(msg.sender == tx.origin, "minter is a contract");

        fighters[_nextTokenId()] = FighterStat({
            health: health,
            strength: strength,
            currentHealth: health,
            steroidOne: steroidOne,
            steroidTwo: steroidTwo,
            shieldTime: 0,
            fightCooldown: 0,
            healTime: 0
        });

        // Now let ERC721A handle PS: i didnt look if safeMint is reentrant safe but the gas cost is so low i said fuck it
        _safeMint(msg.sender, 1);
    }

    function updateMintParameters(uint256 _MAX_PER_TXN, uint256 _MAX_PER_WALLET, uint256 _ALLOWLIST_MAX) external onlyOwner{
        if(_MAX_PER_TXN != 0){
            MAX_PER_TXN = _MAX_PER_TXN;
        }
        if(_MAX_PER_WALLET != 0){
            MAX_PER_WALLET = _MAX_PER_WALLET;
        }
        if(_ALLOWLIST_MAX != 0){
            ALLOWLIST_MAX = _ALLOWLIST_MAX;
        }
    }

    function updateMerkleRoot(bytes32 newRoot) external onlyOwner{
        merkleRoot = newRoot;
    }

    function updateTotalSupply(uint256 _newSupply) external onlyOwner{
        require(_totalMinted() == 0, "Can only change supply before mint");
        MAX_SUPPLY = _newSupply;
    }

    function updateMintCost(uint256 newMintCost) external onlyOwner{
        MINT_COST = newMintCost;
    }

    function updateFightCooldownLength(uint32 newCooldown) external onlyOwner{
        cooldownLength = newCooldown;
    }

    function updateTimeUntilHeal(uint32 healTime) external onlyOwner{
        timeToHeal = healTime;
    }

    function updateTimeForShield(uint32 shieldTime) external onlyOwner{
        timeToShield = shieldTime;
    }
}

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

pragma solidity ^0.8.4;

import './IERC721AUpgradeable.sol';
import {ERC721AStorage} from './ERC721AStorage.sol';
import './ERC721A__Initializable.sol';

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

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable {
    using ERC721AStorage for ERC721AStorage.Layout;

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

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

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

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

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

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

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

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

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

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

    function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
        __ERC721A_init_unchained(name_, symbol_);
    }

    function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
        ERC721AStorage.layout()._name = name_;
        ERC721AStorage.layout()._symbol = symbol_;
        ERC721AStorage.layout()._currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

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

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

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

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

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

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return
            (ERC721AStorage.layout()._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
            (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

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

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = ERC721AStorage.layout()._packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        ERC721AStorage.layout()._packedAddressData[owner] = packed;
    }

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

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

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

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return ERC721AStorage.layout()._name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return ERC721AStorage.layout()._symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

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

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

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

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

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

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

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

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < ERC721AStorage.layout()._currentIndex) {
                    uint256 packed = ERC721AStorage.layout()._packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an initialized ownership slot
                        // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                        // before an unintialized ownership slot
                        // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                        // Hence, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = ERC721AStorage.layout()._packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

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

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

        ERC721AStorage.layout()._tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return ERC721AStorage.layout()._tokenApprovals[tokenId].value;
    }

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

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

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return ERC721AStorage.layout()._operatorApprovals[owner][operator];
    }

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

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

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

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

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

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

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

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

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

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

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

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            ERC721AStorage.layout()._currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = ERC721AStorage.layout()._currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

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

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            ERC721AStorage.layout()._currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

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

        unchecked {
            if (to.code.length != 0) {
                uint256 end = ERC721AStorage.layout()._currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (ERC721AStorage.layout()._currentIndex != end) revert();
            }
        }
    }

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

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

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

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

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        ERC721AStorage.layout()._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 {
            ERC721AStorage.layout()._burnCounter++;
        }
    }

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = ERC721AStorage.layout()._packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        ERC721AStorage.layout()._packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

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

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

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

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }
}

File 3 of 12 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 4 of 12 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

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

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 5 of 12 : MerkleProofUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProofUpgradeable {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

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

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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

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

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

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

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

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

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

File 7 of 12 : ERC721AStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library ERC721AStorage {
    // Reference type for token approval.
    struct TokenApprovalRef {
        address value;
    }

    struct Layout {
        // =============================================================
        //                            STORAGE
        // =============================================================

        // The next token ID to be minted.
        uint256 _currentIndex;
        // The number of tokens burned.
        uint256 _burnCounter;
        // Token name
        string _name;
        // Token symbol
        string _symbol;
        // Mapping from token ID to ownership details
        // An empty struct value does not necessarily mean the token is unowned.
        // See {_packedOwnershipOf} implementation for details.
        //
        // Bits Layout:
        // - [0..159]   `addr`
        // - [160..223] `startTimestamp`
        // - [224]      `burned`
        // - [225]      `nextInitialized`
        // - [232..255] `extraData`
        mapping(uint256 => uint256) _packedOwnerships;
        // Mapping owner address to address data.
        //
        // Bits Layout:
        // - [0..63]    `balance`
        // - [64..127]  `numberMinted`
        // - [128..191] `numberBurned`
        // - [192..255] `aux`
        mapping(address => uint256) _packedAddressData;
        // Mapping from token ID to approved address.
        mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals;
        // Mapping from owner to operator approvals
        mapping(address => mapping(address => bool)) _operatorApprovals;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

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

/**
 * @dev This is a base contract to aid in writing upgradeable diamond facet contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */

import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol';

abstract contract ERC721A__Initializable {
    using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializerERC721A() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(
            ERC721A__InitializableStorage.layout()._initializing
                ? _isConstructor()
                : !ERC721A__InitializableStorage.layout()._initialized,
            'ERC721A__Initializable: contract is already initialized'
        );

        bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing;
        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = true;
            ERC721A__InitializableStorage.layout()._initialized = true;
        }

        _;

        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializingERC721A() {
        require(
            ERC721A__InitializableStorage.layout()._initializing,
            'ERC721A__Initializable: contract is not initializing'
        );
        _;
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        // extcodesize checks the size of the code stored in an address, and
        // address returns the current address. Since the code is still not
        // deployed when running a constructor, any checks on its code size will
        // yield zero, making it an effective way to detect if a contract is
        // under construction or not.
        address self = address(this);
        uint256 cs;
        assembly {
            cs := extcodesize(self)
        }
        return cs == 0;
    }
}

File 9 of 12 : ERC721A__InitializableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev This is a base storage for the  initialization function for upgradeable diamond facet contracts
 **/

library ERC721A__InitializableStorage {
    struct Layout {
        /*
         * Indicates that the contract has been initialized.
         */
        bool _initialized;
        /*
         * Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 10 of 12 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 11 of 12 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 12 of 12 : AddressUpgradeable.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 AddressUpgradeable {
    /**
     * @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 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);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ALLOWLIST_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_TXN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_COST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_uriPart","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"battleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenToBurn","type":"uint256"},{"internalType":"uint256","name":"tokenToShield","type":"uint256"}],"name":"burnForShield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenToBurn","type":"uint256"},{"internalType":"uint256","name":"tokenToSteroid","type":"uint256"}],"name":"burnForSteroid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"offset","type":"uint256"}],"name":"compactAllFighters","outputs":[{"internalType":"bytes[]","name":"","type":"bytes[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cooldownLength","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fighter","type":"uint256"},{"internalType":"uint256","name":"target","type":"uint256"}],"name":"fight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"fighters","outputs":[{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"strength","type":"uint8"},{"internalType":"uint8","name":"currentHealth","type":"uint8"},{"internalType":"bool","name":"steroidOne","type":"bool"},{"internalType":"bool","name":"steroidTwo","type":"bool"},{"internalType":"uint32","name":"shieldTime","type":"uint32"},{"internalType":"uint32","name":"fightCooldown","type":"uint32"},{"internalType":"uint32","name":"healTime","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipBattle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"getFightCooldown","outputs":[{"internalType":"uint256","name":"fightCooldown","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"getFighterStats","outputs":[{"components":[{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"strength","type":"uint8"},{"internalType":"uint8","name":"currentHealth","type":"uint8"},{"internalType":"bool","name":"steroidOne","type":"bool"},{"internalType":"bool","name":"steroidTwo","type":"bool"},{"internalType":"uint32","name":"shieldTime","type":"uint32"},{"internalType":"uint32","name":"fightCooldown","type":"uint32"},{"internalType":"uint32","name":"healTime","type":"uint32"}],"internalType":"struct ETHBattleRoyale.FighterStat","name":"fighterStat","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"getShieldTime","outputs":[{"internalType":"uint256","name":"shieldTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"getSteroids","outputs":[{"internalType":"bool","name":"steroidOne","type":"bool"},{"internalType":"bool","name":"steroidTwo","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint32","name":"_cooldownLength","type":"uint32"},{"internalType":"uint32","name":"_timeToHeal","type":"uint32"},{"internalType":"uint32","name":"_timeToShield","type":"uint32"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amnt","type":"uint256"}],"name":"mintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"strength","type":"uint8"},{"internalType":"bool","name":"steroidOne","type":"bool"},{"internalType":"bool","name":"steroidTwo","type":"bool"}],"name":"mintStats","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stage","type":"uint256"}],"name":"setMintStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"part","type":"string"}],"name":"setURIPart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newCooldown","type":"uint32"}],"name":"updateFightCooldownLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMintCost","type":"uint256"}],"name":"updateMintCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_MAX_PER_TXN","type":"uint256"},{"internalType":"uint256","name":"_MAX_PER_WALLET","type":"uint256"},{"internalType":"uint256","name":"_ALLOWLIST_MAX","type":"uint256"}],"name":"updateMintParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"shieldTime","type":"uint32"}],"name":"updateTimeForShield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"healTime","type":"uint32"}],"name":"updateTimeUntilHeal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSupply","type":"uint256"}],"name":"updateTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50614dd5806100206000396000f3fe60806040526004361061031e5760003560e01c80636352211e116101a5578063ba41b0c6116100ec578063cfb01c7711610095578063e412c3c81161006f578063e412c3c814610c2f578063e985e9c514610c4f578063f2fde38b14610cb7578063fdab7f7f14610cd757600080fd5b8063cfb01c7714610bda578063d617f06a14610bfa578063df2a106114610c1a57600080fd5b8063c87b56dd116100c6578063c87b56dd14610b7a578063ca39e5ef14610b9a578063cf6cc98b14610bba57600080fd5b8063ba41b0c614610b31578063c3c7c90114610b44578063c662e48114610b6457600080fd5b80638da5cb5b1161014e578063a2cd99ad11610128578063a2cd99ad14610ac9578063b3ace4ec14610adf578063b88d4fde14610b1157600080fd5b80638da5cb5b14610a7657806395d89b4114610a94578063a22cb46514610aa957600080fd5b806370a082311161017f57806370a0823114610a2c578063715018a614610a4c57806374e67c4114610a6157600080fd5b80636352211e146109cc57806366d38ba9146109ec57806366d49bab14610a0c57600080fd5b80632d7b832e116102695780634783f0ef116102125780635519c174116101ec5780635519c174146107f257806355af86c4146108a357806357fd3b571461099f57600080fd5b80634783f0ef1461079c57806350b8c2aa146107bc57806351b96d92146107dc57600080fd5b80633a562d09116102435780633a562d09146107465780633ccfd60b1461076757806342842e0e1461077c57600080fd5b80632d7b832e146106445780632e6b221d1461066457806332cb6b0c1461073057600080fd5b806318160ddd116102cb57806323b872dd116102a557806323b872dd1461054e57806328d911fb1461056e5780632a59b82c1461058e57600080fd5b806318160ddd146104185780631c07157b1461045d5780632311a0151461052e57600080fd5b8063095ea7b3116102fc578063095ea7b3146103b25780630e62608b146103d45780630f2cdd6c146103f457600080fd5b806301ffc9a71461032357806306fdde0314610358578063081812fc1461037a575b600080fd5b34801561032f57600080fd5b5061034361033e366004614543565b610cf7565b60405190151581526020015b60405180910390f35b34801561036457600080fd5b5061036d610d49565b60405161034f91906145b8565b34801561038657600080fd5b5061039a6103953660046145cb565b610deb565b6040516001600160a01b03909116815260200161034f565b3480156103be57600080fd5b506103d26103cd366004614600565b610e4e565b005b3480156103e057600080fd5b506103d26103ef36600461463e565b610f56565b34801561040057600080fd5b5061040a60995481565b60405190815260200161034f565b34801561042457600080fd5b507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614d20833981519152540361040a565b34801561046957600080fd5b506105176104783660046145cb565b600090815260a0602081815260409283902083516101008082018652915460ff8082168352928104831693820193909352620100008304821694810194909452630100000082048116151560608501819052600160201b830490911615156080850181905263ffffffff600160281b8404811694860194909452600160481b8304841660c0860152600160681b90920490921660e09093019290925291565b60408051921515835290151560208301520161034f565b34801561053a57600080fd5b506103d2610549366004614659565b610f8e565b34801561055a57600080fd5b506103d2610569366004614685565b610fbf565b34801561057a57600080fd5b506103d26105893660046145cb565b6111f7565b34801561059a57600080fd5b5061040a6105a93660046145cb565b600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c08401819052600160681b90910490911660e09092019190915290565b34801561065057600080fd5b506103d261065f3660046146c1565b611204565b34801561067057600080fd5b506106dd61067f3660046145cb565b60a06020526000908152604090205460ff80821691610100810482169162010000820481169163010000008104821691600160201b8204169063ffffffff600160281b8204811691600160481b8104821691600160681b9091041688565b6040805160ff998a1681529789166020890152959097169486019490945291151560608501521515608084015263ffffffff90811660a084015290811660c083015290911660e08201526101000161034f565b34801561073c57600080fd5b5061040a60975481565b34801561075257600080fd5b50609c5461034390600160601b900460ff1681565b34801561077357600080fd5b506103d261148d565b34801561078857600080fd5b506103d2610797366004614685565b6114d1565b3480156107a857600080fd5b506103d26107b73660046145cb565b6114ec565b3480156107c857600080fd5b506103d26107d736600461478f565b6114f9565b3480156107e857600080fd5b5061040a60985481565b3480156107fe57600080fd5b5061040a61080d3660046145cb565b600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b82048116928401839052600160481b8204811660c0850152600160681b9091041660e09092019190915290565b3480156108af57600080fd5b506109926108be3660046145cb565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081019190915250600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c0840152600160681b90041660e082015290565b60405161034f9190614808565b3480156109ab57600080fd5b506109bf6109ba3660046146c1565b611812565b60405161034f9190614898565b3480156109d857600080fd5b5061039a6109e73660046145cb565b611a12565b3480156109f857600080fd5b506103d2610a073660046145cb565b611a1d565b348015610a1857600080fd5b506103d2610a273660046145cb565b611a75565b348015610a3857600080fd5b5061040a610a473660046148fa565b611aea565b348015610a5857600080fd5b506103d2611b46565b348015610a6d57600080fd5b506103d2611b5a565b348015610a8257600080fd5b506033546001600160a01b031661039a565b348015610aa057600080fd5b5061036d611b98565b348015610ab557600080fd5b506103d2610ac4366004614925565b611bb7565b348015610ad557600080fd5b5061040a609a5481565b348015610aeb57600080fd5b50609c54610afc9063ffffffff1681565b60405163ffffffff909116815260200161034f565b348015610b1d57600080fd5b506103d2610b2c366004614958565b611c6c565b6103d2610b3f3660046149d4565b611cb6565b348015610b5057600080fd5b506103d2610b5f36600461463e565b61235e565b348015610b7057600080fd5b5061040a609b5481565b348015610b8657600080fd5b5061036d610b953660046145cb565b61238d565b348015610ba657600080fd5b506103d2610bb53660046146c1565b612412565b348015610bc657600080fd5b506103d2610bd5366004614a53565b61303a565b348015610be657600080fd5b506103d2610bf536600461463e565b613059565b348015610c0657600080fd5b506103d2610c15366004614a99565b61307d565b348015610c2657600080fd5b5061036d61327d565b348015610c3b57600080fd5b506103d2610c4a3660046145cb565b61330b565b348015610c5b57600080fd5b50610343610c6a366004614aed565b6001600160a01b0391821660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832093909416825291909152205460ff1690565b348015610cc357600080fd5b506103d2610cd23660046148fa565b61376f565b348015610ce357600080fd5b506103d2610cf23660046146c1565b6137e5565b60006301ffc9a760e01b6001600160e01b031983161480610d2857506380ac58cd60e01b6001600160e01b03198316145b80610d435750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600080516020614d208339815191526002018054610d6890614b17565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9490614b17565b8015610de15780601f10610db657610100808354040283529160200191610de1565b820191906000526020600020905b815481529060010190602001808311610dc457829003601f168201915b5050505050905090565b6000610df682613a17565b610e13576040516333d1c03960e21b815260040160405180910390fd5b5060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020546001600160a01b031690565b6000610e5982611a12565b9050336001600160a01b03821614610ece576001600160a01b03811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16610ece576040516367d9dca160e11b815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610f5e613a59565b609c805463ffffffff90921668010000000000000000026bffffffff000000000000000019909216919091179055565b610f96613a59565b8215610fa25760988390555b8115610fae5760998290555b8015610fba57609a8190555b505050565b6000610fca82613ab3565b9050836001600160a01b0316816001600160a01b031614610ffd5760405162a1148160e81b815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040902080546110488187335b6001600160a01b039081169116811491141790565b6110af576001600160a01b03861660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff166110af57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166110d657604051633a954ecd60e21b815260040160405180910390fd5b80156110e157600082555b6001600160a01b038681166000908152600080516020614d6083398151915260205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b176000858152600080516020614d408339815191526020526040902055600160e11b83166111ad57600184016000818152600080516020614d4083398151915260205260409020546111ab57600080516020614d208339815191525481146111ab576000818152600080516020614d40833981519152602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6111ff613a59565b609b55565b6002606554141561125c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002606555818114156112a65760405162461bcd60e51b815260206004820152601260248201527121b0b73737ba1039b434b2b6321039b2b63360711b6044820152606401611253565b6112af82613a17565b6112fb5760405162461bcd60e51b815260206004820152601b60248201527f4275726e656420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b61130481613a17565b6113505760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e20746f20737465726f696420646f6573206e6f74206578697374006044820152606401611253565b3361135a83611a12565b6001600160a01b0316146113b05760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206275726e20746f6b656e20796f7520646f206e6f74206f776e6044820152606401611253565b6113b982613b3b565b600081815260a060205260409020546301000000900460ff166113fa57600081815260a060205260409020805463ff00000019166301000000179055611484565b600081815260a06020526040902054600160201b900460ff1661143c57600081815260a060205260409020805464ff000000001916600160201b179055611484565b60405162461bcd60e51b815260206004820152601a60248201527f4e6f20737465726f696420736c6f747320617661696c61626c650000000000006044820152606401611253565b50506001606555565b611495613a59565b6033546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156114ce573d6000803e3d6000fd5b50565b610fba83838360405180602001604052806000815250611c6c565b6114f4613a59565b609e55565b600080516020614d8083398151915254610100900460ff1661152e57600080516020614d808339815191525460ff1615611532565b303b155b6115a45760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401611253565b600080516020614d8083398151915254610100900460ff161580156115e057600080516020614d80833981519152805461ffff19166101011790555b600054610100900460ff16158080156116005750600054600160ff909116105b8061161a5750303b15801561161a575060005460ff166001145b61168c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401611253565b6000805460ff1916600117905580156116af576000805461ff0019166101001790555b61170b6040518060400160405280600f81526020017f455448426174746c65526f79616c6500000000000000000000000000000000008152506040518060400160405280600581526020016422aa24212960d91b815250613b46565b611713613bd1565b61171b613c44565b865161172e90609d9060208a0190614494565b506097869055609c805463ffffffff87811667ffffffffffffffff1990921691909117600160201b87831602176cffffffffff00000000000000001916680100000000000000009186169190910260ff60601b19161790556000609f556003609a556005609855600a609955662386f26fc10000609b5580156117eb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5080156111ef575050600080516020614d80833981519152805461ff001916905550505050565b606060008367ffffffffffffffff81111561182f5761182f6146e3565b60405190808252806020026020018201604052801561186257816020015b606081526020019060019003908161184d5790505b50905060005b84811015611a0a57600061187c8583614b68565b905061188781613a17565b61189157506119f8565b600081815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c0840152600160681b90041660e082015261192982611a12565b816000015182602001518360400151846060015185608001518660a001518760c001518860e001518a6040516020016119c99a999897969594939291906001600160a01b039a909a168a5260ff98891660208b015296881660408a01529490961660608801529115156080870152151560a086015263ffffffff90811660c086015292831660e08501529091166101008301526101208201526101400190565b6040516020818303038152906040528484815181106119ea576119ea614b80565b602002602001018190525050505b80611a0281614b96565b915050611868565b509392505050565b6000610d4382613ab3565b611a25613a59565b60028111158015611a34575060015b611a705760405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420737461676560981b6044820152606401611253565b609f55565b611a7d613a59565b600080516020614d208339815191525415611ae55760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c79206368616e676520737570706c79206265666f7265206d696044820152611b9d60f21b6064820152608401611253565b609755565b60006001600160a01b038216611b13576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600080516020614d60833981519152602052604090205467ffffffffffffffff1690565b611b4e613a59565b611b586000613cb7565b565b611b62613a59565b609c54600160601b900460ff1615611b8357609c805460ff60601b19169055565b609c805460ff60601b1916600160601b179055565b6060600080516020614d208339815191526003018054610d6890614b17565b6001600160a01b038216331415611be15760405163b06307db60e01b815260040160405180910390fd5b3360008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611c77848484610fbf565b6001600160a01b0383163b15611cb057611c9384848484613d16565b611cb0576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60026065541415611d095760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555609f54611d5d5760405162461bcd60e51b815260206004820152601460248201527f6d696e7420686173206e6f7420737461727465640000000000000000000000006044820152606401611253565b60975483611d77600080516020614d208339815191525490565b611d819190614b68565b1115611dbe5760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662073746f636b60a01b6044820152606401611253565b333214611e045760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d195c881a5cc8184818dbdb9d1c9858dd60621b6044820152606401611253565b609954336000908152600080516020614d608339815191526020526040908190205467ffffffffffffffff911c161115611e805760405162461bcd60e51b815260206004820152601860248201527f737572706173736564206d6178207065722077616c6c657400000000000000006044820152606401611253565b609854831115611ed25760405162461bcd60e51b815260206004820152601560248201527f737572706173736564206d6178207065722074786e00000000000000000000006044820152606401611253565b600080611eeb600080516020614d208339815191525490565b90506107d08111611eff5760009150611f3a565b610bb88111611f17576611c37937e080009150611f3a565b610fa08111611f2f57662386f26fc100009150611f3a565b66470de4df82000091505b611f448583614bb1565b3414611f925760405162461bcd60e51b815260206004820152601260248201527f6d696e74207072696365206e6f74206d657400000000000000000000000000006044820152606401611253565b609f54600114156120dc576040516bffffffffffffffffffffffff193360601b16602082015260009060340160405160208183030381529060405280519060200120905061201785858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050609e549150849050613e0e565b6120535760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401611253565b609a54336000908152600080516020614d608339815191526020526040908190205488911c67ffffffffffffffff1661208c9190614b68565b11156120da5760405162461bcd60e51b815260206004820152601b60248201527f6d696e7420746f6f206d616e7920666f7220616c6c6f776c69737400000000006044820152606401611253565b505b60006120f4600080516020614d208339815191525490565b905060006121028783614b68565b905061210e3388613e24565b80821015612350576000612126633b9aca003a614be6565b9050600060648263ffffffff161161213e5781612141565b60645b90506000612150600583614bfa565b60ff161561216857612163600583614bfa565b61216b565b60015b9050600061217a600a84614bfa565b61218590600a614c1c565b60ff16156121a857612198600a84614bfa565b6121a390600a614c1c565b6121ab565b60015b90506040518061010001604052808360ff1681526020018260ff1681526020018360ff168152602001600015158152602001600015158152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff1681525060a0600088815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff02191690831515021790555060808201518160000160046101000a81548160ff02191690831515021790555060a08201518160000160056101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160000160096101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600001600d6101000a81548163ffffffff021916908363ffffffff16021790555090505050505050818061234890614b96565b92505061210e565b505060016065555050505050565b612366613a59565b609c805463ffffffff909216600160201b0267ffffffff0000000019909216919091179055565b606061239882613a17565b6123b557604051630a14c4b560e41b815260040160405180910390fd5b60006123bf613e3e565b90508051600014156123e0576040518060200160405280600081525061240b565b806123ea84613e4d565b6040516020016123fb929190614c3f565b6040516020818303038152906040525b9392505050565b600260655414156124655760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555818114156124ba5760405162461bcd60e51b815260206004820152601160248201527f43616e6e6f742066696768742073656c660000000000000000000000000000006044820152606401611253565b6124c382613a17565b61250f5760405162461bcd60e51b815260206004820152601c60248201527f4669676874657220746f6b656e20646f6573206e6f74206578697374000000006044820152606401611253565b61251881613a17565b6125645760405162461bcd60e51b815260206004820152601b60248201527f54617267657420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b609c54600160601b900460ff166125bd5760405162461bcd60e51b815260206004820152601b60248201527f54686520626174746c65206861732079657420746f20737461727400000000006044820152606401611253565b336125c783611a12565b6001600160a01b0316146126435760405162461bcd60e51b815260206004820152603760248201527f596f7520646f206e6f74206f776e20746865206669676874657220796f75206160448201527f726520747279696e6720746f20666967687420776974680000000000000000006064820152608401611253565b600060a06000838152602001908152602001600020604051806101000160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900460ff1660ff1660ff1681526020016000820160029054906101000a900460ff1660ff1660ff1681526020016000820160039054906101000a900460ff161515151581526020016000820160049054906101000a900460ff161515151581526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600d9054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050600060a06000858152602001908152602001600020604051806101000160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900460ff1660ff1660ff1681526020016000820160029054906101000a900460ff1660ff1660ff1681526020016000820160039054906101000a900460ff161515151581526020016000820160049054906101000a900460ff161515151581526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600d9054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050428260a0015163ffffffff16106128e05760405162461bcd60e51b815260206004820152601c60248201527f5461726765742069732063757272656e746c7920736869656c646564000000006044820152606401611253565b428160c0015163ffffffff16106129395760405162461bcd60e51b815260206004820181905260248201527f466967687465722069732063757272656e746c79206f6e20636f6f6c646f776e6044820152606401611253565b60e082015163ffffffff161580159061295b5750428260e0015163ffffffff16105b1561297257815160ff166040830152600060e08301525b60e081015163ffffffff16158015906129945750428160e0015163ffffffff16105b156129ab57805160ff166040820152600060e08201525b60208101516060820151600191829160ff90911690156129d3576129d0600a82614b68565b90505b8360800151156129eb576129e8600a82614b68565b90505b846040015160ff16811115612d8957836000015160ff166014148015612a185750836020015160ff166014145b15612bf45760028560400151612a2e9190614bfa565b60ff1615612a4c5760028560400151612a479190614bfa565b612a4f565b60015b60ff1685526020850151612a6590600290614bfa565b60ff1615612a835760028560200151612a7e9190614bfa565b612a86565b60015b60ff90811660208701528551166040860152609c54612aab9063ffffffff1642614c6e565b63ffffffff90811660c0870152609c54612ac6911642614c6e565b63ffffffff1660c085015260009150612ade86613b3b565b8460a06000612af9600080516020614d208339815191525490565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b9190921602179055612bef336001613e24565b612e26565b846000015160ff16856020015160ff161115612cbc578451601490612c1b90600290614bfa565b60ff1615612c36578551612c3190600290614bfa565b612c39565b60015b8551612c459190614c8d565b60ff1611612c8a578451612c5b90600290614bfa565b60ff1615612c76578451612c7190600290614bfa565b612c79565b60015b8451612c859190614c8d565b612c8d565b60145b60ff168452609c54612cac90600160201b900463ffffffff1642614c6e565b63ffffffff1660e0850152612d59565b601460028660200151612ccf9190614bfa565b60ff1615612ced5760028660200151612ce89190614bfa565b612cf0565b60015b8560200151612cff9190614c8d565b60ff1611612d4d5760028560200151612d189190614bfa565b60ff1615612d365760028560200151612d319190614bfa565b612d39565b60015b8460200151612d489190614c8d565b612d50565b60145b60ff1660208501525b612d6286613b3b565b609c5460009250612d799063ffffffff1642614c6e565b63ffffffff1660c0850152612e26565b836040015160ff1660011415612dab57612da287613b3b565b60009250612dd8565b60016040850152609c54612dcc90600160201b900463ffffffff1642614c6e565b63ffffffff1660e08501525b60028460200151612de99190614bfa565b85604001818151612dfa9190614c1c565b60ff16905250609c54612e1a90600160201b900463ffffffff1642614c6e565b63ffffffff1660e08601525b836060015115612e3857600060608501525b836080015115612e4a57600060808501525b8215612f3c57600087815260a0602081815260409283902087518154928901519489015160608a015160808b0151958b015160c08c015160e08d015163ffffffff908116600160681b0263ffffffff60681b19928216600160481b029290921667ffffffffffffffff60481b1991909316600160281b0268ffffffff000000000019991515600160201b029990991668ffffffffff000000001994151563010000000263ff0000001960ff97881662010000021663ffff0000199c88166101000261ffff19909b1697909816969096179890981799909916949094179290921716939093179390931793909316171790555b81156123505750505060009283525060a06020818152604093849020835181549285015195850151606086015160808701519587015160c088015160e09098015160ff94851661ffff1990971696909617610100998516999099029890981763ffff0000191662010000939092169290920263ff0000001916176301000000911515919091021768ffffffffff000000001916600160201b9315159390930268ffffffff0000000000191692909217600160281b63ffffffff958616021767ffffffffffffffff60481b1916600160481b9385169390930263ffffffff60681b191692909217600160681b9390921692909202179055506001606555565b613042613a59565b805161305590609d906020840190614494565b5050565b613061613a59565b609c805463ffffffff191663ffffffff92909216919091179055565b613085613a59565b609754600080516020614d20833981519152546130a3906001614b68565b11156130e05760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662073746f636b60a01b6044820152606401611253565b3332146131265760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d195c881a5cc8184818dbdb9d1c9858dd60621b6044820152606401611253565b604080516101008101825260ff80871680835290861660208301529181019190915282151560608201528115156080820152600060a080830182905260c0830182905260e0830182905290613187600080516020614d208339815191525490565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b9190921602179055611cb0336001613e24565b609d805461328a90614b17565b80601f01602080910402602001604051908101604052809291908181526020018280546132b690614b17565b80156133035780601f106132d857610100808354040283529160200191613303565b820191906000526020600020905b8154815290600101906020018083116132e657829003601f168201915b505050505081565b613313613a59565b600080516020614d208339815191525461336e6133386033546001600160a01b031690565b6001600160a01b03166000908152600080516020614d6083398151915260205260409081902054901c67ffffffffffffffff1690565b146133bb5760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c7920757361626c6520696e2064657620656e7669726f6e6d656e7400006044820152606401611253565b60006133d3600080516020614d208339815191525490565b905060005b82811015613764576000601442336133f08587614b68565b6040516020016134259392919092835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6040516020818303038152906040528051906020012060001c6134489190614cb2565b613453906001614b68565b905060006014426134648587614b68565b61346e8688614b68565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6134ab9190614cb2565b6134b6906001614b68565b9050600060016134c68587614b68565b6134d08688614b68565b6134da8789614b68565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6135179190614cb2565b600114613525576000613531565b6135314261a8c0614c6e565b9050600060014280613543888a614b68565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6135809190614cb2565b60011461358e576000613591565b60015b9050600060014242426040516020016135bd939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6135e09190614cb2565b6001146135ee5760006135f1565b60015b90506040518061010001604052808660ff1681526020018560ff1681526020018660ff168152602001831515815260200182151581526020018463ffffffff168152602001600063ffffffff168152602001600063ffffffff1681525060a06000888a61365e9190614b68565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b91909216021790555084935061375c9250839150614b969050565b9150506133d8565b506130553383613e24565b613777613a59565b6001600160a01b0381166137dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611253565b6114ce81613cb7565b600260655414156138385760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555818114156138825760405162461bcd60e51b815260206004820152601260248201527121b0b73737ba1039b434b2b6321039b2b63360711b6044820152606401611253565b61388b82613a17565b6138d75760405162461bcd60e51b815260206004820152601b60248201527f4275726e656420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b6138e081613a17565b61392c5760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e20746f20736869656c6420646f6573206e6f7420657869737400006044820152606401611253565b3361393683611a12565b6001600160a01b03161461398c5760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206275726e20746f6b656e20796f7520646f206e6f74206f776e6044820152606401611253565b61399582613b3b565b600081815260a06020526040902054600160281b900463ffffffff164281116139c9576139c44261a8c0614c6e565b6139d9565b6139d561a8c082614c6e565b9050805b600092835260a06020526040909220805463ffffffff93909316600160281b0268ffffffff0000000000199093169290921790915550506001606555565b6000600080516020614d208339815191525482108015610d435750506000908152600080516020614d408339815191526020526040902054600160e01b161590565b6033546001600160a01b03163314611b585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611253565b600081600080516020614d2083398151915254811015613b22576000818152600080516020614d408339815191526020526040902054600160e01b8116613b20575b8061240b5750600019016000818152600080516020614d408339815191526020526040902054613af5565b505b604051636f96cda160e11b815260040160405180910390fd5b6114ce816000613e8f565b600080516020614d8083398151915254610100900460ff16613bc75760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608401611253565b613055828261408e565b600054610100900460ff16613c3c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5861418b565b600054610100900460ff16613caf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b586141ff565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613d4b903390899088908890600401614cc6565b602060405180830381600087803b158015613d6557600080fd5b505af1925050508015613d95575060408051601f3d908101601f19168201909252613d9291810190614d02565b60015b613df0573d808015613dc3576040519150601f19603f3d011682016040523d82523d6000602084013e613dc8565b606091505b508051613de8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b600082613e1b8584614271565b14949350505050565b6130558282604051806020016040528060008152506142b6565b6060609d8054610d6890614b17565b604080516080019081905280825b600183039250600a81066030018353600a900480613e7857613e7d565b613e5b565b50819003601f19909101908152919050565b6000613e9a83613ab3565b905080600080613ed78660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040902080549091565b915091508415613f5357613eec818433611033565b613f53576001600160a01b03831660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16613f5357604051632ce44b5f60e11b815260040160405180910390fd5b8015613f5e57600082555b6001600160a01b0383166000818152600080516020614d608339815191526020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b176000878152600080516020614d408339815191526020526040902055600160e11b841661402657600186016000818152600080516020614d40833981519152602052604090205461402457600080516020614d20833981519152548114614024576000818152600080516020614d40833981519152602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c418054600101905550505050565b600080516020614d8083398151915254610100900460ff1661410f5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608401611253565b8151614141907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c42906020850190614494565b508051614174907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c43906020840190614494565b506000600080516020614d20833981519152555050565b600054610100900460ff166141f65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5833613cb7565b600054610100900460ff1661426a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b6001606555565b600081815b8451811015611a0a576142a28286838151811061429557614295614b80565b602002602001015161433d565b9150806142ae81614b96565b915050614276565b6142c08383614369565b6001600160a01b0383163b15610fba57600080516020614d20833981519152548281035b6142f76000868380600101945086613d16565b614314576040516368d2bf6b60e11b815260040160405180910390fd5b8181106142e45781600080516020614d20833981519152541461433657600080fd5b5050505050565b600081831061435957600082815260208490526040902061240b565b5060009182526020526040902090565b600080516020614d2083398151915254816143975760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0383166000818152600080516020614d60833981519152602090815260408083208054680100000000000000018802019055848352600080516020614d4083398151915290915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461446057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101614428565b508161447e57604051622e076360e81b815260040160405180910390fd5b600080516020614d208339815191525550505050565b8280546144a090614b17565b90600052602060002090601f0160209004810192826144c25760008555614508565b82601f106144db57805160ff1916838001178555614508565b82800160010185558215614508579182015b828111156145085782518255916020019190600101906144ed565b50614514929150614518565b5090565b5b808211156145145760008155600101614519565b6001600160e01b0319811681146114ce57600080fd5b60006020828403121561455557600080fd5b813561240b8161452d565b60005b8381101561457b578181015183820152602001614563565b83811115611cb05750506000910152565b600081518084526145a4816020860160208601614560565b601f01601f19169290920160200192915050565b60208152600061240b602083018461458c565b6000602082840312156145dd57600080fd5b5035919050565b80356001600160a01b03811681146145fb57600080fd5b919050565b6000806040838503121561461357600080fd5b61461c836145e4565b946020939093013593505050565b803563ffffffff811681146145fb57600080fd5b60006020828403121561465057600080fd5b61240b8261462a565b60008060006060848603121561466e57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561469a57600080fd5b6146a3846145e4565b92506146b1602085016145e4565b9150604084013590509250925092565b600080604083850312156146d457600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115614714576147146146e3565b604051601f8501601f19908116603f0116810190828211818310171561473c5761473c6146e3565b8160405280935085815286868601111561475557600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261478057600080fd5b61240b838335602085016146f9565b600080600080600060a086880312156147a757600080fd5b853567ffffffffffffffff8111156147be57600080fd5b6147ca8882890161476f565b955050602086013593506147e06040870161462a565b92506147ee6060870161462a565b91506147fc6080870161462a565b90509295509295909350565b60006101008201905060ff835116825260ff602084015116602083015260ff604084015116604083015260608301511515606083015260808301511515608083015260a083015161486160a084018263ffffffff169052565b5060c083015161487960c084018263ffffffff169052565b5060e083015161489160e084018263ffffffff169052565b5092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156148ed57603f198886030184526148db85835161458c565b945092850192908501906001016148bf565b5092979650505050505050565b60006020828403121561490c57600080fd5b61240b826145e4565b803580151581146145fb57600080fd5b6000806040838503121561493857600080fd5b614941836145e4565b915061494f60208401614915565b90509250929050565b6000806000806080858703121561496e57600080fd5b614977856145e4565b9350614985602086016145e4565b925060408501359150606085013567ffffffffffffffff8111156149a857600080fd5b8501601f810187136149b957600080fd5b6149c8878235602084016146f9565b91505092959194509250565b6000806000604084860312156149e957600080fd5b83359250602084013567ffffffffffffffff80821115614a0857600080fd5b818601915086601f830112614a1c57600080fd5b813581811115614a2b57600080fd5b8760208260051b8501011115614a4057600080fd5b6020830194508093505050509250925092565b600060208284031215614a6557600080fd5b813567ffffffffffffffff811115614a7c57600080fd5b613e068482850161476f565b803560ff811681146145fb57600080fd5b60008060008060808587031215614aaf57600080fd5b614ab885614a88565b9350614ac660208601614a88565b9250614ad460408601614915565b9150614ae260608601614915565b905092959194509250565b60008060408385031215614b0057600080fd5b614b09836145e4565b915061494f602084016145e4565b600181811c90821680614b2b57607f821691505b60208210811415614b4c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115614b7b57614b7b614b52565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614baa57614baa614b52565b5060010190565b6000816000190483118215151615614bcb57614bcb614b52565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614bf557614bf5614bd0565b500490565b600060ff831680614c0d57614c0d614bd0565b8060ff84160491505092915050565b600060ff821660ff841680821015614c3657614c36614b52565b90039392505050565b60008351614c51818460208801614560565b835190830190614c65818360208801614560565b01949350505050565b600063ffffffff808316818516808303821115614c6557614c65614b52565b600060ff821660ff84168060ff03821115614caa57614caa614b52565b019392505050565b600082614cc157614cc1614bd0565b500690565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614cf8608083018461458c565b9695505050505050565b600060208284031215614d1457600080fd5b815161240b8161452d56fe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c402569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c442569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45ee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa26469706673582212200e621f48dab370b0c7135ce124ead1614e2ca00b8293cd1480fbbac5953d797464736f6c63430008090033

Deployed Bytecode

0x60806040526004361061031e5760003560e01c80636352211e116101a5578063ba41b0c6116100ec578063cfb01c7711610095578063e412c3c81161006f578063e412c3c814610c2f578063e985e9c514610c4f578063f2fde38b14610cb7578063fdab7f7f14610cd757600080fd5b8063cfb01c7714610bda578063d617f06a14610bfa578063df2a106114610c1a57600080fd5b8063c87b56dd116100c6578063c87b56dd14610b7a578063ca39e5ef14610b9a578063cf6cc98b14610bba57600080fd5b8063ba41b0c614610b31578063c3c7c90114610b44578063c662e48114610b6457600080fd5b80638da5cb5b1161014e578063a2cd99ad11610128578063a2cd99ad14610ac9578063b3ace4ec14610adf578063b88d4fde14610b1157600080fd5b80638da5cb5b14610a7657806395d89b4114610a94578063a22cb46514610aa957600080fd5b806370a082311161017f57806370a0823114610a2c578063715018a614610a4c57806374e67c4114610a6157600080fd5b80636352211e146109cc57806366d38ba9146109ec57806366d49bab14610a0c57600080fd5b80632d7b832e116102695780634783f0ef116102125780635519c174116101ec5780635519c174146107f257806355af86c4146108a357806357fd3b571461099f57600080fd5b80634783f0ef1461079c57806350b8c2aa146107bc57806351b96d92146107dc57600080fd5b80633a562d09116102435780633a562d09146107465780633ccfd60b1461076757806342842e0e1461077c57600080fd5b80632d7b832e146106445780632e6b221d1461066457806332cb6b0c1461073057600080fd5b806318160ddd116102cb57806323b872dd116102a557806323b872dd1461054e57806328d911fb1461056e5780632a59b82c1461058e57600080fd5b806318160ddd146104185780631c07157b1461045d5780632311a0151461052e57600080fd5b8063095ea7b3116102fc578063095ea7b3146103b25780630e62608b146103d45780630f2cdd6c146103f457600080fd5b806301ffc9a71461032357806306fdde0314610358578063081812fc1461037a575b600080fd5b34801561032f57600080fd5b5061034361033e366004614543565b610cf7565b60405190151581526020015b60405180910390f35b34801561036457600080fd5b5061036d610d49565b60405161034f91906145b8565b34801561038657600080fd5b5061039a6103953660046145cb565b610deb565b6040516001600160a01b03909116815260200161034f565b3480156103be57600080fd5b506103d26103cd366004614600565b610e4e565b005b3480156103e057600080fd5b506103d26103ef36600461463e565b610f56565b34801561040057600080fd5b5061040a60995481565b60405190815260200161034f565b34801561042457600080fd5b507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614d20833981519152540361040a565b34801561046957600080fd5b506105176104783660046145cb565b600090815260a0602081815260409283902083516101008082018652915460ff8082168352928104831693820193909352620100008304821694810194909452630100000082048116151560608501819052600160201b830490911615156080850181905263ffffffff600160281b8404811694860194909452600160481b8304841660c0860152600160681b90920490921660e09093019290925291565b60408051921515835290151560208301520161034f565b34801561053a57600080fd5b506103d2610549366004614659565b610f8e565b34801561055a57600080fd5b506103d2610569366004614685565b610fbf565b34801561057a57600080fd5b506103d26105893660046145cb565b6111f7565b34801561059a57600080fd5b5061040a6105a93660046145cb565b600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c08401819052600160681b90910490911660e09092019190915290565b34801561065057600080fd5b506103d261065f3660046146c1565b611204565b34801561067057600080fd5b506106dd61067f3660046145cb565b60a06020526000908152604090205460ff80821691610100810482169162010000820481169163010000008104821691600160201b8204169063ffffffff600160281b8204811691600160481b8104821691600160681b9091041688565b6040805160ff998a1681529789166020890152959097169486019490945291151560608501521515608084015263ffffffff90811660a084015290811660c083015290911660e08201526101000161034f565b34801561073c57600080fd5b5061040a60975481565b34801561075257600080fd5b50609c5461034390600160601b900460ff1681565b34801561077357600080fd5b506103d261148d565b34801561078857600080fd5b506103d2610797366004614685565b6114d1565b3480156107a857600080fd5b506103d26107b73660046145cb565b6114ec565b3480156107c857600080fd5b506103d26107d736600461478f565b6114f9565b3480156107e857600080fd5b5061040a60985481565b3480156107fe57600080fd5b5061040a61080d3660046145cb565b600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b82048116928401839052600160481b8204811660c0850152600160681b9091041660e09092019190915290565b3480156108af57600080fd5b506109926108be3660046145cb565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081019190915250600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c0840152600160681b90041660e082015290565b60405161034f9190614808565b3480156109ab57600080fd5b506109bf6109ba3660046146c1565b611812565b60405161034f9190614898565b3480156109d857600080fd5b5061039a6109e73660046145cb565b611a12565b3480156109f857600080fd5b506103d2610a073660046145cb565b611a1d565b348015610a1857600080fd5b506103d2610a273660046145cb565b611a75565b348015610a3857600080fd5b5061040a610a473660046148fa565b611aea565b348015610a5857600080fd5b506103d2611b46565b348015610a6d57600080fd5b506103d2611b5a565b348015610a8257600080fd5b506033546001600160a01b031661039a565b348015610aa057600080fd5b5061036d611b98565b348015610ab557600080fd5b506103d2610ac4366004614925565b611bb7565b348015610ad557600080fd5b5061040a609a5481565b348015610aeb57600080fd5b50609c54610afc9063ffffffff1681565b60405163ffffffff909116815260200161034f565b348015610b1d57600080fd5b506103d2610b2c366004614958565b611c6c565b6103d2610b3f3660046149d4565b611cb6565b348015610b5057600080fd5b506103d2610b5f36600461463e565b61235e565b348015610b7057600080fd5b5061040a609b5481565b348015610b8657600080fd5b5061036d610b953660046145cb565b61238d565b348015610ba657600080fd5b506103d2610bb53660046146c1565b612412565b348015610bc657600080fd5b506103d2610bd5366004614a53565b61303a565b348015610be657600080fd5b506103d2610bf536600461463e565b613059565b348015610c0657600080fd5b506103d2610c15366004614a99565b61307d565b348015610c2657600080fd5b5061036d61327d565b348015610c3b57600080fd5b506103d2610c4a3660046145cb565b61330b565b348015610c5b57600080fd5b50610343610c6a366004614aed565b6001600160a01b0391821660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832093909416825291909152205460ff1690565b348015610cc357600080fd5b506103d2610cd23660046148fa565b61376f565b348015610ce357600080fd5b506103d2610cf23660046146c1565b6137e5565b60006301ffc9a760e01b6001600160e01b031983161480610d2857506380ac58cd60e01b6001600160e01b03198316145b80610d435750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600080516020614d208339815191526002018054610d6890614b17565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9490614b17565b8015610de15780601f10610db657610100808354040283529160200191610de1565b820191906000526020600020905b815481529060010190602001808311610dc457829003601f168201915b5050505050905090565b6000610df682613a17565b610e13576040516333d1c03960e21b815260040160405180910390fd5b5060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020546001600160a01b031690565b6000610e5982611a12565b9050336001600160a01b03821614610ece576001600160a01b03811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16610ece576040516367d9dca160e11b815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610f5e613a59565b609c805463ffffffff90921668010000000000000000026bffffffff000000000000000019909216919091179055565b610f96613a59565b8215610fa25760988390555b8115610fae5760998290555b8015610fba57609a8190555b505050565b6000610fca82613ab3565b9050836001600160a01b0316816001600160a01b031614610ffd5760405162a1148160e81b815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040902080546110488187335b6001600160a01b039081169116811491141790565b6110af576001600160a01b03861660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff166110af57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166110d657604051633a954ecd60e21b815260040160405180910390fd5b80156110e157600082555b6001600160a01b038681166000908152600080516020614d6083398151915260205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b176000858152600080516020614d408339815191526020526040902055600160e11b83166111ad57600184016000818152600080516020614d4083398151915260205260409020546111ab57600080516020614d208339815191525481146111ab576000818152600080516020614d40833981519152602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6111ff613a59565b609b55565b6002606554141561125c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002606555818114156112a65760405162461bcd60e51b815260206004820152601260248201527121b0b73737ba1039b434b2b6321039b2b63360711b6044820152606401611253565b6112af82613a17565b6112fb5760405162461bcd60e51b815260206004820152601b60248201527f4275726e656420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b61130481613a17565b6113505760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e20746f20737465726f696420646f6573206e6f74206578697374006044820152606401611253565b3361135a83611a12565b6001600160a01b0316146113b05760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206275726e20746f6b656e20796f7520646f206e6f74206f776e6044820152606401611253565b6113b982613b3b565b600081815260a060205260409020546301000000900460ff166113fa57600081815260a060205260409020805463ff00000019166301000000179055611484565b600081815260a06020526040902054600160201b900460ff1661143c57600081815260a060205260409020805464ff000000001916600160201b179055611484565b60405162461bcd60e51b815260206004820152601a60248201527f4e6f20737465726f696420736c6f747320617661696c61626c650000000000006044820152606401611253565b50506001606555565b611495613a59565b6033546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156114ce573d6000803e3d6000fd5b50565b610fba83838360405180602001604052806000815250611c6c565b6114f4613a59565b609e55565b600080516020614d8083398151915254610100900460ff1661152e57600080516020614d808339815191525460ff1615611532565b303b155b6115a45760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401611253565b600080516020614d8083398151915254610100900460ff161580156115e057600080516020614d80833981519152805461ffff19166101011790555b600054610100900460ff16158080156116005750600054600160ff909116105b8061161a5750303b15801561161a575060005460ff166001145b61168c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401611253565b6000805460ff1916600117905580156116af576000805461ff0019166101001790555b61170b6040518060400160405280600f81526020017f455448426174746c65526f79616c6500000000000000000000000000000000008152506040518060400160405280600581526020016422aa24212960d91b815250613b46565b611713613bd1565b61171b613c44565b865161172e90609d9060208a0190614494565b506097869055609c805463ffffffff87811667ffffffffffffffff1990921691909117600160201b87831602176cffffffffff00000000000000001916680100000000000000009186169190910260ff60601b19161790556000609f556003609a556005609855600a609955662386f26fc10000609b5580156117eb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5080156111ef575050600080516020614d80833981519152805461ff001916905550505050565b606060008367ffffffffffffffff81111561182f5761182f6146e3565b60405190808252806020026020018201604052801561186257816020015b606081526020019060019003908161184d5790505b50905060005b84811015611a0a57600061187c8583614b68565b905061188781613a17565b61189157506119f8565b600081815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c0840152600160681b90041660e082015261192982611a12565b816000015182602001518360400151846060015185608001518660a001518760c001518860e001518a6040516020016119c99a999897969594939291906001600160a01b039a909a168a5260ff98891660208b015296881660408a01529490961660608801529115156080870152151560a086015263ffffffff90811660c086015292831660e08501529091166101008301526101208201526101400190565b6040516020818303038152906040528484815181106119ea576119ea614b80565b602002602001018190525050505b80611a0281614b96565b915050611868565b509392505050565b6000610d4382613ab3565b611a25613a59565b60028111158015611a34575060015b611a705760405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420737461676560981b6044820152606401611253565b609f55565b611a7d613a59565b600080516020614d208339815191525415611ae55760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c79206368616e676520737570706c79206265666f7265206d696044820152611b9d60f21b6064820152608401611253565b609755565b60006001600160a01b038216611b13576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600080516020614d60833981519152602052604090205467ffffffffffffffff1690565b611b4e613a59565b611b586000613cb7565b565b611b62613a59565b609c54600160601b900460ff1615611b8357609c805460ff60601b19169055565b609c805460ff60601b1916600160601b179055565b6060600080516020614d208339815191526003018054610d6890614b17565b6001600160a01b038216331415611be15760405163b06307db60e01b815260040160405180910390fd5b3360008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611c77848484610fbf565b6001600160a01b0383163b15611cb057611c9384848484613d16565b611cb0576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60026065541415611d095760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555609f54611d5d5760405162461bcd60e51b815260206004820152601460248201527f6d696e7420686173206e6f7420737461727465640000000000000000000000006044820152606401611253565b60975483611d77600080516020614d208339815191525490565b611d819190614b68565b1115611dbe5760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662073746f636b60a01b6044820152606401611253565b333214611e045760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d195c881a5cc8184818dbdb9d1c9858dd60621b6044820152606401611253565b609954336000908152600080516020614d608339815191526020526040908190205467ffffffffffffffff911c161115611e805760405162461bcd60e51b815260206004820152601860248201527f737572706173736564206d6178207065722077616c6c657400000000000000006044820152606401611253565b609854831115611ed25760405162461bcd60e51b815260206004820152601560248201527f737572706173736564206d6178207065722074786e00000000000000000000006044820152606401611253565b600080611eeb600080516020614d208339815191525490565b90506107d08111611eff5760009150611f3a565b610bb88111611f17576611c37937e080009150611f3a565b610fa08111611f2f57662386f26fc100009150611f3a565b66470de4df82000091505b611f448583614bb1565b3414611f925760405162461bcd60e51b815260206004820152601260248201527f6d696e74207072696365206e6f74206d657400000000000000000000000000006044820152606401611253565b609f54600114156120dc576040516bffffffffffffffffffffffff193360601b16602082015260009060340160405160208183030381529060405280519060200120905061201785858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050609e549150849050613e0e565b6120535760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401611253565b609a54336000908152600080516020614d608339815191526020526040908190205488911c67ffffffffffffffff1661208c9190614b68565b11156120da5760405162461bcd60e51b815260206004820152601b60248201527f6d696e7420746f6f206d616e7920666f7220616c6c6f776c69737400000000006044820152606401611253565b505b60006120f4600080516020614d208339815191525490565b905060006121028783614b68565b905061210e3388613e24565b80821015612350576000612126633b9aca003a614be6565b9050600060648263ffffffff161161213e5781612141565b60645b90506000612150600583614bfa565b60ff161561216857612163600583614bfa565b61216b565b60015b9050600061217a600a84614bfa565b61218590600a614c1c565b60ff16156121a857612198600a84614bfa565b6121a390600a614c1c565b6121ab565b60015b90506040518061010001604052808360ff1681526020018260ff1681526020018360ff168152602001600015158152602001600015158152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff1681525060a0600088815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff02191690831515021790555060808201518160000160046101000a81548160ff02191690831515021790555060a08201518160000160056101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160000160096101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600001600d6101000a81548163ffffffff021916908363ffffffff16021790555090505050505050818061234890614b96565b92505061210e565b505060016065555050505050565b612366613a59565b609c805463ffffffff909216600160201b0267ffffffff0000000019909216919091179055565b606061239882613a17565b6123b557604051630a14c4b560e41b815260040160405180910390fd5b60006123bf613e3e565b90508051600014156123e0576040518060200160405280600081525061240b565b806123ea84613e4d565b6040516020016123fb929190614c3f565b6040516020818303038152906040525b9392505050565b600260655414156124655760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555818114156124ba5760405162461bcd60e51b815260206004820152601160248201527f43616e6e6f742066696768742073656c660000000000000000000000000000006044820152606401611253565b6124c382613a17565b61250f5760405162461bcd60e51b815260206004820152601c60248201527f4669676874657220746f6b656e20646f6573206e6f74206578697374000000006044820152606401611253565b61251881613a17565b6125645760405162461bcd60e51b815260206004820152601b60248201527f54617267657420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b609c54600160601b900460ff166125bd5760405162461bcd60e51b815260206004820152601b60248201527f54686520626174746c65206861732079657420746f20737461727400000000006044820152606401611253565b336125c783611a12565b6001600160a01b0316146126435760405162461bcd60e51b815260206004820152603760248201527f596f7520646f206e6f74206f776e20746865206669676874657220796f75206160448201527f726520747279696e6720746f20666967687420776974680000000000000000006064820152608401611253565b600060a06000838152602001908152602001600020604051806101000160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900460ff1660ff1660ff1681526020016000820160029054906101000a900460ff1660ff1660ff1681526020016000820160039054906101000a900460ff161515151581526020016000820160049054906101000a900460ff161515151581526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600d9054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050600060a06000858152602001908152602001600020604051806101000160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900460ff1660ff1660ff1681526020016000820160029054906101000a900460ff1660ff1660ff1681526020016000820160039054906101000a900460ff161515151581526020016000820160049054906101000a900460ff161515151581526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600d9054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050428260a0015163ffffffff16106128e05760405162461bcd60e51b815260206004820152601c60248201527f5461726765742069732063757272656e746c7920736869656c646564000000006044820152606401611253565b428160c0015163ffffffff16106129395760405162461bcd60e51b815260206004820181905260248201527f466967687465722069732063757272656e746c79206f6e20636f6f6c646f776e6044820152606401611253565b60e082015163ffffffff161580159061295b5750428260e0015163ffffffff16105b1561297257815160ff166040830152600060e08301525b60e081015163ffffffff16158015906129945750428160e0015163ffffffff16105b156129ab57805160ff166040820152600060e08201525b60208101516060820151600191829160ff90911690156129d3576129d0600a82614b68565b90505b8360800151156129eb576129e8600a82614b68565b90505b846040015160ff16811115612d8957836000015160ff166014148015612a185750836020015160ff166014145b15612bf45760028560400151612a2e9190614bfa565b60ff1615612a4c5760028560400151612a479190614bfa565b612a4f565b60015b60ff1685526020850151612a6590600290614bfa565b60ff1615612a835760028560200151612a7e9190614bfa565b612a86565b60015b60ff90811660208701528551166040860152609c54612aab9063ffffffff1642614c6e565b63ffffffff90811660c0870152609c54612ac6911642614c6e565b63ffffffff1660c085015260009150612ade86613b3b565b8460a06000612af9600080516020614d208339815191525490565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b9190921602179055612bef336001613e24565b612e26565b846000015160ff16856020015160ff161115612cbc578451601490612c1b90600290614bfa565b60ff1615612c36578551612c3190600290614bfa565b612c39565b60015b8551612c459190614c8d565b60ff1611612c8a578451612c5b90600290614bfa565b60ff1615612c76578451612c7190600290614bfa565b612c79565b60015b8451612c859190614c8d565b612c8d565b60145b60ff168452609c54612cac90600160201b900463ffffffff1642614c6e565b63ffffffff1660e0850152612d59565b601460028660200151612ccf9190614bfa565b60ff1615612ced5760028660200151612ce89190614bfa565b612cf0565b60015b8560200151612cff9190614c8d565b60ff1611612d4d5760028560200151612d189190614bfa565b60ff1615612d365760028560200151612d319190614bfa565b612d39565b60015b8460200151612d489190614c8d565b612d50565b60145b60ff1660208501525b612d6286613b3b565b609c5460009250612d799063ffffffff1642614c6e565b63ffffffff1660c0850152612e26565b836040015160ff1660011415612dab57612da287613b3b565b60009250612dd8565b60016040850152609c54612dcc90600160201b900463ffffffff1642614c6e565b63ffffffff1660e08501525b60028460200151612de99190614bfa565b85604001818151612dfa9190614c1c565b60ff16905250609c54612e1a90600160201b900463ffffffff1642614c6e565b63ffffffff1660e08601525b836060015115612e3857600060608501525b836080015115612e4a57600060808501525b8215612f3c57600087815260a0602081815260409283902087518154928901519489015160608a015160808b0151958b015160c08c015160e08d015163ffffffff908116600160681b0263ffffffff60681b19928216600160481b029290921667ffffffffffffffff60481b1991909316600160281b0268ffffffff000000000019991515600160201b029990991668ffffffffff000000001994151563010000000263ff0000001960ff97881662010000021663ffff0000199c88166101000261ffff19909b1697909816969096179890981799909916949094179290921716939093179390931793909316171790555b81156123505750505060009283525060a06020818152604093849020835181549285015195850151606086015160808701519587015160c088015160e09098015160ff94851661ffff1990971696909617610100998516999099029890981763ffff0000191662010000939092169290920263ff0000001916176301000000911515919091021768ffffffffff000000001916600160201b9315159390930268ffffffff0000000000191692909217600160281b63ffffffff958616021767ffffffffffffffff60481b1916600160481b9385169390930263ffffffff60681b191692909217600160681b9390921692909202179055506001606555565b613042613a59565b805161305590609d906020840190614494565b5050565b613061613a59565b609c805463ffffffff191663ffffffff92909216919091179055565b613085613a59565b609754600080516020614d20833981519152546130a3906001614b68565b11156130e05760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662073746f636b60a01b6044820152606401611253565b3332146131265760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d195c881a5cc8184818dbdb9d1c9858dd60621b6044820152606401611253565b604080516101008101825260ff80871680835290861660208301529181019190915282151560608201528115156080820152600060a080830182905260c0830182905260e0830182905290613187600080516020614d208339815191525490565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b9190921602179055611cb0336001613e24565b609d805461328a90614b17565b80601f01602080910402602001604051908101604052809291908181526020018280546132b690614b17565b80156133035780601f106132d857610100808354040283529160200191613303565b820191906000526020600020905b8154815290600101906020018083116132e657829003601f168201915b505050505081565b613313613a59565b600080516020614d208339815191525461336e6133386033546001600160a01b031690565b6001600160a01b03166000908152600080516020614d6083398151915260205260409081902054901c67ffffffffffffffff1690565b146133bb5760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c7920757361626c6520696e2064657620656e7669726f6e6d656e7400006044820152606401611253565b60006133d3600080516020614d208339815191525490565b905060005b82811015613764576000601442336133f08587614b68565b6040516020016134259392919092835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6040516020818303038152906040528051906020012060001c6134489190614cb2565b613453906001614b68565b905060006014426134648587614b68565b61346e8688614b68565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6134ab9190614cb2565b6134b6906001614b68565b9050600060016134c68587614b68565b6134d08688614b68565b6134da8789614b68565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6135179190614cb2565b600114613525576000613531565b6135314261a8c0614c6e565b9050600060014280613543888a614b68565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6135809190614cb2565b60011461358e576000613591565b60015b9050600060014242426040516020016135bd939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6135e09190614cb2565b6001146135ee5760006135f1565b60015b90506040518061010001604052808660ff1681526020018560ff1681526020018660ff168152602001831515815260200182151581526020018463ffffffff168152602001600063ffffffff168152602001600063ffffffff1681525060a06000888a61365e9190614b68565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b91909216021790555084935061375c9250839150614b969050565b9150506133d8565b506130553383613e24565b613777613a59565b6001600160a01b0381166137dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611253565b6114ce81613cb7565b600260655414156138385760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555818114156138825760405162461bcd60e51b815260206004820152601260248201527121b0b73737ba1039b434b2b6321039b2b63360711b6044820152606401611253565b61388b82613a17565b6138d75760405162461bcd60e51b815260206004820152601b60248201527f4275726e656420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b6138e081613a17565b61392c5760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e20746f20736869656c6420646f6573206e6f7420657869737400006044820152606401611253565b3361393683611a12565b6001600160a01b03161461398c5760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206275726e20746f6b656e20796f7520646f206e6f74206f776e6044820152606401611253565b61399582613b3b565b600081815260a06020526040902054600160281b900463ffffffff164281116139c9576139c44261a8c0614c6e565b6139d9565b6139d561a8c082614c6e565b9050805b600092835260a06020526040909220805463ffffffff93909316600160281b0268ffffffff0000000000199093169290921790915550506001606555565b6000600080516020614d208339815191525482108015610d435750506000908152600080516020614d408339815191526020526040902054600160e01b161590565b6033546001600160a01b03163314611b585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611253565b600081600080516020614d2083398151915254811015613b22576000818152600080516020614d408339815191526020526040902054600160e01b8116613b20575b8061240b5750600019016000818152600080516020614d408339815191526020526040902054613af5565b505b604051636f96cda160e11b815260040160405180910390fd5b6114ce816000613e8f565b600080516020614d8083398151915254610100900460ff16613bc75760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608401611253565b613055828261408e565b600054610100900460ff16613c3c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5861418b565b600054610100900460ff16613caf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b586141ff565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613d4b903390899088908890600401614cc6565b602060405180830381600087803b158015613d6557600080fd5b505af1925050508015613d95575060408051601f3d908101601f19168201909252613d9291810190614d02565b60015b613df0573d808015613dc3576040519150601f19603f3d011682016040523d82523d6000602084013e613dc8565b606091505b508051613de8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b600082613e1b8584614271565b14949350505050565b6130558282604051806020016040528060008152506142b6565b6060609d8054610d6890614b17565b604080516080019081905280825b600183039250600a81066030018353600a900480613e7857613e7d565b613e5b565b50819003601f19909101908152919050565b6000613e9a83613ab3565b905080600080613ed78660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040902080549091565b915091508415613f5357613eec818433611033565b613f53576001600160a01b03831660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16613f5357604051632ce44b5f60e11b815260040160405180910390fd5b8015613f5e57600082555b6001600160a01b0383166000818152600080516020614d608339815191526020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b176000878152600080516020614d408339815191526020526040902055600160e11b841661402657600186016000818152600080516020614d40833981519152602052604090205461402457600080516020614d20833981519152548114614024576000818152600080516020614d40833981519152602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c418054600101905550505050565b600080516020614d8083398151915254610100900460ff1661410f5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608401611253565b8151614141907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c42906020850190614494565b508051614174907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c43906020840190614494565b506000600080516020614d20833981519152555050565b600054610100900460ff166141f65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5833613cb7565b600054610100900460ff1661426a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b6001606555565b600081815b8451811015611a0a576142a28286838151811061429557614295614b80565b602002602001015161433d565b9150806142ae81614b96565b915050614276565b6142c08383614369565b6001600160a01b0383163b15610fba57600080516020614d20833981519152548281035b6142f76000868380600101945086613d16565b614314576040516368d2bf6b60e11b815260040160405180910390fd5b8181106142e45781600080516020614d20833981519152541461433657600080fd5b5050505050565b600081831061435957600082815260208490526040902061240b565b5060009182526020526040902090565b600080516020614d2083398151915254816143975760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0383166000818152600080516020614d60833981519152602090815260408083208054680100000000000000018802019055848352600080516020614d4083398151915290915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461446057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101614428565b508161447e57604051622e076360e81b815260040160405180910390fd5b600080516020614d208339815191525550505050565b8280546144a090614b17565b90600052602060002090601f0160209004810192826144c25760008555614508565b82601f106144db57805160ff1916838001178555614508565b82800160010185558215614508579182015b828111156145085782518255916020019190600101906144ed565b50614514929150614518565b5090565b5b808211156145145760008155600101614519565b6001600160e01b0319811681146114ce57600080fd5b60006020828403121561455557600080fd5b813561240b8161452d565b60005b8381101561457b578181015183820152602001614563565b83811115611cb05750506000910152565b600081518084526145a4816020860160208601614560565b601f01601f19169290920160200192915050565b60208152600061240b602083018461458c565b6000602082840312156145dd57600080fd5b5035919050565b80356001600160a01b03811681146145fb57600080fd5b919050565b6000806040838503121561461357600080fd5b61461c836145e4565b946020939093013593505050565b803563ffffffff811681146145fb57600080fd5b60006020828403121561465057600080fd5b61240b8261462a565b60008060006060848603121561466e57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561469a57600080fd5b6146a3846145e4565b92506146b1602085016145e4565b9150604084013590509250925092565b600080604083850312156146d457600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115614714576147146146e3565b604051601f8501601f19908116603f0116810190828211818310171561473c5761473c6146e3565b8160405280935085815286868601111561475557600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261478057600080fd5b61240b838335602085016146f9565b600080600080600060a086880312156147a757600080fd5b853567ffffffffffffffff8111156147be57600080fd5b6147ca8882890161476f565b955050602086013593506147e06040870161462a565b92506147ee6060870161462a565b91506147fc6080870161462a565b90509295509295909350565b60006101008201905060ff835116825260ff602084015116602083015260ff604084015116604083015260608301511515606083015260808301511515608083015260a083015161486160a084018263ffffffff169052565b5060c083015161487960c084018263ffffffff169052565b5060e083015161489160e084018263ffffffff169052565b5092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156148ed57603f198886030184526148db85835161458c565b945092850192908501906001016148bf565b5092979650505050505050565b60006020828403121561490c57600080fd5b61240b826145e4565b803580151581146145fb57600080fd5b6000806040838503121561493857600080fd5b614941836145e4565b915061494f60208401614915565b90509250929050565b6000806000806080858703121561496e57600080fd5b614977856145e4565b9350614985602086016145e4565b925060408501359150606085013567ffffffffffffffff8111156149a857600080fd5b8501601f810187136149b957600080fd5b6149c8878235602084016146f9565b91505092959194509250565b6000806000604084860312156149e957600080fd5b83359250602084013567ffffffffffffffff80821115614a0857600080fd5b818601915086601f830112614a1c57600080fd5b813581811115614a2b57600080fd5b8760208260051b8501011115614a4057600080fd5b6020830194508093505050509250925092565b600060208284031215614a6557600080fd5b813567ffffffffffffffff811115614a7c57600080fd5b613e068482850161476f565b803560ff811681146145fb57600080fd5b60008060008060808587031215614aaf57600080fd5b614ab885614a88565b9350614ac660208601614a88565b9250614ad460408601614915565b9150614ae260608601614915565b905092959194509250565b60008060408385031215614b0057600080fd5b614b09836145e4565b915061494f602084016145e4565b600181811c90821680614b2b57607f821691505b60208210811415614b4c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115614b7b57614b7b614b52565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614baa57614baa614b52565b5060010190565b6000816000190483118215151615614bcb57614bcb614b52565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614bf557614bf5614bd0565b500490565b600060ff831680614c0d57614c0d614bd0565b8060ff84160491505092915050565b600060ff821660ff841680821015614c3657614c36614b52565b90039392505050565b60008351614c51818460208801614560565b835190830190614c65818360208801614560565b01949350505050565b600063ffffffff808316818516808303821115614c6557614c65614b52565b600060ff821660ff84168060ff03821115614caa57614caa614b52565b019392505050565b600082614cc157614cc1614bd0565b500690565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614cf8608083018461458c565b9695505050505050565b600060208284031215614d1457600080fd5b815161240b8161452d56fe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c402569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c442569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45ee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa26469706673582212200e621f48dab370b0c7135ce124ead1614e2ca00b8293cd1480fbbac5953d797464736f6c63430008090033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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