ETH Price: $3,471.82 (+1.55%)
Gas: 13 Gwei

Token

Brawler Bearz Battle Pass: S2 (BBBPS2)
 

Overview

Max Total Supply

237 BBBPS2

Holders

156

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 BBBPS2
0x2d07cd174a5041bac0735cc55e49124fe86c4bf7
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
BrawlerBearzBattlePassSeason2

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 500 runs

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

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import {IBrawlerBearzFaction} from "./interfaces/IBrawlerBearzFaction.sol";
import {IBrawlerBearzDynamicItems} from "./interfaces/IBrawlerBearzDynamicItems.sol";
import "./tunnel/FxBaseRootTunnel.sol";

/*******************************************************************************
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|,|@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@@@@@@@@@@|,*|&@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%,**%@@@@@@@@%|******%&@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&##*****|||**,(%%%%%**|%@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***,#%%%%**#&@@@@@#**,|@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@*,(@@@@@@@@@@**,(&@@@@#**%@@@@@@||(%@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@%|,****&@((@&***&@@@@@@%||||||||#%&@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@&%#*****||||||**#%&@%%||||||||#@&%#(@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@&**,(&@@@@@%|||||*##&&&&##|||||(%@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@**,%@@@@@@@(|*|#%@@@@@@@@#||#%%@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@#||||#@@@@||*|%@@@@@@@@&|||%%&@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@#,,,,,,*|**||%|||||||###&@@@@@@@#|||#%@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@&#||*|||||%%%@%%%#|||%@@@@@@@@&(|(%&@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@&&%%(||||@@@@@@&|||||(%&((||(#%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@%%(||||||||||#%#(|||||%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@&%#######%%@@**||(#%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%##%%&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
********************************************************************************/

/**
 * @title BrawlerBearzBattlePassSeason2
 * @author @scottybmitch
 * @dev Battle pass public mint and L2 sync on mint, non-transferable, or sellable
 */
