ETH Price: $3,163.79 (+2.68%)

Token

On Chain Bears (OCB)
 

Overview

Max Total Supply

1,000 OCB

Holders

420

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
lfg.keeny.eth
Balance
2 OCB
0xddc76010dc3a9cd6104b938cbde52186bd1af243
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:
OnChainBears

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : OnChainBears.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.17;

import "erc721a/contracts/extensions/ERC721AQueryable.sol";
import "solady/auth/Ownable.sol";
import "solady/utils/Base64.sol";
import "./interfaces/IOnChainBears.sol";

/*
   ____           ________          _          ____                      
  / __ \____     / ____/ /_  ____ _(_)___     / __ )___  ____ ___________
 / / / / __ \   / /   / __ \/ __ `/ / __ \   / __  / _ \/ __ `/ ___/ ___/
/ /_/ / / / /  / /___/ / / / /_/ / / / / /  / /_/ /  __/ /_/ / /  (__  ) 
\____/_/ /_/   \____/_/ /_/\__,_/_/_/ /_/  /_____/\___/\__,_/_/  /____/  
                                                                         
*/

/// @title On Chain Bears
/// @author ItsCuzzo

contract OnChainBears is IOnChainBears, Ownable, ERC721AQueryable {
    using Base64 for bytes;

    enum SaleStates {
        PAUSED,
        ACTIVE
    }

    /// @dev Define `Trait` struct. Due to the nature of how traits
    /// are stored on-chain, this struct is used to manage trait information.
    /// `name`: Equivalent to `trait_type` in metadata.
    /// `value`: The value of `trait_type` in metadata.
    /// `pixels`: A string representation of the pixel placement associated with a trait.
    struct Trait {
        string name;
        string value;
        string pixels;
    }

    /// @dev Used with the `&` operator to parse the
    /// least significant 40 bits of a uint256 value.
    uint256 private constant _BIT_MASK = (1 << 40) - 1;

    /// @dev When parsing the `pixels` value of `Trait`, we use
    /// two lowercase letters to represent the x and y coordinates
    /// of our 24 x 24 SVG grid. We can imagine these letters to
    /// have a similar orientation to a traditional Caesar cipher.
    ///
    /// In the context of this contract, 'a' is 0, 'b' is 1, and so
    /// forth up until 'z' which is 25. With reference to an ASCII
    /// table, the decimal representation of a lowercase 'a' is
    /// 97. In order to derive the previously stated values, we
    /// need to minus 97 from the decimal value of the character
    /// being parsed, hence our `_ASCII_OFFSET` value.
    ///
    uint256 private constant _ASCII_OFFSET = 97;

    /// @dev This is the value that the cumulative weighting of
    /// each trait type should summate to. E.g. The sum of all
    /// weights within the `Hat` category should equal to 10000.
    /// See `_defineWeights()` for further clarity.
    uint64 private constant _TRAIT_WEIGHT = 10000;

    /// @dev Maps a token ID to a packed `dna` value. The
    /// most significant 16 bits are unused.
    ///
    ///  ------------------------
    /// | Bit Pos  | Trait       |
    /// |-------------------------
    /// | 0....39  | Hat         |
    /// | 40...79  | Eyes        |
    /// | 80..119  | Nose        |
    /// | 120.159  | Mouth       |
    /// | 160.199  | Fur         |
    /// | 200.239  | Background  |
    ///  ------------------------
    ///
    /// Layout: 32 Bytes (256 Bits)
    /// 0000000000000000000000000000000000000000000000000000000000000000
    ///     | BG     || Fur    || Mouth  || Nose   || Eyes   || Hat    |
    ///
    mapping(uint256 => uint256) private _dna;

    /// @dev Used to store the weights of each individual trait. There are
    /// 6 trait types, so we define the length of `_weights` to have 6 indices.
    uint16[][6] private _weights;

    uint256 public constant MAX_SUPPLY = 1000;
    uint256 public constant MAX_MINT = 2;

    /// @dev Maps a trait identifier to an array of traits. Since the value
    /// of `0` is indicative of the `Hat` trait, `traits[0]` would return
    /// an array of `Trait` that is representive of all the possible hats.
    mapping(uint256 => Trait[]) public traits;

    SaleStates public saleState;

    constructor() ERC721A("On Chain Bears", "OCB") {
        _initializeOwner(msg.sender);
        _defineWeights();
    }

    /// @notice Function used to mint `amount` of tokens.
    /// @param amount Desired number of tokens to mint.
    /// @dev Mints are free! (づ。◕w◕。)づ
    function mint(uint256 amount) external {
        unchecked {
            if (msg.sender != tx.origin) revert NonEOA();
            if (amount > MAX_MINT) revert InvalidAmount();
            if (_totalMinted() + amount > MAX_SUPPLY) revert OverMaxSupply();
            if (_numberMinted(msg.sender) + amount > MAX_MINT) revert MaxMinted();
            if (saleState != SaleStates.ACTIVE) revert MintInactive();

            uint256 id = _nextTokenId();
            
            /// Assign a DNA value for each of the tokens that are about to
            /// be minted. In the context of a 'real' project, you would
            /// opt to use either a commit-reveal scheme or oracle to prevent
            /// gaming of rare DNA. Since this is a free mint and stakes are
            /// low, naive generation of DNA values is adequate.
            for (uint256 i = id; i < id + amount; i++) {
                _dna[i] = uint256(keccak256(abi.encodePacked(
                    msg.sender, block.coinbase, i, "DNA"
                )));
            }

            _mint(msg.sender, amount);
        }
    }

    /// @notice Function used to set the `saleState` value to `ACTIVE`.
    function enableMint() external onlyOwner {
        saleState = SaleStates.ACTIVE;
    }

    /// @notice Function used to store trait data on-chain.
    /// @param id Unique trait identifier.
    /// @param traitData An array of `Trait` associated with `id`.
    /// @dev This function will be called 6 times immediately after deployment
    /// to populate the trait data on-chain for each respective trait type.
    function addTraits(uint256 id, Trait[] calldata traitData) external onlyOwner {
        unchecked {
            for (uint256 i = 0; i < traitData.length; i++) {
                traits[id].push(Trait(
                    traitData[i].name,
                    traitData[i].value,
                    traitData[i].pixels
                ));
            }
        }
    }

    /// @notice Function used to return a token URI for `id`.
    /// @param id Unique token identifier.
    /// @dev This function has been overriden to allow for on-chain rendering.
    function tokenURI(uint256 id) public view override(ERC721A, IERC721A) returns (string memory) {
        if (!_exists(id)) revert NonExistent();
        Trait[] memory _traits = _parseTraitsFromDna(_dna[id]);
        return _getMetadata(id, _traits);
    }

    /// @dev Function called within the constructor to define the weighting associated
    /// with each trait type. The sum of each array equates to 10000 which allows for
    /// rarity percision to 2 decimal places. E.g. 10000 = 100.00% | 1000 = 10.00% 
    function _defineWeights() internal {
        
        // Ordering: Hats -> Eyes -> Noses -> Mouths -> Furs -> Backgrounds
        _weights[0] = [2500, 300, 600, 600, 200, 600, 600, 600, 600, 300, 300, 600, 600, 600, 400, 600];
        _weights[1] = [400, 200, 400, 700, 850, 850, 700, 800, 800, 850, 850, 850, 850, 700, 200];
        _weights[2] = [4750, 4750, 500];
        _weights[3] = [830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 870];
        _weights[4] = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000];
        _weights[5] = [500, 750, 1000, 1000, 1000, 1000, 1250, 1250, 500, 500, 1250];

        // Whilst not necessary, we conduct a sanity check here to ensure that all
        // weightings of each trait type summate to `_TRAIT_WEIGHT`.
        unchecked {
            for (uint256 i = 0; i < _weights.length; i++) {
                uint256 sum = 0;
                for (uint256 j = 0; j < _weights[i].length; j++) {
                    sum += _weights[i][j];
                }
                if (sum != _TRAIT_WEIGHT) revert Insane();
            }
        }
    }

    /// @dev Function used to parse a tokens associated traits from its DNA.
    function _parseTraitsFromDna(uint256 dna) internal view returns (Trait[] memory _traits) {

        _traits = new Trait[](_weights.length);

        uint256 roll;
        uint256 weight;
        uint256 traitWeight;

        // Iterate over `dna` to acquire the `roll` value for each trait.
        for (uint256 i = 0; i < _weights.length; i++) {
            
            // Determine the `roll` value for each trait. Upon each iteration, the
            // next most significant 40 bits will be shifted right and masked out.
            // The `roll` value will then be moduloed by 10000 to derive a value
            // between the bounds 0 and 9999.
            roll = (dna >> i * 40 & _BIT_MASK) % _TRAIT_WEIGHT;
            
            weight = 0;
            traitWeight = 0;

            // Using weighted random numbers, determine the rolled trait. This is an incredibly
            // useful algorithm to add rarity to traits in a simple yet efficient manner.
            // ref: https://www.rubyguides.com/2016/05/weighted-random-numbers/
            for (uint256 j = 0; j < _weights[i].length; j++) {
                traitWeight = _weights[i][j];

                if (roll <= weight + traitWeight) {
                    _traits[i] = traits[i][j];
                    break;
                }

                weight += traitWeight;
            }

        }

    }

    /// @dev Used to return the metadata attributes. All tokens will have 6 traits, so we
    /// can hardcode the array accesses. The `trait_type` values have been hardcoded as 
    /// ordering is guaranteed.
    function _getAttributes(Trait[] memory _traits) internal pure returns (string memory) {
        return string(abi.encodePacked(
            '{"trait_type":"Hat","value":"', _traits[0].value, '"},',
            '{"trait_type":"Eyes","value":"', _traits[1].value, '"},',
            '{"trait_type":"Nose","value":"', _traits[2].value, '"},',
            '{"trait_type":"Mouth","value":"', _traits[3].value, '"},',
            '{"trait_type":"Fur","value":"', _traits[4].value, '"},',
            '{"trait_type":"Background","value":"', _traits[5].value, '"}'
        ));
    }

    /// @dev Used to return the complete metadata URI which has been base64 encoded. Many thanks
    /// to Vectorized of Solady who has written an extremely gas-efficient base64 `encode()` function
    /// in pure assembly.
    function _getMetadata(uint256 id, Trait[] memory _traits) internal pure returns (string memory) {
        return string(abi.encodePacked(
            "data:application/json;base64,",
            abi.encodePacked(
                '{"name":"Bear #', _toString(id),
                '","description":"On Chain Bears is a passion project inspired by the concept of on-chain NFTs, NFTs with no dependence on the outside world or external services such as IPFS. Rendered directly from the blockchain and destined to remain there forever. In the true spirit of decentralisation; CC0, 100% on-chain and 0% royalties.',
                '","image": "data:image/svg+xml;base64,', _getSVG(_traits),
                '","attributes":[', _getAttributes(_traits), ']}'
            ).encode())
        );
    }

    /// @dev Used to return the SVG XML. The algorithm used to generate the SVG is similar to that 
    /// used in Anonymice with a few minor differences. One such being that the `Trait` struct no
    /// longer requires a `pixelCount` attribute. Instead, the number of iterations is determined
    /// based off the byte length of `pixels`.
    function _getSVG(Trait[] memory _traits) internal pure returns (string memory) {
        
        // Represents a 24 x 24 grid, identical to the dimensions of our SVG artwork. This
        // variable will be used to determine which coordinates have already had a pixel placed.
        bool[24][24] memory placed;

        // Variable used to return the full `<rect>` properties of our SVG. Since no pixels
        // within our SVG artwork are void, we can expect 576 rect properties to be returned.
        string memory rects;

        // Variable used to store the casted bytes values of `pixels`.
        bytes memory b;

        // Iterate over each `Trait` in `_traits`.
        for (uint256 i = 0; i < _traits.length; i++) {

            // Cast `pixels` of `Trait` to type bytes, this allows for indices access
            // and the `length` property of `pixels`.
            b = bytes(_traits[i].pixels);

            // Lets assume we have a `pixels` value of `lq57mq57`. Since each series of 4
            // characters within `pixels` represents 1 pixel (p) worth of information we
            // can deconstruct `lq57mq57` as follows: p1 = `lq57` | p2 = `mq57`
            // With reference to `lq57`:
            //
            //   `l` : x coordinate (11).
            //   `q` : y coordinate (16).
            //   `57`: fill value in SVG style (c57).
            //
            // Since we can get the bytes length of `pixels`, we can infer the number of iterations
            // we need to make by simply dividing the `b.length` value by 4.
            for (uint256 j = 0; j < b.length / 4; j++) {

                // Parse out both `x` and `y` coordinate decimal values.
                uint256 x = uint8(b[j*4]) - _ASCII_OFFSET;
                uint256 y = uint8(b[j*4+1]) - _ASCII_OFFSET;

                // If a pixel has already been placed at coordinates `(x,y)` start the next iteration.
                if (placed[x][y]) continue;

                // Acknowledge that a pixel has been placed at `(x,y)`.
                placed[x][y] = true;

                // Concatenate the previous `rects` string with a new rect.
                rects = string(abi.encodePacked(
                    rects,
                    "<rect class='c", string(abi.encodePacked(b[j*4+2], b[j*4+3])),
                    "' x='", _toString(x),
                    "' y='", _toString(y),
                    "'/>"
                ));
            }

        }

        return abi.encodePacked(
            '<svg id="bears" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 24 24">',
            rects,
            "<style>",
            "rect{width:1px;height:1px;} #bears{shape-rendering: crispedges;}",
            ".c00{fill:#9ccc65}.c01{fill:#689f38}.c02{fill:#01579b}.c03{fill:#546e7a}.c04{fill:#80deea}.c05{fill:#b71c1c}.c06{fill:#ffeb3b}.c07{fill:#f44336}.c08{fill:#c5e1a5}.c09{fill:#00bcd4}.c10{fill:#42a5f5}.c11{fill:#ffff00}.c12{fill:#00c853}.c13{fill:#9fa8da}.c14{fill:#a1887f}.c15{fill:#9e9e9e}.c16{fill:#7cb342}.c17{fill:#03a9f4}.c18{fill:#ff5252}.c19{fill:#4dd0e1}.c20{fill:#ffff8d}.c21{fill:#c62828}.c22{fill:#673ab7}.c23{fill:#00897b}.c24{fill:#fbc02d}.c25{fill:#9c27b0}.c26{fill:#ff9800}.c27{fill:#4e342e}.c28{fill:#7c4dff}.c29{fill:#5d4037}.c30{fill:#00acc1}.c31{fill:#26c6da}.c32{fill:#ef9a9a}.c33{fill:#d32f2f}.c34{fill:#33691e}.c35{fill:#8d6e63}.c36{fill:#ff5722}.c37{fill:#ff6e40}.c38{fill:#ce93d8}.c39{fill:#bcaaa4}.c40{fill:#fff59d}.c41{fill:#b388ff}.c42{fill:#000000}.c43{fill:#ffee58}.c44{fill:#fff176}.c45{fill:#fafafa}.c46{fill:#fdd835}.c47{fill:#795548}.c48{fill:#ffc107}.c49{fill:#bdbdbd}.c50{fill:#76ff03}.c51{fill:#212121}.c52{fill:#ffd600}.c53{fill:#6d4c41}.c54{fill:#2196f3}.c55{fill:#ea80fc}.c56{fill:#424242}.c57{fill:#0097a7}.c58{fill:#f06292}.c59{fill:#ffffff}.c60{fill:#ef5350}.c61{fill:#aed581}.c62{fill:#f48fb1}.c63{fill:#eeeeee}.c64{fill:#d50000}.c65{fill:#8bc34a}.c66{fill:#0288d1}",
            "</style>",
            "</svg>"
        ).encode();

    }

    /// @dev Function used to override the starting token ID number.
    function _startTokenId() internal pure override returns (uint256) {
        return 1;
    }

}

File 2 of 8 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID 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 => TokenApprovalRef) private _tokenApprovals;

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _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 virtual {
        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;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        return _tokenApprovals[tokenId].value;
    }

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_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 `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

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

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

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

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__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))
                }
            }
        }
    }

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

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

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _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 toMasked;
            uint256 end = startTokenId + quantity;

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

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

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

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _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 Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _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 Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, '');
    }

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

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

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

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

File 3 of 8 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.4;

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

/**
 * @title ERC721AQueryable.
 *
 * @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 virtual 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[] calldata tokenIds)
        external
        view
        virtual
        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 virtual 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 collections should be fine).
     */
    function tokensOfOwner(address owner) external view virtual 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 8 : IERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of ERC721AQueryable.
 */
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`
     * - `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) 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 collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

File 6 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Simple single owner authorization mixin.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/OwnableRoles.sol)
/// @dev While the ownable portion follows [EIP-173](https://eips.ethereum.org/EIPS/eip-173)
/// for compatibility, the nomenclature for the 2-step ownership handover
/// may be unique to this codebase.
abstract contract Ownable {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                       CUSTOM ERRORS                        */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The caller is not authorized to call the function.
    error Unauthorized();

    /// @dev The `newOwner` cannot be the zero address.
    error NewOwnerIsZeroAddress();

    /// @dev The `pendingOwner` does not have a valid handover request.
    error NoHandoverRequest();

    /// @dev `bytes4(keccak256(bytes("Unauthorized()")))`.
    uint256 private constant _UNAUTHORIZED_ERROR_SELECTOR = 0x82b42900;

    /// @dev `bytes4(keccak256(bytes("NewOwnerIsZeroAddress()")))`.
    uint256 private constant _NEW_OWNER_IS_ZERO_ADDRESS_ERROR_SELECTOR = 0x7448fbae;

    /// @dev `bytes4(keccak256(bytes("NoHandoverRequest()")))`.
    uint256 private constant _NO_HANDOVER_REQUEST_ERROR_SELECTOR = 0x6f5e8818;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                           EVENTS                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The ownership is transferred from `oldOwner` to `newOwner`.
    /// This event is intentionally kept the same as OpenZeppelin's Ownable to be
    /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173),
    /// despite it not being as lightweight as a single argument event.
    event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);

    /// @dev An ownership handover to `pendingOwner` has been requested.
    event OwnershipHandoverRequested(address indexed pendingOwner);

    /// @dev The ownership handover to `pendingOwner` has been canceled.
    event OwnershipHandoverCanceled(address indexed pendingOwner);

    /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`.
    uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE =
        0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0;

    /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`.
    uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE =
        0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d;

    /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`.
    uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE =
        0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                          STORAGE                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The owner slot is given by: `not(_OWNER_SLOT_NOT)`.
    /// It is intentionally choosen to be a high value
    /// to avoid collision with lower slots.
    /// The choice of manual storage layout is to enable compatibility
    /// with both regular and upgradeable contracts.
    uint256 private constant _OWNER_SLOT_NOT = 0x8b78c6d8;

    /// The ownership handover slot of `newOwner` is given by:
    /// ```
    ///     mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED))
    ///     let handoverSlot := keccak256(0x00, 0x20)
    /// ```
    /// It stores the expiry timestamp of the two-step ownership handover.
    uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                     INTERNAL FUNCTIONS                     */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Initializes the owner directly without authorization guard.
    /// This function must be called upon initialization,
    /// regardless of whether the contract is upgradeable or not.
    /// This is to enable generalization to both regular and upgradeable contracts,
    /// and to save gas in case the initial owner is not the caller.
    /// For performance reasons, this function will not check if there
    /// is an existing owner.
    function _initializeOwner(address newOwner) internal virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // Clean the upper 96 bits.
            newOwner := shr(96, shl(96, newOwner))
            // Store the new value.
            sstore(not(_OWNER_SLOT_NOT), newOwner)
            // Emit the {OwnershipTransferred} event.
            log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)
        }
    }

    /// @dev Sets the owner directly without authorization guard.
    function _setOwner(address newOwner) internal virtual {
        /// @solidity memory-safe-assembly
        assembly {
            let ownerSlot := not(_OWNER_SLOT_NOT)
            // Clean the upper 96 bits.
            newOwner := shr(96, shl(96, newOwner))
            // Emit the {OwnershipTransferred} event.
            log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)
            // Store the new value.
            sstore(ownerSlot, newOwner)
        }
    }

    /// @dev Throws if the sender is not the owner.
    function _checkOwner() internal view virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // If the caller is not the stored owner, revert.
            if iszero(eq(caller(), sload(not(_OWNER_SLOT_NOT)))) {
                mstore(0x00, _UNAUTHORIZED_ERROR_SELECTOR)
                revert(0x1c, 0x04)
            }
        }
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                  PUBLIC UPDATE FUNCTIONS                   */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Allows the owner to transfer the ownership to `newOwner`.
    function transferOwnership(address newOwner) public payable virtual onlyOwner {
        if (newOwner == address(0)) revert NewOwnerIsZeroAddress();
        _setOwner(newOwner);
    }

    /// @dev Allows the owner to renounce their ownership.
    function renounceOwnership() public payable virtual onlyOwner {
        _setOwner(address(0));
    }

    /// @dev Request a two-step ownership handover to the caller.
    /// The request will be automatically expire in 48 hours (172800 seconds) by default.
    function requestOwnershipHandover() public payable virtual {
        unchecked {
            uint256 expires = block.timestamp + ownershipHandoverValidFor();
            /// @solidity memory-safe-assembly
            assembly {
                // Compute and set the handover slot to 1.
                mstore(0x0c, _HANDOVER_SLOT_SEED)
                mstore(0x00, caller())
                sstore(keccak256(0x0c, 0x20), expires)
                // Emit the {OwnershipHandoverRequested} event.
                log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller())
            }
        }
    }

    /// @dev Cancels the two-step ownership handover to the caller, if any.
    function cancelOwnershipHandover() public payable virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute and set the handover slot to 0.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, caller())
            sstore(keccak256(0x0c, 0x20), 0)
            // Emit the {OwnershipHandoverCanceled} event.
            log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller())
        }
    }

    /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`.
    /// Reverts if there is no existing ownership handover requested by `pendingOwner`.
    function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute and set the handover slot to 0.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, pendingOwner)
            let handoverSlot := keccak256(0x0c, 0x20)
            // If the handover does not exist, or has expired.
            if gt(timestamp(), sload(handoverSlot)) {
                mstore(0x00, _NO_HANDOVER_REQUEST_ERROR_SELECTOR)
                revert(0x1c, 0x04)
            }
            // Set the handover slot to 0.
            sstore(handoverSlot, 0)
            // Clean the upper 96 bits.
            let newOwner := shr(96, mload(0x0c))
            // Emit the {OwnershipTransferred} event.
            log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, caller(), newOwner)
            // Store the new value.
            sstore(not(_OWNER_SLOT_NOT), newOwner)
        }
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                   PUBLIC READ FUNCTIONS                    */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Returns the owner of the contract.
    function owner() public view virtual returns (address result) {
        /// @solidity memory-safe-assembly
        assembly {
            result := sload(not(_OWNER_SLOT_NOT))
        }
    }

    /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.
    function ownershipHandoverExpiresAt(address pendingOwner)
        public
        view
        virtual
        returns (uint256 result)
    {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute the handover slot.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, pendingOwner)
            // Load the handover slot.
            result := sload(keccak256(0x0c, 0x20))
        }
    }

    /// @dev Returns how long a two-step ownership handover is valid for in seconds.
    function ownershipHandoverValidFor() public view virtual returns (uint64) {
        return 48 * 3600;
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                         MODIFIERS                          */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Marks a function as only callable by the owner.
    modifier onlyOwner() virtual {
        _checkOwner();
        _;
    }
}

File 7 of 8 : Base64.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Library to encode strings in Base64.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/Base64.sol)
/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/Base64.sol)
/// @author Modified from (https://github.com/Brechtpd/base64/blob/main/base64.sol) by Brecht Devos - <[email protected]>.
library Base64 {
    /// @dev Encodes `data` using the base64 encoding described in RFC 4648.
    /// See: https://datatracker.ietf.org/doc/html/rfc4648
    /// @param fileSafe  Whether to replace '+' with '-' and '/' with '_'.
    /// @param noPadding Whether to strip away the padding.
    function encode(bytes memory data, bool fileSafe, bool noPadding)
        internal
        pure
        returns (string memory result)
    {
        /// @solidity memory-safe-assembly
        assembly {
            let dataLength := mload(data)

            if dataLength {
                // Multiply by 4/3 rounded up.
                // The `shl(2, ...)` is equivalent to multiplying by 4.
                let encodedLength := shl(2, div(add(dataLength, 2), 3))

                // Set `result` to point to the start of the free memory.
                result := mload(0x40)

                // Store the table into the scratch space.
                // Offsetted by -1 byte so that the `mload` will load the character.
                // We will rewrite the free memory pointer at `0x40` later with
                // the allocated size.
                // The magic constant 0x0230 will translate "-_" + "+/".
                mstore(0x1f, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef")
                mstore(0x3f, sub("ghijklmnopqrstuvwxyz0123456789-_", mul(iszero(fileSafe), 0x0230)))

                // Skip the first slot, which stores the length.
                let ptr := add(result, 0x20)
                let end := add(ptr, encodedLength)

                // Run over the input, 3 bytes at a time.
                for {} 1 {} {
                    data := add(data, 3) // Advance 3 bytes.
                    let input := mload(data)

                    // Write 4 bytes. Optimized for fewer stack operations.
                    mstore8(ptr, mload(and(shr(18, input), 0x3F)))
                    mstore8(add(ptr, 1), mload(and(shr(12, input), 0x3F)))
                    mstore8(add(ptr, 2), mload(and(shr(6, input), 0x3F)))
                    mstore8(add(ptr, 3), mload(and(input, 0x3F)))

                    ptr := add(ptr, 4) // Advance 4 bytes.

                    if iszero(lt(ptr, end)) { break }
                }

                let r := mod(dataLength, 3)

                switch noPadding
                case 0 {
                    // Offset `ptr` and pad with '='. We can simply write over the end.
                    mstore8(sub(ptr, iszero(iszero(r))), 0x3d) // Pad at `ptr - 1` if `r > 0`.
                    mstore8(sub(ptr, shl(1, eq(r, 1))), 0x3d) // Pad at `ptr - 2` if `r == 1`.
                    // Write the length of the string.
                    mstore(result, encodedLength)
                }
                default {
                    // Write the length of the string.
                    mstore(result, sub(encodedLength, add(iszero(iszero(r)), eq(r, 1))))
                }

                // Allocate the memory for the string.
                // Add 31 and mask with `not(31)` to round the
                // free memory pointer up the next multiple of 32.
                mstore(0x40, and(add(end, 31), not(31)))
            }
        }
    }

    /// @dev Encodes `data` using the base64 encoding described in RFC 4648.
    /// Equivalent to `encode(data, false, false)`.
    function encode(bytes memory data) internal pure returns (string memory result) {
        result = encode(data, false, false);
    }

    /// @dev Encodes `data` using the base64 encoding described in RFC 4648.
    /// Equivalent to `encode(data, fileSafe, false)`.
    function encode(bytes memory data, bool fileSafe)
        internal
        pure
        returns (string memory result)
    {
        result = encode(data, fileSafe, false);
    }

    /// @dev Encodes base64 encoded `data`.
    ///
    /// Supports:
    /// - RFC 4648 (both standard and file-safe mode).
    /// - RFC 3501 (63: ',').
    ///
    /// Does not support:
    /// - Line breaks.
    ///
    /// Note: For performance reasons,
    /// this function will NOT revert on invalid `data` inputs.
    /// Outputs for invalid inputs will simply be undefined behaviour.
    /// It is the user's responsibility to ensure that the `data`
    /// is a valid base64 encoded string.
    function decode(string memory data) internal pure returns (bytes memory result) {
        /// @solidity memory-safe-assembly
        assembly {
            let dataLength := mload(data)

            if dataLength {
                let end := add(data, dataLength)
                let decodedLength := mul(shr(2, dataLength), 3)

                switch and(dataLength, 3)
                case 0 {
                    // If padded.
                    // forgefmt: disable-next-item
                    decodedLength := sub(
                        decodedLength,
                        add(eq(and(mload(end), 0xFF), 0x3d), eq(and(mload(end), 0xFFFF), 0x3d3d))
                    )
                }
                default {
                    // If non-padded.
                    decodedLength := add(decodedLength, sub(and(dataLength, 3), 1))
                }

                result := mload(0x40)

                // Write the length of the string.
                mstore(result, decodedLength)

                // Skip the first slot, which stores the length.
                let ptr := add(result, 0x20)

                // Load the table into the scratch space.
                // Constants are optimized for smaller bytecode with zero gas overhead.
                // `m` also doubles as the mask of the upper 6 bits.
                let m := 0xfc000000fc00686c7074787c8084888c9094989ca0a4a8acb0b4b8bcc0c4c8cc
                mstore(0x5b, m)
                mstore(0x3b, 0x04080c1014181c2024282c3034383c4044484c5054585c6064)
                mstore(0x1a, 0xf8fcf800fcd0d4d8dce0e4e8ecf0f4)

                for {} 1 {} {
                    // Read 4 bytes.
                    data := add(data, 4)
                    let input := mload(data)

                    // Write 3 bytes.
                    // forgefmt: disable-next-item
                    mstore(ptr, or(
                        and(m, mload(byte(28, input))),
                        shr(6, or(
                            and(m, mload(byte(29, input))),
                            shr(6, or(
                                and(m, mload(byte(30, input))),
                                shr(6, mload(byte(31, input)))
                            ))
                        ))
                    ))

                    ptr := add(ptr, 3)

                    if iszero(lt(data, end)) { break }
                }

                // Allocate the memory for the string.
                // Add 32 + 31 and mask with `not(31)` to round the
                // free memory pointer up the next multiple of 32.
                mstore(0x40, and(add(add(result, decodedLength), 63), not(31)))

                // Restore the zero slot.
                mstore(0x60, 0)
            }
        }
    }
}

File 8 of 8 : IOnChainBears.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.17;

import "erc721a/contracts/extensions/IERC721AQueryable.sol";

interface IOnChainBears is IERC721AQueryable {    
    error NonEOA();
    error InvalidAmount();
    error OverMaxSupply();
    error MaxMinted();
    error NonExistent();
    error Insane();
    error MintInactive();
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc721a/=lib/erc721a/",
    "forge-std/=lib/forge-std/src/",
    "solady/=lib/solady/src/",
    "solmate/=lib/solady/lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"Insane","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MaxMinted","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintInactive","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"NonEOA","type":"error"},{"inputs":[],"name":"NonExistent","type":"error"},{"inputs":[],"name":"OverMaxSupply","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"},{"inputs":[],"name":"Unauthorized","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":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","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":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"value","type":"string"},{"internalType":"string","name":"pixels","type":"string"}],"internalType":"struct OnChainBears.Trait[]","name":"traitData","type":"tuple[]"}],"name":"addTraits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"enableMint","outputs":[],"stateMutability":"nonpayable","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":[{"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":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","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":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownershipHandoverValidFor","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","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":"payable","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":"payable","type":"function"},{"inputs":[],"name":"saleState","outputs":[{"internalType":"enum OnChainBears.SaleStates","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","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":"id","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":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"traits","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"value","type":"string"},{"internalType":"string","name":"pixels","type":"string"}],"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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"}]

60806040523480156200001157600080fd5b506040518060400160405280600e81526020016d4f6e20436861696e20426561727360901b8152506040518060400160405280600381526020016227a1a160e91b81525081600290816200006691906200059c565b5060036200007582826200059c565b5050600160005550620000883362000098565b62000092620000d4565b6200067e565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b60408051610200810182526109c4815261012c602082018190526102589282018390526060820183905260c8608083015260a0820183905260c0820183905260e0820183905261010082018390526101208201819052610140820152610160810182905261018081018290526101a081018290526101906101c08201526101e08101919091526200016a90600990601062000430565b50604080516101e08101825261019080825260c860208301819052928201526102bc606082018190526103526080830181905260a0830181905260c0830182905261032060e084018190526101008401526101208301819052610140830181905261016083018190526101808301526101a08201526101c0810191909152620001f890600a90600f62000430565b506040805160608101825261128e80825260208201526101f4918101919091526200022890600b90600362000430565b50604080516101808101825261033e80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526103666101608201526200029b90600c908162000430565b5060408051610140810182526103e880825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810191909152620002fe90600d90600a62000430565b5060408051610160810182526101f48082526102ee60208301526103e8928201839052606082018390526080820183905260a08201929092526104e260c0820181905260e0820181905261010082018390526101208201929092526101408101919091526200037290600e90600b62000430565b5060005b60068110156200042d576000805b600983600681106200039a576200039a62000668565b0154811015620003ff5760098360068110620003ba57620003ba62000668565b018181548110620003cf57620003cf62000668565b60009182526020909120601082040154600f9091166002026101000a900461ffff16919091019060010162000384565b5061271081146200042357604051633168842560e11b815260040160405180910390fd5b5060010162000376565b50565b82805482825590600052602060002090600f01601090048101928215620004ce5791602002820160005b838211156200049c57835183826101000a81548161ffff021916908361ffff16021790555092602001926002016020816001010492830192600103026200045a565b8015620004cc5782816101000a81549061ffff02191690556002016020816001010492830192600103026200049c565b505b50620004dc929150620004e0565b5090565b5b80821115620004dc5760008155600101620004e1565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200052257607f821691505b6020821081036200054357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200059757600081815260208120601f850160051c81016020861015620005725750805b601f850160051c820191505b8181101562000593578281556001016200057e565b5050505b505050565b81516001600160401b03811115620005b857620005b8620004f7565b620005d081620005c984546200050d565b8462000549565b602080601f831160018114620006085760008415620005ef5750858301515b600019600386901b1c1916600185901b17855562000593565b600085815260208120601f198616915b82811015620006395788860151825594840194600190910190840162000618565b5085821015620006585787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b61353c806200068e6000396000f3fe6080604052600436106101ee5760003560e01c806379d3cd001161010d578063c01e6c6d116100a0578063e985e9c51161006f578063e985e9c514610543578063f0292a031461058c578063f04e283e146105a1578063f2fde38b146105b4578063fee81cf4146105c757600080fd5b8063c01e6c6d146104b8578063c23dc68f146104d8578063c87b56dd14610505578063d7533f021461052557600080fd5b806399a2557a116100dc57806399a2557a14610445578063a0712d6814610465578063a22cb46514610485578063b88d4fde146104a557600080fd5b806379d3cd00146103bb5780638462151c146103ea5780638da5cb5b1461041757806395d89b411461043057600080fd5b806342842e0e11610185578063603f4d5211610154578063603f4d521461034c5780636352211e1461037357806370a0823114610393578063715018a6146103b357600080fd5b806342842e0e146102ef57806344b28d591461030257806354d1f13d146103175780635bbb21771461031f57600080fd5b806318160ddd116101c157806318160ddd1461029757806323b872dd146102be57806325692962146102d157806332cb6b0c146102d957600080fd5b806301ffc9a7146101f357806306fdde0314610228578063081812fc1461024a578063095ea7b314610282575b600080fd5b3480156101ff57600080fd5b5061021361020e366004612170565b6105fa565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d61064c565b60405161021f91906121dd565b34801561025657600080fd5b5061026a6102653660046121f0565b6106de565b6040516001600160a01b03909116815260200161021f565b610295610290366004612225565b610722565b005b3480156102a357600080fd5b5060015460005403600019015b60405190815260200161021f565b6102956102cc36600461224f565b6107c2565b61029561095b565b3480156102e557600080fd5b506102b06103e881565b6102956102fd36600461224f565b6109aa565b34801561030e57600080fd5b506102956109ca565b6102956109e1565b34801561032b57600080fd5b5061033f61033a3660046122d6565b610a1d565b60405161021f9190612353565b34801561035857600080fd5b506010546103669060ff1681565b60405161021f91906123ab565b34801561037f57600080fd5b5061026a61038e3660046121f0565b610ae8565b34801561039f57600080fd5b506102b06103ae3660046123d3565b610af3565b610295610b41565b3480156103c757600080fd5b506103db6103d63660046123ee565b610b55565b60405161021f93929190612410565b3480156103f657600080fd5b5061040a6104053660046123d3565b610d34565b60405161021f9190612453565b34801561042357600080fd5b50638b78c6d8195461026a565b34801561043c57600080fd5b5061023d610e3c565b34801561045157600080fd5b5061040a61046036600461248b565b610e4b565b34801561047157600080fd5b506102956104803660046121f0565b610fd2565b34801561049157600080fd5b506102956104a03660046124be565b611144565b6102956104b3366004612510565b6111b0565b3480156104c457600080fd5b506102956104d33660046125eb565b6111fa565b3480156104e457600080fd5b506104f86104f33660046121f0565b6113c1565b60405161021f9190612636565b34801561051157600080fd5b5061023d6105203660046121f0565b611449565b34801561053157600080fd5b506040516202a300815260200161021f565b34801561054f57600080fd5b5061021361055e366004612644565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561059857600080fd5b506102b0600281565b6102956105af3660046123d3565b611495565b6102956105c23660046123d3565b611501565b3480156105d357600080fd5b506102b06105e23660046123d3565b63389a75e1600c908152600091909152602090205490565b60006301ffc9a760e01b6001600160e01b03198316148061062b57506380ac58cd60e01b6001600160e01b03198316145b806106465750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461065b90612677565b80601f016020809104026020016040519081016040528092919081815260200182805461068790612677565b80156106d45780601f106106a9576101008083540402835291602001916106d4565b820191906000526020600020905b8154815290600101906020018083116106b757829003601f168201915b5050505050905090565b60006106e98261153c565b610706576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061072d82610ae8565b9050336001600160a01b0382161461076657610749813361055e565b610766576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006107cd82611571565b9050836001600160a01b0316816001600160a01b0316146108005760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b0388169091141761084d57610830863361055e565b61084d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661087457604051633a954ecd60e21b815260040160405180910390fd5b801561087f57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036109115760018401600081815260046020526040812054900361090f57600054811461090f5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6109c5838383604051806020016040528060008152506111b0565b505050565b6109d26115e0565b6010805460ff19166001179055565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6060816000816001600160401b03811115610a3a57610a3a6124fa565b604051908082528060200260200182016040528015610a8c57816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610a585790505b50905060005b828114610adf57610aba868683818110610aae57610aae6126b1565b905060200201356113c1565b828281518110610acc57610acc6126b1565b6020908102919091010152600101610a92565b50949350505050565b600061064682611571565b60006001600160a01b038216610b1c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b610b496115e0565b610b5360006115fb565b565b600f6020528160005260406000208181548110610b7157600080fd5b906000526020600020906003020160009150915050806000018054610b9590612677565b80601f0160208091040260200160405190810160405280929190818152602001828054610bc190612677565b8015610c0e5780601f10610be357610100808354040283529160200191610c0e565b820191906000526020600020905b815481529060010190602001808311610bf157829003601f168201915b505050505090806001018054610c2390612677565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4f90612677565b8015610c9c5780601f10610c7157610100808354040283529160200191610c9c565b820191906000526020600020905b815481529060010190602001808311610c7f57829003601f168201915b505050505090806002018054610cb190612677565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdd90612677565b8015610d2a5780601f10610cff57610100808354040283529160200191610d2a565b820191906000526020600020905b815481529060010190602001808311610d0d57829003601f168201915b5050505050905083565b60606000806000610d4485610af3565b90506000816001600160401b03811115610d6057610d606124fa565b604051908082528060200260200182016040528015610d89578160200160208202803683370190505b509050610db660408051608081018252600080825260208201819052918101829052606081019190915290565b60015b838614610e3057610dc981611639565b91508160400151610e285781516001600160a01b031615610de957815194505b876001600160a01b0316856001600160a01b031603610e285780838780600101985081518110610e1b57610e1b6126b1565b6020026020010181815250505b600101610db9565b50909695505050505050565b60606003805461065b90612677565b6060818310610e6d57604051631960ccad60e11b815260040160405180910390fd5b600080610e7960005490565b90506001851015610e8957600194505b80841115610e95578093505b6000610ea087610af3565b905084861015610ebf5785850381811015610eb9578091505b50610ec3565b5060005b6000816001600160401b03811115610edd57610edd6124fa565b604051908082528060200260200182016040528015610f06578160200160208202803683370190505b50905081600003610f1c579350610fcb92505050565b6000610f27886113c1565b905060008160400151610f38575080515b885b888114158015610f4a5750848714155b15610fbf57610f5881611639565b92508260400151610fb75782516001600160a01b031615610f7857825191505b8a6001600160a01b0316826001600160a01b031603610fb75780848880600101995081518110610faa57610faa6126b1565b6020026020010181815250505b600101610f3a565b50505092835250909150505b9392505050565b333214610ff257604051634f19899d60e11b815260040160405180910390fd5b60028111156110145760405163162908e360e11b815260040160405180910390fd5b6103e8816110256000546000190190565b01111561104557604051634c9c5c3360e11b815260040160405180910390fd5b3360009081526005602052604090819020546002911c6001600160401b0316820111156110855760405163c109f51160e01b815260040160405180910390fd5b600160105460ff16600181111561109e5761109e612395565b146110bc57604051630d0ca57160e21b815260040160405180910390fd5b600054805b828201811015611135576040516bffffffffffffffffffffffff1933606090811b8216602084015241901b1660348201526048810182905262444e4160e81b6068820152606b0160408051601f198184030181529181528151602092830120600084815260089093529120556001016110c1565b506111403383611675565b5050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6111bb8484846107c2565b6001600160a01b0383163b156111f4576111d784848484611773565b6111f4576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6112026115e0565b60005b818110156111f457600f6000858152602001908152602001600020604051806060016040528085858581811061123d5761123d6126b1565b905060200281019061124f91906126c7565b61125990806126e7565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252506020018585858181106112a5576112a56126b1565b90506020028101906112b791906126c7565b6112c59060208101906126e7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250602001858585818110611311576113116126b1565b905060200281019061132391906126c7565b6113319060408101906126e7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505083546001810185559381526020902082519293600302019182915061138c9082612773565b50602082015160018201906113a19082612773565b50604082015160028201906113b69082612773565b505050600101611205565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061141a57506000548310155b156114255792915050565b61142e83611639565b90508060400151156114405792915050565b610fcb8361185f565b60606114548261153c565b61147157604051632f9d01c560e01b815260040160405180910390fd5b60008281526008602052604081205461148990611894565b9050610fcb8382611be3565b61149d6115e0565b63389a75e1600c52806000526020600c2080544211156114c557636f5e88186000526004601cfd5b6000815550600c5160601c80337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3638b78c6d8195550565b6115096115e0565b6001600160a01b03811661153057604051633a247dd760e11b815260040160405180910390fd5b611539816115fb565b50565b600081600111158015611550575060005482105b8015610646575050600090815260046020526040902054600160e01b161590565b600081806001116115c7576000548110156115c75760008181526004602052604081205490600160e01b821690036115c5575b80600003610fcb5750600019016000818152600460205260409020546115a4565b505b604051636f96cda160e11b815260040160405180910390fd5b638b78c6d819543314610b53576382b429006000526004601cfd5b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461064690611c50565b600080549082900361169a5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461174957808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611711565b508160000361176a57604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906117a8903390899088908890600401612832565b6020604051808303816000875af19250505080156117e3575060408051601f3d908101601f191682019092526117e091810190612865565b60015b611841573d808015611811576040519150601f19603f3d011682016040523d82523d6000602084013e611816565b606091505b508051600003611839576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261064661188f83611571565b611c50565b60408051600680825260e08201909252606091816020015b6118d060405180606001604052806060815260200160608152602001606081525090565b8152602001906001900390816118ac57905050905060008080805b6006811015611bda5761271064ffffffffff611908836028612898565b88901c1661191691906128c5565b9350600092506000915060005b60098260068110611936576119366126b1565b0154811015611bc75760098260068110611952576119526126b1565b018181548110611964576119646126b1565b60009182526020909120601082040154600f9091166002026101000a900461ffff16925061199283856128d9565b8511611ba9576000828152600f602052604090208054829081106119b8576119b86126b1565b90600052602060002090600302016040518060600160405290816000820180546119e190612677565b80601f0160208091040260200160405190810160405280929190818152602001828054611a0d90612677565b8015611a5a5780601f10611a2f57610100808354040283529160200191611a5a565b820191906000526020600020905b815481529060010190602001808311611a3d57829003601f168201915b50505050508152602001600182018054611a7390612677565b80601f0160208091040260200160405190810160405280929190818152602001828054611a9f90612677565b8015611aec5780601f10611ac157610100808354040283529160200191611aec565b820191906000526020600020905b815481529060010190602001808311611acf57829003601f168201915b50505050508152602001600282018054611b0590612677565b80601f0160208091040260200160405190810160405280929190818152602001828054611b3190612677565b8015611b7e5780601f10611b5357610100808354040283529160200191611b7e565b820191906000526020600020905b815481529060010190602001808311611b6157829003601f168201915b505050505081525050868381518110611b9957611b996126b1565b6020026020010181905250611bc7565b611bb383856128d9565b935080611bbf816128ec565b915050611923565b5080611bd2816128ec565b9150506118eb565b50505050919050565b6060611c29611bf184611c97565b611bfa84611cdb565b611c0385611f1e565b604051602001611c1593929190612921565b604051602081830303815290604052612005565b604051602001611c399190612b61565b604051602081830303815290604052905092915050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480611cb15750819003601f19909101908152919050565b6060611ce561210d565b60608060005b8551811015611f0057858181518110611d0657611d066126b1565b602002602001015160400151915060005b60048351611d259190612ba6565b811015611eed576000606184611d3c846004612898565b81518110611d4c57611d4c6126b1565b0160200151611d5e919060f81c612bba565b90506000606185611d70856004612898565b611d7b9060016128d9565b81518110611d8b57611d8b6126b1565b0160200151611d9d919060f81c612bba565b9050868260188110611db157611db16126b1565b60200201518160188110611dc757611dc76126b1565b602002015115611dd8575050611edb565b6001878360188110611dec57611dec6126b1565b60200201518260188110611e0257611e026126b1565b911515602090920201528585611e19856004612898565b611e249060026128d9565b81518110611e3457611e346126b1565b01602001516001600160f81b03191686611e4f866004612898565b611e5a9060036128d9565b81518110611e6a57611e6a6126b1565b016020908101516040516001600160f81b031993841692810192909252919091166021820152602201604051602081830303815290604052611eab84611c97565b611eb484611c97565b604051602001611ec79493929190612bcd565b604051602081830303815290604052955050505b80611ee5816128ec565b915050611d17565b5080611ef8816128ec565b915050611ceb565b50611f1582604051602001611c159190612c74565b95945050505050565b606081600081518110611f3357611f336126b1565b60200260200101516020015182600181518110611f5257611f526126b1565b60200260200101516020015183600281518110611f7157611f716126b1565b60200260200101516020015184600381518110611f9057611f906126b1565b60200260200101516020015185600481518110611faf57611faf6126b1565b60200260200101516020015186600581518110611fce57611fce6126b1565b602002602001015160200151604051602001611fef9695949392919061335d565b6040516020818303038152906040529050919050565b606061064682600080606083518015612105576003600282010460021b60405192507f4142434445464748494a4b4c4d4e4f505152535455565758595a616263646566601f526102308515027f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392d5f03603f52602083018181015b6003880197508751603f8160121c16518353603f81600c1c16516001840153603f8160061c16516002840153603f81165160038401535060048201915080821061207e57600384068680156120de576001821482151501850387526120f6565b603d821515850353603d6001831460011b8503538487525b5050601f01601f191660405250505b509392505050565b6040518061030001604052806018905b61212561213b565b81526020019060019003908161211d5790505090565b6040518061030001604052806018906020820280368337509192915050565b6001600160e01b03198116811461153957600080fd5b60006020828403121561218257600080fd5b8135610fcb8161215a565b60005b838110156121a8578181015183820152602001612190565b50506000910152565b600081518084526121c981602086016020860161218d565b601f01601f19169290920160200192915050565b602081526000610fcb60208301846121b1565b60006020828403121561220257600080fd5b5035919050565b80356001600160a01b038116811461222057600080fd5b919050565b6000806040838503121561223857600080fd5b61224183612209565b946020939093013593505050565b60008060006060848603121561226457600080fd5b61226d84612209565b925061227b60208501612209565b9150604084013590509250925092565b60008083601f84011261229d57600080fd5b5081356001600160401b038111156122b457600080fd5b6020830191508360208260051b85010111156122cf57600080fd5b9250929050565b600080602083850312156122e957600080fd5b82356001600160401b038111156122ff57600080fd5b61230b8582860161228b565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b81811015610e3057612382838551612317565b928401926080929092019160010161236f565b634e487b7160e01b600052602160045260246000fd5b60208101600283106123cd57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156123e557600080fd5b610fcb82612209565b6000806040838503121561240157600080fd5b50508035926020909101359150565b60608152600061242360608301866121b1565b828103602084015261243581866121b1565b9050828103604084015261244981856121b1565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610e305783518352928401929184019160010161246f565b6000806000606084860312156124a057600080fd5b6124a984612209565b95602085013595506040909401359392505050565b600080604083850312156124d157600080fd5b6124da83612209565b9150602083013580151581146124ef57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561252657600080fd5b61252f85612209565b935061253d60208601612209565b92506040850135915060608501356001600160401b038082111561256057600080fd5b818701915087601f83011261257457600080fd5b813581811115612586576125866124fa565b604051601f8201601f19908116603f011681019083821181831017156125ae576125ae6124fa565b816040528281528a60208487010111156125c757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060006040848603121561260057600080fd5b8335925060208401356001600160401b0381111561261d57600080fd5b6126298682870161228b565b9497909650939450505050565b608081016106468284612317565b6000806040838503121561265757600080fd5b61266083612209565b915061266e60208401612209565b90509250929050565b600181811c9082168061268b57607f821691505b6020821081036126ab57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60008235605e198336030181126126dd57600080fd5b9190910192915050565b6000808335601e198436030181126126fe57600080fd5b8301803591506001600160401b0382111561271857600080fd5b6020019150368190038213156122cf57600080fd5b601f8211156109c557600081815260208120601f850160051c810160208610156127545750805b601f850160051c820191505b8181101561095357828155600101612760565b81516001600160401b0381111561278c5761278c6124fa565b6127a08161279a8454612677565b8461272d565b602080601f8311600181146127d557600084156127bd5750858301515b600019600386901b1c1916600185901b178555610953565b600085815260208120601f198616915b82811015612804578886015182559484019460019091019084016127e5565b50858210156128225787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612449908301846121b1565b60006020828403121561287757600080fd5b8151610fcb8161215a565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761064657610646612882565b634e487b7160e01b600052601260045260246000fd5b6000826128d4576128d46128af565b500690565b8082018082111561064657610646612882565b6000600182016128fe576128fe612882565b5060010190565b6000815161291781856020860161218d565b9290920192915050565b6e7b226e616d65223a2242656172202360881b8152835160009061294c81600f85016020890161218d565b7f222c226465736372697074696f6e223a224f6e20436861696e20426561727320600f918401918201527f697320612070617373696f6e2070726f6a65637420696e737069726564206279602f8201527f2074686520636f6e63657074206f66206f6e2d636861696e204e4654732c204e604f8201527f4654732077697468206e6f20646570656e64656e6365206f6e20746865206f75606f8201527f747369646520776f726c64206f722065787465726e616c207365727669636573608f8201527f207375636820617320495046532e2052656e6465726564206469726563746c7960af8201527f2066726f6d2074686520626c6f636b636861696e20616e642064657374696e6560cf8201527f6420746f2072656d61696e20746865726520666f72657665722e20496e20746860ef8201527f65207472756520737069726974206f6620646563656e7472616c69736174696f61010f8201527f6e3b204343302c2031303025206f6e2d636861696e20616e6420302520726f7961012f8201526630b63a34b2b99760c91b61014f820152612449612b53612b4d612b31612b2b61015686017f222c22696d616765223a2022646174613a696d6167652f7376672b786d6c3b62815265185cd94d8d0b60d21b602082015260260190565b89612905565b6f222c2261747472696275746573223a5b60801b815260100190565b86612905565b615d7d60f01b815260020190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612b9981601d85016020870161218d565b91909101601d0192915050565b600082612bb557612bb56128af565b500490565b8181038181111561064657610646612882565b60008551612bdf818460208a0161218d565b6d3c7265637420636c6173733d276360901b9083019081528551612c0a81600e840160208a0161218d565b642720783d2760d81b600e92909101918201528451612c3081601384016020890161218d565b642720793d2760d81b601392909101918201528351612c5681601884016020880161218d565b6213979f60e91b60189290910191820152601b019695505050505050565b7f3c7376672069643d2262656172732220786d6c6e733d22687474703a2f2f777781527f772e77332e6f72672f323030302f73766722207072657365727665417370656360208201527f74526174696f3d22784d696e594d696e206d656574222076696577426f783d2260408201526a18101810191a10191a111f60a91b606082015260008251612d0c81606b85016020870161218d565b661e39ba3cb6329f60c91b606b918401918201527f726563747b77696474683a3170783b6865696768743a3170783b7d202362656160728201527f72737b73686170652d72656e646572696e673a20637269737065646765733b7d60928201527f2e6330307b66696c6c3a233963636336357d2e6330317b66696c6c3a2336383960b28201527f6633387d2e6330327b66696c6c3a233031353739627d2e6330337b66696c6c3a60d28201527f233534366537617d2e6330347b66696c6c3a233830646565617d2e6330357b6660f28201527f696c6c3a236237316331637d2e6330367b66696c6c3a236666656233627d2e636101128201527f30377b66696c6c3a236634343333367d2e6330387b66696c6c3a2363356531616101328201527f357d2e6330397b66696c6c3a233030626364347d2e6331307b66696c6c3a23346101528201527f32613566357d2e6331317b66696c6c3a236666666630307d2e6331327b66696c6101728201527f6c3a233030633835337d2e6331337b66696c6c3a233966613864617d2e6331346101928201527f7b66696c6c3a236131383837667d2e6331357b66696c6c3a233965396539657d6101b28201527f2e6331367b66696c6c3a233763623334327d2e6331377b66696c6c3a233033616101d28201527f3966347d2e6331387b66696c6c3a236666353235327d2e6331397b66696c6c3a6101f28201527f233464643065317d2e6332307b66696c6c3a236666666638647d2e6332317b666102128201527f696c6c3a236336323832387d2e6332327b66696c6c3a233637336162377d2e636102328201527f32337b66696c6c3a233030383937627d2e6332347b66696c6c3a2366626330326102528201527f647d2e6332357b66696c6c3a233963323762307d2e6332367b66696c6c3a23666102728201527f66393830307d2e6332377b66696c6c3a233465333432657d2e6332387b66696c6102928201527f6c3a233763346466667d2e6332397b66696c6c3a233564343033377d2e6333306102b28201527f7b66696c6c3a233030616363317d2e6333317b66696c6c3a233236633664617d6102d28201527f2e6333327b66696c6c3a236566396139617d2e6333337b66696c6c3a236433326102f28201527f6632667d2e6333347b66696c6c3a233333363931657d2e6333357b66696c6c3a6103128201527f233864366536337d2e6333367b66696c6c3a236666353732327d2e6333377b666103328201527f696c6c3a236666366534307d2e6333387b66696c6c3a236365393364387d2e636103528201527f33397b66696c6c3a236263616161347d2e6334307b66696c6c3a2366666635396103728201527f647d2e6334317b66696c6c3a236233383866667d2e6334327b66696c6c3a23306103928201527f30303030307d2e6334337b66696c6c3a236666656535387d2e6334347b66696c6103b28201527f6c3a236666663137367d2e6334357b66696c6c3a236661666166617d2e6334366103d28201527f7b66696c6c3a236664643833357d2e6334377b66696c6c3a233739353534387d6103f28201527f2e6334387b66696c6c3a236666633130377d2e6334397b66696c6c3a236264626104128201527f6462647d2e6335307b66696c6c3a233736666630337d2e6335317b66696c6c3a6104328201527f233231323132317d2e6335327b66696c6c3a236666643630307d2e6335337b666104528201527f696c6c3a233664346334317d2e6335347b66696c6c3a233231393666337d2e636104728201527f35357b66696c6c3a236561383066637d2e6335367b66696c6c3a2334323432346104928201527f327d2e6335377b66696c6c3a233030393761377d2e6335387b66696c6c3a23666104b28201527f30363239327d2e6335397b66696c6c3a236666666666667d2e6336307b66696c6104d28201527f6c3a236566353335307d2e6336317b66696c6c3a236165643538317d2e6336326104f28201527f7b66696c6c3a236634386662317d2e6336337b66696c6c3a236565656565657d6105128201527f2e6336347b66696c6c3a236435303030307d2e6336357b66696c6c3a23386263610532820152753334617d2e6336367b66696c6c3a233032383864317d60501b61055282015261185761334b6105688301671e17b9ba3cb6329f60c11b815260080190565b651e17b9bb339f60d11b815260060190565b7f7b2274726169745f74797065223a22486174222c2276616c7565223a2200000081526000875161339581601d850160208c0161218d565b808301905062089f4b60ea1b80601d8301527f7b2274726169745f74797065223a2245796573222c2276616c7565223a220000602083015288516133e081603e850160208d0161218d565b603e92019182018190527f7b2274726169745f74797065223a224e6f7365222c2276616c7565223a2200006041830152875161342381605f850160208c0161218d565b605f9201918201526134f96134eb612b4d6134b56134776134af6134868261347160628a017f7b2274726169745f74797065223a224d6f757468222c2276616c7565223a22008152601f0190565b8e612905565b62089f4b60ea1b815260030190565b7f7b2274726169745f74797065223a22467572222c2276616c7565223a220000008152601d0190565b8a612905565b7f7b2274726169745f74797065223a224261636b67726f756e64222c2276616c7581526332911d1160e11b602082015260240190565b61227d60f01b815260020190565b999850505050505050505056fea264697066735822122014f71b3a12d1103249e460627864d5cdbbb9345cf673a82bb8c66ab3d74c120064736f6c63430008110033

Deployed Bytecode

0x6080604052600436106101ee5760003560e01c806379d3cd001161010d578063c01e6c6d116100a0578063e985e9c51161006f578063e985e9c514610543578063f0292a031461058c578063f04e283e146105a1578063f2fde38b146105b4578063fee81cf4146105c757600080fd5b8063c01e6c6d146104b8578063c23dc68f146104d8578063c87b56dd14610505578063d7533f021461052557600080fd5b806399a2557a116100dc57806399a2557a14610445578063a0712d6814610465578063a22cb46514610485578063b88d4fde146104a557600080fd5b806379d3cd00146103bb5780638462151c146103ea5780638da5cb5b1461041757806395d89b411461043057600080fd5b806342842e0e11610185578063603f4d5211610154578063603f4d521461034c5780636352211e1461037357806370a0823114610393578063715018a6146103b357600080fd5b806342842e0e146102ef57806344b28d591461030257806354d1f13d146103175780635bbb21771461031f57600080fd5b806318160ddd116101c157806318160ddd1461029757806323b872dd146102be57806325692962146102d157806332cb6b0c146102d957600080fd5b806301ffc9a7146101f357806306fdde0314610228578063081812fc1461024a578063095ea7b314610282575b600080fd5b3480156101ff57600080fd5b5061021361020e366004612170565b6105fa565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d61064c565b60405161021f91906121dd565b34801561025657600080fd5b5061026a6102653660046121f0565b6106de565b6040516001600160a01b03909116815260200161021f565b610295610290366004612225565b610722565b005b3480156102a357600080fd5b5060015460005403600019015b60405190815260200161021f565b6102956102cc36600461224f565b6107c2565b61029561095b565b3480156102e557600080fd5b506102b06103e881565b6102956102fd36600461224f565b6109aa565b34801561030e57600080fd5b506102956109ca565b6102956109e1565b34801561032b57600080fd5b5061033f61033a3660046122d6565b610a1d565b60405161021f9190612353565b34801561035857600080fd5b506010546103669060ff1681565b60405161021f91906123ab565b34801561037f57600080fd5b5061026a61038e3660046121f0565b610ae8565b34801561039f57600080fd5b506102b06103ae3660046123d3565b610af3565b610295610b41565b3480156103c757600080fd5b506103db6103d63660046123ee565b610b55565b60405161021f93929190612410565b3480156103f657600080fd5b5061040a6104053660046123d3565b610d34565b60405161021f9190612453565b34801561042357600080fd5b50638b78c6d8195461026a565b34801561043c57600080fd5b5061023d610e3c565b34801561045157600080fd5b5061040a61046036600461248b565b610e4b565b34801561047157600080fd5b506102956104803660046121f0565b610fd2565b34801561049157600080fd5b506102956104a03660046124be565b611144565b6102956104b3366004612510565b6111b0565b3480156104c457600080fd5b506102956104d33660046125eb565b6111fa565b3480156104e457600080fd5b506104f86104f33660046121f0565b6113c1565b60405161021f9190612636565b34801561051157600080fd5b5061023d6105203660046121f0565b611449565b34801561053157600080fd5b506040516202a300815260200161021f565b34801561054f57600080fd5b5061021361055e366004612644565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561059857600080fd5b506102b0600281565b6102956105af3660046123d3565b611495565b6102956105c23660046123d3565b611501565b3480156105d357600080fd5b506102b06105e23660046123d3565b63389a75e1600c908152600091909152602090205490565b60006301ffc9a760e01b6001600160e01b03198316148061062b57506380ac58cd60e01b6001600160e01b03198316145b806106465750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461065b90612677565b80601f016020809104026020016040519081016040528092919081815260200182805461068790612677565b80156106d45780601f106106a9576101008083540402835291602001916106d4565b820191906000526020600020905b8154815290600101906020018083116106b757829003601f168201915b5050505050905090565b60006106e98261153c565b610706576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061072d82610ae8565b9050336001600160a01b0382161461076657610749813361055e565b610766576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006107cd82611571565b9050836001600160a01b0316816001600160a01b0316146108005760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b0388169091141761084d57610830863361055e565b61084d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661087457604051633a954ecd60e21b815260040160405180910390fd5b801561087f57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036109115760018401600081815260046020526040812054900361090f57600054811461090f5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6109c5838383604051806020016040528060008152506111b0565b505050565b6109d26115e0565b6010805460ff19166001179055565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6060816000816001600160401b03811115610a3a57610a3a6124fa565b604051908082528060200260200182016040528015610a8c57816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610a585790505b50905060005b828114610adf57610aba868683818110610aae57610aae6126b1565b905060200201356113c1565b828281518110610acc57610acc6126b1565b6020908102919091010152600101610a92565b50949350505050565b600061064682611571565b60006001600160a01b038216610b1c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b610b496115e0565b610b5360006115fb565b565b600f6020528160005260406000208181548110610b7157600080fd5b906000526020600020906003020160009150915050806000018054610b9590612677565b80601f0160208091040260200160405190810160405280929190818152602001828054610bc190612677565b8015610c0e5780601f10610be357610100808354040283529160200191610c0e565b820191906000526020600020905b815481529060010190602001808311610bf157829003601f168201915b505050505090806001018054610c2390612677565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4f90612677565b8015610c9c5780601f10610c7157610100808354040283529160200191610c9c565b820191906000526020600020905b815481529060010190602001808311610c7f57829003601f168201915b505050505090806002018054610cb190612677565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdd90612677565b8015610d2a5780601f10610cff57610100808354040283529160200191610d2a565b820191906000526020600020905b815481529060010190602001808311610d0d57829003601f168201915b5050505050905083565b60606000806000610d4485610af3565b90506000816001600160401b03811115610d6057610d606124fa565b604051908082528060200260200182016040528015610d89578160200160208202803683370190505b509050610db660408051608081018252600080825260208201819052918101829052606081019190915290565b60015b838614610e3057610dc981611639565b91508160400151610e285781516001600160a01b031615610de957815194505b876001600160a01b0316856001600160a01b031603610e285780838780600101985081518110610e1b57610e1b6126b1565b6020026020010181815250505b600101610db9565b50909695505050505050565b60606003805461065b90612677565b6060818310610e6d57604051631960ccad60e11b815260040160405180910390fd5b600080610e7960005490565b90506001851015610e8957600194505b80841115610e95578093505b6000610ea087610af3565b905084861015610ebf5785850381811015610eb9578091505b50610ec3565b5060005b6000816001600160401b03811115610edd57610edd6124fa565b604051908082528060200260200182016040528015610f06578160200160208202803683370190505b50905081600003610f1c579350610fcb92505050565b6000610f27886113c1565b905060008160400151610f38575080515b885b888114158015610f4a5750848714155b15610fbf57610f5881611639565b92508260400151610fb75782516001600160a01b031615610f7857825191505b8a6001600160a01b0316826001600160a01b031603610fb75780848880600101995081518110610faa57610faa6126b1565b6020026020010181815250505b600101610f3a565b50505092835250909150505b9392505050565b333214610ff257604051634f19899d60e11b815260040160405180910390fd5b60028111156110145760405163162908e360e11b815260040160405180910390fd5b6103e8816110256000546000190190565b01111561104557604051634c9c5c3360e11b815260040160405180910390fd5b3360009081526005602052604090819020546002911c6001600160401b0316820111156110855760405163c109f51160e01b815260040160405180910390fd5b600160105460ff16600181111561109e5761109e612395565b146110bc57604051630d0ca57160e21b815260040160405180910390fd5b600054805b828201811015611135576040516bffffffffffffffffffffffff1933606090811b8216602084015241901b1660348201526048810182905262444e4160e81b6068820152606b0160408051601f198184030181529181528151602092830120600084815260089093529120556001016110c1565b506111403383611675565b5050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6111bb8484846107c2565b6001600160a01b0383163b156111f4576111d784848484611773565b6111f4576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6112026115e0565b60005b818110156111f457600f6000858152602001908152602001600020604051806060016040528085858581811061123d5761123d6126b1565b905060200281019061124f91906126c7565b61125990806126e7565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252506020018585858181106112a5576112a56126b1565b90506020028101906112b791906126c7565b6112c59060208101906126e7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250602001858585818110611311576113116126b1565b905060200281019061132391906126c7565b6113319060408101906126e7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505083546001810185559381526020902082519293600302019182915061138c9082612773565b50602082015160018201906113a19082612773565b50604082015160028201906113b69082612773565b505050600101611205565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061141a57506000548310155b156114255792915050565b61142e83611639565b90508060400151156114405792915050565b610fcb8361185f565b60606114548261153c565b61147157604051632f9d01c560e01b815260040160405180910390fd5b60008281526008602052604081205461148990611894565b9050610fcb8382611be3565b61149d6115e0565b63389a75e1600c52806000526020600c2080544211156114c557636f5e88186000526004601cfd5b6000815550600c5160601c80337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3638b78c6d8195550565b6115096115e0565b6001600160a01b03811661153057604051633a247dd760e11b815260040160405180910390fd5b611539816115fb565b50565b600081600111158015611550575060005482105b8015610646575050600090815260046020526040902054600160e01b161590565b600081806001116115c7576000548110156115c75760008181526004602052604081205490600160e01b821690036115c5575b80600003610fcb5750600019016000818152600460205260409020546115a4565b505b604051636f96cda160e11b815260040160405180910390fd5b638b78c6d819543314610b53576382b429006000526004601cfd5b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461064690611c50565b600080549082900361169a5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461174957808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611711565b508160000361176a57604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906117a8903390899088908890600401612832565b6020604051808303816000875af19250505080156117e3575060408051601f3d908101601f191682019092526117e091810190612865565b60015b611841573d808015611811576040519150601f19603f3d011682016040523d82523d6000602084013e611816565b606091505b508051600003611839576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261064661188f83611571565b611c50565b60408051600680825260e08201909252606091816020015b6118d060405180606001604052806060815260200160608152602001606081525090565b8152602001906001900390816118ac57905050905060008080805b6006811015611bda5761271064ffffffffff611908836028612898565b88901c1661191691906128c5565b9350600092506000915060005b60098260068110611936576119366126b1565b0154811015611bc75760098260068110611952576119526126b1565b018181548110611964576119646126b1565b60009182526020909120601082040154600f9091166002026101000a900461ffff16925061199283856128d9565b8511611ba9576000828152600f602052604090208054829081106119b8576119b86126b1565b90600052602060002090600302016040518060600160405290816000820180546119e190612677565b80601f0160208091040260200160405190810160405280929190818152602001828054611a0d90612677565b8015611a5a5780601f10611a2f57610100808354040283529160200191611a5a565b820191906000526020600020905b815481529060010190602001808311611a3d57829003601f168201915b50505050508152602001600182018054611a7390612677565b80601f0160208091040260200160405190810160405280929190818152602001828054611a9f90612677565b8015611aec5780601f10611ac157610100808354040283529160200191611aec565b820191906000526020600020905b815481529060010190602001808311611acf57829003601f168201915b50505050508152602001600282018054611b0590612677565b80601f0160208091040260200160405190810160405280929190818152602001828054611b3190612677565b8015611b7e5780601f10611b5357610100808354040283529160200191611b7e565b820191906000526020600020905b815481529060010190602001808311611b6157829003601f168201915b505050505081525050868381518110611b9957611b996126b1565b6020026020010181905250611bc7565b611bb383856128d9565b935080611bbf816128ec565b915050611923565b5080611bd2816128ec565b9150506118eb565b50505050919050565b6060611c29611bf184611c97565b611bfa84611cdb565b611c0385611f1e565b604051602001611c1593929190612921565b604051602081830303815290604052612005565b604051602001611c399190612b61565b604051602081830303815290604052905092915050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480611cb15750819003601f19909101908152919050565b6060611ce561210d565b60608060005b8551811015611f0057858181518110611d0657611d066126b1565b602002602001015160400151915060005b60048351611d259190612ba6565b811015611eed576000606184611d3c846004612898565b81518110611d4c57611d4c6126b1565b0160200151611d5e919060f81c612bba565b90506000606185611d70856004612898565b611d7b9060016128d9565b81518110611d8b57611d8b6126b1565b0160200151611d9d919060f81c612bba565b9050868260188110611db157611db16126b1565b60200201518160188110611dc757611dc76126b1565b602002015115611dd8575050611edb565b6001878360188110611dec57611dec6126b1565b60200201518260188110611e0257611e026126b1565b911515602090920201528585611e19856004612898565b611e249060026128d9565b81518110611e3457611e346126b1565b01602001516001600160f81b03191686611e4f866004612898565b611e5a9060036128d9565b81518110611e6a57611e6a6126b1565b016020908101516040516001600160f81b031993841692810192909252919091166021820152602201604051602081830303815290604052611eab84611c97565b611eb484611c97565b604051602001611ec79493929190612bcd565b604051602081830303815290604052955050505b80611ee5816128ec565b915050611d17565b5080611ef8816128ec565b915050611ceb565b50611f1582604051602001611c159190612c74565b95945050505050565b606081600081518110611f3357611f336126b1565b60200260200101516020015182600181518110611f5257611f526126b1565b60200260200101516020015183600281518110611f7157611f716126b1565b60200260200101516020015184600381518110611f9057611f906126b1565b60200260200101516020015185600481518110611faf57611faf6126b1565b60200260200101516020015186600581518110611fce57611fce6126b1565b602002602001015160200151604051602001611fef9695949392919061335d565b6040516020818303038152906040529050919050565b606061064682600080606083518015612105576003600282010460021b60405192507f4142434445464748494a4b4c4d4e4f505152535455565758595a616263646566601f526102308515027f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392d5f03603f52602083018181015b6003880197508751603f8160121c16518353603f81600c1c16516001840153603f8160061c16516002840153603f81165160038401535060048201915080821061207e57600384068680156120de576001821482151501850387526120f6565b603d821515850353603d6001831460011b8503538487525b5050601f01601f191660405250505b509392505050565b6040518061030001604052806018905b61212561213b565b81526020019060019003908161211d5790505090565b6040518061030001604052806018906020820280368337509192915050565b6001600160e01b03198116811461153957600080fd5b60006020828403121561218257600080fd5b8135610fcb8161215a565b60005b838110156121a8578181015183820152602001612190565b50506000910152565b600081518084526121c981602086016020860161218d565b601f01601f19169290920160200192915050565b602081526000610fcb60208301846121b1565b60006020828403121561220257600080fd5b5035919050565b80356001600160a01b038116811461222057600080fd5b919050565b6000806040838503121561223857600080fd5b61224183612209565b946020939093013593505050565b60008060006060848603121561226457600080fd5b61226d84612209565b925061227b60208501612209565b9150604084013590509250925092565b60008083601f84011261229d57600080fd5b5081356001600160401b038111156122b457600080fd5b6020830191508360208260051b85010111156122cf57600080fd5b9250929050565b600080602083850312156122e957600080fd5b82356001600160401b038111156122ff57600080fd5b61230b8582860161228b565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b81811015610e3057612382838551612317565b928401926080929092019160010161236f565b634e487b7160e01b600052602160045260246000fd5b60208101600283106123cd57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156123e557600080fd5b610fcb82612209565b6000806040838503121561240157600080fd5b50508035926020909101359150565b60608152600061242360608301866121b1565b828103602084015261243581866121b1565b9050828103604084015261244981856121b1565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610e305783518352928401929184019160010161246f565b6000806000606084860312156124a057600080fd5b6124a984612209565b95602085013595506040909401359392505050565b600080604083850312156124d157600080fd5b6124da83612209565b9150602083013580151581146124ef57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561252657600080fd5b61252f85612209565b935061253d60208601612209565b92506040850135915060608501356001600160401b038082111561256057600080fd5b818701915087601f83011261257457600080fd5b813581811115612586576125866124fa565b604051601f8201601f19908116603f011681019083821181831017156125ae576125ae6124fa565b816040528281528a60208487010111156125c757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060006040848603121561260057600080fd5b8335925060208401356001600160401b0381111561261d57600080fd5b6126298682870161228b565b9497909650939450505050565b608081016106468284612317565b6000806040838503121561265757600080fd5b61266083612209565b915061266e60208401612209565b90509250929050565b600181811c9082168061268b57607f821691505b6020821081036126ab57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60008235605e198336030181126126dd57600080fd5b9190910192915050565b6000808335601e198436030181126126fe57600080fd5b8301803591506001600160401b0382111561271857600080fd5b6020019150368190038213156122cf57600080fd5b601f8211156109c557600081815260208120601f850160051c810160208610156127545750805b601f850160051c820191505b8181101561095357828155600101612760565b81516001600160401b0381111561278c5761278c6124fa565b6127a08161279a8454612677565b8461272d565b602080601f8311600181146127d557600084156127bd5750858301515b600019600386901b1c1916600185901b178555610953565b600085815260208120601f198616915b82811015612804578886015182559484019460019091019084016127e5565b50858210156128225787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612449908301846121b1565b60006020828403121561287757600080fd5b8151610fcb8161215a565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761064657610646612882565b634e487b7160e01b600052601260045260246000fd5b6000826128d4576128d46128af565b500690565b8082018082111561064657610646612882565b6000600182016128fe576128fe612882565b5060010190565b6000815161291781856020860161218d565b9290920192915050565b6e7b226e616d65223a2242656172202360881b8152835160009061294c81600f85016020890161218d565b7f222c226465736372697074696f6e223a224f6e20436861696e20426561727320600f918401918201527f697320612070617373696f6e2070726f6a65637420696e737069726564206279602f8201527f2074686520636f6e63657074206f66206f6e2d636861696e204e4654732c204e604f8201527f4654732077697468206e6f20646570656e64656e6365206f6e20746865206f75606f8201527f747369646520776f726c64206f722065787465726e616c207365727669636573608f8201527f207375636820617320495046532e2052656e6465726564206469726563746c7960af8201527f2066726f6d2074686520626c6f636b636861696e20616e642064657374696e6560cf8201527f6420746f2072656d61696e20746865726520666f72657665722e20496e20746860ef8201527f65207472756520737069726974206f6620646563656e7472616c69736174696f61010f8201527f6e3b204343302c2031303025206f6e2d636861696e20616e6420302520726f7961012f8201526630b63a34b2b99760c91b61014f820152612449612b53612b4d612b31612b2b61015686017f222c22696d616765223a2022646174613a696d6167652f7376672b786d6c3b62815265185cd94d8d0b60d21b602082015260260190565b89612905565b6f222c2261747472696275746573223a5b60801b815260100190565b86612905565b615d7d60f01b815260020190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612b9981601d85016020870161218d565b91909101601d0192915050565b600082612bb557612bb56128af565b500490565b8181038181111561064657610646612882565b60008551612bdf818460208a0161218d565b6d3c7265637420636c6173733d276360901b9083019081528551612c0a81600e840160208a0161218d565b642720783d2760d81b600e92909101918201528451612c3081601384016020890161218d565b642720793d2760d81b601392909101918201528351612c5681601884016020880161218d565b6213979f60e91b60189290910191820152601b019695505050505050565b7f3c7376672069643d2262656172732220786d6c6e733d22687474703a2f2f777781527f772e77332e6f72672f323030302f73766722207072657365727665417370656360208201527f74526174696f3d22784d696e594d696e206d656574222076696577426f783d2260408201526a18101810191a10191a111f60a91b606082015260008251612d0c81606b85016020870161218d565b661e39ba3cb6329f60c91b606b918401918201527f726563747b77696474683a3170783b6865696768743a3170783b7d202362656160728201527f72737b73686170652d72656e646572696e673a20637269737065646765733b7d60928201527f2e6330307b66696c6c3a233963636336357d2e6330317b66696c6c3a2336383960b28201527f6633387d2e6330327b66696c6c3a233031353739627d2e6330337b66696c6c3a60d28201527f233534366537617d2e6330347b66696c6c3a233830646565617d2e6330357b6660f28201527f696c6c3a236237316331637d2e6330367b66696c6c3a236666656233627d2e636101128201527f30377b66696c6c3a236634343333367d2e6330387b66696c6c3a2363356531616101328201527f357d2e6330397b66696c6c3a233030626364347d2e6331307b66696c6c3a23346101528201527f32613566357d2e6331317b66696c6c3a236666666630307d2e6331327b66696c6101728201527f6c3a233030633835337d2e6331337b66696c6c3a233966613864617d2e6331346101928201527f7b66696c6c3a236131383837667d2e6331357b66696c6c3a233965396539657d6101b28201527f2e6331367b66696c6c3a233763623334327d2e6331377b66696c6c3a233033616101d28201527f3966347d2e6331387b66696c6c3a236666353235327d2e6331397b66696c6c3a6101f28201527f233464643065317d2e6332307b66696c6c3a236666666638647d2e6332317b666102128201527f696c6c3a236336323832387d2e6332327b66696c6c3a233637336162377d2e636102328201527f32337b66696c6c3a233030383937627d2e6332347b66696c6c3a2366626330326102528201527f647d2e6332357b66696c6c3a233963323762307d2e6332367b66696c6c3a23666102728201527f66393830307d2e6332377b66696c6c3a233465333432657d2e6332387b66696c6102928201527f6c3a233763346466667d2e6332397b66696c6c3a233564343033377d2e6333306102b28201527f7b66696c6c3a233030616363317d2e6333317b66696c6c3a233236633664617d6102d28201527f2e6333327b66696c6c3a236566396139617d2e6333337b66696c6c3a236433326102f28201527f6632667d2e6333347b66696c6c3a233333363931657d2e6333357b66696c6c3a6103128201527f233864366536337d2e6333367b66696c6c3a236666353732327d2e6333377b666103328201527f696c6c3a236666366534307d2e6333387b66696c6c3a236365393364387d2e636103528201527f33397b66696c6c3a236263616161347d2e6334307b66696c6c3a2366666635396103728201527f647d2e6334317b66696c6c3a236233383866667d2e6334327b66696c6c3a23306103928201527f30303030307d2e6334337b66696c6c3a236666656535387d2e6334347b66696c6103b28201527f6c3a236666663137367d2e6334357b66696c6c3a236661666166617d2e6334366103d28201527f7b66696c6c3a236664643833357d2e6334377b66696c6c3a233739353534387d6103f28201527f2e6334387b66696c6c3a236666633130377d2e6334397b66696c6c3a236264626104128201527f6462647d2e6335307b66696c6c3a233736666630337d2e6335317b66696c6c3a6104328201527f233231323132317d2e6335327b66696c6c3a236666643630307d2e6335337b666104528201527f696c6c3a233664346334317d2e6335347b66696c6c3a233231393666337d2e636104728201527f35357b66696c6c3a236561383066637d2e6335367b66696c6c3a2334323432346104928201527f327d2e6335377b66696c6c3a233030393761377d2e6335387b66696c6c3a23666104b28201527f30363239327d2e6335397b66696c6c3a236666666666667d2e6336307b66696c6104d28201527f6c3a236566353335307d2e6336317b66696c6c3a236165643538317d2e6336326104f28201527f7b66696c6c3a236634386662317d2e6336337b66696c6c3a236565656565657d6105128201527f2e6336347b66696c6c3a236435303030307d2e6336357b66696c6c3a23386263610532820152753334617d2e6336367b66696c6c3a233032383864317d60501b61055282015261185761334b6105688301671e17b9ba3cb6329f60c11b815260080190565b651e17b9bb339f60d11b815260060190565b7f7b2274726169745f74797065223a22486174222c2276616c7565223a2200000081526000875161339581601d850160208c0161218d565b808301905062089f4b60ea1b80601d8301527f7b2274726169745f74797065223a2245796573222c2276616c7565223a220000602083015288516133e081603e850160208d0161218d565b603e92019182018190527f7b2274726169745f74797065223a224e6f7365222c2276616c7565223a2200006041830152875161342381605f850160208c0161218d565b605f9201918201526134f96134eb612b4d6134b56134776134af6134868261347160628a017f7b2274726169745f74797065223a224d6f757468222c2276616c7565223a22008152601f0190565b8e612905565b62089f4b60ea1b815260030190565b7f7b2274726169745f74797065223a22467572222c2276616c7565223a220000008152601d0190565b8a612905565b7f7b2274726169745f74797065223a224261636b67726f756e64222c2276616c7581526332911d1160e11b602082015260240190565b61227d60f01b815260020190565b999850505050505050505056fea264697066735822122014f71b3a12d1103249e460627864d5cdbbb9345cf673a82bb8c66ab3d74c120064736f6c63430008110033

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.