contract BrawlerBearzBattlePassSeason2 is
    FxBaseRootTunnel,
    ERC721AQueryable,
    ERC721ABurnable,
    Ownable
{
    using Strings for uint256;

    /// @dev Sync actions
    bytes32 public constant MINTED = keccak256("MINTED");
    bytes32 public constant REWARDS_CLAIM = keccak256("REWARDS_CLAIM");

    /// @notice Vendor contract
    IBrawlerBearzDynamicItems public vendorContract;

    /// @notice Faction contract
    IBrawlerBearzFaction public factionContract;

    // @dev Base uri for the nft
    string private baseURI =
        "ipfs://bafybeigwlfixgwq7wi453g7f4j75w4tld7tvmfcxkhqdfshemlw3dhybgi/";

    /// @notice Pro battle pass tier
    uint256 constant PRO_PASS = 1;

    /// @notice Pro+ battle pass tier
    uint256 constant PRO_PLUS_PASS = 2;

    /// @notice Pro pass mint price
    uint256 public proPrice = 0.015 ether;

    /// @notice Pro plus pass mint price
    uint256 public proPlusPrice = 0.045 ether;

    // @dev Treasury
    address public treasury =
        payable(0x39bfA2b4319581bc885A2d4b9F0C90C2e1c24B87);

    /*
     * @notice All mints live ~ March 16th, 12PM EST
     * @dev Mints go live date
     */
    uint256 public liveAt = 1678982400;

    /*
     * @notice All mints expired ~ March 29th, 12PM EST
     * @dev Mints expire at
     */
    uint256 public expiresAt = 1680105600;

    /// @dev A token mapping to battle pass type
    mapping(uint256 => uint256) public passes;

    /// @dev Thrown on approval
    error CannotApproveAll();

    /// @dev Thrown on transfer
    error Nontransferable();

    modifier mintIsActive() {
        require(
            block.timestamp > liveAt && block.timestamp < expiresAt,
            "Minting is not active."
        );
        _;
    }

    constructor(
        address _checkpointManager,
        address _fxRoot,
        address _vendorContractAddress,
        address _factionContractAddress
    )
        FxBaseRootTunnel(_checkpointManager, _fxRoot)
        ERC721A("Brawler Bearz Battle Pass: S2", "BBBPS2")
    {
        vendorContract = IBrawlerBearzDynamicItems(_vendorContractAddress);
        factionContract = IBrawlerBearzFaction(_factionContractAddress);
    }

    /// @notice Pro pass mint
    function proPassMint() external payable mintIsActive {
        require(msg.value >= proPrice, "Not enough funds.");
        _mintSync(_msgSender(), PRO_PASS);
    }

    /// @notice Pro plus pass mint
    function proPlusPassMint() external payable mintIsActive {
        require(msg.value >= proPlusPrice, "Not enough funds.");
        _mintSync(_msgSender(), PRO_PLUS_PASS);
    }

    /**
     * @notice Returns the URI for a given token id
     * @param _tokenId A tokenId
     */
    function tokenURI(uint256 _tokenId)
        public
        view
        override
        returns (string memory)
    {
        if (!_exists(_tokenId)) revert OwnerQueryForNonexistentToken();
        // 1, 2, 3
        return
            string(
                abi.encodePacked(baseURI, Strings.toString(passes[_tokenId]))
            );
    }

    // @dev Check if mint is live
    function isLive() public view returns (bool) {
        return block.timestamp > liveAt && block.timestamp < expiresAt;
    }

    // @dev Returns the starting token ID.
    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }

    /**
     * @notice Sets pro price
     * @param _proPrice A base uri
     */
    function setProPrice(uint256 _proPrice) external onlyOwner {
        proPrice = _proPrice;
    }

    /**
     * @notice Sets pro plus price
     * @param _proPlusPrice A base uri
     */
    function setProPlusPrice(uint256 _proPlusPrice) external onlyOwner {
        proPlusPrice = _proPlusPrice;
    }

    /**
     * @notice Sets the base URI of the NFT
     * @param _baseURI A base uri
     */
    function setBaseURI(string calldata _baseURI) external onlyOwner {
        baseURI = _baseURI;
    }

    /**
     * @notice Sets timestamps for live and expires timeframe
     * @param _liveAt A unix timestamp for live date
     * @param _expiresAt A unix timestamp for expiration date
     */
    function setMintWindow(uint256 _liveAt, uint256 _expiresAt)
        external
        onlyOwner
    {
        liveAt = _liveAt;
        expiresAt = _expiresAt;
    }

    /**
     * @notice Sets the treasury recipient
     * @param _treasury The treasury address
     */
    function setTreasury(address _treasury) public onlyOwner {
        treasury = payable(_treasury);
    }

    /**
     * Set FxChildTunnel
     * @param _fxChildTunnel - the fxChildTunnel address
     */
    function setFxChildTunnel(address _fxChildTunnel)
        public
        override
        onlyOwner
    {
        fxChildTunnel = _fxChildTunnel;
    }

    /**
     * @notice Sets the bearz vendor item contract
     * @dev only owner call this function
     * @param _vendorContractAddress The new contract address
     */
    function setVendorContractAddress(address _vendorContractAddress)
        external
        onlyOwner
    {
        vendorContract = IBrawlerBearzDynamicItems(_vendorContractAddress);
    }

    /**
     * @notice Sets the bearz faction contract
     * @dev only owner call this function
     * @param _factionContractAddress The new contract address
     */
    function setFactionContractAddress(address _factionContractAddress)
        external
        onlyOwner
    {
        factionContract = IBrawlerBearzFaction(_factionContractAddress);
    }

    /// @notice Withdraws funds from contract
    function withdraw() public onlyOwner {
        (bool success, ) = treasury.call{value: address(this).balance}("");
        require(success, "999");
    }

    /**
     * @dev Internal helper function for minting and syncing to L2
     * @param _address The amount of pro passes to mint
     * @param _passType The pass type (1,2)
     */
    function _mintSync(address _address, uint256 _passType) internal {
        uint256 tokenId = _nextTokenId();
        uint256 factionId = factionContract.getFaction(_address);
        _mint(_address, 1);
        passes[tokenId] = _passType;
        _sendMessageToChild(
            abi.encode(
                MINTED,
                abi.encode(_address, tokenId, _passType, factionId)
            )
        );
    }

    /// @dev Prevent approvals of token
    function setApprovalForAll(address, bool) public virtual override {
        revert CannotApproveAll();
    }

    /// @dev Prevent token transfer unless burning
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal override(ERC721A) {
        if (to != address(0) && from != address(0)) {
            revert Nontransferable();
        }
        super._beforeTokenTransfers(from, to, startTokenId, quantity);
    }

    function _processRewardsClaim(bytes memory data) internal {
        (address to, uint256[] memory itemIds) = abi.decode(
            data,
            (address, uint256[])
        );
        vendorContract.dropItems(to, itemIds);
    }

    /// @dev TEST
    function _processMessageFromChildTest(bytes memory message)
        external
        onlyOwner
    {
        (bytes32 syncType, bytes memory syncData) = abi.decode(
            message,
            (bytes32, bytes)
        );
        if (syncType == REWARDS_CLAIM) {
            _processRewardsClaim(syncData);
        } else {
            revert("INVALID_SYNC_TYPE");
        }
    }

    function _processMessageFromChild(bytes memory message) internal override {
        (bytes32 syncType, bytes memory syncData) = abi.decode(
            message,
            (bytes32, bytes)
        );
        if (syncType == REWARDS_CLAIM) {
            _processRewardsClaim(syncData);
        } else {
            revert("INVALID_SYNC_TYPE");
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 4 of 21 : ERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AQueryable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721A Queryable
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {
    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *   - `extraData` = `0`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *   - `extraData` = `<Extra data when token was burned>`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     *   - `extraData` = `<Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) public view override returns (TokenOwnership memory) {
        TokenOwnership memory ownership;
        if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) {
            return ownership;
        }
        ownership = _ownershipAt(tokenId);
        if (ownership.burned) {
            return ownership;
        }
        return _ownershipOf(tokenId);
    }

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view override returns (TokenOwnership[] memory) {
        unchecked {
            uint256 tokenIdsLength = tokenIds.length;
            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
            for (uint256 i; i != tokenIdsLength; ++i) {
                ownerships[i] = explicitOwnershipOf(tokenIds[i]);
            }
            return ownerships;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view override returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            uint256 tokenIdsIdx;
            uint256 stopLimit = _nextTokenId();
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, stopLimit)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }
            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }
            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }
            // We need to call `explicitOwnershipOf(start)`,
            // because the slot at `start` may not be initialized.
            TokenOwnership memory ownership = explicitOwnershipOf(start);
            address currOwnershipAddr;
            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
            if (!ownership.burned) {
                currOwnershipAddr = ownership.addr;
            }
            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view override returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }
}

File 5 of 21 : ERC721ABurnable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721ABurnable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721A Burnable Token
 * @dev ERC721A Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual override {
        _burn(tokenId, true);
    }
}

File 6 of 21 : IBrawlerBearzFaction.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

interface IBrawlerBearzFaction is IERC1155 {
    function getFaction(address _address) external view returns (uint256);
}

File 7 of 21 : IBrawlerBearzDynamicItems.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";

interface IBrawlerBearzDynamicItems is IERC1155Upgradeable {
    struct CustomMetadata {
        string typeOf;
        string name;
        uint256 xp; // Min XP required to equip
        string rarity; // LEGENDARY, SUPER_RARE, RARE, UNCOMMON, COMMON
        uint256 atk; // Correlated to Strength
        uint256 def; // Correlated to Endurance
        uint256 usageChance; // DEPRECATED
        string usageDuration; // PERSISTENT - equipable items, TEMPORARY - battles, ONE-TIME - buffs
        string description;
        uint256 intel; // Correlated to intellgience
        uint256 luck; // Correlated to luck
    }

    function getMetadata(uint256 tokenId)
        external
        view
        returns (CustomMetadata memory);

    function getMetadataBatch(uint256[] calldata tokenIds)
        external
        view
        returns (CustomMetadata[] memory);

    function getItemType(uint256 tokenId) external view returns (string memory);

    function getItemName(uint256 tokenId) external view returns (string memory);

    function getItemXPReq(uint256 tokenId) external view returns (uint256);

    function setItemMetadata(
        uint256 tokenId,
        string calldata typeOf,
        string calldata name,
        uint256 xp
    ) external;

    function setItemMetadataStruct(
        uint256 tokenId,
        CustomMetadata memory metadata
    ) external;

    function shopDrop(address _toAddress, uint256 _amount) external;

    function dropItems(address _toAddress, uint256[] calldata itemIds) external;

    function burnItemForOwnerAddress(
        uint256 _typeId,
        uint256 _quantity,
        address _materialOwnerAddress
    ) external;

    function mintItemToAddress(
        uint256 _typeId,
        uint256 _quantity,
        address _toAddress
    ) external;

    function mintBatchItemsToAddress(
        uint256[] memory _typeIds,
        uint256[] memory _quantities,
        address _toAddress
    ) external;

    function bulkSafeTransfer(
        uint256 _typeId,
        uint256 _quantityPerRecipient,
        address[] calldata recipients
    ) external;
}

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

import {RLPReader} from "../lib/RLPReader.sol";
import {MerklePatriciaProof} from "../lib/MerklePatriciaProof.sol";
import {Merkle} from "../lib/Merkle.sol";
import "../lib/ExitPayloadReader.sol";

interface IFxStateSender {
    function sendMessageToChild(address _receiver, bytes calldata _data)
        external;
}

contract ICheckpointManager {
    struct HeaderBlock {
        bytes32 root;
        uint256 start;
        uint256 end;
        uint256 createdAt;
        address proposer;
    }

    /**
     * @notice mapping of checkpoint header numbers to block details
     * @dev These checkpoints are submited by plasma contracts
     */
    mapping(uint256 => HeaderBlock) public headerBlocks;
}

abstract contract FxBaseRootTunnel {
    using RLPReader for RLPReader.RLPItem;
    using Merkle for bytes32;
    using ExitPayloadReader for bytes;
    using ExitPayloadReader for ExitPayloadReader.ExitPayload;
    using ExitPayloadReader for ExitPayloadReader.Log;
    using ExitPayloadReader for ExitPayloadReader.LogTopics;
    using ExitPayloadReader for ExitPayloadReader.Receipt;

    // keccak256(MessageSent(bytes))
    bytes32 public constant SEND_MESSAGE_EVENT_SIG =
        0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;

    // state sender contract
    IFxStateSender public fxRoot;
    // root chain manager
    ICheckpointManager public checkpointManager;
    // child tunnel contract which receives and sends messages
    address public fxChildTunnel;

    // storage to avoid duplicate exits
    mapping(bytes32 => bool) public processedExits;

    constructor(address _checkpointManager, address _fxRoot) {
        checkpointManager = ICheckpointManager(_checkpointManager);
        fxRoot = IFxStateSender(_fxRoot);
    }

    // set fxChildTunnel if not set already
    function setFxChildTunnel(address _fxChildTunnel) public virtual {
        require(
            fxChildTunnel == address(0x0),
            "FxBaseRootTunnel: CHILD_TUNNEL_ALREADY_SET"
        );
        fxChildTunnel = _fxChildTunnel;
    }

    /**
     * @notice Send bytes message to Child Tunnel
     * @param message bytes message that will be sent to Child Tunnel
     * some message examples -
     *   abi.encode(tokenId);
     *   abi.encode(tokenId, tokenMetadata);
     *   abi.encode(messageType, messageData);
     */
    function _sendMessageToChild(bytes memory message) internal {
        fxRoot.sendMessageToChild(fxChildTunnel, message);
    }

    function _validateAndExtractMessage(bytes memory inputData)
        internal
        returns (bytes memory)
    {
        ExitPayloadReader.ExitPayload memory payload = inputData
            .toExitPayload();

        bytes memory branchMaskBytes = payload.getBranchMaskAsBytes();
        uint256 blockNumber = payload.getBlockNumber();
        // checking if exit has already been processed
        // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)
        bytes32 exitHash = keccak256(
            abi.encodePacked(
                blockNumber,
                // first 2 nibbles are dropped while generating nibble array
                // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)
                // so converting to nibble array and then hashing it
                MerklePatriciaProof._getNibbleArray(branchMaskBytes),
                payload.getReceiptLogIndex()
            )
        );
        require(
            processedExits[exitHash] == false,
            "FxRootTunnel: EXIT_ALREADY_PROCESSED"
        );
        processedExits[exitHash] = true;

        ExitPayloadReader.Receipt memory receipt = payload.getReceipt();
        ExitPayloadReader.Log memory log = receipt.getLog();

        // check child tunnel
        require(
            fxChildTunnel == log.getEmitter(),
            "FxRootTunnel: INVALID_FX_CHILD_TUNNEL"
        );

        bytes32 receiptRoot = payload.getReceiptRoot();
        // verify receipt inclusion
        require(
            MerklePatriciaProof.verify(
                receipt.toBytes(),
                branchMaskBytes,
                payload.getReceiptProof(),
                receiptRoot
            ),
            "FxRootTunnel: INVALID_RECEIPT_PROOF"
        );

        // verify checkpoint inclusion
        _checkBlockMembershipInCheckpoint(
            blockNumber,
            payload.getBlockTime(),
            payload.getTxRoot(),
            receiptRoot,
            payload.getHeaderNumber(),
            payload.getBlockProof()
        );

        ExitPayloadReader.LogTopics memory topics = log.getTopics();

        require(
            bytes32(topics.getField(0).toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig
            "FxRootTunnel: INVALID_SIGNATURE"
        );

        // received message data
        bytes memory message = abi.decode(log.getData(), (bytes)); // event decodes params again, so decoding bytes to get message
        return message;
    }

    function _checkBlockMembershipInCheckpoint(
        uint256 blockNumber,
        uint256 blockTime,
        bytes32 txRoot,
        bytes32 receiptRoot,
        uint256 headerNumber,
        bytes memory blockProof
    ) private view returns (uint256) {
        (
            bytes32 headerRoot,
            uint256 startBlock,
            ,
            uint256 createdAt,

        ) = checkpointManager.headerBlocks(headerNumber);

        require(
            keccak256(
                abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)
            ).checkMembership(blockNumber - startBlock, headerRoot, blockProof),
            "FxRootTunnel: INVALID_HEADER"
        );
        return createdAt;
    }

    /**
     * @notice receive message from  L2 to L1, validated by proof
     * @dev This function verifies if the transaction actually happened on child chain
     *
     * @param inputData RLP encoded data of the reference tx containing following list of fields
     *  0 - headerNumber - Checkpoint header block number containing the reference tx
     *  1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root
     *  2 - blockNumber - Block number containing the reference tx on child chain
     *  3 - blockTime - Reference tx block time
     *  4 - txRoot - Transactions root of block
     *  5 - receiptRoot - Receipts root of block
     *  6 - receipt - Receipt of the reference transaction
     *  7 - receiptProof - Merkle proof of the reference receipt
     *  8 - branchMask - 32 bits denoting the path of receipt in merkle tree
     *  9 - receiptLogIndex - Log Index to read from the receipt
     */
    function receiveMessage(bytes memory inputData) public virtual {
        bytes memory message = _validateAndExtractMessage(inputData);
        _processMessageFromChild(message);
    }

    /**
     * @notice Process message received from Child Tunnel
     * @dev function needs to be implemented to handle message as per requirement
     * This is called by onStateReceive function.
     * Since it is called via a system call, any event will not be emitted during its execution.
     * @param message bytes message that was sent from Child Tunnel
     */
    function _processMessageFromChild(bytes memory message) internal virtual;
}

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

pragma solidity ^0.8.0;

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

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

File 10 of 21 : IERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of an ERC721AQueryable compliant contract.
 */
interface IERC721AQueryable is IERC721A {
    /**
     * Invalid query range (`start` >= `stop`).
     */
    error InvalidQueryRange();

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view returns (uint256[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

File 11 of 21 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

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

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

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

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

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

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

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

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

    // The 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 tokenId of the next token to be minted.
    uint256 private _currentIndex;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * Sets the 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 {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

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

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

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

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

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

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

    /**
     * @dev 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 See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

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

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

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

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

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

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

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

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

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

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

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

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

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

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

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

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

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

        // Overflows are incredibly unrealistic.
        // `balance` 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`.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 tokenId = startTokenId;
            uint256 end = startTokenId + quantity;
            do {
                emit Transfer(address(0), to, tokenId++);
            } while (tokenId < end);

            _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 {
        uint256 startTokenId = _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`.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

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

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

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals;
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
        assembly {
            // Compute the slot.
            mstore(0x00, tokenId)
            mstore(0x20, tokenApprovalsPtr.slot)
            approvedAddressSlot := keccak256(0x00, 0x40)
            // Load the slot's value from storage.
            approvedAddress := sload(approvedAddressSlot)
        }
    }

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function 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) = _getApprovedAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isOwnerOrApproved(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.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _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 (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isOwnerOrApproved(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;`.
            _packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _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 (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

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

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

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal {
        uint256 packed = _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);
        _packedOwnerships[index] = packed;
    }

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

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

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

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

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

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

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

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

File 12 of 21 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId` (inclusive) is transferred from `from` to `to`,
     * as defined in the ERC2309 standard. See `_mintERC2309` for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

File 13 of 21 : IERC721ABurnable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of an ERC721ABurnable compliant contract.
 */
interface IERC721ABurnable is IERC721A {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) external;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 18 of 21 : RLPReader.sol
/*
 * @author Hamdi Allam [email protected]
 * Please reach out with any questions or concerns
 */
pragma solidity ^0.8.0;

library RLPReader {
    uint8 constant STRING_SHORT_START = 0x80;
    uint8 constant STRING_LONG_START = 0xb8;
    uint8 constant LIST_SHORT_START = 0xc0;
    uint8 constant LIST_LONG_START = 0xf8;
    uint8 constant WORD_SIZE = 32;

    struct RLPItem {
        uint256 len;
        uint256 memPtr;
    }

    struct Iterator {
        RLPItem item; // Item that's being iterated over.
        uint256 nextPtr; // Position of the next item in the list.
    }

    /*
     * @dev Returns the next element in the iteration. Reverts if it has not next element.
     * @param self The iterator.
     * @return The next element in the iteration.
     */
    function next(Iterator memory self) internal pure returns (RLPItem memory) {
        require(hasNext(self));

        uint256 ptr = self.nextPtr;
        uint256 itemLength = _itemLength(ptr);
        self.nextPtr = ptr + itemLength;

        return RLPItem(itemLength, ptr);
    }

    /*
     * @dev Returns true if the iteration has more elements.
     * @param self The iterator.
     * @return true if the iteration has more elements.
     */
    function hasNext(Iterator memory self) internal pure returns (bool) {
        RLPItem memory item = self.item;
        return self.nextPtr < item.memPtr + item.len;
    }

    /*
     * @param item RLP encoded bytes
     */
    function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {
        uint256 memPtr;
        assembly {
            memPtr := add(item, 0x20)
        }

        return RLPItem(item.length, memPtr);
    }

    /*
     * @dev Create an iterator. Reverts if item is not a list.
     * @param self The RLP item.
     * @return An 'Iterator' over the item.
     */
    function iterator(RLPItem memory self) internal pure returns (Iterator memory) {
        require(isList(self));

        uint256 ptr = self.memPtr + _payloadOffset(self.memPtr);
        return Iterator(self, ptr);
    }

    /*
     * @param item RLP encoded bytes
     */
    function rlpLen(RLPItem memory item) internal pure returns (uint256) {
        return item.len;
    }

    /*
     * @param item RLP encoded bytes
     */
    function payloadLen(RLPItem memory item) internal pure returns (uint256) {
        return item.len - _payloadOffset(item.memPtr);
    }

    /*
     * @param item RLP encoded list in bytes
     */
    function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) {
        require(isList(item));

        uint256 items = numItems(item);
        RLPItem[] memory result = new RLPItem[](items);

        uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint256 dataLen;
        for (uint256 i = 0; i < items; i++) {
            dataLen = _itemLength(memPtr);
            result[i] = RLPItem(dataLen, memPtr);
            memPtr = memPtr + dataLen;
        }

        return result;
    }

    // @return indicator whether encoded payload is a list. negate this function call for isData.
    function isList(RLPItem memory item) internal pure returns (bool) {
        if (item.len == 0) return false;

        uint8 byte0;
        uint256 memPtr = item.memPtr;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }

        if (byte0 < LIST_SHORT_START) return false;
        return true;
    }

    /*
     * @dev A cheaper version of keccak256(toRlpBytes(item)) that avoids copying memory.
     * @return keccak256 hash of RLP encoded bytes.
     */
    function rlpBytesKeccak256(RLPItem memory item) internal pure returns (bytes32) {
        uint256 ptr = item.memPtr;
        uint256 len = item.len;
        bytes32 result;
        assembly {
            result := keccak256(ptr, len)
        }
        return result;
    }

    function payloadLocation(RLPItem memory item) internal pure returns (uint256, uint256) {
        uint256 offset = _payloadOffset(item.memPtr);
        uint256 memPtr = item.memPtr + offset;
        uint256 len = item.len - offset; // data length
        return (memPtr, len);
    }

    /*
     * @dev A cheaper version of keccak256(toBytes(item)) that avoids copying memory.
     * @return keccak256 hash of the item payload.
     */
    function payloadKeccak256(RLPItem memory item) internal pure returns (bytes32) {
        (uint256 memPtr, uint256 len) = payloadLocation(item);
        bytes32 result;
        assembly {
            result := keccak256(memPtr, len)
        }
        return result;
    }

    /** RLPItem conversions into data types **/

    // @returns raw rlp encoding in bytes
    function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) {
        bytes memory result = new bytes(item.len);
        if (result.length == 0) return result;

        uint256 ptr;
        assembly {
            ptr := add(0x20, result)
        }

        copy(item.memPtr, ptr, item.len);
        return result;
    }

    // any non-zero byte is considered true
    function toBoolean(RLPItem memory item) internal pure returns (bool) {
        require(item.len == 1);
        uint256 result;
        uint256 memPtr = item.memPtr;
        assembly {
            result := byte(0, mload(memPtr))
        }

        return result == 0 ? false : true;
    }

    function toAddress(RLPItem memory item) internal pure returns (address) {
        // 1 byte for the length prefix
        require(item.len == 21);

        return address(uint160(toUint(item)));
    }

    function toUint(RLPItem memory item) internal pure returns (uint256) {
        require(item.len > 0 && item.len <= 33);

        uint256 offset = _payloadOffset(item.memPtr);
        uint256 len = item.len - offset;

        uint256 result;
        uint256 memPtr = item.memPtr + offset;
        assembly {
            result := mload(memPtr)

            // shfit to the correct location if neccesary
            if lt(len, 32) {
                result := div(result, exp(256, sub(32, len)))
            }
        }

        return result;
    }

    // enforces 32 byte length
    function toUintStrict(RLPItem memory item) internal pure returns (uint256) {
        // one byte prefix
        require(item.len == 33);

        uint256 result;
        uint256 memPtr = item.memPtr + 1;
        assembly {
            result := mload(memPtr)
        }

        return result;
    }

    function toBytes(RLPItem memory item) internal pure returns (bytes memory) {
        require(item.len > 0);

        uint256 offset = _payloadOffset(item.memPtr);
        uint256 len = item.len - offset; // data length
        bytes memory result = new bytes(len);

        uint256 destPtr;
        assembly {
            destPtr := add(0x20, result)
        }

        copy(item.memPtr + offset, destPtr, len);
        return result;
    }

    /*
     * Private Helpers
     */

    // @return number of payload items inside an encoded list.
    function numItems(RLPItem memory item) private pure returns (uint256) {
        if (item.len == 0) return 0;

        uint256 count = 0;
        uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint256 endPtr = item.memPtr + item.len;
        while (currPtr < endPtr) {
            currPtr = currPtr + _itemLength(currPtr); // skip over an item
            count++;
        }

        return count;
    }

    // @return entire rlp item byte length
    function _itemLength(uint256 memPtr) private pure returns (uint256) {
        uint256 itemLen;
        uint256 byte0;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }

        if (byte0 < STRING_SHORT_START) itemLen = 1;
        else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1;
        else if (byte0 < LIST_SHORT_START) {
            assembly {
                let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is
                memPtr := add(memPtr, 1) // skip over the first byte
                /* 32 byte word size */
                let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len
                itemLen := add(dataLen, add(byteLen, 1))
            }
        } else if (byte0 < LIST_LONG_START) {
            itemLen = byte0 - LIST_SHORT_START + 1;
        } else {
            assembly {
                let byteLen := sub(byte0, 0xf7)
                memPtr := add(memPtr, 1)

                let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length
                itemLen := add(dataLen, add(byteLen, 1))
            }
        }

        return itemLen;
    }

    // @return number of bytes until the data
    function _payloadOffset(uint256 memPtr) private pure returns (uint256) {
        uint256 byte0;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }

        if (byte0 < STRING_SHORT_START) return 0;
        else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1;
        else if (byte0 < LIST_SHORT_START)
            // being explicit
            return byte0 - (STRING_LONG_START - 1) + 1;
        else return byte0 - (LIST_LONG_START - 1) + 1;
    }

    /*
     * @param src Pointer to source
     * @param dest Pointer to destination
     * @param len Amount of memory to copy from the source
     */
    function copy(
        uint256 src,
        uint256 dest,
        uint256 len
    ) private pure {
        if (len == 0) return;

        // copy as many word sizes as possible
        for (; len >= WORD_SIZE; len -= WORD_SIZE) {
            assembly {
                mstore(dest, mload(src))
            }

            src += WORD_SIZE;
            dest += WORD_SIZE;
        }

        if (len == 0) return;

        // left over bytes. Mask is used to remove unwanted bytes from the word
        uint256 mask = 256**(WORD_SIZE - len) - 1;

        assembly {
            let srcpart := and(mload(src), not(mask)) // zero out src
            let destpart := and(mload(dest), mask) // retrieve the bytes
            mstore(dest, or(destpart, srcpart))
        }
    }
}

File 19 of 21 : MerklePatriciaProof.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

library MerklePatriciaProof {
    /*
     * @dev Verifies a merkle patricia proof.
     * @param value The terminating value in the trie.
     * @param encodedPath The path in the trie leading to value.
     * @param rlpParentNodes The rlp encoded stack of nodes.
     * @param root The root hash of the trie.
     * @return The boolean validity of the proof.
     */
    function verify(
        bytes memory value,
        bytes memory encodedPath,
        bytes memory rlpParentNodes,
        bytes32 root
    ) internal pure returns (bool) {
        RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes);
        RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item);

        bytes memory currentNode;
        RLPReader.RLPItem[] memory currentNodeList;

        bytes32 nodeKey = root;
        uint256 pathPtr = 0;

        bytes memory path = _getNibbleArray(encodedPath);
        if (path.length == 0) {
            return false;
        }

        for (uint256 i = 0; i < parentNodes.length; i++) {
            if (pathPtr > path.length) {
                return false;
            }

            currentNode = RLPReader.toRlpBytes(parentNodes[i]);
            if (nodeKey != keccak256(currentNode)) {
                return false;
            }
            currentNodeList = RLPReader.toList(parentNodes[i]);

            if (currentNodeList.length == 17) {
                if (pathPtr == path.length) {
                    if (keccak256(RLPReader.toBytes(currentNodeList[16])) == keccak256(value)) {
                        return true;
                    } else {
                        return false;
                    }
                }

                uint8 nextPathNibble = uint8(path[pathPtr]);
                if (nextPathNibble > 16) {
                    return false;
                }
                nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[nextPathNibble]));
                pathPtr += 1;
            } else if (currentNodeList.length == 2) {
                uint256 traversed = _nibblesToTraverse(RLPReader.toBytes(currentNodeList[0]), path, pathPtr);
                if (pathPtr + traversed == path.length) {
                    //leaf node
                    if (keccak256(RLPReader.toBytes(currentNodeList[1])) == keccak256(value)) {
                        return true;
                    } else {
                        return false;
                    }
                }

                //extension node
                if (traversed == 0) {
                    return false;
                }

                pathPtr += traversed;
                nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1]));
            } else {
                return false;
            }
        }
    }

    function _nibblesToTraverse(
        bytes memory encodedPartialPath,
        bytes memory path,
        uint256 pathPtr
    ) private pure returns (uint256) {
        uint256 len = 0;
        // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath
        // and slicedPath have elements that are each one hex character (1 nibble)
        bytes memory partialPath = _getNibbleArray(encodedPartialPath);
        bytes memory slicedPath = new bytes(partialPath.length);

        // pathPtr counts nibbles in path
        // partialPath.length is a number of nibbles
        for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) {
            bytes1 pathNibble = path[i];
            slicedPath[i - pathPtr] = pathNibble;
        }

        if (keccak256(partialPath) == keccak256(slicedPath)) {
            len = partialPath.length;
        } else {
            len = 0;
        }
        return len;
    }

    // bytes b must be hp encoded
    function _getNibbleArray(bytes memory b) internal pure returns (bytes memory) {
        bytes memory nibbles = "";
        if (b.length > 0) {
            uint8 offset;
            uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b));
            if (hpNibble == 1 || hpNibble == 3) {
                nibbles = new bytes(b.length * 2 - 1);
                bytes1 oddNibble = _getNthNibbleOfBytes(1, b);
                nibbles[0] = oddNibble;
                offset = 1;
            } else {
                nibbles = new bytes(b.length * 2 - 2);
                offset = 0;
            }

            for (uint256 i = offset; i < nibbles.length; i++) {
                nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b);
            }
        }
        return nibbles;
    }

    function _getNthNibbleOfBytes(uint256 n, bytes memory str) private pure returns (bytes1) {
        return bytes1(n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10);
    }
}

File 20 of 21 : Merkle.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library Merkle {
    function checkMembership(
        bytes32 leaf,
        uint256 index,
        bytes32 rootHash,
        bytes memory proof
    ) internal pure returns (bool) {
        require(proof.length % 32 == 0, "Invalid proof length");
        uint256 proofHeight = proof.length / 32;
        // Proof of size n means, height of the tree is n+1.
        // In a tree of height n+1, max #leafs possible is 2 ^ n
        require(index < 2**proofHeight, "Leaf index is too big");

        bytes32 proofElement;
        bytes32 computedHash = leaf;
        for (uint256 i = 32; i <= proof.length; i += 32) {
            assembly {
                proofElement := mload(add(proof, i))
            }

            if (index % 2 == 0) {
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }

            index = index / 2;
        }
        return computedHash == rootHash;
    }
}

File 21 of 21 : ExitPayloadReader.sol
pragma solidity ^0.8.0;

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

library ExitPayloadReader {
    using RLPReader for bytes;
    using RLPReader for RLPReader.RLPItem;

    uint8 constant WORD_SIZE = 32;

    struct ExitPayload {
        RLPReader.RLPItem[] data;
    }

    struct Receipt {
        RLPReader.RLPItem[] data;
        bytes raw;
        uint256 logIndex;
    }

    struct Log {
        RLPReader.RLPItem data;
        RLPReader.RLPItem[] list;
    }

    struct LogTopics {
        RLPReader.RLPItem[] data;
    }

    // copy paste of private copy() from RLPReader to avoid changing of existing contracts
    function copy(
        uint256 src,
        uint256 dest,
        uint256 len
    ) private pure {
        if (len == 0) return;

        // copy as many word sizes as possible
        for (; len >= WORD_SIZE; len -= WORD_SIZE) {
            assembly {
                mstore(dest, mload(src))
            }

            src += WORD_SIZE;
            dest += WORD_SIZE;
        }

        // left over bytes. Mask is used to remove unwanted bytes from the word
        uint256 mask = 256**(WORD_SIZE - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask)) // zero out src
            let destpart := and(mload(dest), mask) // retrieve the bytes
            mstore(dest, or(destpart, srcpart))
        }
    }

    function toExitPayload(bytes memory data) internal pure returns (ExitPayload memory) {
        RLPReader.RLPItem[] memory payloadData = data.toRlpItem().toList();

        return ExitPayload(payloadData);
    }

    function getHeaderNumber(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[0].toUint();
    }

    function getBlockProof(ExitPayload memory payload) internal pure returns (bytes memory) {
        return payload.data[1].toBytes();
    }

    function getBlockNumber(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[2].toUint();
    }

    function getBlockTime(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[3].toUint();
    }

    function getTxRoot(ExitPayload memory payload) internal pure returns (bytes32) {
        return bytes32(payload.data[4].toUint());
    }

    function getReceiptRoot(ExitPayload memory payload) internal pure returns (bytes32) {
        return bytes32(payload.data[5].toUint());
    }

    function getReceipt(ExitPayload memory payload) internal pure returns (Receipt memory receipt) {
        receipt.raw = payload.data[6].toBytes();
        RLPReader.RLPItem memory receiptItem = receipt.raw.toRlpItem();

        if (receiptItem.isList()) {
            // legacy tx
            receipt.data = receiptItem.toList();
        } else {
            // pop first byte before parsting receipt
            bytes memory typedBytes = receipt.raw;
            bytes memory result = new bytes(typedBytes.length - 1);
            uint256 srcPtr;
            uint256 destPtr;
            assembly {
                srcPtr := add(33, typedBytes)
                destPtr := add(0x20, result)
            }

            copy(srcPtr, destPtr, result.length);
            receipt.data = result.toRlpItem().toList();
        }

        receipt.logIndex = getReceiptLogIndex(payload);
        return receipt;
    }

    function getReceiptProof(ExitPayload memory payload) internal pure returns (bytes memory) {
        return payload.data[7].toBytes();
    }

    function getBranchMaskAsBytes(ExitPayload memory payload) internal pure returns (bytes memory) {
        return payload.data[8].toBytes();
    }

    function getBranchMaskAsUint(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[8].toUint();
    }

    function getReceiptLogIndex(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[9].toUint();
    }

    // Receipt methods
    function toBytes(Receipt memory receipt) internal pure returns (bytes memory) {
        return receipt.raw;
    }

    function getLog(Receipt memory receipt) internal pure returns (Log memory) {
        RLPReader.RLPItem memory logData = receipt.data[3].toList()[receipt.logIndex];
        return Log(logData, logData.toList());
    }

    // Log methods
    function getEmitter(Log memory log) internal pure returns (address) {
        return RLPReader.toAddress(log.list[0]);
    }

    function getTopics(Log memory log) internal pure returns (LogTopics memory) {
        return LogTopics(log.list[1].toList());
    }

    function getData(Log memory log) internal pure returns (bytes memory) {
        return log.list[2].toBytes();
    }

    function toRlpBytes(Log memory log) internal pure returns (bytes memory) {
        return log.data.toRlpBytes();
    }

    // LogTopics methods
    function getField(LogTopics memory topics, uint256 index) internal pure returns (RLPReader.RLPItem memory) {
        return topics.data[index];
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_checkpointManager","type":"address"},{"internalType":"address","name":"_fxRoot","type":"address"},{"internalType":"address","name":"_vendorContractAddress","type":"address"},{"internalType":"address","name":"_factionContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CannotApproveAll","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"Nontransferable","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":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":"MINTED","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARDS_CLAIM","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEND_MESSAGE_EVENT_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"message","type":"bytes"}],"name":"_processMessageFromChildTest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkpointManager","outputs":[{"internalType":"contract ICheckpointManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expiresAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factionContract","outputs":[{"internalType":"contract IBrawlerBearzFaction","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxChildTunnel","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxRoot","outputs":[{"internalType":"contract IFxStateSender","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liveAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"passes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proPassMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"proPlusPassMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"proPlusPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"processedExits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"inputData","type":"bytes"}],"name":"receiveMessage","outputs":[],"stateMutability":"nonpayable","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":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_factionContractAddress","type":"address"}],"name":"setFactionContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fxChildTunnel","type":"address"}],"name":"setFxChildTunnel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liveAt","type":"uint256"},{"internalType":"uint256","name":"_expiresAt","type":"uint256"}],"name":"setMintWindow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proPlusPrice","type":"uint256"}],"name":"setProPlusPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proPrice","type":"uint256"}],"name":"setProPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vendorContractAddress","type":"address"}],"name":"setVendorContractAddress","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":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vendorContract","outputs":[{"internalType":"contract IBrawlerBearzDynamicItems","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610100604052604360808181529062004a6960a03980516200002a91600f91602090910190620001ec565b5066354a6ba7a18000601055669fdf42f6e48000601155601280546001600160a01b0319167339bfa2b4319581bc885a2d4b9f0c90c2e1c24b871790556364133d0060135563642460806014553480156200008457600080fd5b5060405162004aac38038062004aac833981016040819052620000a791620002cc565b604080518082018252601d81527f427261776c657220426561727a20426174746c6520506173733a2053320000006020808301918252835180850190945260068085526521212128299960d11b91850191909152600180546001600160a01b03808b166001600160a01b03199283161790925560008054928a169290911691909117905582519293926200013c9290620001ec565b50805162000152906007906020840190620001ec565b505060016004555062000165336200019a565b600d80546001600160a01b039384166001600160a01b031991821617909155600e805492909316911617905550620003819050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001fa9062000350565b90600052602060002090601f0160209004810192826200021e576000855562000269565b82601f106200023957805160ff191683800117855562000269565b8280016001018555821562000269579182015b82811115620002695782518255916020019190600101906200024c565b50620002779291506200027b565b5090565b5b808211156200027757600081556001016200027c565b60006001600160a01b0382165b92915050565b620002b08162000292565b8114620002bc57600080fd5b50565b80516200029f81620002a5565b60008060008060808587031215620002e757620002e7600080fd5b6000620002f58787620002bf565b94505060206200030887828801620002bf565b93505060406200031b87828801620002bf565b92505060606200032e87828801620002bf565b91505092959194509250565b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200036557607f821691505b602082108114156200037b576200037b6200033a565b50919050565b6146d880620003916000396000f3fe6080604052600436106103345760003560e01c806370a08231116101b0578063b88d4fde116100ec578063d629c86d11610095578063ea07e68a1161006f578063ea07e68a1461097a578063f0f442601461099a578063f2fde38b146109ba578063f953cec7146109da57600080fd5b8063d629c86d146108fb578063de9b771f14610911578063e985e9c51461093157600080fd5b8063c23dc68f116100c6578063c23dc68f1461087a578063c3b2ec49146108a7578063c87b56dd146108db57600080fd5b8063b88d4fde14610825578063b8f7a66514610845578063c0857ba01461085a57600080fd5b8063972c492811610159578063a22cb46511610133578063a22cb465146107bd578063a90b7755146107dd578063a9cdd60d146107e5578063aea4e49e1461080557600080fd5b8063972c49281461075057806399a2557a146107705780639a9e2e4a1461079057600080fd5b80638622a6891161018a5780638622a689146107075780638da5cb5b1461071d57806395d89b411461073b57600080fd5b806370a08231146106a5578063715018a6146106c55780638462151c146106da57600080fd5b80633e9c7f691161027f5780635bbb2177116102285780636255c3ac116102025780636255c3ac146106185780636352211e146106385780636e321ce4146106585780636ed1dc791461068557600080fd5b80635bbb21771461059b578063607f2d42146105c857806361d027b3146105f857600080fd5b806353b0e17d1161025957806353b0e17d1461054f57806353f8bb9a1461056557806355f804b31461057b57600080fd5b80633e9c7f69146104db57806342842e0e1461050f57806342966c681461052f57600080fd5b80630f867751116102e157806323b872dd116102bb57806323b872dd146104865780633ccfd60b146104a65780633d58e62e146104bb57600080fd5b80630f8677511461042957806318160ddd146104495780631b8886571461046657600080fd5b8063081812fc11610312578063081812fc1461039b578063095ea7b3146103c85780630e387de6146103e857600080fd5b806301ffc9a7146103395780630245b80f1461036f57806306fdde0314610379575b600080fd5b34801561034557600080fd5b506103596103543660046134c7565b6109fa565b60405161036691906134f2565b60405180910390f35b610377610a4c565b005b34801561038557600080fd5b5061038e610ab2565b604051610366919061355e565b3480156103a757600080fd5b506103bb6103b6366004613580565b610b44565b60405161036691906135bb565b3480156103d457600080fd5b506103776103e33660046135dd565b610b88565b3480156103f457600080fd5b5061041c7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6040516103669190613620565b34801561043557600080fd5b5061037761044436600461362e565b610c45565b34801561045557600080fd5b50600554600454036000190161041c565b34801561047257600080fd5b50610377610481366004613580565b610c7a565b34801561049257600080fd5b506103776104a1366004613650565b610ca9565b3480156104b257600080fd5b50610377610e6e565b3480156104c757600080fd5b506103776104d6366004613793565b610f1c565b3480156104e757600080fd5b5061041c7f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae369025281565b34801561051b57600080fd5b5061037761052a366004613650565b610faf565b34801561053b57600080fd5b5061037761054a366004613580565b610fca565b34801561055b57600080fd5b5061041c60105481565b34801561057157600080fd5b5061041c60135481565b34801561058757600080fd5b50610377610596366004613820565b610fd5565b3480156105a757600080fd5b506105bb6105b636600461390b565b61100b565b6040516103669190613a08565b3480156105d457600080fd5b506103596105e3366004613580565b60036020526000908152604090205460ff1681565b34801561060457600080fd5b506012546103bb906001600160a01b031681565b34801561062457600080fd5b50610377610633366004613580565b6110d9565b34801561064457600080fd5b506103bb610653366004613580565b611108565b34801561066457600080fd5b5061041c610673366004613580565b60156020526000908152604090205481565b34801561069157600080fd5b506103776106a0366004613a19565b611113565b3480156106b157600080fd5b5061041c6106c0366004613a19565b61115f565b3480156106d157600080fd5b506103776111ae565b3480156106e657600080fd5b506106fa6106f5366004613a19565b6111e2565b6040516103669190613a8c565b34801561071357600080fd5b5061041c60145481565b34801561072957600080fd5b50600c546001600160a01b03166103bb565b34801561074757600080fd5b5061038e6112f2565b34801561075c57600080fd5b506002546103bb906001600160a01b031681565b34801561077c57600080fd5b506106fa61078b366004613a9d565b611301565b34801561079c57600080fd5b50600e546107b0906001600160a01b031681565b6040516103669190613af1565b3480156107c957600080fd5b506103776107d8366004613b12565b61148d565b6103776114a6565b3480156107f157600080fd5b50610377610800366004613a19565b611501565b34801561081157600080fd5b50610377610820366004613a19565b61154d565b34801561083157600080fd5b50610377610840366004613b45565b611599565b34801561085157600080fd5b506103596115e3565b34801561086657600080fd5b506001546107b0906001600160a01b031681565b34801561088657600080fd5b5061089a610895366004613580565b6115fc565b6040516103669190613bc4565b3480156108b357600080fd5b5061041c7f306c27fde4d30e93105afde87f5773b4557f5fcbd91b3f18aedef29a5e80fd2881565b3480156108e757600080fd5b5061038e6108f6366004613580565b611684565b34801561090757600080fd5b5061041c60115481565b34801561091d57600080fd5b506000546107b0906001600160a01b031681565b34801561093d57600080fd5b5061035961094c366004613bd2565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b34801561098657600080fd5b50600d546107b0906001600160a01b031681565b3480156109a657600080fd5b506103776109b5366004613a19565b6116ee565b3480156109c657600080fd5b506103776109d5366004613a19565b61173a565b3480156109e657600080fd5b506103776109f5366004613793565b611793565b60006301ffc9a760e01b6001600160e01b031983161480610a2b57506380ac58cd60e01b6001600160e01b03198316145b80610a465750635b5e139f60e01b6001600160e01b03198316145b92915050565b60135442118015610a5e575060145442105b610a835760405162461bcd60e51b8152600401610a7a90613c3c565b60405180910390fd5b601154341015610aa55760405162461bcd60e51b8152600401610a7a90613c80565b610ab03360026117ad565b565b606060068054610ac190613ca6565b80601f0160208091040260200160405190810160405280929190818152602001828054610aed90613ca6565b8015610b3a5780601f10610b0f57610100808354040283529160200191610b3a565b820191906000526020600020905b815481529060010190602001808311610b1d57829003601f168201915b5050505050905090565b6000610b4f826118cc565b610b6c576040516333d1c03960e21b815260040160405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b6000610b9382611108565b9050336001600160a01b03821614610be9576001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff16610be9576040516367d9dca160e11b815260040160405180910390fd5b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600c546001600160a01b03163314610c6f5760405162461bcd60e51b8152600401610a7a90613cff565b601391909155601455565b600c546001600160a01b03163314610ca45760405162461bcd60e51b8152600401610a7a90613cff565b601155565b6000610cb482611901565b9050836001600160a01b0316816001600160a01b031614610ce75760405162a1148160e81b815260040160405180910390fd5b6000828152600a602052604090208054610d138187335b6001600160a01b039081169116811491141790565b610d5b576001600160a01b0386166000908152600b6020908152604080832033845290915290205460ff16610d5b57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610d8257604051633a954ecd60e21b815260040160405180910390fd5b610d8f868686600161196a565b8015610d9a57600082555b6001600160a01b038681166000908152600960205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260086020526040902055600160e11b8316610e255760018401600081815260086020526040902054610e23576004548114610e235760008181526008602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600c546001600160a01b03163314610e985760405162461bcd60e51b8152600401610a7a90613cff565b6012546040516000916001600160a01b0316904790610eb690613d0f565b60006040518083038185875af1925050503d8060008114610ef3576040519150601f19603f3d011682016040523d82523d6000602084013e610ef8565b606091505b5050905080610f195760405162461bcd60e51b8152600401610a7a90613d31565b50565b600c546001600160a01b03163314610f465760405162461bcd60e51b8152600401610a7a90613cff565b60008082806020019051810190610f5d9190613da4565b915091507f306c27fde4d30e93105afde87f5773b4557f5fcbd91b3f18aedef29a5e80fd28821415610f9757610f92816119ad565b505050565b60405162461bcd60e51b8152600401610a7a90613e26565b610f9283838360405180602001604052806000815250611599565b610f19816001611a31565b600c546001600160a01b03163314610fff5760405162461bcd60e51b8152600401610a7a90613cff565b610f92600f838361340c565b805160609060008167ffffffffffffffff81111561102b5761102b6136a0565b60405190808252806020026020018201604052801561107d57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816110495790505b50905060005b8281146110d1576110ac85828151811061109f5761109f613e36565b60200260200101516115fc565b8282815181106110be576110be613e36565b6020908102919091010152600101611083565b509392505050565b600c546001600160a01b031633146111035760405162461bcd60e51b8152600401610a7a90613cff565b601055565b6000610a4682611901565b600c546001600160a01b0316331461113d5760405162461bcd60e51b8152600401610a7a90613cff565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216611188576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526009602052604090205467ffffffffffffffff1690565b600c546001600160a01b031633146111d85760405162461bcd60e51b8152600401610a7a90613cff565b610ab06000611ba0565b606060008060006111f28561115f565b905060008167ffffffffffffffff81111561120f5761120f6136a0565b604051908082528060200260200182016040528015611238578160200160208202803683370190505b50905061126560408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146112e65761127881611bf2565b9150816040015115611289576112de565b81516001600160a01b03161561129e57815194505b876001600160a01b0316856001600160a01b031614156112de57808387806001019850815181106112d1576112d1613e36565b6020026020010181815250505b600101611268565b50909695505050505050565b606060078054610ac190613ca6565b606081831061132357604051631960ccad60e11b815260040160405180910390fd5b60008061132f60045490565b9050600185101561133f57600194505b8084111561134b578093505b60006113568761115f565b905084861015611375578585038181101561136f578091505b50611379565b5060005b60008167ffffffffffffffff811115611394576113946136a0565b6040519080825280602002602001820160405280156113bd578160200160208202803683370190505b509050816113d057935061148692505050565b60006113db886115fc565b9050600081604001516113ec575080515b885b8881141580156113fe5750848714155b1561147a5761140c81611bf2565b925082604001511561141d57611472565b82516001600160a01b03161561143257825191505b8a6001600160a01b0316826001600160a01b03161415611472578084888060010199508151811061146557611465613e36565b6020026020010181815250505b6001016113ee565b50505092835250909150505b9392505050565b6040516301473cbb60e71b815260040160405180910390fd5b601354421180156114b8575060145442105b6114d45760405162461bcd60e51b8152600401610a7a90613c3c565b6010543410156114f65760405162461bcd60e51b8152600401610a7a90613c80565b610ab03360016117ad565b600c546001600160a01b0316331461152b5760405162461bcd60e51b8152600401610a7a90613cff565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b600c546001600160a01b031633146115775760405162461bcd60e51b8152600401610a7a90613cff565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6115a4848484610ca9565b6001600160a01b0383163b156115dd576115c084848484611c71565b6115dd576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000601354421180156115f7575060145442105b905090565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061165557506004548310155b156116605792915050565b61166983611bf2565b905080604001511561167b5792915050565b61148683611d69565b606061168f826118cc565b6116ac57604051636f96cda160e11b815260040160405180910390fd5b600082815260156020526040902054600f906116c790611de1565b6040516020016116d8929190613ed9565b6040516020818303038152906040529050919050565b600c546001600160a01b031633146117185760405162461bcd60e51b8152600401610a7a90613cff565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b600c546001600160a01b031633146117645760405162461bcd60e51b8152600401610a7a90613cff565b6001600160a01b03811661178a5760405162461bcd60e51b8152600401610a7a90613f37565b610f1981611ba0565b600061179e82611edf565b90506117a981610f46565b5050565b60006117b860045490565b600e5460405163de325b8f60e01b81529192506000916001600160a01b039091169063de325b8f906117ee9087906004016135bb565b60206040518083038186803b15801561180657600080fd5b505afa15801561181a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183e9190613f47565b905061184b8460016120df565b60008281526015602090815260409182902085905590516115dd917f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae36902529161189a91889187918991889101613f68565b60408051601f19818403018152908290526118b89291602001613fa6565b6040516020818303038152906040526121c9565b6000816001111580156118e0575060045482105b8015610a46575050600090815260086020526040902054600160e01b161590565b600081806001116119515760045481101561195157600081815260086020526040902054600160e01b811661194f575b80611486575060001901600081815260086020526040902054611931565b505b604051636f96cda160e11b815260040160405180910390fd5b6001600160a01b0383161580159061198a57506001600160a01b03841615155b156119a85760405163399f41e760e01b815260040160405180910390fd5b6115dd565b600080828060200190518101906119c49190614046565b600d546040516311b211c160e31b81529294509092506001600160a01b031690638d908e08906119fa9085908590600401614094565b600060405180830381600087803b158015611a1457600080fd5b505af1158015611a28573d6000803e3d6000fd5b50505050505050565b6000611a3c83611901565b905080600080611a5a866000908152600a6020526040902080549091565b915091508415611ab757611a6f818433610cfe565b611ab7576001600160a01b0383166000908152600b6020908152604080832033845290915290205460ff16611ab757604051632ce44b5f60e11b815260040160405180910390fd5b611ac583600088600161196a565b8015611ad057600082555b6001600160a01b038316600081815260096020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260086020526040902055600160e11b8416611b575760018601600081815260086020526040902054611b55576004548114611b555760008181526008602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060058054600101905550505050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260086020526040902054610a4690604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611ca69033908990889088906004016140b4565b602060405180830381600087803b158015611cc057600080fd5b505af1925050508015611cf0575060408051601f3d908101601f19168201909252611ced91810190614103565b60015b611d4b573d808015611d1e576040519150601f19603f3d011682016040523d82523d6000602084013e611d23565b606091505b508051611d43576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152610a46611d9983611901565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b606081611e055750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e2f5780611e198161413a565b9150611e289050600a8361416b565b9150611e09565b60008167ffffffffffffffff811115611e4a57611e4a6136a0565b6040519080825280601f01601f191660200182016040528015611e74576020820181803683370190505b5090505b8415611d6157611e89600183614183565b9150611e96600a8661419e565b611ea19060306141b6565b60f81b818381518110611eb657611eb6613e36565b60200101906001600160f81b031916908160001a905350611ed8600a8661416b565b9450611e78565b60606000611eec83612234565b90506000611ef982612293565b90506000611f06836122bc565b9050600081611f14846122e5565b611f1d866124a3565b604051602001611f2f939291906141ce565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff1615611f775760405162461bcd60e51b8152600401610a7a90614242565b6000818152600360205260408120805460ff19166001179055611f99856124bf565b90506000611fa682612609565b9050611fb181612699565b6002546001600160a01b03908116911614611fde5760405162461bcd60e51b8152600401610a7a90614294565b6000611fe9876126c2565b9050612009611ff9846020015190565b876120038a6126de565b846126fa565b6120255760405162461bcd60e51b8152600401610a7a906142e4565b61205385612032896129b0565b61203b8a6129cc565b846120458c6129e8565b61204e8d612a04565b612a20565b50600061205f83612b28565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036612095612090836000612b64565b612b9c565b146120b25760405162461bcd60e51b8152600401610a7a90614328565b60006120bd84612c17565b8060200190518101906120d09190614338565b9b9a5050505050505050505050565b6004546001600160a01b03831661210857604051622e076360e81b815260040160405180910390fd5b816121265760405163b562e8dd60e01b815260040160405180910390fd5b612133600084838561196a565b6001600160a01b038316600081815260096020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260086020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821061217d5760045550505050565b60005460025460405163b472047760e01b81526001600160a01b039283169263b4720477926121ff929116908590600401614373565b600060405180830381600087803b15801561221957600080fd5b505af115801561222d573d6000803e3d6000fd5b5050505050565b604080516020810190915260608152600061227e6122798460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b612c33565b60408051602081019091529081529392505050565b6060610a4682600001516008815181106122af576122af613e36565b6020026020010151612d49565b6000610a4682600001516002815181106122d8576122d8613e36565b6020026020010151612b9c565b60408051602081019091526000815281516060919015610a465760008061230d600086612de6565b60f81c9050600181148061232457508060ff166003145b156123cc576001855160026123399190614381565b6123439190614183565b67ffffffffffffffff81111561235b5761235b6136a0565b6040519080825280601f01601f191660200182016040528015612385576020820181803683370190505b5092506000612395600187612de6565b905080846000815181106123ab576123ab613e36565b60200101906001600160f81b031916908160001a9053506001925050612430565b6002855160026123dc9190614381565b6123e69190614183565b67ffffffffffffffff8111156123fe576123fe6136a0565b6040519080825280601f01601f191660200182016040528015612428576020820181803683370190505b509250600091505b60ff82165b835181101561249a5761245f61244e60ff851683614183565b6124599060026141b6565b87612de6565b84828151811061247157612471613e36565b60200101906001600160f81b031916908160001a905350806124928161413a565b915050612435565b50505092915050565b6000610a4682600001516009815181106122d8576122d8613e36565b6124e360405180606001604052806060815260200160608152602001600081525090565b6124fd82600001516006815181106122af576122af613e36565b60208281018290526040805180820182526000808252908301528051808201909152825181529181019082015261253381612e67565b156125485761254181612c33565b82526125f5565b6020820151805160009061255e90600190614183565b67ffffffffffffffff811115612576576125766136a0565b6040519080825280601f01601f1916602001820160405280156125a0576020820181803683370190505b5090506000808360210191508260200190506125be82828551612ea0565b6040805180820182526000808252602091820152815180830190925284518252808501908201526125ee90612c33565b8652505050505b6125fe836124a3565b604083015250919050565b604080516080810182526000918101828152606080830193909352815260208101919091526000612657836000015160038151811061264a5761264a613e36565b6020026020010151612c33565b83604001518151811061266c5761266c613e36565b60200260200101519050604051806040016040528082815260200161269083612c33565b90529392505050565b6000610a4682602001516000815181106126b5576126b5613e36565b6020026020010151612f1b565b6000610a4682600001516005815181106122d8576122d8613e36565b6060610a4682600001516007815181106122af576122af613e36565b60008061272e8460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b9050600061273b82612c33565b90506060808560008061274d8b6122e5565b9050805160001415612769576000975050505050505050611d61565b60005b86518110156129a057815183111561278f57600098505050505050505050611d61565b6127b18782815181106127a4576127a4613e36565b6020026020010151612f35565b9550858051906020012084146127d257600098505050505050505050611d61565b6127e787828151811061264a5761264a613e36565b94508451601114156128bc578151831415612849578c8051906020012061281a866010815181106122af576122af613e36565b80519060200120141561283857600198505050505050505050611d61565b600098505050505050505050611d61565b600082848151811061285d5761285d613e36565b016020015160f81c905060108111156128825760009950505050505050505050611d61565b6128a7868260ff168151811061289a5761289a613e36565b6020026020010151612fb5565b94506128b46001856141b6565b93505061298e565b8451600214156128385760006128e86128e1876000815181106122af576122af613e36565b8486612fe3565b83519091506128f782866141b6565b141561294c578d8051906020012061291b876001815181106122af576122af613e36565b80519060200120141561293a5760019950505050505050505050611d61565b60009950505050505050505050611d61565b806129635760009950505050505050505050611d61565b61296d81856141b6565b93506129858660018151811061289a5761289a613e36565b945061298e9050565b806129988161413a565b91505061276c565b5050505050505050949350505050565b6000610a4682600001516003815181106122d8576122d8613e36565b6000610a4682600001516004815181106122d8576122d8613e36565b6000610a4682600001516000815181106122d8576122d8613e36565b6060610a4682600001516001815181106122af576122af613e36565b6001546040516320a9cea560e11b81526000918291829182916001600160a01b03909116906341539d4a90612a59908990600401613620565b60a06040518083038186803b158015612a7157600080fd5b505afa158015612a85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa991906143a0565b5093505092509250612aff828b612ac09190614183565b84878d8d8d8d604051602001612ad99493929190614418565b60405160208183030381529060405280519060200120613104909392919063ffffffff16565b612b1b5760405162461bcd60e51b8152600401610a7a90614494565b9998505050505050505050565b6040805160208101909152606081526040518060200160405280612b5c846020015160018151811061264a5761264a613e36565b905292915050565b60408051808201909152600080825260208201528251805183908110612b8c57612b8c613e36565b6020026020010151905092915050565b805160009015801590612bb157508151602110155b612bba57600080fd5b6000612bc98360200151613218565b90506000818460000151612bdd9190614183565b9050600080838660200151612bf291906141b6565b9050805191506020831015612c0e57826020036101000a820491505b50949350505050565b6060610a4682602001516002815181106122af576122af613e36565b6060612c3e82612e67565b612c4757600080fd5b6000612c5283613299565b905060008167ffffffffffffffff811115612c6f57612c6f6136a0565b604051908082528060200260200182016040528015612cb457816020015b6040805180820190915260008082526020820152815260200190600190039081612c8d5790505b5090506000612cc68560200151613218565b8560200151612cd591906141b6565b90506000805b84811015612d3e57612cec8361331c565b9150604051806040016040528083815260200184815250848281518110612d1557612d15613e36565b6020908102919091010152612d2a82846141b6565b925080612d368161413a565b915050612cdb565b509195945050505050565b8051606090612d5757600080fd5b6000612d668360200151613218565b90506000818460000151612d7a9190614183565b905060008167ffffffffffffffff811115612d9757612d976136a0565b6040519080825280601f01601f191660200182016040528015612dc1576020820181803683370190505b5090506000816020019050612c0e848760200151612ddf91906141b6565b82856133c0565b6000612df360028461419e565b15612e2d57601082612e0660028661416b565b81518110612e1657612e16613e36565b0160200151612e28919060f81c6144a4565b612e5d565b601082612e3b60028661416b565b81518110612e4b57612e4b613e36565b0160200151612e5d919060f81c6144b5565b60f81b9392505050565b8051600090612e7857506000919050565b6020820151805160001a9060c0821015612e96575060009392505050565b5060019392505050565b80612eaa57505050565b60208110612ee25782518252612ec16020846141b6565b9250612ece6020836141b6565b9150612edb602082614183565b9050612eaa565b60006001612ef1836020614183565b612efd906101006145d4565b612f079190614183565b935183518516941916939093179091525050565b8051600090601514612f2c57600080fd5b610a4682612b9c565b60606000826000015167ffffffffffffffff811115612f5657612f566136a0565b6040519080825280601f01601f191660200182016040528015612f80576020820181803683370190505b509050805160001415612f935792915050565b6000816020019050612fae84602001518286600001516133c0565b5092915050565b8051600090602114612fc657600080fd5b60008083602001516001612fda91906141b6565b51949350505050565b60008080612ff0866122e5565b90506000815167ffffffffffffffff81111561300e5761300e6136a0565b6040519080825280601f01601f191660200182016040528015613038576020820181803683370190505b509050845b825161304990876141b6565b8110156130d457600087828151811061306457613064613e36565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016905080836130998985614183565b815181106130a9576130a9613e36565b60200101906001600160f81b031916908160001a9053505080806130cc9061413a565b91505061303d565b508080519060200120828051906020012014156130f457815192506130f9565b600092505b509095945050505050565b600060208251613114919061419e565b156131315760405162461bcd60e51b8152600401610a7a90614617565b600060208351613141919061416b565b905061314e8160026145d4565b851061316c5760405162461bcd60e51b8152600401610a7a9061465b565b60008660205b8551811161320a5785810151925061318b60028961419e565b6131bf5781836040516020016131a292919061466b565b6040516020818303038152906040528051906020012091506131eb565b82826040516020016131d292919061466b565b6040516020818303038152906040528051906020012091505b6131f660028961416b565b97506132036020826141b6565b9050613172565b509094149695505050505050565b8051600090811a60808110156132315750600092915050565b60b881108061324c575060c0811080159061324c575060f881105b1561325a5750600192915050565b60c08110156132875761326f600160b8614691565b61327c9060ff1682614183565b6114869060016141b6565b61326f600160f8614691565b50919050565b80516000906132aa57506000919050565b6000806132ba8460200151613218565b84602001516132c991906141b6565b90506000846000015185602001516132e191906141b6565b90505b80821015613313576132f58261331c565b6132ff90836141b6565b91508261330b8161413a565b9350506132e4565b50909392505050565b80516000908190811a60808110156133375760019150612fae565b60b881101561335d5761334b608082614183565b6133569060016141b6565b9150612fae565b60c081101561338a5760b78103600185019450806020036101000a85510460018201810193505050612fae565b60f881101561339e5761334b60c082614183565b60019390930151602084900360f7016101000a900490920160f5190192915050565b806133ca57505050565b6020811061340257825182526133e16020846141b6565b92506133ee6020836141b6565b91506133fb602082614183565b90506133ca565b80612ee257505050565b82805461341890613ca6565b90600052602060002090601f01602090048101928261343a5760008555613480565b82601f106134535782800160ff19823516178555613480565b82800160010185558215613480579182015b82811115613480578235825591602001919060010190613465565b5061348c929150613490565b5090565b5b8082111561348c5760008155600101613491565b6001600160e01b031981165b8114610f1957600080fd5b8035610a46816134a5565b6000602082840312156134dc576134dc600080fd5b6000611d6184846134bc565b8015155b82525050565b60208101610a4682846134e8565b60005b8381101561351b578181015183820152602001613503565b838111156115dd5750506000910152565b6000613536825190565b80845260208401935061354d818560208601613500565b601f01601f19169290920192915050565b60208082528101611486818461352c565b806134b1565b8035610a468161356f565b60006020828403121561359557613595600080fd5b6000611d618484613575565b60006001600160a01b038216610a46565b6134ec816135a1565b60208101610a4682846135b2565b6134b1816135a1565b8035610a46816135c9565b600080604083850312156135f3576135f3600080fd5b60006135ff85856135d2565b925050602061361085828601613575565b9150509250929050565b806134ec565b60208101610a46828461361a565b6000806040838503121561364457613644600080fd5b60006135ff8585613575565b60008060006060848603121561366857613668600080fd5b600061367486866135d2565b9350506020613685868287016135d2565b925050604061369686828701613575565b9150509250925092565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156136dc576136dc6136a0565b6040525050565b60006136ee60405190565b90506136fa82826136b6565b919050565b600067ffffffffffffffff821115613719576137196136a0565b601f19601f83011660200192915050565b82818337506000910152565b6000613749613744846136ff565b6136e3565b90508281526020810184848401111561376457613764600080fd5b6110d184828561372a565b600082601f83011261378357613783600080fd5b8135611d61848260208601613736565b6000602082840312156137a8576137a8600080fd5b813567ffffffffffffffff8111156137c2576137c2600080fd5b611d618482850161376f565b60008083601f8401126137e3576137e3600080fd5b50813567ffffffffffffffff8111156137fe576137fe600080fd5b60208301915083600182028301111561381957613819600080fd5b9250929050565b6000806020838503121561383657613836600080fd5b823567ffffffffffffffff81111561385057613850600080fd5b61385c858286016137ce565b92509250509250929050565b600067ffffffffffffffff821115613882576138826136a0565b5060209081020190565b600061389a61374484613868565b838152905060208082019084028301858111156138b9576138b9600080fd5b835b818110156138dd57806138ce8882613575565b845250602092830192016138bb565b5050509392505050565b600082601f8301126138fb576138fb600080fd5b8135611d6184826020860161388c565b60006020828403121561392057613920600080fd5b813567ffffffffffffffff81111561393a5761393a600080fd5b611d61848285016138e7565b67ffffffffffffffff81166134ec565b62ffffff81166134ec565b8051608083019061397284826135b2565b5060208201516139856020850182613946565b50604082015161399860408501826134e8565b5060608201516115dd6060850182613956565b60006139b78383613961565b505060800190565b60006139c9825190565b80845260209384019383018060005b838110156139fd5781516139ec88826139ab565b9750602083019250506001016139d8565b509495945050505050565b6020808252810161148681846139bf565b600060208284031215613a2e57613a2e600080fd5b6000611d6184846135d2565b6000613a46838361361a565b505060200190565b6000613a58825190565b80845260209384019383018060005b838110156139fd578151613a7b8882613a3a565b975060208301925050600101613a67565b602080825281016114868184613a4e565b600080600060608486031215613ab557613ab5600080fd5b6000613ac186866135d2565b935050602061368586828701613575565b6000610a46826135a1565b6000610a4682613ad2565b6134ec81613add565b60208101610a468284613ae8565b8015156134b1565b8035610a4681613aff565b60008060408385031215613b2857613b28600080fd5b6000613b3485856135d2565b925050602061361085828601613b07565b60008060008060808587031215613b5e57613b5e600080fd5b6000613b6a87876135d2565b9450506020613b7b878288016135d2565b9350506040613b8c87828801613575565b925050606085013567ffffffffffffffff811115613bac57613bac600080fd5b613bb88782880161376f565b91505092959194509250565b60808101610a468284613961565b60008060408385031215613be857613be8600080fd5b6000613bf485856135d2565b9250506020613610858286016135d2565b601681526000602082017f4d696e74696e67206973206e6f74206163746976652e00000000000000000000815291505b5060200190565b60208082528101610a4681613c05565b601181526000602082017f4e6f7420656e6f7567682066756e64732e00000000000000000000000000000081529150613c35565b60208082528101610a4681613c4c565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613cba57607f821691505b6020821081141561329357613293613c90565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000613c35565b60208082528101610a4681613ccd565b600081610a46565b600381526000602082016239393960e81b81529150613c35565b60208082528101610a4681613d17565b8051610a468161356f565b6000613d5a613744846136ff565b905082815260208101848484011115613d7557613d75600080fd5b6110d1848285613500565b600082601f830112613d9457613d94600080fd5b8151611d61848260208601613d4c565b60008060408385031215613dba57613dba600080fd5b6000613dc68585613d41565b925050602083015167ffffffffffffffff811115613de657613de6600080fd5b61361085828601613d80565b601181526000602082017f494e56414c49445f53594e435f5459504500000000000000000000000000000081529150613c35565b60208082528101610a4681613df2565b634e487b7160e01b600052603260045260246000fd5b60008154613e5981613ca6565b600182168015613e705760018114613e815761249a565b60ff1983168652818601935061249a565b60008581526020902060005b83811015613ea957815488820152600190910190602001613e8d565b505050939093019392505050565b6000613ec1825190565b613ecf818560208601613500565b9290920192915050565b6000613ee58285613e4c565b9150611d618284613eb7565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291505b5060400190565b60208082528101610a4681613ef1565b600060208284031215613f5c57613f5c600080fd5b6000611d618484613d41565b60808101613f7682876135b2565b613f83602083018661361a565b613f90604083018561361a565b613f9d606083018461361a565b95945050505050565b60408101613fb4828561361a565b8181036020830152611d61818461352c565b8051610a46816135c9565b6000613fdf61374484613868565b83815290506020808201908402830185811115613ffe57613ffe600080fd5b835b818110156138dd57806140138882613d41565b84525060209283019201614000565b600082601f83011261403657614036600080fd5b8151611d61848260208601613fd1565b6000806040838503121561405c5761405c600080fd5b60006140688585613fc6565b925050602083015167ffffffffffffffff81111561408857614088600080fd5b61361085828601614022565b604081016140a282856135b2565b8181036020830152611d618184613a4e565b608081016140c282876135b2565b6140cf60208301866135b2565b6140dc604083018561361a565b81810360608301526140ee818461352c565b9695505050505050565b8051610a46816134a5565b60006020828403121561411857614118600080fd5b6000611d6184846140f8565b634e487b7160e01b600052601160045260246000fd5b600060001982141561414e5761414e614124565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000825b92508261417e5761417e614155565b500490565b6000825b92508282101561419957614199614124565b500390565b6000825b9250826141b1576141b1614155565b500690565b600082198211156141c9576141c9614124565b500190565b60006141da828661361a565b6020820191506141ea8285613eb7565b91506141f6828461361a565b506020019392505050565b602481526000602082017f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434581526314d4d15160e21b60208201529150613f30565b60208082528101610a4681614201565b602581526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f54815264155393915360da1b60208201529150613f30565b60208082528101610a4681614252565b602381526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505281526227a7a360e91b60208201529150613f30565b60208082528101610a46816142a4565b601f81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e41545552450081529150613c35565b60208082528101610a46816142f4565b60006020828403121561434d5761434d600080fd5b815167ffffffffffffffff81111561436757614367600080fd5b611d6184828501613d80565b60408101613fb482856135b2565b600081600019048311821515161561439b5761439b614124565b500290565b600080600080600060a086880312156143bb576143bb600080fd5b60006143c78888613d41565b95505060206143d888828901613d41565b94505060406143e988828901613d41565b93505060606143fa88828901613d41565b925050608061440b88828901613fc6565b9150509295509295909350565b6000614424828761361a565b602082019150614434828661361a565b602082019150614444828561361a565b602082019150614454828461361a565b50602001949350505050565b601c81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f4845414445520000000081529150613c35565b60208082528101610a4681614460565b600060ff8216915060ff83166141a2565b600060ff8216915060ff831661416f565b80825b6001851115614505578086048111156144e4576144e4614124565b60018516156144f257908102905b80026144fe8560011c90565b94506144c9565b94509492505050565b60008261451d57506001611486565b8161452a57506000611486565b8160018114614540576002811461454a57614577565b6001915050611486565b60ff84111561455b5761455b614124565b8360020a91508482111561457157614571614124565b50611486565b5060208310610133831016604e8410600b84101617156145aa575081810a838111156145a5576145a5614124565b611486565b6145b784848460016144c6565b925090508184048111156145cd576145cd614124565b0292915050565b6000611486600019848461450e565b601481526000602082017f496e76616c69642070726f6f66206c656e67746800000000000000000000000081529150613c35565b60208082528101610a46816145e3565b601581526000602082017f4c65616620696e64657820697320746f6f20626967000000000000000000000081529150613c35565b60208082528101610a4681614627565b6000614677828561361a565b602082019150614687828461361a565b5060200192915050565b600060ff8216915060ff831661418756fea26469706673582212205cafa093b57304849ece16fc30d0fa2b001bf38ea7400ad3ae6f3c042c42c5b264736f6c63430008090033697066733a2f2f6261667962656967776c666978677771377769343533673766346a37357734746c643774766d6663786b687164667368656d6c77336468796267692f00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2000000000000000000000000bd24a76f4135f930f5c49f6c30e0e30a61b975370000000000000000000000005e2454f33c3da3aa30eabc502255f66a6d72adc8

Deployed Bytecode

0x6080604052600436106103345760003560e01c806370a08231116101b0578063b88d4fde116100ec578063d629c86d11610095578063ea07e68a1161006f578063ea07e68a1461097a578063f0f442601461099a578063f2fde38b146109ba578063f953cec7146109da57600080fd5b8063d629c86d146108fb578063de9b771f14610911578063e985e9c51461093157600080fd5b8063c23dc68f116100c6578063c23dc68f1461087a578063c3b2ec49146108a7578063c87b56dd146108db57600080fd5b8063b88d4fde14610825578063b8f7a66514610845578063c0857ba01461085a57600080fd5b8063972c492811610159578063a22cb46511610133578063a22cb465146107bd578063a90b7755146107dd578063a9cdd60d146107e5578063aea4e49e1461080557600080fd5b8063972c49281461075057806399a2557a146107705780639a9e2e4a1461079057600080fd5b80638622a6891161018a5780638622a689146107075780638da5cb5b1461071d57806395d89b411461073b57600080fd5b806370a08231146106a5578063715018a6146106c55780638462151c146106da57600080fd5b80633e9c7f691161027f5780635bbb2177116102285780636255c3ac116102025780636255c3ac146106185780636352211e146106385780636e321ce4146106585780636ed1dc791461068557600080fd5b80635bbb21771461059b578063607f2d42146105c857806361d027b3146105f857600080fd5b806353b0e17d1161025957806353b0e17d1461054f57806353f8bb9a1461056557806355f804b31461057b57600080fd5b80633e9c7f69146104db57806342842e0e1461050f57806342966c681461052f57600080fd5b80630f867751116102e157806323b872dd116102bb57806323b872dd146104865780633ccfd60b146104a65780633d58e62e146104bb57600080fd5b80630f8677511461042957806318160ddd146104495780631b8886571461046657600080fd5b8063081812fc11610312578063081812fc1461039b578063095ea7b3146103c85780630e387de6146103e857600080fd5b806301ffc9a7146103395780630245b80f1461036f57806306fdde0314610379575b600080fd5b34801561034557600080fd5b506103596103543660046134c7565b6109fa565b60405161036691906134f2565b60405180910390f35b610377610a4c565b005b34801561038557600080fd5b5061038e610ab2565b604051610366919061355e565b3480156103a757600080fd5b506103bb6103b6366004613580565b610b44565b60405161036691906135bb565b3480156103d457600080fd5b506103776103e33660046135dd565b610b88565b3480156103f457600080fd5b5061041c7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6040516103669190613620565b34801561043557600080fd5b5061037761044436600461362e565b610c45565b34801561045557600080fd5b50600554600454036000190161041c565b34801561047257600080fd5b50610377610481366004613580565b610c7a565b34801561049257600080fd5b506103776104a1366004613650565b610ca9565b3480156104b257600080fd5b50610377610e6e565b3480156104c757600080fd5b506103776104d6366004613793565b610f1c565b3480156104e757600080fd5b5061041c7f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae369025281565b34801561051b57600080fd5b5061037761052a366004613650565b610faf565b34801561053b57600080fd5b5061037761054a366004613580565b610fca565b34801561055b57600080fd5b5061041c60105481565b34801561057157600080fd5b5061041c60135481565b34801561058757600080fd5b50610377610596366004613820565b610fd5565b3480156105a757600080fd5b506105bb6105b636600461390b565b61100b565b6040516103669190613a08565b3480156105d457600080fd5b506103596105e3366004613580565b60036020526000908152604090205460ff1681565b34801561060457600080fd5b506012546103bb906001600160a01b031681565b34801561062457600080fd5b50610377610633366004613580565b6110d9565b34801561064457600080fd5b506103bb610653366004613580565b611108565b34801561066457600080fd5b5061041c610673366004613580565b60156020526000908152604090205481565b34801561069157600080fd5b506103776106a0366004613a19565b611113565b3480156106b157600080fd5b5061041c6106c0366004613a19565b61115f565b3480156106d157600080fd5b506103776111ae565b3480156106e657600080fd5b506106fa6106f5366004613a19565b6111e2565b6040516103669190613a8c565b34801561071357600080fd5b5061041c60145481565b34801561072957600080fd5b50600c546001600160a01b03166103bb565b34801561074757600080fd5b5061038e6112f2565b34801561075c57600080fd5b506002546103bb906001600160a01b031681565b34801561077c57600080fd5b506106fa61078b366004613a9d565b611301565b34801561079c57600080fd5b50600e546107b0906001600160a01b031681565b6040516103669190613af1565b3480156107c957600080fd5b506103776107d8366004613b12565b61148d565b6103776114a6565b3480156107f157600080fd5b50610377610800366004613a19565b611501565b34801561081157600080fd5b50610377610820366004613a19565b61154d565b34801561083157600080fd5b50610377610840366004613b45565b611599565b34801561085157600080fd5b506103596115e3565b34801561086657600080fd5b506001546107b0906001600160a01b031681565b34801561088657600080fd5b5061089a610895366004613580565b6115fc565b6040516103669190613bc4565b3480156108b357600080fd5b5061041c7f306c27fde4d30e93105afde87f5773b4557f5fcbd91b3f18aedef29a5e80fd2881565b3480156108e757600080fd5b5061038e6108f6366004613580565b611684565b34801561090757600080fd5b5061041c60115481565b34801561091d57600080fd5b506000546107b0906001600160a01b031681565b34801561093d57600080fd5b5061035961094c366004613bd2565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b34801561098657600080fd5b50600d546107b0906001600160a01b031681565b3480156109a657600080fd5b506103776109b5366004613a19565b6116ee565b3480156109c657600080fd5b506103776109d5366004613a19565b61173a565b3480156109e657600080fd5b506103776109f5366004613793565b611793565b60006301ffc9a760e01b6001600160e01b031983161480610a2b57506380ac58cd60e01b6001600160e01b03198316145b80610a465750635b5e139f60e01b6001600160e01b03198316145b92915050565b60135442118015610a5e575060145442105b610a835760405162461bcd60e51b8152600401610a7a90613c3c565b60405180910390fd5b601154341015610aa55760405162461bcd60e51b8152600401610a7a90613c80565b610ab03360026117ad565b565b606060068054610ac190613ca6565b80601f0160208091040260200160405190810160405280929190818152602001828054610aed90613ca6565b8015610b3a5780601f10610b0f57610100808354040283529160200191610b3a565b820191906000526020600020905b815481529060010190602001808311610b1d57829003601f168201915b5050505050905090565b6000610b4f826118cc565b610b6c576040516333d1c03960e21b815260040160405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b6000610b9382611108565b9050336001600160a01b03821614610be9576001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff16610be9576040516367d9dca160e11b815260040160405180910390fd5b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600c546001600160a01b03163314610c6f5760405162461bcd60e51b8152600401610a7a90613cff565b601391909155601455565b600c546001600160a01b03163314610ca45760405162461bcd60e51b8152600401610a7a90613cff565b601155565b6000610cb482611901565b9050836001600160a01b0316816001600160a01b031614610ce75760405162a1148160e81b815260040160405180910390fd5b6000828152600a602052604090208054610d138187335b6001600160a01b039081169116811491141790565b610d5b576001600160a01b0386166000908152600b6020908152604080832033845290915290205460ff16610d5b57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610d8257604051633a954ecd60e21b815260040160405180910390fd5b610d8f868686600161196a565b8015610d9a57600082555b6001600160a01b038681166000908152600960205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260086020526040902055600160e11b8316610e255760018401600081815260086020526040902054610e23576004548114610e235760008181526008602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600c546001600160a01b03163314610e985760405162461bcd60e51b8152600401610a7a90613cff565b6012546040516000916001600160a01b0316904790610eb690613d0f565b60006040518083038185875af1925050503d8060008114610ef3576040519150601f19603f3d011682016040523d82523d6000602084013e610ef8565b606091505b5050905080610f195760405162461bcd60e51b8152600401610a7a90613d31565b50565b600c546001600160a01b03163314610f465760405162461bcd60e51b8152600401610a7a90613cff565b60008082806020019051810190610f5d9190613da4565b915091507f306c27fde4d30e93105afde87f5773b4557f5fcbd91b3f18aedef29a5e80fd28821415610f9757610f92816119ad565b505050565b60405162461bcd60e51b8152600401610a7a90613e26565b610f9283838360405180602001604052806000815250611599565b610f19816001611a31565b600c546001600160a01b03163314610fff5760405162461bcd60e51b8152600401610a7a90613cff565b610f92600f838361340c565b805160609060008167ffffffffffffffff81111561102b5761102b6136a0565b60405190808252806020026020018201604052801561107d57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816110495790505b50905060005b8281146110d1576110ac85828151811061109f5761109f613e36565b60200260200101516115fc565b8282815181106110be576110be613e36565b6020908102919091010152600101611083565b509392505050565b600c546001600160a01b031633146111035760405162461bcd60e51b8152600401610a7a90613cff565b601055565b6000610a4682611901565b600c546001600160a01b0316331461113d5760405162461bcd60e51b8152600401610a7a90613cff565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216611188576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526009602052604090205467ffffffffffffffff1690565b600c546001600160a01b031633146111d85760405162461bcd60e51b8152600401610a7a90613cff565b610ab06000611ba0565b606060008060006111f28561115f565b905060008167ffffffffffffffff81111561120f5761120f6136a0565b604051908082528060200260200182016040528015611238578160200160208202803683370190505b50905061126560408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146112e65761127881611bf2565b9150816040015115611289576112de565b81516001600160a01b03161561129e57815194505b876001600160a01b0316856001600160a01b031614156112de57808387806001019850815181106112d1576112d1613e36565b6020026020010181815250505b600101611268565b50909695505050505050565b606060078054610ac190613ca6565b606081831061132357604051631960ccad60e11b815260040160405180910390fd5b60008061132f60045490565b9050600185101561133f57600194505b8084111561134b578093505b60006113568761115f565b905084861015611375578585038181101561136f578091505b50611379565b5060005b60008167ffffffffffffffff811115611394576113946136a0565b6040519080825280602002602001820160405280156113bd578160200160208202803683370190505b509050816113d057935061148692505050565b60006113db886115fc565b9050600081604001516113ec575080515b885b8881141580156113fe5750848714155b1561147a5761140c81611bf2565b925082604001511561141d57611472565b82516001600160a01b03161561143257825191505b8a6001600160a01b0316826001600160a01b03161415611472578084888060010199508151811061146557611465613e36565b6020026020010181815250505b6001016113ee565b50505092835250909150505b9392505050565b6040516301473cbb60e71b815260040160405180910390fd5b601354421180156114b8575060145442105b6114d45760405162461bcd60e51b8152600401610a7a90613c3c565b6010543410156114f65760405162461bcd60e51b8152600401610a7a90613c80565b610ab03360016117ad565b600c546001600160a01b0316331461152b5760405162461bcd60e51b8152600401610a7a90613cff565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b600c546001600160a01b031633146115775760405162461bcd60e51b8152600401610a7a90613cff565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6115a4848484610ca9565b6001600160a01b0383163b156115dd576115c084848484611c71565b6115dd576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000601354421180156115f7575060145442105b905090565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061165557506004548310155b156116605792915050565b61166983611bf2565b905080604001511561167b5792915050565b61148683611d69565b606061168f826118cc565b6116ac57604051636f96cda160e11b815260040160405180910390fd5b600082815260156020526040902054600f906116c790611de1565b6040516020016116d8929190613ed9565b6040516020818303038152906040529050919050565b600c546001600160a01b031633146117185760405162461bcd60e51b8152600401610a7a90613cff565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b600c546001600160a01b031633146117645760405162461bcd60e51b8152600401610a7a90613cff565b6001600160a01b03811661178a5760405162461bcd60e51b8152600401610a7a90613f37565b610f1981611ba0565b600061179e82611edf565b90506117a981610f46565b5050565b60006117b860045490565b600e5460405163de325b8f60e01b81529192506000916001600160a01b039091169063de325b8f906117ee9087906004016135bb565b60206040518083038186803b15801561180657600080fd5b505afa15801561181a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183e9190613f47565b905061184b8460016120df565b60008281526015602090815260409182902085905590516115dd917f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae36902529161189a91889187918991889101613f68565b60408051601f19818403018152908290526118b89291602001613fa6565b6040516020818303038152906040526121c9565b6000816001111580156118e0575060045482105b8015610a46575050600090815260086020526040902054600160e01b161590565b600081806001116119515760045481101561195157600081815260086020526040902054600160e01b811661194f575b80611486575060001901600081815260086020526040902054611931565b505b604051636f96cda160e11b815260040160405180910390fd5b6001600160a01b0383161580159061198a57506001600160a01b03841615155b156119a85760405163399f41e760e01b815260040160405180910390fd5b6115dd565b600080828060200190518101906119c49190614046565b600d546040516311b211c160e31b81529294509092506001600160a01b031690638d908e08906119fa9085908590600401614094565b600060405180830381600087803b158015611a1457600080fd5b505af1158015611a28573d6000803e3d6000fd5b50505050505050565b6000611a3c83611901565b905080600080611a5a866000908152600a6020526040902080549091565b915091508415611ab757611a6f818433610cfe565b611ab7576001600160a01b0383166000908152600b6020908152604080832033845290915290205460ff16611ab757604051632ce44b5f60e11b815260040160405180910390fd5b611ac583600088600161196a565b8015611ad057600082555b6001600160a01b038316600081815260096020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260086020526040902055600160e11b8416611b575760018601600081815260086020526040902054611b55576004548114611b555760008181526008602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060058054600101905550505050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260086020526040902054610a4690604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611ca69033908990889088906004016140b4565b602060405180830381600087803b158015611cc057600080fd5b505af1925050508015611cf0575060408051601f3d908101601f19168201909252611ced91810190614103565b60015b611d4b573d808015611d1e576040519150601f19603f3d011682016040523d82523d6000602084013e611d23565b606091505b508051611d43576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152610a46611d9983611901565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b606081611e055750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e2f5780611e198161413a565b9150611e289050600a8361416b565b9150611e09565b60008167ffffffffffffffff811115611e4a57611e4a6136a0565b6040519080825280601f01601f191660200182016040528015611e74576020820181803683370190505b5090505b8415611d6157611e89600183614183565b9150611e96600a8661419e565b611ea19060306141b6565b60f81b818381518110611eb657611eb6613e36565b60200101906001600160f81b031916908160001a905350611ed8600a8661416b565b9450611e78565b60606000611eec83612234565b90506000611ef982612293565b90506000611f06836122bc565b9050600081611f14846122e5565b611f1d866124a3565b604051602001611f2f939291906141ce565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff1615611f775760405162461bcd60e51b8152600401610a7a90614242565b6000818152600360205260408120805460ff19166001179055611f99856124bf565b90506000611fa682612609565b9050611fb181612699565b6002546001600160a01b03908116911614611fde5760405162461bcd60e51b8152600401610a7a90614294565b6000611fe9876126c2565b9050612009611ff9846020015190565b876120038a6126de565b846126fa565b6120255760405162461bcd60e51b8152600401610a7a906142e4565b61205385612032896129b0565b61203b8a6129cc565b846120458c6129e8565b61204e8d612a04565b612a20565b50600061205f83612b28565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036612095612090836000612b64565b612b9c565b146120b25760405162461bcd60e51b8152600401610a7a90614328565b60006120bd84612c17565b8060200190518101906120d09190614338565b9b9a5050505050505050505050565b6004546001600160a01b03831661210857604051622e076360e81b815260040160405180910390fd5b816121265760405163b562e8dd60e01b815260040160405180910390fd5b612133600084838561196a565b6001600160a01b038316600081815260096020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260086020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821061217d5760045550505050565b60005460025460405163b472047760e01b81526001600160a01b039283169263b4720477926121ff929116908590600401614373565b600060405180830381600087803b15801561221957600080fd5b505af115801561222d573d6000803e3d6000fd5b5050505050565b604080516020810190915260608152600061227e6122798460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b612c33565b60408051602081019091529081529392505050565b6060610a4682600001516008815181106122af576122af613e36565b6020026020010151612d49565b6000610a4682600001516002815181106122d8576122d8613e36565b6020026020010151612b9c565b60408051602081019091526000815281516060919015610a465760008061230d600086612de6565b60f81c9050600181148061232457508060ff166003145b156123cc576001855160026123399190614381565b6123439190614183565b67ffffffffffffffff81111561235b5761235b6136a0565b6040519080825280601f01601f191660200182016040528015612385576020820181803683370190505b5092506000612395600187612de6565b905080846000815181106123ab576123ab613e36565b60200101906001600160f81b031916908160001a9053506001925050612430565b6002855160026123dc9190614381565b6123e69190614183565b67ffffffffffffffff8111156123fe576123fe6136a0565b6040519080825280601f01601f191660200182016040528015612428576020820181803683370190505b509250600091505b60ff82165b835181101561249a5761245f61244e60ff851683614183565b6124599060026141b6565b87612de6565b84828151811061247157612471613e36565b60200101906001600160f81b031916908160001a905350806124928161413a565b915050612435565b50505092915050565b6000610a4682600001516009815181106122d8576122d8613e36565b6124e360405180606001604052806060815260200160608152602001600081525090565b6124fd82600001516006815181106122af576122af613e36565b60208281018290526040805180820182526000808252908301528051808201909152825181529181019082015261253381612e67565b156125485761254181612c33565b82526125f5565b6020820151805160009061255e90600190614183565b67ffffffffffffffff811115612576576125766136a0565b6040519080825280601f01601f1916602001820160405280156125a0576020820181803683370190505b5090506000808360210191508260200190506125be82828551612ea0565b6040805180820182526000808252602091820152815180830190925284518252808501908201526125ee90612c33565b8652505050505b6125fe836124a3565b604083015250919050565b604080516080810182526000918101828152606080830193909352815260208101919091526000612657836000015160038151811061264a5761264a613e36565b6020026020010151612c33565b83604001518151811061266c5761266c613e36565b60200260200101519050604051806040016040528082815260200161269083612c33565b90529392505050565b6000610a4682602001516000815181106126b5576126b5613e36565b6020026020010151612f1b565b6000610a4682600001516005815181106122d8576122d8613e36565b6060610a4682600001516007815181106122af576122af613e36565b60008061272e8460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b9050600061273b82612c33565b90506060808560008061274d8b6122e5565b9050805160001415612769576000975050505050505050611d61565b60005b86518110156129a057815183111561278f57600098505050505050505050611d61565b6127b18782815181106127a4576127a4613e36565b6020026020010151612f35565b9550858051906020012084146127d257600098505050505050505050611d61565b6127e787828151811061264a5761264a613e36565b94508451601114156128bc578151831415612849578c8051906020012061281a866010815181106122af576122af613e36565b80519060200120141561283857600198505050505050505050611d61565b600098505050505050505050611d61565b600082848151811061285d5761285d613e36565b016020015160f81c905060108111156128825760009950505050505050505050611d61565b6128a7868260ff168151811061289a5761289a613e36565b6020026020010151612fb5565b94506128b46001856141b6565b93505061298e565b8451600214156128385760006128e86128e1876000815181106122af576122af613e36565b8486612fe3565b83519091506128f782866141b6565b141561294c578d8051906020012061291b876001815181106122af576122af613e36565b80519060200120141561293a5760019950505050505050505050611d61565b60009950505050505050505050611d61565b806129635760009950505050505050505050611d61565b61296d81856141b6565b93506129858660018151811061289a5761289a613e36565b945061298e9050565b806129988161413a565b91505061276c565b5050505050505050949350505050565b6000610a4682600001516003815181106122d8576122d8613e36565b6000610a4682600001516004815181106122d8576122d8613e36565b6000610a4682600001516000815181106122d8576122d8613e36565b6060610a4682600001516001815181106122af576122af613e36565b6001546040516320a9cea560e11b81526000918291829182916001600160a01b03909116906341539d4a90612a59908990600401613620565b60a06040518083038186803b158015612a7157600080fd5b505afa158015612a85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa991906143a0565b5093505092509250612aff828b612ac09190614183565b84878d8d8d8d604051602001612ad99493929190614418565b60405160208183030381529060405280519060200120613104909392919063ffffffff16565b612b1b5760405162461bcd60e51b8152600401610a7a90614494565b9998505050505050505050565b6040805160208101909152606081526040518060200160405280612b5c846020015160018151811061264a5761264a613e36565b905292915050565b60408051808201909152600080825260208201528251805183908110612b8c57612b8c613e36565b6020026020010151905092915050565b805160009015801590612bb157508151602110155b612bba57600080fd5b6000612bc98360200151613218565b90506000818460000151612bdd9190614183565b9050600080838660200151612bf291906141b6565b9050805191506020831015612c0e57826020036101000a820491505b50949350505050565b6060610a4682602001516002815181106122af576122af613e36565b6060612c3e82612e67565b612c4757600080fd5b6000612c5283613299565b905060008167ffffffffffffffff811115612c6f57612c6f6136a0565b604051908082528060200260200182016040528015612cb457816020015b6040805180820190915260008082526020820152815260200190600190039081612c8d5790505b5090506000612cc68560200151613218565b8560200151612cd591906141b6565b90506000805b84811015612d3e57612cec8361331c565b9150604051806040016040528083815260200184815250848281518110612d1557612d15613e36565b6020908102919091010152612d2a82846141b6565b925080612d368161413a565b915050612cdb565b509195945050505050565b8051606090612d5757600080fd5b6000612d668360200151613218565b90506000818460000151612d7a9190614183565b905060008167ffffffffffffffff811115612d9757612d976136a0565b6040519080825280601f01601f191660200182016040528015612dc1576020820181803683370190505b5090506000816020019050612c0e848760200151612ddf91906141b6565b82856133c0565b6000612df360028461419e565b15612e2d57601082612e0660028661416b565b81518110612e1657612e16613e36565b0160200151612e28919060f81c6144a4565b612e5d565b601082612e3b60028661416b565b81518110612e4b57612e4b613e36565b0160200151612e5d919060f81c6144b5565b60f81b9392505050565b8051600090612e7857506000919050565b6020820151805160001a9060c0821015612e96575060009392505050565b5060019392505050565b80612eaa57505050565b60208110612ee25782518252612ec16020846141b6565b9250612ece6020836141b6565b9150612edb602082614183565b9050612eaa565b60006001612ef1836020614183565b612efd906101006145d4565b612f079190614183565b935183518516941916939093179091525050565b8051600090601514612f2c57600080fd5b610a4682612b9c565b60606000826000015167ffffffffffffffff811115612f5657612f566136a0565b6040519080825280601f01601f191660200182016040528015612f80576020820181803683370190505b509050805160001415612f935792915050565b6000816020019050612fae84602001518286600001516133c0565b5092915050565b8051600090602114612fc657600080fd5b60008083602001516001612fda91906141b6565b51949350505050565b60008080612ff0866122e5565b90506000815167ffffffffffffffff81111561300e5761300e6136a0565b6040519080825280601f01601f191660200182016040528015613038576020820181803683370190505b509050845b825161304990876141b6565b8110156130d457600087828151811061306457613064613e36565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016905080836130998985614183565b815181106130a9576130a9613e36565b60200101906001600160f81b031916908160001a9053505080806130cc9061413a565b91505061303d565b508080519060200120828051906020012014156130f457815192506130f9565b600092505b509095945050505050565b600060208251613114919061419e565b156131315760405162461bcd60e51b8152600401610a7a90614617565b600060208351613141919061416b565b905061314e8160026145d4565b851061316c5760405162461bcd60e51b8152600401610a7a9061465b565b60008660205b8551811161320a5785810151925061318b60028961419e565b6131bf5781836040516020016131a292919061466b565b6040516020818303038152906040528051906020012091506131eb565b82826040516020016131d292919061466b565b6040516020818303038152906040528051906020012091505b6131f660028961416b565b97506132036020826141b6565b9050613172565b509094149695505050505050565b8051600090811a60808110156132315750600092915050565b60b881108061324c575060c0811080159061324c575060f881105b1561325a5750600192915050565b60c08110156132875761326f600160b8614691565b61327c9060ff1682614183565b6114869060016141b6565b61326f600160f8614691565b50919050565b80516000906132aa57506000919050565b6000806132ba8460200151613218565b84602001516132c991906141b6565b90506000846000015185602001516132e191906141b6565b90505b80821015613313576132f58261331c565b6132ff90836141b6565b91508261330b8161413a565b9350506132e4565b50909392505050565b80516000908190811a60808110156133375760019150612fae565b60b881101561335d5761334b608082614183565b6133569060016141b6565b9150612fae565b60c081101561338a5760b78103600185019450806020036101000a85510460018201810193505050612fae565b60f881101561339e5761334b60c082614183565b60019390930151602084900360f7016101000a900490920160f5190192915050565b806133ca57505050565b6020811061340257825182526133e16020846141b6565b92506133ee6020836141b6565b91506133fb602082614183565b90506133ca565b80612ee257505050565b82805461341890613ca6565b90600052602060002090601f01602090048101928261343a5760008555613480565b82601f106134535782800160ff19823516178555613480565b82800160010185558215613480579182015b82811115613480578235825591602001919060010190613465565b5061348c929150613490565b5090565b5b8082111561348c5760008155600101613491565b6001600160e01b031981165b8114610f1957600080fd5b8035610a46816134a5565b6000602082840312156134dc576134dc600080fd5b6000611d6184846134bc565b8015155b82525050565b60208101610a4682846134e8565b60005b8381101561351b578181015183820152602001613503565b838111156115dd5750506000910152565b6000613536825190565b80845260208401935061354d818560208601613500565b601f01601f19169290920192915050565b60208082528101611486818461352c565b806134b1565b8035610a468161356f565b60006020828403121561359557613595600080fd5b6000611d618484613575565b60006001600160a01b038216610a46565b6134ec816135a1565b60208101610a4682846135b2565b6134b1816135a1565b8035610a46816135c9565b600080604083850312156135f3576135f3600080fd5b60006135ff85856135d2565b925050602061361085828601613575565b9150509250929050565b806134ec565b60208101610a46828461361a565b6000806040838503121561364457613644600080fd5b60006135ff8585613575565b60008060006060848603121561366857613668600080fd5b600061367486866135d2565b9350506020613685868287016135d2565b925050604061369686828701613575565b9150509250925092565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156136dc576136dc6136a0565b6040525050565b60006136ee60405190565b90506136fa82826136b6565b919050565b600067ffffffffffffffff821115613719576137196136a0565b601f19601f83011660200192915050565b82818337506000910152565b6000613749613744846136ff565b6136e3565b90508281526020810184848401111561376457613764600080fd5b6110d184828561372a565b600082601f83011261378357613783600080fd5b8135611d61848260208601613736565b6000602082840312156137a8576137a8600080fd5b813567ffffffffffffffff8111156137c2576137c2600080fd5b611d618482850161376f565b60008083601f8401126137e3576137e3600080fd5b50813567ffffffffffffffff8111156137fe576137fe600080fd5b60208301915083600182028301111561381957613819600080fd5b9250929050565b6000806020838503121561383657613836600080fd5b823567ffffffffffffffff81111561385057613850600080fd5b61385c858286016137ce565b92509250509250929050565b600067ffffffffffffffff821115613882576138826136a0565b5060209081020190565b600061389a61374484613868565b838152905060208082019084028301858111156138b9576138b9600080fd5b835b818110156138dd57806138ce8882613575565b845250602092830192016138bb565b5050509392505050565b600082601f8301126138fb576138fb600080fd5b8135611d6184826020860161388c565b60006020828403121561392057613920600080fd5b813567ffffffffffffffff81111561393a5761393a600080fd5b611d61848285016138e7565b67ffffffffffffffff81166134ec565b62ffffff81166134ec565b8051608083019061397284826135b2565b5060208201516139856020850182613946565b50604082015161399860408501826134e8565b5060608201516115dd6060850182613956565b60006139b78383613961565b505060800190565b60006139c9825190565b80845260209384019383018060005b838110156139fd5781516139ec88826139ab565b9750602083019250506001016139d8565b509495945050505050565b6020808252810161148681846139bf565b600060208284031215613a2e57613a2e600080fd5b6000611d6184846135d2565b6000613a46838361361a565b505060200190565b6000613a58825190565b80845260209384019383018060005b838110156139fd578151613a7b8882613a3a565b975060208301925050600101613a67565b602080825281016114868184613a4e565b600080600060608486031215613ab557613ab5600080fd5b6000613ac186866135d2565b935050602061368586828701613575565b6000610a46826135a1565b6000610a4682613ad2565b6134ec81613add565b60208101610a468284613ae8565b8015156134b1565b8035610a4681613aff565b60008060408385031215613b2857613b28600080fd5b6000613b3485856135d2565b925050602061361085828601613b07565b60008060008060808587031215613b5e57613b5e600080fd5b6000613b6a87876135d2565b9450506020613b7b878288016135d2565b9350506040613b8c87828801613575565b925050606085013567ffffffffffffffff811115613bac57613bac600080fd5b613bb88782880161376f565b91505092959194509250565b60808101610a468284613961565b60008060408385031215613be857613be8600080fd5b6000613bf485856135d2565b9250506020613610858286016135d2565b601681526000602082017f4d696e74696e67206973206e6f74206163746976652e00000000000000000000815291505b5060200190565b60208082528101610a4681613c05565b601181526000602082017f4e6f7420656e6f7567682066756e64732e00000000000000000000000000000081529150613c35565b60208082528101610a4681613c4c565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613cba57607f821691505b6020821081141561329357613293613c90565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000613c35565b60208082528101610a4681613ccd565b600081610a46565b600381526000602082016239393960e81b81529150613c35565b60208082528101610a4681613d17565b8051610a468161356f565b6000613d5a613744846136ff565b905082815260208101848484011115613d7557613d75600080fd5b6110d1848285613500565b600082601f830112613d9457613d94600080fd5b8151611d61848260208601613d4c565b60008060408385031215613dba57613dba600080fd5b6000613dc68585613d41565b925050602083015167ffffffffffffffff811115613de657613de6600080fd5b61361085828601613d80565b601181526000602082017f494e56414c49445f53594e435f5459504500000000000000000000000000000081529150613c35565b60208082528101610a4681613df2565b634e487b7160e01b600052603260045260246000fd5b60008154613e5981613ca6565b600182168015613e705760018114613e815761249a565b60ff1983168652818601935061249a565b60008581526020902060005b83811015613ea957815488820152600190910190602001613e8d565b505050939093019392505050565b6000613ec1825190565b613ecf818560208601613500565b9290920192915050565b6000613ee58285613e4c565b9150611d618284613eb7565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291505b5060400190565b60208082528101610a4681613ef1565b600060208284031215613f5c57613f5c600080fd5b6000611d618484613d41565b60808101613f7682876135b2565b613f83602083018661361a565b613f90604083018561361a565b613f9d606083018461361a565b95945050505050565b60408101613fb4828561361a565b8181036020830152611d61818461352c565b8051610a46816135c9565b6000613fdf61374484613868565b83815290506020808201908402830185811115613ffe57613ffe600080fd5b835b818110156138dd57806140138882613d41565b84525060209283019201614000565b600082601f83011261403657614036600080fd5b8151611d61848260208601613fd1565b6000806040838503121561405c5761405c600080fd5b60006140688585613fc6565b925050602083015167ffffffffffffffff81111561408857614088600080fd5b61361085828601614022565b604081016140a282856135b2565b8181036020830152611d618184613a4e565b608081016140c282876135b2565b6140cf60208301866135b2565b6140dc604083018561361a565b81810360608301526140ee818461352c565b9695505050505050565b8051610a46816134a5565b60006020828403121561411857614118600080fd5b6000611d6184846140f8565b634e487b7160e01b600052601160045260246000fd5b600060001982141561414e5761414e614124565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000825b92508261417e5761417e614155565b500490565b6000825b92508282101561419957614199614124565b500390565b6000825b9250826141b1576141b1614155565b500690565b600082198211156141c9576141c9614124565b500190565b60006141da828661361a565b6020820191506141ea8285613eb7565b91506141f6828461361a565b506020019392505050565b602481526000602082017f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434581526314d4d15160e21b60208201529150613f30565b60208082528101610a4681614201565b602581526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f54815264155393915360da1b60208201529150613f30565b60208082528101610a4681614252565b602381526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505281526227a7a360e91b60208201529150613f30565b60208082528101610a46816142a4565b601f81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e41545552450081529150613c35565b60208082528101610a46816142f4565b60006020828403121561434d5761434d600080fd5b815167ffffffffffffffff81111561436757614367600080fd5b611d6184828501613d80565b60408101613fb482856135b2565b600081600019048311821515161561439b5761439b614124565b500290565b600080600080600060a086880312156143bb576143bb600080fd5b60006143c78888613d41565b95505060206143d888828901613d41565b94505060406143e988828901613d41565b93505060606143fa88828901613d41565b925050608061440b88828901613fc6565b9150509295509295909350565b6000614424828761361a565b602082019150614434828661361a565b602082019150614444828561361a565b602082019150614454828461361a565b50602001949350505050565b601c81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f4845414445520000000081529150613c35565b60208082528101610a4681614460565b600060ff8216915060ff83166141a2565b600060ff8216915060ff831661416f565b80825b6001851115614505578086048111156144e4576144e4614124565b60018516156144f257908102905b80026144fe8560011c90565b94506144c9565b94509492505050565b60008261451d57506001611486565b8161452a57506000611486565b8160018114614540576002811461454a57614577565b6001915050611486565b60ff84111561455b5761455b614124565b8360020a91508482111561457157614571614124565b50611486565b5060208310610133831016604e8410600b84101617156145aa575081810a838111156145a5576145a5614124565b611486565b6145b784848460016144c6565b925090508184048111156145cd576145cd614124565b0292915050565b6000611486600019848461450e565b601481526000602082017f496e76616c69642070726f6f66206c656e67746800000000000000000000000081529150613c35565b60208082528101610a46816145e3565b601581526000602082017f4c65616620696e64657820697320746f6f20626967000000000000000000000081529150613c35565b60208082528101610a4681614627565b6000614677828561361a565b602082019150614687828461361a565b5060200192915050565b600060ff8216915060ff831661418756fea26469706673582212205cafa093b57304849ece16fc30d0fa2b001bf38ea7400ad3ae6f3c042c42c5b264736f6c63430008090033

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

00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2000000000000000000000000bd24a76f4135f930f5c49f6c30e0e30a61b975370000000000000000000000005e2454f33c3da3aa30eabc502255f66a6d72adc8

-----Decoded View---------------
Arg [0] : _checkpointManager (address): 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287
Arg [1] : _fxRoot (address): 0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2
Arg [2] : _vendorContractAddress (address): 0xbd24A76F4135F930F5c49f6c30e0E30A61b97537
Arg [3] : _factionContractAddress (address): 0x5E2454F33c3da3Aa30EabC502255f66A6d72aDc8

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287
Arg [1] : 000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2
Arg [2] : 000000000000000000000000bd24a76f4135f930f5c49f6c30e0e30a61b97537
Arg [3] : 0000000000000000000000005e2454f33c3da3aa30eabc502255f66a6d72adc8


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

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