ETH Price: $3,101.33 (-4.09%)
 

Overview

TokenID

1925

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
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:
CypherDudes

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion
File 1 of 19 : CypherDudes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol";
import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol";
import {File, Content} from "./ethfs/File.sol";

error NotTheOwner(string filename, address caller);
error NotAuthorized();
error MaxSupplyReached();
error SupplyLocked();

interface ICypherdudesFileStore {
    function storeFile(string calldata filename, bytes calldata content) external returns(File memory file);
    function deleteCard(string calldata filename) external;
    function readFile(string calldata filename) external view returns(string memory content);
    error NottheOwner(string filename, address wrongAddress);
}

interface ICypherDudesRenderer {
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// Returns the decimal string representation of value
function itoa(uint value) pure returns (string memory) {

  // Count the length of the decimal string representation
  uint length = 1;
  uint v = value;
  while ((v /= 10) != 0) { length++; }

  // Allocated enough bytes
  bytes memory result = new bytes(length);

  // Place each ASCII string character in the string,
  // right to left
  while (true) {
    length--;

    // The ASCII value of the modulo 10 value
    result[length] = bytes1(uint8(0x30 + (value % 10)));

    value /= 10;

    if (length == 0) { break; }
  }

  return string(result);
}

/// @title CypherDudes
/// @author @felixfelixfelix

contract CypherDudes is ERC721Royalty, Ownable {
    using SafeCast for uint256;

    uint256 public totalSupply = 1728;
    uint256 public maxSupply;
    uint256 public cost = 0.031337 ether;

    bytes32 public merkleRoot;

    uint256 public publicSaleStartTime = 1716860882000;

/// @dev Token variable to generate traits and track the progression
    struct TokenData {
        uint256 seed;
        uint256 globalProgression;
        string secretWord;
    }

/// @dev EIP-2098 compact signature representation
    struct SignatureCompact {
        bytes32 r;
        bytes32 yParityAndS;
    }

    ICypherdudesFileStore public fileStore;
    ICypherDudesRenderer public renderer;

/// @dev Mapping from token ID to token data
    mapping(uint256 => TokenData) public tokenData;

    constructor(
        address filestore_,
        address cypherdudesRenderer
    ) ERC721("CypherDudes", "CYD") Ownable(msg.sender) {
        maxSupply = 2048;
        fileStore = ICypherdudesFileStore(filestore_);
        renderer = ICypherDudesRenderer(cypherdudesRenderer);
        _setDefaultRoyalty(msg.sender, 500);
    }

    /// @dev Reentrancy protection
    modifier callerIsUser(){
        require(tx.origin == msg.sender, "The caller is another contract");
        _;
    }
    
    /// @dev contract dependency managment
    function setFileStoreContract(address _FileStoreContract) public onlyOwner{
        fileStore = ICypherdudesFileStore(_FileStoreContract);
    }
    function setRenderer(address _cypherdudesRenderer) public onlyOwner{
        renderer = ICypherDudesRenderer(_cypherdudesRenderer);
    }
    
    /// @dev internal mint function
    function mint() internal {
        if (totalSupply >= maxSupply) revert MaxSupplyReached();
        if (_msgSender() == owner()) revert NotAuthorized();

        uint256 _tokenId = totalSupply;
        totalSupply++;
        uint256 seed = uint256(keccak256(abi.encodePacked( block.number, block.timestamp, _msgSender(), _tokenId)));
        tokenData[_tokenId].globalProgression = seed%192 + 1;
        seed >>=8;
        tokenData[_tokenId].seed = seed;
        tokenData[_tokenId].secretWord = "";
        //
        fileStore.storeFile(string.concat("cypherCard_",toString(_tokenId)), "0x02797021a27e3f37a6631267647187c784f4a893cede9fd11089b7be3fefa5e972e0776cbe6bef2990c009a41138469675399bdba49c5e979e46aec7095cf428ccde43f6060c320d6680b73432f757d8660bbdd1e4144638fdb516b74fa77778ac8c65c42bed2d9176ed6cf973961bd1ba0d6b0bc548fdf583b645adb6f737e5c68abd277d3381484333309d3cc785091b92850f4c29f1f32dcd098d0adcdc70999a86c099b4b2a6a8333f764737ba6c0674375064b04ed8336e0f7bf6ab05a0");
        _safeMint(_msgSender(), _tokenId);
    }

    /// @dev Public mint function
    function publicMint(uint256 _quantity) external payable callerIsUser{
        require(block.timestamp < publicSaleStartTime, "Public sale not activated");
        require(_quantity >= 1, "No minting request");
        require(msg.value >= _quantity * 0.031337 ether, "Not enough funds");
        uint256 i;
        do {
            mint();
            unchecked{++i;}
        } while (i < _quantity);
    }

    /// @dev Owner mint function
    function gift(uint256 _quantity) external onlyOwner{
        uint256 i;
        do {
            mint();
            unchecked{++i;}
        } while (i < _quantity);
    }

    function setPublicSaleStart(uint256 _time) public onlyOwner{
        publicSaleStartTime = _time;
    }

    /// @dev withdraw contract balance
    function withdraw() public payable onlyOwner {
        require(payable(_msgSender()).send(address(this).balance));
    }

    /// @dev claims the words from the offchain list after signature validation
    function signedClaimWord(string calldata word, SignatureCompact calldata sig, uint256 tokenId) public {
        // Decompose the EIP-2098 signature (the struct is 64 bytes in length)
        uint8 v = 27 + uint8(uint256(sig.yParityAndS) >> 255);
        bytes32 s = bytes32((uint256(sig.yParityAndS) << 1) >> 1);

        address caller = _ecrecover(word, v, sig.r, s);

        if (caller == ownerOf(tokenId)){
            tokenData[tokenId].secretWord = word;
        } else {
            revert NotAuthorized();
        }
    }
    
    /// @dev read the message writen on the card
    function readCard(uint256 tokenId) public view returns(string memory content){
        return fileStore.readFile(string.concat("cypherCard_",toString(tokenId)));
    }

    /// @dev writes the message on the card
    function writeCard(uint256 tokenId, bytes memory content) public returns(File memory file){
        string memory filename = string.concat("cypherCard_",toString(tokenId));
        if(ownerOf(tokenId) == msg.sender){
            fileStore.deleteCard(filename);
            if(tokenData[tokenId].globalProgression < 288){
                tokenData[tokenId].globalProgression = tokenData[tokenId].globalProgression + 2;
            } else if(tokenData[tokenId].globalProgression < 289){
                ++tokenData[tokenId].globalProgression;
            }
            return fileStore.storeFile(filename, content);
        } else {
            revert NotTheOwner(filename, msg.sender);
            }
    }

    /// @dev calls the renderer token URI function
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        return renderer.tokenURI(tokenId);
    }

    /// @dev Decryption main function
    function encrypt(string memory key, string memory message) public pure returns(bytes memory mainHash){
       bytes memory hash = abi.encode(key, message);
       bytes memory hashedRecipient = abi.encode(key);

       return translate(hash, hashedRecipient);
   }

   /// @dev Decryption main function
   function decrypt(string memory key,bytes memory hash) public pure returns(string memory _message) {
       bytes memory hashedRecipient = abi.encode(key);
       bytes memory hashedMessage = translate(hash, hashedRecipient);

       return _message = read(hashedMessage);

   }

   /// @dev decode and extract message
   function read(bytes memory hash) private pure returns (string memory _message){
       (, _message) = abi.decode(hash, (string, string));
           return _message;  
   }

   /// @dev Bidirectional Encryption function
   function translate (bytes memory data, bytes memory key) private pure returns (bytes memory result) {
   // Store data length on stack for later use
   uint256 length = data.length;

   assembly {
       // Set result to free memory pointer
       result := mload (0x40)
       // Increase free memory pointer by lenght + 32
       mstore (0x40, add (add (result, length), 32))
       // Set result length
       mstore (result, length)
   }

   // Iterate over the data stepping by 32 bytes
   for (uint i = 0; i < length; i += 32) {
       // Generate hash of the key and offset
       bytes32 hash = keccak256 (abi.encodePacked (key, i));

       bytes32 chunk;
       assembly {
       // Read 32-bytes data chunk
       chunk := mload (add (data, add (i, 32)))
       }
       // XOR the chunk with hash
       chunk ^= hash;
       assembly {
       // Write 32-byte encrypted chunk
       mstore (add (result, add (i, 32)), chunk)
       }
   }
   }
    /// @dev Helper function to convert uint256 into string
    function toString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0";
        }
 
        uint256 temp = value;
        uint256 digits;
 
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
 
        bytes memory buffer = new bytes(digits);
 
        while (value != 0) {
            digits--;
            buffer[digits] = bytes1(uint8(48 + (value % 10)));
            value /= 10;
        }
 
        return string(buffer);
    }

    /// @dev Signer function
    function _ecrecover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        // Compute the EIP-191 prefixed message
        bytes memory prefixedMessage = abi.encodePacked(
        "\x19Ethereum Signed Message:\n",
        itoa(bytes(message).length),
        message
        );

        // Compute the message digest
        bytes32 digest = keccak256(prefixedMessage);

        // Use the native ecrecover provided by the EVM
        return ecrecover(digest, v, r, s);
    }

}

File 2 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

File 3 of 19 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 4 of 19 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(
        uint256 tokenId,
        uint256 salePrice
    ) external view returns (address receiver, uint256 royaltyAmount);
}

File 5 of 19 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.20;

import {IERC2981} from "../../interfaces/IERC2981.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 tokenId => RoyaltyInfo) private _tokenRoyaltyInfo;

    /**
     * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1).
     */
    error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator);

    /**
     * @dev The default royalty receiver is invalid.
     */
    error ERC2981InvalidDefaultRoyaltyReceiver(address receiver);

    /**
     * @dev The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1).
     */
    error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator);

    /**
     * @dev The royalty receiver for `tokenId` is invalid.
     */
    error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver);

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidDefaultRoyaltyReceiver(address(0));
        }

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0));
        }

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 6 of 19 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.20;

import {IERC721} from "./IERC721.sol";
import {IERC721Receiver} from "./IERC721Receiver.sol";
import {IERC721Metadata} from "./extensions/IERC721Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {Strings} from "../../utils/Strings.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    mapping(uint256 tokenId => address) private _owners;

    mapping(address owner => uint256) private _balances;

    mapping(uint256 tokenId => address) private _tokenApprovals;

    mapping(address owner => mapping(address operator => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

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

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual returns (string memory) {
        _requireOwned(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : "";
    }

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

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual {
        _approve(to, tokenId, _msgSender());
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual returns (address) {
        _requireOwned(tokenId);

        return _getApproved(tokenId);
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
        // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
        address previousOwner = _update(to, tokenId, _msgSender());
        if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {
        transferFrom(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     *
     * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the
     * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances
     * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by
     * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.
     */
    function _getApproved(uint256 tokenId) internal view virtual returns (address) {
        return _tokenApprovals[tokenId];
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
     * particular (ignoring whether it is owned by `owner`).
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {
        return
            spender != address(0) &&
            (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);
    }

    /**
     * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
     * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets
     * the `spender` for the specific `tokenId`.
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {
        if (!_isAuthorized(owner, spender, tokenId)) {
            if (owner == address(0)) {
                revert ERC721NonexistentToken(tokenId);
            } else {
                revert ERC721InsufficientApproval(spender, tokenId);
            }
        }
    }

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that
     * a uint256 would ever overflow from increments when these increments are bounded to uint128 values.
     *
     * WARNING: Increasing an account's balance using this function tends to be paired with an override of the
     * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership
     * remain consistent with one another.
     */
    function _increaseBalance(address account, uint128 value) internal virtual {
        unchecked {
            _balances[account] += value;
        }
    }

    /**
     * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner
     * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that
     * `auth` is either the owner of the token, or approved to operate on the token (by the owner).
     *
     * Emits a {Transfer} event.
     *
     * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.
     */
    function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {
        address from = _ownerOf(tokenId);

        // Perform (optional) operator check
        if (auth != address(0)) {
            _checkAuthorized(from, auth, tokenId);
        }

        // Execute the update
        if (from != address(0)) {
            // Clear approval. No need to re-authorize or emit the Approval event
            _approve(address(0), tokenId, address(0), false);

            unchecked {
                _balances[from] -= 1;
            }
        }

        if (to != address(0)) {
            unchecked {
                _balances[to] += 1;
            }
        }

        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        return from;
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner != address(0)) {
            revert ERC721InvalidSender(address(0));
        }
    }

    /**
     * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
        _mint(to, tokenId);
        _checkOnERC721Received(address(0), to, tokenId, data);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal {
        address previousOwner = _update(address(0), tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        }
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(address from, address to, uint256 tokenId) internal {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        } else if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients
     * are aware of the ERC721 standard to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is like {safeTransferFrom} in the sense that it invokes
     * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `tokenId` token must exist and be owned by `from`.
     * - `to` cannot be the zero address.
     * - `from` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(address from, address to, uint256 tokenId) internal {
        _safeTransfer(from, to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
        _transfer(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is
     * either the owner of the token, or approved to operate on all tokens held by this owner.
     *
     * Emits an {Approval} event.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address to, uint256 tokenId, address auth) internal {
        _approve(to, tokenId, auth, true);
    }

    /**
     * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not
     * emitted in the context of transfers.
     */
    function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {
        // Avoid reading the owner unless necessary
        if (emitEvent || auth != address(0)) {
            address owner = _requireOwned(tokenId);

            // We do not use _isAuthorized because single-token approvals should not be able to call approve
            if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {
                revert ERC721InvalidApprover(auth);
            }

            if (emitEvent) {
                emit Approval(owner, to, tokenId);
            }
        }

        _tokenApprovals[tokenId] = to;
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Requirements:
     * - operator can't be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
        if (operator == address(0)) {
            revert ERC721InvalidOperator(operator);
        }
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
     * Returns the owner.
     *
     * Overrides to ownership logic should be done to {_ownerOf}.
     */
    function _requireOwned(uint256 tokenId) internal view returns (address) {
        address owner = _ownerOf(tokenId);
        if (owner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        }
        return owner;
    }

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the
     * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {
        if (to.code.length > 0) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                if (retval != IERC721Receiver.onERC721Received.selector) {
                    revert ERC721InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert ERC721InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }
}

File 7 of 19 : ERC721Royalty.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Royalty.sol)

pragma solidity ^0.8.20;

import {ERC721} from "../ERC721.sol";
import {ERC2981} from "../../common/ERC2981.sol";

/**
 * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment
 * information.
 *
 * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually
 * for specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 */
abstract contract ERC721Royalty is ERC2981, ERC721 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) {
        return super.supportsInterface(interfaceId);
    }
}

File 8 of 19 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.20;

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

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

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

File 9 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

File 10 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

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

File 11 of 19 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 12 of 19 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.20;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

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

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

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

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

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

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

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

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Sorts the pair (a, b) and hashes the result.
     */
    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 13 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

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

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

File 14 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

File 15 of 19 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
     * Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.
            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
            // works in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 16 of 19 : SafeCast.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.

pragma solidity ^0.8.20;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeCast {
    /**
     * @dev Value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);

    /**
     * @dev An int value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedIntToUint(int256 value);

    /**
     * @dev Value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);

    /**
     * @dev An uint value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedUintToInt(uint256 value);

    /**
     * @dev Returns the downcasted uint248 from uint256, reverting on
     * overflow (when the input is greater than largest uint248).
     *
     * Counterpart to Solidity's `uint248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toUint248(uint256 value) internal pure returns (uint248) {
        if (value > type(uint248).max) {
            revert SafeCastOverflowedUintDowncast(248, value);
        }
        return uint248(value);
    }

    /**
     * @dev Returns the downcasted uint240 from uint256, reverting on
     * overflow (when the input is greater than largest uint240).
     *
     * Counterpart to Solidity's `uint240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toUint240(uint256 value) internal pure returns (uint240) {
        if (value > type(uint240).max) {
            revert SafeCastOverflowedUintDowncast(240, value);
        }
        return uint240(value);
    }

    /**
     * @dev Returns the downcasted uint232 from uint256, reverting on
     * overflow (when the input is greater than largest uint232).
     *
     * Counterpart to Solidity's `uint232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toUint232(uint256 value) internal pure returns (uint232) {
        if (value > type(uint232).max) {
            revert SafeCastOverflowedUintDowncast(232, value);
        }
        return uint232(value);
    }

    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        if (value > type(uint224).max) {
            revert SafeCastOverflowedUintDowncast(224, value);
        }
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint216 from uint256, reverting on
     * overflow (when the input is greater than largest uint216).
     *
     * Counterpart to Solidity's `uint216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toUint216(uint256 value) internal pure returns (uint216) {
        if (value > type(uint216).max) {
            revert SafeCastOverflowedUintDowncast(216, value);
        }
        return uint216(value);
    }

    /**
     * @dev Returns the downcasted uint208 from uint256, reverting on
     * overflow (when the input is greater than largest uint208).
     *
     * Counterpart to Solidity's `uint208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toUint208(uint256 value) internal pure returns (uint208) {
        if (value > type(uint208).max) {
            revert SafeCastOverflowedUintDowncast(208, value);
        }
        return uint208(value);
    }

    /**
     * @dev Returns the downcasted uint200 from uint256, reverting on
     * overflow (when the input is greater than largest uint200).
     *
     * Counterpart to Solidity's `uint200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toUint200(uint256 value) internal pure returns (uint200) {
        if (value > type(uint200).max) {
            revert SafeCastOverflowedUintDowncast(200, value);
        }
        return uint200(value);
    }

    /**
     * @dev Returns the downcasted uint192 from uint256, reverting on
     * overflow (when the input is greater than largest uint192).
     *
     * Counterpart to Solidity's `uint192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toUint192(uint256 value) internal pure returns (uint192) {
        if (value > type(uint192).max) {
            revert SafeCastOverflowedUintDowncast(192, value);
        }
        return uint192(value);
    }

    /**
     * @dev Returns the downcasted uint184 from uint256, reverting on
     * overflow (when the input is greater than largest uint184).
     *
     * Counterpart to Solidity's `uint184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toUint184(uint256 value) internal pure returns (uint184) {
        if (value > type(uint184).max) {
            revert SafeCastOverflowedUintDowncast(184, value);
        }
        return uint184(value);
    }

    /**
     * @dev Returns the downcasted uint176 from uint256, reverting on
     * overflow (when the input is greater than largest uint176).
     *
     * Counterpart to Solidity's `uint176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toUint176(uint256 value) internal pure returns (uint176) {
        if (value > type(uint176).max) {
            revert SafeCastOverflowedUintDowncast(176, value);
        }
        return uint176(value);
    }

    /**
     * @dev Returns the downcasted uint168 from uint256, reverting on
     * overflow (when the input is greater than largest uint168).
     *
     * Counterpart to Solidity's `uint168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toUint168(uint256 value) internal pure returns (uint168) {
        if (value > type(uint168).max) {
            revert SafeCastOverflowedUintDowncast(168, value);
        }
        return uint168(value);
    }

    /**
     * @dev Returns the downcasted uint160 from uint256, reverting on
     * overflow (when the input is greater than largest uint160).
     *
     * Counterpart to Solidity's `uint160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toUint160(uint256 value) internal pure returns (uint160) {
        if (value > type(uint160).max) {
            revert SafeCastOverflowedUintDowncast(160, value);
        }
        return uint160(value);
    }

    /**
     * @dev Returns the downcasted uint152 from uint256, reverting on
     * overflow (when the input is greater than largest uint152).
     *
     * Counterpart to Solidity's `uint152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toUint152(uint256 value) internal pure returns (uint152) {
        if (value > type(uint152).max) {
            revert SafeCastOverflowedUintDowncast(152, value);
        }
        return uint152(value);
    }

    /**
     * @dev Returns the downcasted uint144 from uint256, reverting on
     * overflow (when the input is greater than largest uint144).
     *
     * Counterpart to Solidity's `uint144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toUint144(uint256 value) internal pure returns (uint144) {
        if (value > type(uint144).max) {
            revert SafeCastOverflowedUintDowncast(144, value);
        }
        return uint144(value);
    }

    /**
     * @dev Returns the downcasted uint136 from uint256, reverting on
     * overflow (when the input is greater than largest uint136).
     *
     * Counterpart to Solidity's `uint136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toUint136(uint256 value) internal pure returns (uint136) {
        if (value > type(uint136).max) {
            revert SafeCastOverflowedUintDowncast(136, value);
        }
        return uint136(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        if (value > type(uint128).max) {
            revert SafeCastOverflowedUintDowncast(128, value);
        }
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint120 from uint256, reverting on
     * overflow (when the input is greater than largest uint120).
     *
     * Counterpart to Solidity's `uint120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toUint120(uint256 value) internal pure returns (uint120) {
        if (value > type(uint120).max) {
            revert SafeCastOverflowedUintDowncast(120, value);
        }
        return uint120(value);
    }

    /**
     * @dev Returns the downcasted uint112 from uint256, reverting on
     * overflow (when the input is greater than largest uint112).
     *
     * Counterpart to Solidity's `uint112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toUint112(uint256 value) internal pure returns (uint112) {
        if (value > type(uint112).max) {
            revert SafeCastOverflowedUintDowncast(112, value);
        }
        return uint112(value);
    }

    /**
     * @dev Returns the downcasted uint104 from uint256, reverting on
     * overflow (when the input is greater than largest uint104).
     *
     * Counterpart to Solidity's `uint104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toUint104(uint256 value) internal pure returns (uint104) {
        if (value > type(uint104).max) {
            revert SafeCastOverflowedUintDowncast(104, value);
        }
        return uint104(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        if (value > type(uint96).max) {
            revert SafeCastOverflowedUintDowncast(96, value);
        }
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint88 from uint256, reverting on
     * overflow (when the input is greater than largest uint88).
     *
     * Counterpart to Solidity's `uint88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toUint88(uint256 value) internal pure returns (uint88) {
        if (value > type(uint88).max) {
            revert SafeCastOverflowedUintDowncast(88, value);
        }
        return uint88(value);
    }

    /**
     * @dev Returns the downcasted uint80 from uint256, reverting on
     * overflow (when the input is greater than largest uint80).
     *
     * Counterpart to Solidity's `uint80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toUint80(uint256 value) internal pure returns (uint80) {
        if (value > type(uint80).max) {
            revert SafeCastOverflowedUintDowncast(80, value);
        }
        return uint80(value);
    }

    /**
     * @dev Returns the downcasted uint72 from uint256, reverting on
     * overflow (when the input is greater than largest uint72).
     *
     * Counterpart to Solidity's `uint72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toUint72(uint256 value) internal pure returns (uint72) {
        if (value > type(uint72).max) {
            revert SafeCastOverflowedUintDowncast(72, value);
        }
        return uint72(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        if (value > type(uint64).max) {
            revert SafeCastOverflowedUintDowncast(64, value);
        }
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint56 from uint256, reverting on
     * overflow (when the input is greater than largest uint56).
     *
     * Counterpart to Solidity's `uint56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toUint56(uint256 value) internal pure returns (uint56) {
        if (value > type(uint56).max) {
            revert SafeCastOverflowedUintDowncast(56, value);
        }
        return uint56(value);
    }

    /**
     * @dev Returns the downcasted uint48 from uint256, reverting on
     * overflow (when the input is greater than largest uint48).
     *
     * Counterpart to Solidity's `uint48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toUint48(uint256 value) internal pure returns (uint48) {
        if (value > type(uint48).max) {
            revert SafeCastOverflowedUintDowncast(48, value);
        }
        return uint48(value);
    }

    /**
     * @dev Returns the downcasted uint40 from uint256, reverting on
     * overflow (when the input is greater than largest uint40).
     *
     * Counterpart to Solidity's `uint40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toUint40(uint256 value) internal pure returns (uint40) {
        if (value > type(uint40).max) {
            revert SafeCastOverflowedUintDowncast(40, value);
        }
        return uint40(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        if (value > type(uint32).max) {
            revert SafeCastOverflowedUintDowncast(32, value);
        }
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint24 from uint256, reverting on
     * overflow (when the input is greater than largest uint24).
     *
     * Counterpart to Solidity's `uint24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toUint24(uint256 value) internal pure returns (uint24) {
        if (value > type(uint24).max) {
            revert SafeCastOverflowedUintDowncast(24, value);
        }
        return uint24(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        if (value > type(uint16).max) {
            revert SafeCastOverflowedUintDowncast(16, value);
        }
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        if (value > type(uint8).max) {
            revert SafeCastOverflowedUintDowncast(8, value);
        }
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        if (value < 0) {
            revert SafeCastOverflowedIntToUint(value);
        }
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int248 from int256, reverting on
     * overflow (when the input is less than smallest int248 or
     * greater than largest int248).
     *
     * Counterpart to Solidity's `int248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toInt248(int256 value) internal pure returns (int248 downcasted) {
        downcasted = int248(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(248, value);
        }
    }

    /**
     * @dev Returns the downcasted int240 from int256, reverting on
     * overflow (when the input is less than smallest int240 or
     * greater than largest int240).
     *
     * Counterpart to Solidity's `int240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toInt240(int256 value) internal pure returns (int240 downcasted) {
        downcasted = int240(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(240, value);
        }
    }

    /**
     * @dev Returns the downcasted int232 from int256, reverting on
     * overflow (when the input is less than smallest int232 or
     * greater than largest int232).
     *
     * Counterpart to Solidity's `int232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toInt232(int256 value) internal pure returns (int232 downcasted) {
        downcasted = int232(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(232, value);
        }
    }

    /**
     * @dev Returns the downcasted int224 from int256, reverting on
     * overflow (when the input is less than smallest int224 or
     * greater than largest int224).
     *
     * Counterpart to Solidity's `int224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toInt224(int256 value) internal pure returns (int224 downcasted) {
        downcasted = int224(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(224, value);
        }
    }

    /**
     * @dev Returns the downcasted int216 from int256, reverting on
     * overflow (when the input is less than smallest int216 or
     * greater than largest int216).
     *
     * Counterpart to Solidity's `int216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toInt216(int256 value) internal pure returns (int216 downcasted) {
        downcasted = int216(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(216, value);
        }
    }

    /**
     * @dev Returns the downcasted int208 from int256, reverting on
     * overflow (when the input is less than smallest int208 or
     * greater than largest int208).
     *
     * Counterpart to Solidity's `int208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toInt208(int256 value) internal pure returns (int208 downcasted) {
        downcasted = int208(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(208, value);
        }
    }

    /**
     * @dev Returns the downcasted int200 from int256, reverting on
     * overflow (when the input is less than smallest int200 or
     * greater than largest int200).
     *
     * Counterpart to Solidity's `int200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toInt200(int256 value) internal pure returns (int200 downcasted) {
        downcasted = int200(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(200, value);
        }
    }

    /**
     * @dev Returns the downcasted int192 from int256, reverting on
     * overflow (when the input is less than smallest int192 or
     * greater than largest int192).
     *
     * Counterpart to Solidity's `int192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toInt192(int256 value) internal pure returns (int192 downcasted) {
        downcasted = int192(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(192, value);
        }
    }

    /**
     * @dev Returns the downcasted int184 from int256, reverting on
     * overflow (when the input is less than smallest int184 or
     * greater than largest int184).
     *
     * Counterpart to Solidity's `int184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toInt184(int256 value) internal pure returns (int184 downcasted) {
        downcasted = int184(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(184, value);
        }
    }

    /**
     * @dev Returns the downcasted int176 from int256, reverting on
     * overflow (when the input is less than smallest int176 or
     * greater than largest int176).
     *
     * Counterpart to Solidity's `int176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toInt176(int256 value) internal pure returns (int176 downcasted) {
        downcasted = int176(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(176, value);
        }
    }

    /**
     * @dev Returns the downcasted int168 from int256, reverting on
     * overflow (when the input is less than smallest int168 or
     * greater than largest int168).
     *
     * Counterpart to Solidity's `int168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toInt168(int256 value) internal pure returns (int168 downcasted) {
        downcasted = int168(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(168, value);
        }
    }

    /**
     * @dev Returns the downcasted int160 from int256, reverting on
     * overflow (when the input is less than smallest int160 or
     * greater than largest int160).
     *
     * Counterpart to Solidity's `int160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toInt160(int256 value) internal pure returns (int160 downcasted) {
        downcasted = int160(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(160, value);
        }
    }

    /**
     * @dev Returns the downcasted int152 from int256, reverting on
     * overflow (when the input is less than smallest int152 or
     * greater than largest int152).
     *
     * Counterpart to Solidity's `int152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toInt152(int256 value) internal pure returns (int152 downcasted) {
        downcasted = int152(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(152, value);
        }
    }

    /**
     * @dev Returns the downcasted int144 from int256, reverting on
     * overflow (when the input is less than smallest int144 or
     * greater than largest int144).
     *
     * Counterpart to Solidity's `int144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toInt144(int256 value) internal pure returns (int144 downcasted) {
        downcasted = int144(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(144, value);
        }
    }

    /**
     * @dev Returns the downcasted int136 from int256, reverting on
     * overflow (when the input is less than smallest int136 or
     * greater than largest int136).
     *
     * Counterpart to Solidity's `int136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toInt136(int256 value) internal pure returns (int136 downcasted) {
        downcasted = int136(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(136, value);
        }
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toInt128(int256 value) internal pure returns (int128 downcasted) {
        downcasted = int128(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(128, value);
        }
    }

    /**
     * @dev Returns the downcasted int120 from int256, reverting on
     * overflow (when the input is less than smallest int120 or
     * greater than largest int120).
     *
     * Counterpart to Solidity's `int120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toInt120(int256 value) internal pure returns (int120 downcasted) {
        downcasted = int120(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(120, value);
        }
    }

    /**
     * @dev Returns the downcasted int112 from int256, reverting on
     * overflow (when the input is less than smallest int112 or
     * greater than largest int112).
     *
     * Counterpart to Solidity's `int112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toInt112(int256 value) internal pure returns (int112 downcasted) {
        downcasted = int112(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(112, value);
        }
    }

    /**
     * @dev Returns the downcasted int104 from int256, reverting on
     * overflow (when the input is less than smallest int104 or
     * greater than largest int104).
     *
     * Counterpart to Solidity's `int104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toInt104(int256 value) internal pure returns (int104 downcasted) {
        downcasted = int104(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(104, value);
        }
    }

    /**
     * @dev Returns the downcasted int96 from int256, reverting on
     * overflow (when the input is less than smallest int96 or
     * greater than largest int96).
     *
     * Counterpart to Solidity's `int96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toInt96(int256 value) internal pure returns (int96 downcasted) {
        downcasted = int96(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(96, value);
        }
    }

    /**
     * @dev Returns the downcasted int88 from int256, reverting on
     * overflow (when the input is less than smallest int88 or
     * greater than largest int88).
     *
     * Counterpart to Solidity's `int88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toInt88(int256 value) internal pure returns (int88 downcasted) {
        downcasted = int88(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(88, value);
        }
    }

    /**
     * @dev Returns the downcasted int80 from int256, reverting on
     * overflow (when the input is less than smallest int80 or
     * greater than largest int80).
     *
     * Counterpart to Solidity's `int80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toInt80(int256 value) internal pure returns (int80 downcasted) {
        downcasted = int80(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(80, value);
        }
    }

    /**
     * @dev Returns the downcasted int72 from int256, reverting on
     * overflow (when the input is less than smallest int72 or
     * greater than largest int72).
     *
     * Counterpart to Solidity's `int72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toInt72(int256 value) internal pure returns (int72 downcasted) {
        downcasted = int72(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(72, value);
        }
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toInt64(int256 value) internal pure returns (int64 downcasted) {
        downcasted = int64(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(64, value);
        }
    }

    /**
     * @dev Returns the downcasted int56 from int256, reverting on
     * overflow (when the input is less than smallest int56 or
     * greater than largest int56).
     *
     * Counterpart to Solidity's `int56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toInt56(int256 value) internal pure returns (int56 downcasted) {
        downcasted = int56(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(56, value);
        }
    }

    /**
     * @dev Returns the downcasted int48 from int256, reverting on
     * overflow (when the input is less than smallest int48 or
     * greater than largest int48).
     *
     * Counterpart to Solidity's `int48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toInt48(int256 value) internal pure returns (int48 downcasted) {
        downcasted = int48(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(48, value);
        }
    }

    /**
     * @dev Returns the downcasted int40 from int256, reverting on
     * overflow (when the input is less than smallest int40 or
     * greater than largest int40).
     *
     * Counterpart to Solidity's `int40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toInt40(int256 value) internal pure returns (int40 downcasted) {
        downcasted = int40(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(40, value);
        }
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toInt32(int256 value) internal pure returns (int32 downcasted) {
        downcasted = int32(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(32, value);
        }
    }

    /**
     * @dev Returns the downcasted int24 from int256, reverting on
     * overflow (when the input is less than smallest int24 or
     * greater than largest int24).
     *
     * Counterpart to Solidity's `int24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toInt24(int256 value) internal pure returns (int24 downcasted) {
        downcasted = int24(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(24, value);
        }
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toInt16(int256 value) internal pure returns (int16 downcasted) {
        downcasted = int16(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(16, value);
        }
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toInt8(int256 value) internal pure returns (int8 downcasted) {
        downcasted = int8(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(8, value);
        }
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        if (value > uint256(type(int256).max)) {
            revert SafeCastOverflowedUintToInt(value);
        }
        return int256(value);
    }
}

File 17 of 19 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 18 of 19 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant HEX_DIGITS = "0123456789abcdef";
    uint8 private constant ADDRESS_LENGTH = 20;

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
     * representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 19 of 19 : File.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.20;

struct Content {
    bytes32 checksum;
    address pointer;
}

struct File {
    uint256 size; // content length in bytes, max 24k
    Content[] contents;
}

function read(File memory file) view returns (string memory contents) {
    Content[] memory chunks = file.contents;

    // Adapted from https://gist.github.com/xtremetom/20411eb126aaf35f98c8a8ffa00123cd
    assembly {
        let len := mload(chunks)
        let totalSize := 0x20
        contents := mload(0x40)
        let size
        let chunk
        let pointer

        // loop through all pointer addresses
        // - get content
        // - get address
        // - get data size
        // - get code and add to contents
        // - update total size

        for { let i := 0 } lt(i, len) { i := add(i, 1) } {
            chunk := mload(add(chunks, add(0x20, mul(i, 0x20))))
            pointer := mload(add(chunk, 0x20))

            size := sub(extcodesize(pointer), 1)
            extcodecopy(pointer, add(contents, totalSize), 1, size)
            totalSize := add(totalSize, size)
        }

        // update contents size
        mstore(contents, sub(totalSize, 0x20))
        // store contents
        mstore(0x40, add(contents, and(add(totalSize, 0x1f), not(0x1f))))
    }
}

using {read} for File global;

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"filestore_","type":"address"},{"internalType":"address","name":"cypherdudesRenderer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidDefaultRoyalty","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidDefaultRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidTokenRoyalty","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidTokenRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"MaxSupplyReached","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[{"internalType":"string","name":"filename","type":"string"},{"internalType":"address","name":"caller","type":"address"}],"name":"NotTheOwner","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"decrypt","outputs":[{"internalType":"string","name":"_message","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"message","type":"string"}],"name":"encrypt","outputs":[{"internalType":"bytes","name":"mainHash","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"fileStore","outputs":[{"internalType":"contract ICypherdudesFileStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"gift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicSaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"readCard","outputs":[{"internalType":"string","name":"content","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"contract ICypherDudesRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_FileStoreContract","type":"address"}],"name":"setFileStoreContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"setPublicSaleStart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_cypherdudesRenderer","type":"address"}],"name":"setRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"word","type":"string"},{"components":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"yParityAndS","type":"bytes32"}],"internalType":"struct CypherDudes.SignatureCompact","name":"sig","type":"tuple"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"signedClaimWord","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":"","type":"uint256"}],"name":"tokenData","outputs":[{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"uint256","name":"globalProgression","type":"uint256"},{"internalType":"string","name":"secretWord","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"content","type":"bytes"}],"name":"writeCard","outputs":[{"components":[{"internalType":"uint256","name":"size","type":"uint256"},{"components":[{"internalType":"bytes32","name":"checksum","type":"bytes32"},{"internalType":"address","name":"pointer","type":"address"}],"internalType":"struct Content[]","name":"contents","type":"tuple[]"}],"internalType":"struct File","name":"file","type":"tuple"}],"stateMutability":"nonpayable","type":"function"}]

60806040526106c0600955666f54d5e1539000600b5565018fbce20c50600d553480156200002c57600080fd5b50604051620053e2380380620053e28339818101604052810190620000529190620004fc565b336040518060400160405280600b81526020017f43797068657244756465730000000000000000000000000000000000000000008152506040518060400160405280600381526020017f43594400000000000000000000000000000000000000000000000000000000008152508160029081620000d09190620007bd565b508060039081620000e29190620007bd565b505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036200015a5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620001519190620008b5565b60405180910390fd5b6200016b816200021360201b60201c565b50610800600a8190555081600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200020b336101f4620002d960201b60201c565b505062000961565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000620002eb6200048860201b60201c565b6bffffffffffffffffffffffff16905080826bffffffffffffffffffffffff161115620003535781816040517f6f483d090000000000000000000000000000000000000000000000000000000081526004016200034a92919062000934565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603620003c85760006040517fb6d9900a000000000000000000000000000000000000000000000000000000008152600401620003bf9190620008b5565b60405180910390fd5b60405180604001604052808473ffffffffffffffffffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff168152506000808201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550905050505050565b6000612710905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620004c48262000497565b9050919050565b620004d681620004b7565b8114620004e257600080fd5b50565b600081519050620004f681620004cb565b92915050565b6000806040838503121562000516576200051562000492565b5b60006200052685828601620004e5565b92505060206200053985828601620004e5565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620005c557607f821691505b602082108103620005db57620005da6200057d565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620006457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000606565b62000651868362000606565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006200069e62000698620006928462000669565b62000673565b62000669565b9050919050565b6000819050919050565b620006ba836200067d565b620006d2620006c982620006a5565b84845462000613565b825550505050565b600090565b620006e9620006da565b620006f6818484620006af565b505050565b5b818110156200071e5762000712600082620006df565b600181019050620006fc565b5050565b601f8211156200076d576200073781620005e1565b6200074284620005f6565b8101602085101562000752578190505b6200076a6200076185620005f6565b830182620006fb565b50505b505050565b600082821c905092915050565b6000620007926000198460080262000772565b1980831691505092915050565b6000620007ad83836200077f565b9150826002028217905092915050565b620007c88262000543565b67ffffffffffffffff811115620007e457620007e36200054e565b5b620007f08254620005ac565b620007fd82828562000722565b600060209050601f83116001811462000835576000841562000820578287015190505b6200082c85826200079f565b8655506200089c565b601f1984166200084586620005e1565b60005b828110156200086f5784890151825560018201915060208501945060208101905062000848565b868310156200088f57848901516200088b601f8916826200077f565b8355505b6001600288020188555050505b505050505050565b620008af81620004b7565b82525050565b6000602082019050620008cc6000830184620008a4565b92915050565b60006bffffffffffffffffffffffff82169050919050565b60006200090b62000905620008ff84620008d2565b62000673565b62000669565b9050919050565b6200091d81620008ea565b82525050565b6200092e8162000669565b82525050565b60006040820190506200094b600083018562000912565b6200095a602083018462000923565b9392505050565b614a7180620009716000396000f3fe60806040526004361061020f5760003560e01c80636352211e11610118578063a25f751f116100a0578063c87b56dd1161006f578063c87b56dd146107aa578063d5abeb01146107e7578063e4604df414610812578063e985e9c51461083b578063f2fde38b146108785761020f565b8063a25f751f146106f0578063b298247e14610719578063b4b5b48f14610742578063b88d4fde146107815761020f565b80638ada6b0f116100e75780638ada6b0f146106095780638da5cb5b1461063457806395d89b411461065f578063a101ef3e1461068a578063a22cb465146106c75761020f565b80636352211e1461054d5780636bb7b1d91461058a57806370a08231146105b5578063715018a6146105f25761020f565b806321ea07e11161019b5780632eb4a7ab1161016a5780632eb4a7ab146104895780633ccfd60b146104b457806342842e0e146104be57806356d3163d146104e75780636100447b146105105761020f565b806321ea07e1146103db57806323b872dd146104065780632a55205a1461042f5780632db115441461046d5761020f565b80630ca282f7116101e25780630ca282f7146102e2578063125704b81461030b57806313faede61461034857806318160ddd1461037357806320c7c4661461039e5761020f565b806301ffc9a71461021457806306fdde0314610251578063081812fc1461027c578063095ea7b3146102b9575b600080fd5b34801561022057600080fd5b5061023b60048036038101906102369190612da1565b6108a1565b6040516102489190612de9565b60405180910390f35b34801561025d57600080fd5b506102666108b3565b6040516102739190612e94565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612eec565b610945565b6040516102b09190612f5a565b60405180910390f35b3480156102c557600080fd5b506102e060048036038101906102db9190612fa1565b610961565b005b3480156102ee57600080fd5b5061030960048036038101906103049190612eec565b610977565b005b34801561031757600080fd5b50610332600480360381019061032d9190613116565b610989565b60405161033f91906131e3565b60405180910390f35b34801561035457600080fd5b5061035d6109e9565b60405161036a9190613214565b60405180910390f35b34801561037f57600080fd5b506103886109ef565b6040516103959190613214565b60405180910390f35b3480156103aa57600080fd5b506103c560048036038101906103c091906132d0565b6109f5565b6040516103d2919061347e565b60405180910390f35b3480156103e757600080fd5b506103f0610c91565b6040516103fd91906134ff565b60405180910390f35b34801561041257600080fd5b5061042d6004803603810190610428919061351a565b610cb7565b005b34801561043b57600080fd5b506104566004803603810190610451919061356d565b610db9565b6040516104649291906135ad565b60405180910390f35b61048760048036038101906104829190612eec565b610fa3565b005b34801561049557600080fd5b5061049e61110a565b6040516104ab91906135e5565b60405180910390f35b6104bc611110565b005b3480156104ca57600080fd5b506104e560048036038101906104e0919061351a565b61115f565b005b3480156104f357600080fd5b5061050e60048036038101906105099190613600565b61117f565b005b34801561051c57600080fd5b506105376004803603810190610532919061362d565b6111cb565b6040516105449190612e94565b60405180910390f35b34801561055957600080fd5b50610574600480360381019061056f9190612eec565b611212565b6040516105819190612f5a565b60405180910390f35b34801561059657600080fd5b5061059f611224565b6040516105ac9190613214565b60405180910390f35b3480156105c157600080fd5b506105dc60048036038101906105d79190613600565b61122a565b6040516105e99190613214565b60405180910390f35b3480156105fe57600080fd5b506106076112e4565b005b34801561061557600080fd5b5061061e6112f8565b60405161062b91906136c6565b60405180910390f35b34801561064057600080fd5b5061064961131e565b6040516106569190612f5a565b60405180910390f35b34801561066b57600080fd5b50610674611348565b6040516106819190612e94565b60405180910390f35b34801561069657600080fd5b506106b160048036038101906106ac9190612eec565b6113da565b6040516106be9190612e94565b60405180910390f35b3480156106d357600080fd5b506106ee60048036038101906106e9919061370d565b6114ab565b005b3480156106fc57600080fd5b5061071760048036038101906107129190613600565b6114c1565b005b34801561072557600080fd5b50610740600480360381019061073b9190612eec565b61150d565b005b34801561074e57600080fd5b5061076960048036038101906107649190612eec565b611531565b6040516107789392919061374d565b60405180910390f35b34801561078d57600080fd5b506107a860048036038101906107a3919061378b565b6115e3565b005b3480156107b657600080fd5b506107d160048036038101906107cc9190612eec565b611600565b6040516107de9190612e94565b60405180910390f35b3480156107f357600080fd5b506107fc6116aa565b6040516108099190613214565b60405180910390f35b34801561081e57600080fd5b5061083960048036038101906108349190613892565b6116b0565b005b34801561084757600080fd5b50610862600480360381019061085d9190613906565b6117db565b60405161086f9190612de9565b60405180910390f35b34801561088457600080fd5b5061089f600480360381019061089a9190613600565b61186f565b005b60006108ac826118f5565b9050919050565b6060600280546108c290613975565b80601f01602080910402602001604051908101604052809291908181526020018280546108ee90613975565b801561093b5780601f106109105761010080835404028352916020019161093b565b820191906000526020600020905b81548152906001019060200180831161091e57829003601f168201915b5050505050905090565b6000610950826119d7565b5061095a82611a5f565b9050919050565b610973828261096e611a9c565b611aa4565b5050565b61097f611ab6565b80600d8190555050565b6060600083836040516020016109a09291906139a6565b60405160208183030381529060405290506000846040516020016109c49190612e94565b60405160208183030381529060405290506109df8282611b3d565b9250505092915050565b600b5481565b60095481565b6109fd612d1b565b6000610a0884611bc4565b604051602001610a189190613a3f565b60405160208183030381529060405290503373ffffffffffffffffffffffffffffffffffffffff16610a4985611212565b73ffffffffffffffffffffffffffffffffffffffff1603610c4c57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637fc92bf9826040518263ffffffff1660e01b8152600401610abf9190612e94565b600060405180830381600087803b158015610ad957600080fd5b505af1158015610aed573d6000803e3d6000fd5b5050505061012060106000868152602001908152602001600020600101541015610b535760026010600086815260200190815260200160002060010154610b349190613a94565b6010600086815260200190815260200160002060010181905550610b9f565b61012160106000868152602001908152602001600020600101541015610b9e576010600085815260200190815260200160002060010160008154610b9690613ac8565b919050819055505b5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638cb5e7dc82856040518363ffffffff1660e01b8152600401610bfc929190613b10565b6000604051808303816000875af1158015610c1b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610c449190613d26565b915050610c8b565b80336040517f919560ad000000000000000000000000000000000000000000000000000000008152600401610c82929190613d6f565b60405180910390fd5b92915050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d295760006040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401610d209190612f5a565b60405180910390fd5b6000610d3d8383610d38611a9c565b611d23565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610db3578382826040517f64283d7b000000000000000000000000000000000000000000000000000000008152600401610daa93929190613d9f565b60405180910390fd5b50505050565b6000806000600160008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610f4e5760006040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000610f58611f3d565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610f849190613dd6565b610f8e9190613e47565b90508160000151819350935050509250929050565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611011576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100890613ec4565b60405180910390fd5b600d544210611055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104c90613f30565b60405180910390fd5b6001811015611099576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109090613f9c565b60405180910390fd5b666f54d5e1539000816110ac9190613dd6565b3410156110ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e590614008565b60405180910390fd5b60005b6110f9611f47565b8060010190508181106110f1575050565b600c5481565b611118611ab6565b611120611a9c565b73ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505061115d57600080fd5b565b61117a838383604051806020016040528060008152506115e3565b505050565b611187611ab6565b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606000836040516020016111e09190612e94565b604051602081830303815290604052905060006111fd8483611b3d565b9050611208816121b9565b9250505092915050565b600061121d826119d7565b9050919050565b600d5481565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361129d5760006040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016112949190612f5a565b60405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112ec611ab6565b6112f660006121da565b565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606003805461135790613975565b80601f016020809104026020016040519081016040528092919081815260200182805461138390613975565b80156113d05780601f106113a5576101008083540402835291602001916113d0565b820191906000526020600020905b8154815290600101906020018083116113b357829003601f168201915b5050505050905090565b6060600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166360f9bb1161142384611bc4565b6040516020016114339190613a3f565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161145e9190612e94565b600060405180830381865afa15801561147b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906114a49190614098565b9050919050565b6114bd6114b6611a9c565b83836122a0565b5050565b6114c9611ab6565b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611515611ab6565b60005b611520611f47565b806001019050818110611518575050565b601060205280600052604060002060009150905080600001549080600101549080600201805461156090613975565b80601f016020809104026020016040519081016040528092919081815260200182805461158c90613975565b80156115d95780601f106115ae576101008083540402835291602001916115d9565b820191906000526020600020905b8154815290600101906020018083116115bc57829003601f168201915b5050505050905083565b6115ee848484610cb7565b6115fa8484848461240f565b50505050565b6060600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c87b56dd836040518263ffffffff1660e01b815260040161165d9190613214565b600060405180830381865afa15801561167a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906116a39190614098565b9050919050565b600a5481565b600060ff836020013560001c901c601b6116ca91906140ee565b90506000600180856020013560001c901b901c60001b9050600061173887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050848760000135856125c6565b905061174384611212565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036117a057868660106000878152602001908152602001600020600201918261179a9291906142d0565b506117d2565b6040517fea8e4eb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611877611ab6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036118e95760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016118e09190612f5a565b60405180910390fd5b6118f2816121da565b50565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806119c057507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806119d057506119cf8261265d565b5b9050919050565b6000806119e3836126d7565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a5657826040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611a4d9190613214565b60405180910390fd5b80915050919050565b60006006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600033905090565b611ab18383836001612714565b505050565b611abe611a9c565b73ffffffffffffffffffffffffffffffffffffffff16611adc61131e565b73ffffffffffffffffffffffffffffffffffffffff1614611b3b57611aff611a9c565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611b329190612f5a565b60405180910390fd5b565b6060600083519050604051915060208183010160405280825260005b81811015611bbc5760008482604051602001611b769291906143fd565b6040516020818303038152906040528051906020012090506000602083018701519050818118905080602084018601525050602081611bb59190613a94565b9050611b59565b505092915050565b606060008203611c0b576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611d1e565b600082905060005b60008214611c3d578080611c2690613ac8565b915050600a82611c369190613e47565b9150611c13565b60008167ffffffffffffffff811115611c5957611c58612feb565b5b6040519080825280601f01601f191660200182016040528015611c8b5781602001600182028036833780820191505090505b5090505b60008514611d17578180611ca290614425565b925050600a85611cb2919061444e565b6030611cbe9190613a94565b60f81b818381518110611cd457611cd361447f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611d109190613e47565b9450611c8f565b8093505050505b919050565b600080611d2f846126d7565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611d7157611d708184866128d9565b5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611e0257611db3600085600080612714565b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611e85576001600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b846004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6000612710905090565b600a5460095410611f84576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f8c61131e565b73ffffffffffffffffffffffffffffffffffffffff16611faa611a9c565b73ffffffffffffffffffffffffffffffffffffffff1603611ff7576040517fea8e4eb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060095490506009600081548092919061201190613ac8565b919050555060004342612022611a9c565b8460405160200161203694939291906144f6565b6040516020818303038152906040528051906020012060001c9050600160c082612060919061444e565b61206a9190613a94565b6010600084815260200190815260200160002060010181905550600881901c9050806010600084815260200190815260200160002060000181905550604051806020016040528060008152506010600084815260200190815260200160002060020190816120d89190614544565b50600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638cb5e7dc61212084611bc4565b6040516020016121309190613a3f565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161215b9190614831565b6000604051808303816000875af115801561217a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906121a39190613d26565b506121b56121af611a9c565b8361299d565b5050565b6060818060200190518101906121cf9190614866565b905080915050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361231157816040517f5b08ba180000000000000000000000000000000000000000000000000000000081526004016123089190612f5a565b60405180910390fd5b80600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516124029190612de9565b60405180910390a3505050565b60008373ffffffffffffffffffffffffffffffffffffffff163b11156125c0578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02612453611a9c565b8685856040518563ffffffff1660e01b815260040161247594939291906148de565b6020604051808303816000875af19250505080156124b157506040513d601f19601f820116820180604052508101906124ae919061493f565b60015b612535573d80600081146124e1576040519150601f19603f3d011682016040523d82523d6000602084013e6124e6565b606091505b50600081510361252d57836040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016125249190612f5a565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146125be57836040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016125b59190612f5a565b60405180910390fd5b505b50505050565b6000806125d386516129bb565b866040516020016125e59291906149b8565b60405160208183030381529060405290506000818051906020012090506001818787876040516000815260200160405260405161262594939291906149f6565b6020604051602081039080840390855afa158015612647573d6000803e3d6000fd5b5050506020604051035192505050949350505050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806126d057506126cf82612adb565b5b9050919050565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b808061274d5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561288157600061275d846119d7565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156127c857508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156127db57506127d981846117db565b155b1561281d57826040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526004016128149190612f5a565b60405180910390fd5b811561287f57838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b836006600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6128e4838383612b45565b61299857600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361295957806040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016129509190613214565b60405180910390fd5b81816040517f177e802f00000000000000000000000000000000000000000000000000000000815260040161298f9291906135ad565b60405180910390fd5b505050565b6129b7828260405180602001604052806000815250612c06565b5050565b606060006001905060008390505b6000600a826129d89190613e47565b915081146129f35781806129eb90613ac8565b9250506129c9565b60008267ffffffffffffffff811115612a0f57612a0e612feb565b5b6040519080825280601f01601f191660200182016040528015612a415781602001600182028036833780820191505090505b5090505b600115612ad0578280612a5790614425565b935050600a85612a67919061444e565b6030612a739190613a94565b60f81b818481518110612a8957612a8861447f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612ac59190613e47565b945060008303612a45575b809350505050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015612bfd57508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612bbe5750612bbd84846117db565b5b80612bfc57508273ffffffffffffffffffffffffffffffffffffffff16612be483611a5f565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b612c108383612c22565b612c1d600084848461240f565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612c945760006040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612c8b9190612f5a565b60405180910390fd5b6000612ca283836000611d23565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612d165760006040517f73c6ac6e000000000000000000000000000000000000000000000000000000008152600401612d0d9190612f5a565b60405180910390fd5b505050565b604051806040016040528060008152602001606081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612d7e81612d49565b8114612d8957600080fd5b50565b600081359050612d9b81612d75565b92915050565b600060208284031215612db757612db6612d3f565b5b6000612dc584828501612d8c565b91505092915050565b60008115159050919050565b612de381612dce565b82525050565b6000602082019050612dfe6000830184612dda565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612e3e578082015181840152602081019050612e23565b60008484015250505050565b6000601f19601f8301169050919050565b6000612e6682612e04565b612e708185612e0f565b9350612e80818560208601612e20565b612e8981612e4a565b840191505092915050565b60006020820190508181036000830152612eae8184612e5b565b905092915050565b6000819050919050565b612ec981612eb6565b8114612ed457600080fd5b50565b600081359050612ee681612ec0565b92915050565b600060208284031215612f0257612f01612d3f565b5b6000612f1084828501612ed7565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612f4482612f19565b9050919050565b612f5481612f39565b82525050565b6000602082019050612f6f6000830184612f4b565b92915050565b612f7e81612f39565b8114612f8957600080fd5b50565b600081359050612f9b81612f75565b92915050565b60008060408385031215612fb857612fb7612d3f565b5b6000612fc685828601612f8c565b9250506020612fd785828601612ed7565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61302382612e4a565b810181811067ffffffffffffffff8211171561304257613041612feb565b5b80604052505050565b6000613055612d35565b9050613061828261301a565b919050565b600067ffffffffffffffff82111561308157613080612feb565b5b61308a82612e4a565b9050602081019050919050565b82818337600083830152505050565b60006130b96130b484613066565b61304b565b9050828152602081018484840111156130d5576130d4612fe6565b5b6130e0848285613097565b509392505050565b600082601f8301126130fd576130fc612fe1565b5b813561310d8482602086016130a6565b91505092915050565b6000806040838503121561312d5761312c612d3f565b5b600083013567ffffffffffffffff81111561314b5761314a612d44565b5b613157858286016130e8565b925050602083013567ffffffffffffffff81111561317857613177612d44565b5b613184858286016130e8565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60006131b58261318e565b6131bf8185613199565b93506131cf818560208601612e20565b6131d881612e4a565b840191505092915050565b600060208201905081810360008301526131fd81846131aa565b905092915050565b61320e81612eb6565b82525050565b60006020820190506132296000830184613205565b92915050565b600067ffffffffffffffff82111561324a57613249612feb565b5b61325382612e4a565b9050602081019050919050565b600061327361326e8461322f565b61304b565b90508281526020810184848401111561328f5761328e612fe6565b5b61329a848285613097565b509392505050565b600082601f8301126132b7576132b6612fe1565b5b81356132c7848260208601613260565b91505092915050565b600080604083850312156132e7576132e6612d3f565b5b60006132f585828601612ed7565b925050602083013567ffffffffffffffff81111561331657613315612d44565b5b613322858286016132a2565b9150509250929050565b61333581612eb6565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b61337a81613367565b82525050565b61338981612f39565b82525050565b6040820160008201516133a56000850182613371565b5060208201516133b86020850182613380565b50505050565b60006133ca838361338f565b60408301905092915050565b6000602082019050919050565b60006133ee8261333b565b6133f88185613346565b935061340383613357565b8060005b8381101561343457815161341b88826133be565b9750613426836133d6565b925050600181019050613407565b5085935050505092915050565b6000604083016000830151613459600086018261332c565b506020830151848203602086015261347182826133e3565b9150508091505092915050565b600060208201905081810360008301526134988184613441565b905092915050565b6000819050919050565b60006134c56134c06134bb84612f19565b6134a0565b612f19565b9050919050565b60006134d7826134aa565b9050919050565b60006134e9826134cc565b9050919050565b6134f9816134de565b82525050565b600060208201905061351460008301846134f0565b92915050565b60008060006060848603121561353357613532612d3f565b5b600061354186828701612f8c565b935050602061355286828701612f8c565b925050604061356386828701612ed7565b9150509250925092565b6000806040838503121561358457613583612d3f565b5b600061359285828601612ed7565b92505060206135a385828601612ed7565b9150509250929050565b60006040820190506135c26000830185612f4b565b6135cf6020830184613205565b9392505050565b6135df81613367565b82525050565b60006020820190506135fa60008301846135d6565b92915050565b60006020828403121561361657613615612d3f565b5b600061362484828501612f8c565b91505092915050565b6000806040838503121561364457613643612d3f565b5b600083013567ffffffffffffffff81111561366257613661612d44565b5b61366e858286016130e8565b925050602083013567ffffffffffffffff81111561368f5761368e612d44565b5b61369b858286016132a2565b9150509250929050565b60006136b0826134cc565b9050919050565b6136c0816136a5565b82525050565b60006020820190506136db60008301846136b7565b92915050565b6136ea81612dce565b81146136f557600080fd5b50565b600081359050613707816136e1565b92915050565b6000806040838503121561372457613723612d3f565b5b600061373285828601612f8c565b9250506020613743858286016136f8565b9150509250929050565b60006060820190506137626000830186613205565b61376f6020830185613205565b81810360408301526137818184612e5b565b9050949350505050565b600080600080608085870312156137a5576137a4612d3f565b5b60006137b387828801612f8c565b94505060206137c487828801612f8c565b93505060406137d587828801612ed7565b925050606085013567ffffffffffffffff8111156137f6576137f5612d44565b5b613802878288016132a2565b91505092959194509250565b600080fd5b600080fd5b60008083601f84011261382e5761382d612fe1565b5b8235905067ffffffffffffffff81111561384b5761384a61380e565b5b60208301915083600182028301111561386757613866613813565b5b9250929050565b600080fd5b6000604082840312156138895761388861386e565b5b81905092915050565b600080600080608085870312156138ac576138ab612d3f565b5b600085013567ffffffffffffffff8111156138ca576138c9612d44565b5b6138d687828801613818565b945094505060206138e987828801613873565b92505060606138fa87828801612ed7565b91505092959194509250565b6000806040838503121561391d5761391c612d3f565b5b600061392b85828601612f8c565b925050602061393c85828601612f8c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061398d57607f821691505b6020821081036139a05761399f613946565b5b50919050565b600060408201905081810360008301526139c08185612e5b565b905081810360208301526139d48184612e5b565b90509392505050565b7f637970686572436172645f000000000000000000000000000000000000000000815250565b600081905092915050565b6000613a1982612e04565b613a238185613a03565b9350613a33818560208601612e20565b80840191505092915050565b6000613a4a826139dd565b600b82019150613a5a8284613a0e565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613a9f82612eb6565b9150613aaa83612eb6565b9250828201905080821115613ac257613ac1613a65565b5b92915050565b6000613ad382612eb6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b0557613b04613a65565b5b600182019050919050565b60006040820190508181036000830152613b2a8185612e5b565b90508181036020830152613b3e81846131aa565b90509392505050565b600080fd5b600080fd5b600081519050613b6081612ec0565b92915050565b600067ffffffffffffffff821115613b8157613b80612feb565b5b602082029050602081019050919050565b613b9b81613367565b8114613ba657600080fd5b50565b600081519050613bb881613b92565b92915050565b600081519050613bcd81612f75565b92915050565b600060408284031215613be957613be8613b47565b5b613bf3604061304b565b90506000613c0384828501613ba9565b6000830152506020613c1784828501613bbe565b60208301525092915050565b6000613c36613c3184613b66565b61304b565b90508083825260208201905060408402830185811115613c5957613c58613813565b5b835b81811015613c825780613c6e8882613bd3565b845260208401935050604081019050613c5b565b5050509392505050565b600082601f830112613ca157613ca0612fe1565b5b8151613cb1848260208601613c23565b91505092915050565b600060408284031215613cd057613ccf613b47565b5b613cda604061304b565b90506000613cea84828501613b51565b600083015250602082015167ffffffffffffffff811115613d0e57613d0d613b4c565b5b613d1a84828501613c8c565b60208301525092915050565b600060208284031215613d3c57613d3b612d3f565b5b600082015167ffffffffffffffff811115613d5a57613d59612d44565b5b613d6684828501613cba565b91505092915050565b60006040820190508181036000830152613d898185612e5b565b9050613d986020830184612f4b565b9392505050565b6000606082019050613db46000830186612f4b565b613dc16020830185613205565b613dce6040830184612f4b565b949350505050565b6000613de182612eb6565b9150613dec83612eb6565b9250828202613dfa81612eb6565b91508282048414831517613e1157613e10613a65565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613e5282612eb6565b9150613e5d83612eb6565b925082613e6d57613e6c613e18565b5b828204905092915050565b7f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000600082015250565b6000613eae601e83612e0f565b9150613eb982613e78565b602082019050919050565b60006020820190508181036000830152613edd81613ea1565b9050919050565b7f5075626c69632073616c65206e6f742061637469766174656400000000000000600082015250565b6000613f1a601983612e0f565b9150613f2582613ee4565b602082019050919050565b60006020820190508181036000830152613f4981613f0d565b9050919050565b7f4e6f206d696e74696e6720726571756573740000000000000000000000000000600082015250565b6000613f86601283612e0f565b9150613f9182613f50565b602082019050919050565b60006020820190508181036000830152613fb581613f79565b9050919050565b7f4e6f7420656e6f7567682066756e647300000000000000000000000000000000600082015250565b6000613ff2601083612e0f565b9150613ffd82613fbc565b602082019050919050565b6000602082019050818103600083015261402181613fe5565b9050919050565b600061403b61403684613066565b61304b565b90508281526020810184848401111561405757614056612fe6565b5b614062848285612e20565b509392505050565b600082601f83011261407f5761407e612fe1565b5b815161408f848260208601614028565b91505092915050565b6000602082840312156140ae576140ad612d3f565b5b600082015167ffffffffffffffff8111156140cc576140cb612d44565b5b6140d88482850161406a565b91505092915050565b600060ff82169050919050565b60006140f9826140e1565b9150614104836140e1565b9250828201905060ff81111561411d5761411c613a65565b5b92915050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026141907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614153565b61419a8683614153565b95508019841693508086168417925050509392505050565b60006141cd6141c86141c384612eb6565b6134a0565b612eb6565b9050919050565b6000819050919050565b6141e7836141b2565b6141fb6141f3826141d4565b848454614160565b825550505050565b600090565b614210614203565b61421b8184846141de565b505050565b5b8181101561423f57614234600082614208565b600181019050614221565b5050565b601f821115614284576142558161412e565b61425e84614143565b8101602085101561426d578190505b61428161427985614143565b830182614220565b50505b505050565b600082821c905092915050565b60006142a760001984600802614289565b1980831691505092915050565b60006142c08383614296565b9150826002028217905092915050565b6142da8383614123565b67ffffffffffffffff8111156142f3576142f2612feb565b5b6142fd8254613975565b614308828285614243565b6000601f8311600181146143375760008415614325578287013590505b61432f85826142b4565b865550614397565b601f1984166143458661412e565b60005b8281101561436d57848901358255600182019150602085019450602081019050614348565b8683101561438a5784890135614386601f891682614296565b8355505b6001600288020188555050505b50505050505050565b600081905092915050565b60006143b68261318e565b6143c081856143a0565b93506143d0818560208601612e20565b80840191505092915050565b6000819050919050565b6143f76143f282612eb6565b6143dc565b82525050565b600061440982856143ab565b915061441582846143e6565b6020820191508190509392505050565b600061443082612eb6565b91506000820361444357614442613a65565b5b600182039050919050565b600061445982612eb6565b915061446483612eb6565b92508261447457614473613e18565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008160601b9050919050565b60006144c6826144ae565b9050919050565b60006144d8826144bb565b9050919050565b6144f06144eb82612f39565b6144cd565b82525050565b600061450282876143e6565b60208201915061451282866143e6565b60208201915061452282856144df565b60148201915061453282846143e6565b60208201915081905095945050505050565b61454d82612e04565b67ffffffffffffffff81111561456657614565612feb565b5b6145708254613975565b61457b828285614243565b600060209050601f8311600181146145ae576000841561459c578287015190505b6145a685826142b4565b86555061460e565b601f1984166145bc8661412e565b60005b828110156145e4578489015182556001820191506020850194506020810190506145bf565b8683101561460157848901516145fd601f891682614296565b8355505b6001600288020188555050505b505050505050565b7f307830323739373032316132376533663337613636333132363736343731383760008201527f633738346634613839336365646539666431313038396237626533666566613560208201527f653937326530373736636265366265663239393063303039613431313338343660408201527f393637353339396264626134396335653937396534366165633730393563663460608201527f323863636465343366363036306333323064363638306237333433326637353760808201527f643836363062626464316534313434363338666462353136623734666137373760a08201527f373861633863363563343262656432643931373665643663663937333936316260c08201527f643162613064366230626335343866646635383362363435616462366637333760e08201527f65356336386162643237376433333831343834333333333039643363633738356101008201527f30393162393238353066346332396631663332646364303938643061646364636101208201527f37303939396138366330393962346232613661383333336637363437333762616101408201527f36633036373433373530363462303465643833333665306637626636616230356101608201527f613000000000000000000000000000000000000000000000000000000000000061018082015250565b600061481a61018283613199565b915061482582614616565b6101a082019050919050565b6000604082019050818103600083015261484b8184612e5b565b9050818103602083015261485e8161480c565b905092915050565b6000806040838503121561487d5761487c612d3f565b5b600083015167ffffffffffffffff81111561489b5761489a612d44565b5b6148a78582860161406a565b925050602083015167ffffffffffffffff8111156148c8576148c7612d44565b5b6148d48582860161406a565b9150509250929050565b60006080820190506148f36000830187612f4b565b6149006020830186612f4b565b61490d6040830185613205565b818103606083015261491f81846131aa565b905095945050505050565b60008151905061493981612d75565b92915050565b60006020828403121561495557614954612d3f565b5b60006149638482850161492a565b91505092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000600082015250565b60006149a2601a83613a03565b91506149ad8261496c565b601a82019050919050565b60006149c382614995565b91506149cf8285613a0e565b91506149db8284613a0e565b91508190509392505050565b6149f0816140e1565b82525050565b6000608082019050614a0b60008301876135d6565b614a1860208301866149e7565b614a2560408301856135d6565b614a3260608301846135d6565b9594505050505056fea26469706673582212200a321f2912382efe39aa65d804bd5b33b7007bb1658c52b857ca53604e13ec3964736f6c634300081600330000000000000000000000001532bdc14ca87df4a7bd76c0856ddd108314002b000000000000000000000000480f79fed07475bcaf72263b37c11cebea6ca037

Deployed Bytecode

0x60806040526004361061020f5760003560e01c80636352211e11610118578063a25f751f116100a0578063c87b56dd1161006f578063c87b56dd146107aa578063d5abeb01146107e7578063e4604df414610812578063e985e9c51461083b578063f2fde38b146108785761020f565b8063a25f751f146106f0578063b298247e14610719578063b4b5b48f14610742578063b88d4fde146107815761020f565b80638ada6b0f116100e75780638ada6b0f146106095780638da5cb5b1461063457806395d89b411461065f578063a101ef3e1461068a578063a22cb465146106c75761020f565b80636352211e1461054d5780636bb7b1d91461058a57806370a08231146105b5578063715018a6146105f25761020f565b806321ea07e11161019b5780632eb4a7ab1161016a5780632eb4a7ab146104895780633ccfd60b146104b457806342842e0e146104be57806356d3163d146104e75780636100447b146105105761020f565b806321ea07e1146103db57806323b872dd146104065780632a55205a1461042f5780632db115441461046d5761020f565b80630ca282f7116101e25780630ca282f7146102e2578063125704b81461030b57806313faede61461034857806318160ddd1461037357806320c7c4661461039e5761020f565b806301ffc9a71461021457806306fdde0314610251578063081812fc1461027c578063095ea7b3146102b9575b600080fd5b34801561022057600080fd5b5061023b60048036038101906102369190612da1565b6108a1565b6040516102489190612de9565b60405180910390f35b34801561025d57600080fd5b506102666108b3565b6040516102739190612e94565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612eec565b610945565b6040516102b09190612f5a565b60405180910390f35b3480156102c557600080fd5b506102e060048036038101906102db9190612fa1565b610961565b005b3480156102ee57600080fd5b5061030960048036038101906103049190612eec565b610977565b005b34801561031757600080fd5b50610332600480360381019061032d9190613116565b610989565b60405161033f91906131e3565b60405180910390f35b34801561035457600080fd5b5061035d6109e9565b60405161036a9190613214565b60405180910390f35b34801561037f57600080fd5b506103886109ef565b6040516103959190613214565b60405180910390f35b3480156103aa57600080fd5b506103c560048036038101906103c091906132d0565b6109f5565b6040516103d2919061347e565b60405180910390f35b3480156103e757600080fd5b506103f0610c91565b6040516103fd91906134ff565b60405180910390f35b34801561041257600080fd5b5061042d6004803603810190610428919061351a565b610cb7565b005b34801561043b57600080fd5b506104566004803603810190610451919061356d565b610db9565b6040516104649291906135ad565b60405180910390f35b61048760048036038101906104829190612eec565b610fa3565b005b34801561049557600080fd5b5061049e61110a565b6040516104ab91906135e5565b60405180910390f35b6104bc611110565b005b3480156104ca57600080fd5b506104e560048036038101906104e0919061351a565b61115f565b005b3480156104f357600080fd5b5061050e60048036038101906105099190613600565b61117f565b005b34801561051c57600080fd5b506105376004803603810190610532919061362d565b6111cb565b6040516105449190612e94565b60405180910390f35b34801561055957600080fd5b50610574600480360381019061056f9190612eec565b611212565b6040516105819190612f5a565b60405180910390f35b34801561059657600080fd5b5061059f611224565b6040516105ac9190613214565b60405180910390f35b3480156105c157600080fd5b506105dc60048036038101906105d79190613600565b61122a565b6040516105e99190613214565b60405180910390f35b3480156105fe57600080fd5b506106076112e4565b005b34801561061557600080fd5b5061061e6112f8565b60405161062b91906136c6565b60405180910390f35b34801561064057600080fd5b5061064961131e565b6040516106569190612f5a565b60405180910390f35b34801561066b57600080fd5b50610674611348565b6040516106819190612e94565b60405180910390f35b34801561069657600080fd5b506106b160048036038101906106ac9190612eec565b6113da565b6040516106be9190612e94565b60405180910390f35b3480156106d357600080fd5b506106ee60048036038101906106e9919061370d565b6114ab565b005b3480156106fc57600080fd5b5061071760048036038101906107129190613600565b6114c1565b005b34801561072557600080fd5b50610740600480360381019061073b9190612eec565b61150d565b005b34801561074e57600080fd5b5061076960048036038101906107649190612eec565b611531565b6040516107789392919061374d565b60405180910390f35b34801561078d57600080fd5b506107a860048036038101906107a3919061378b565b6115e3565b005b3480156107b657600080fd5b506107d160048036038101906107cc9190612eec565b611600565b6040516107de9190612e94565b60405180910390f35b3480156107f357600080fd5b506107fc6116aa565b6040516108099190613214565b60405180910390f35b34801561081e57600080fd5b5061083960048036038101906108349190613892565b6116b0565b005b34801561084757600080fd5b50610862600480360381019061085d9190613906565b6117db565b60405161086f9190612de9565b60405180910390f35b34801561088457600080fd5b5061089f600480360381019061089a9190613600565b61186f565b005b60006108ac826118f5565b9050919050565b6060600280546108c290613975565b80601f01602080910402602001604051908101604052809291908181526020018280546108ee90613975565b801561093b5780601f106109105761010080835404028352916020019161093b565b820191906000526020600020905b81548152906001019060200180831161091e57829003601f168201915b5050505050905090565b6000610950826119d7565b5061095a82611a5f565b9050919050565b610973828261096e611a9c565b611aa4565b5050565b61097f611ab6565b80600d8190555050565b6060600083836040516020016109a09291906139a6565b60405160208183030381529060405290506000846040516020016109c49190612e94565b60405160208183030381529060405290506109df8282611b3d565b9250505092915050565b600b5481565b60095481565b6109fd612d1b565b6000610a0884611bc4565b604051602001610a189190613a3f565b60405160208183030381529060405290503373ffffffffffffffffffffffffffffffffffffffff16610a4985611212565b73ffffffffffffffffffffffffffffffffffffffff1603610c4c57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637fc92bf9826040518263ffffffff1660e01b8152600401610abf9190612e94565b600060405180830381600087803b158015610ad957600080fd5b505af1158015610aed573d6000803e3d6000fd5b5050505061012060106000868152602001908152602001600020600101541015610b535760026010600086815260200190815260200160002060010154610b349190613a94565b6010600086815260200190815260200160002060010181905550610b9f565b61012160106000868152602001908152602001600020600101541015610b9e576010600085815260200190815260200160002060010160008154610b9690613ac8565b919050819055505b5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638cb5e7dc82856040518363ffffffff1660e01b8152600401610bfc929190613b10565b6000604051808303816000875af1158015610c1b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610c449190613d26565b915050610c8b565b80336040517f919560ad000000000000000000000000000000000000000000000000000000008152600401610c82929190613d6f565b60405180910390fd5b92915050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d295760006040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401610d209190612f5a565b60405180910390fd5b6000610d3d8383610d38611a9c565b611d23565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610db3578382826040517f64283d7b000000000000000000000000000000000000000000000000000000008152600401610daa93929190613d9f565b60405180910390fd5b50505050565b6000806000600160008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610f4e5760006040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000610f58611f3d565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610f849190613dd6565b610f8e9190613e47565b90508160000151819350935050509250929050565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611011576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100890613ec4565b60405180910390fd5b600d544210611055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104c90613f30565b60405180910390fd5b6001811015611099576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109090613f9c565b60405180910390fd5b666f54d5e1539000816110ac9190613dd6565b3410156110ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e590614008565b60405180910390fd5b60005b6110f9611f47565b8060010190508181106110f1575050565b600c5481565b611118611ab6565b611120611a9c565b73ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505061115d57600080fd5b565b61117a838383604051806020016040528060008152506115e3565b505050565b611187611ab6565b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606000836040516020016111e09190612e94565b604051602081830303815290604052905060006111fd8483611b3d565b9050611208816121b9565b9250505092915050565b600061121d826119d7565b9050919050565b600d5481565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361129d5760006040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016112949190612f5a565b60405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112ec611ab6565b6112f660006121da565b565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606003805461135790613975565b80601f016020809104026020016040519081016040528092919081815260200182805461138390613975565b80156113d05780601f106113a5576101008083540402835291602001916113d0565b820191906000526020600020905b8154815290600101906020018083116113b357829003601f168201915b5050505050905090565b6060600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166360f9bb1161142384611bc4565b6040516020016114339190613a3f565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161145e9190612e94565b600060405180830381865afa15801561147b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906114a49190614098565b9050919050565b6114bd6114b6611a9c565b83836122a0565b5050565b6114c9611ab6565b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611515611ab6565b60005b611520611f47565b806001019050818110611518575050565b601060205280600052604060002060009150905080600001549080600101549080600201805461156090613975565b80601f016020809104026020016040519081016040528092919081815260200182805461158c90613975565b80156115d95780601f106115ae576101008083540402835291602001916115d9565b820191906000526020600020905b8154815290600101906020018083116115bc57829003601f168201915b5050505050905083565b6115ee848484610cb7565b6115fa8484848461240f565b50505050565b6060600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c87b56dd836040518263ffffffff1660e01b815260040161165d9190613214565b600060405180830381865afa15801561167a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906116a39190614098565b9050919050565b600a5481565b600060ff836020013560001c901c601b6116ca91906140ee565b90506000600180856020013560001c901b901c60001b9050600061173887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050848760000135856125c6565b905061174384611212565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036117a057868660106000878152602001908152602001600020600201918261179a9291906142d0565b506117d2565b6040517fea8e4eb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611877611ab6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036118e95760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016118e09190612f5a565b60405180910390fd5b6118f2816121da565b50565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806119c057507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806119d057506119cf8261265d565b5b9050919050565b6000806119e3836126d7565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a5657826040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611a4d9190613214565b60405180910390fd5b80915050919050565b60006006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600033905090565b611ab18383836001612714565b505050565b611abe611a9c565b73ffffffffffffffffffffffffffffffffffffffff16611adc61131e565b73ffffffffffffffffffffffffffffffffffffffff1614611b3b57611aff611a9c565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611b329190612f5a565b60405180910390fd5b565b6060600083519050604051915060208183010160405280825260005b81811015611bbc5760008482604051602001611b769291906143fd565b6040516020818303038152906040528051906020012090506000602083018701519050818118905080602084018601525050602081611bb59190613a94565b9050611b59565b505092915050565b606060008203611c0b576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611d1e565b600082905060005b60008214611c3d578080611c2690613ac8565b915050600a82611c369190613e47565b9150611c13565b60008167ffffffffffffffff811115611c5957611c58612feb565b5b6040519080825280601f01601f191660200182016040528015611c8b5781602001600182028036833780820191505090505b5090505b60008514611d17578180611ca290614425565b925050600a85611cb2919061444e565b6030611cbe9190613a94565b60f81b818381518110611cd457611cd361447f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611d109190613e47565b9450611c8f565b8093505050505b919050565b600080611d2f846126d7565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611d7157611d708184866128d9565b5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611e0257611db3600085600080612714565b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611e85576001600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b846004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6000612710905090565b600a5460095410611f84576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f8c61131e565b73ffffffffffffffffffffffffffffffffffffffff16611faa611a9c565b73ffffffffffffffffffffffffffffffffffffffff1603611ff7576040517fea8e4eb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060095490506009600081548092919061201190613ac8565b919050555060004342612022611a9c565b8460405160200161203694939291906144f6565b6040516020818303038152906040528051906020012060001c9050600160c082612060919061444e565b61206a9190613a94565b6010600084815260200190815260200160002060010181905550600881901c9050806010600084815260200190815260200160002060000181905550604051806020016040528060008152506010600084815260200190815260200160002060020190816120d89190614544565b50600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638cb5e7dc61212084611bc4565b6040516020016121309190613a3f565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161215b9190614831565b6000604051808303816000875af115801561217a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906121a39190613d26565b506121b56121af611a9c565b8361299d565b5050565b6060818060200190518101906121cf9190614866565b905080915050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361231157816040517f5b08ba180000000000000000000000000000000000000000000000000000000081526004016123089190612f5a565b60405180910390fd5b80600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516124029190612de9565b60405180910390a3505050565b60008373ffffffffffffffffffffffffffffffffffffffff163b11156125c0578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02612453611a9c565b8685856040518563ffffffff1660e01b815260040161247594939291906148de565b6020604051808303816000875af19250505080156124b157506040513d601f19601f820116820180604052508101906124ae919061493f565b60015b612535573d80600081146124e1576040519150601f19603f3d011682016040523d82523d6000602084013e6124e6565b606091505b50600081510361252d57836040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016125249190612f5a565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146125be57836040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016125b59190612f5a565b60405180910390fd5b505b50505050565b6000806125d386516129bb565b866040516020016125e59291906149b8565b60405160208183030381529060405290506000818051906020012090506001818787876040516000815260200160405260405161262594939291906149f6565b6020604051602081039080840390855afa158015612647573d6000803e3d6000fd5b5050506020604051035192505050949350505050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806126d057506126cf82612adb565b5b9050919050565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b808061274d5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561288157600061275d846119d7565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156127c857508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156127db57506127d981846117db565b155b1561281d57826040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526004016128149190612f5a565b60405180910390fd5b811561287f57838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b836006600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6128e4838383612b45565b61299857600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361295957806040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016129509190613214565b60405180910390fd5b81816040517f177e802f00000000000000000000000000000000000000000000000000000000815260040161298f9291906135ad565b60405180910390fd5b505050565b6129b7828260405180602001604052806000815250612c06565b5050565b606060006001905060008390505b6000600a826129d89190613e47565b915081146129f35781806129eb90613ac8565b9250506129c9565b60008267ffffffffffffffff811115612a0f57612a0e612feb565b5b6040519080825280601f01601f191660200182016040528015612a415781602001600182028036833780820191505090505b5090505b600115612ad0578280612a5790614425565b935050600a85612a67919061444e565b6030612a739190613a94565b60f81b818481518110612a8957612a8861447f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612ac59190613e47565b945060008303612a45575b809350505050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015612bfd57508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612bbe5750612bbd84846117db565b5b80612bfc57508273ffffffffffffffffffffffffffffffffffffffff16612be483611a5f565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b612c108383612c22565b612c1d600084848461240f565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612c945760006040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612c8b9190612f5a565b60405180910390fd5b6000612ca283836000611d23565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612d165760006040517f73c6ac6e000000000000000000000000000000000000000000000000000000008152600401612d0d9190612f5a565b60405180910390fd5b505050565b604051806040016040528060008152602001606081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612d7e81612d49565b8114612d8957600080fd5b50565b600081359050612d9b81612d75565b92915050565b600060208284031215612db757612db6612d3f565b5b6000612dc584828501612d8c565b91505092915050565b60008115159050919050565b612de381612dce565b82525050565b6000602082019050612dfe6000830184612dda565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612e3e578082015181840152602081019050612e23565b60008484015250505050565b6000601f19601f8301169050919050565b6000612e6682612e04565b612e708185612e0f565b9350612e80818560208601612e20565b612e8981612e4a565b840191505092915050565b60006020820190508181036000830152612eae8184612e5b565b905092915050565b6000819050919050565b612ec981612eb6565b8114612ed457600080fd5b50565b600081359050612ee681612ec0565b92915050565b600060208284031215612f0257612f01612d3f565b5b6000612f1084828501612ed7565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612f4482612f19565b9050919050565b612f5481612f39565b82525050565b6000602082019050612f6f6000830184612f4b565b92915050565b612f7e81612f39565b8114612f8957600080fd5b50565b600081359050612f9b81612f75565b92915050565b60008060408385031215612fb857612fb7612d3f565b5b6000612fc685828601612f8c565b9250506020612fd785828601612ed7565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61302382612e4a565b810181811067ffffffffffffffff8211171561304257613041612feb565b5b80604052505050565b6000613055612d35565b9050613061828261301a565b919050565b600067ffffffffffffffff82111561308157613080612feb565b5b61308a82612e4a565b9050602081019050919050565b82818337600083830152505050565b60006130b96130b484613066565b61304b565b9050828152602081018484840111156130d5576130d4612fe6565b5b6130e0848285613097565b509392505050565b600082601f8301126130fd576130fc612fe1565b5b813561310d8482602086016130a6565b91505092915050565b6000806040838503121561312d5761312c612d3f565b5b600083013567ffffffffffffffff81111561314b5761314a612d44565b5b613157858286016130e8565b925050602083013567ffffffffffffffff81111561317857613177612d44565b5b613184858286016130e8565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60006131b58261318e565b6131bf8185613199565b93506131cf818560208601612e20565b6131d881612e4a565b840191505092915050565b600060208201905081810360008301526131fd81846131aa565b905092915050565b61320e81612eb6565b82525050565b60006020820190506132296000830184613205565b92915050565b600067ffffffffffffffff82111561324a57613249612feb565b5b61325382612e4a565b9050602081019050919050565b600061327361326e8461322f565b61304b565b90508281526020810184848401111561328f5761328e612fe6565b5b61329a848285613097565b509392505050565b600082601f8301126132b7576132b6612fe1565b5b81356132c7848260208601613260565b91505092915050565b600080604083850312156132e7576132e6612d3f565b5b60006132f585828601612ed7565b925050602083013567ffffffffffffffff81111561331657613315612d44565b5b613322858286016132a2565b9150509250929050565b61333581612eb6565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b61337a81613367565b82525050565b61338981612f39565b82525050565b6040820160008201516133a56000850182613371565b5060208201516133b86020850182613380565b50505050565b60006133ca838361338f565b60408301905092915050565b6000602082019050919050565b60006133ee8261333b565b6133f88185613346565b935061340383613357565b8060005b8381101561343457815161341b88826133be565b9750613426836133d6565b925050600181019050613407565b5085935050505092915050565b6000604083016000830151613459600086018261332c565b506020830151848203602086015261347182826133e3565b9150508091505092915050565b600060208201905081810360008301526134988184613441565b905092915050565b6000819050919050565b60006134c56134c06134bb84612f19565b6134a0565b612f19565b9050919050565b60006134d7826134aa565b9050919050565b60006134e9826134cc565b9050919050565b6134f9816134de565b82525050565b600060208201905061351460008301846134f0565b92915050565b60008060006060848603121561353357613532612d3f565b5b600061354186828701612f8c565b935050602061355286828701612f8c565b925050604061356386828701612ed7565b9150509250925092565b6000806040838503121561358457613583612d3f565b5b600061359285828601612ed7565b92505060206135a385828601612ed7565b9150509250929050565b60006040820190506135c26000830185612f4b565b6135cf6020830184613205565b9392505050565b6135df81613367565b82525050565b60006020820190506135fa60008301846135d6565b92915050565b60006020828403121561361657613615612d3f565b5b600061362484828501612f8c565b91505092915050565b6000806040838503121561364457613643612d3f565b5b600083013567ffffffffffffffff81111561366257613661612d44565b5b61366e858286016130e8565b925050602083013567ffffffffffffffff81111561368f5761368e612d44565b5b61369b858286016132a2565b9150509250929050565b60006136b0826134cc565b9050919050565b6136c0816136a5565b82525050565b60006020820190506136db60008301846136b7565b92915050565b6136ea81612dce565b81146136f557600080fd5b50565b600081359050613707816136e1565b92915050565b6000806040838503121561372457613723612d3f565b5b600061373285828601612f8c565b9250506020613743858286016136f8565b9150509250929050565b60006060820190506137626000830186613205565b61376f6020830185613205565b81810360408301526137818184612e5b565b9050949350505050565b600080600080608085870312156137a5576137a4612d3f565b5b60006137b387828801612f8c565b94505060206137c487828801612f8c565b93505060406137d587828801612ed7565b925050606085013567ffffffffffffffff8111156137f6576137f5612d44565b5b613802878288016132a2565b91505092959194509250565b600080fd5b600080fd5b60008083601f84011261382e5761382d612fe1565b5b8235905067ffffffffffffffff81111561384b5761384a61380e565b5b60208301915083600182028301111561386757613866613813565b5b9250929050565b600080fd5b6000604082840312156138895761388861386e565b5b81905092915050565b600080600080608085870312156138ac576138ab612d3f565b5b600085013567ffffffffffffffff8111156138ca576138c9612d44565b5b6138d687828801613818565b945094505060206138e987828801613873565b92505060606138fa87828801612ed7565b91505092959194509250565b6000806040838503121561391d5761391c612d3f565b5b600061392b85828601612f8c565b925050602061393c85828601612f8c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061398d57607f821691505b6020821081036139a05761399f613946565b5b50919050565b600060408201905081810360008301526139c08185612e5b565b905081810360208301526139d48184612e5b565b90509392505050565b7f637970686572436172645f000000000000000000000000000000000000000000815250565b600081905092915050565b6000613a1982612e04565b613a238185613a03565b9350613a33818560208601612e20565b80840191505092915050565b6000613a4a826139dd565b600b82019150613a5a8284613a0e565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613a9f82612eb6565b9150613aaa83612eb6565b9250828201905080821115613ac257613ac1613a65565b5b92915050565b6000613ad382612eb6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b0557613b04613a65565b5b600182019050919050565b60006040820190508181036000830152613b2a8185612e5b565b90508181036020830152613b3e81846131aa565b90509392505050565b600080fd5b600080fd5b600081519050613b6081612ec0565b92915050565b600067ffffffffffffffff821115613b8157613b80612feb565b5b602082029050602081019050919050565b613b9b81613367565b8114613ba657600080fd5b50565b600081519050613bb881613b92565b92915050565b600081519050613bcd81612f75565b92915050565b600060408284031215613be957613be8613b47565b5b613bf3604061304b565b90506000613c0384828501613ba9565b6000830152506020613c1784828501613bbe565b60208301525092915050565b6000613c36613c3184613b66565b61304b565b90508083825260208201905060408402830185811115613c5957613c58613813565b5b835b81811015613c825780613c6e8882613bd3565b845260208401935050604081019050613c5b565b5050509392505050565b600082601f830112613ca157613ca0612fe1565b5b8151613cb1848260208601613c23565b91505092915050565b600060408284031215613cd057613ccf613b47565b5b613cda604061304b565b90506000613cea84828501613b51565b600083015250602082015167ffffffffffffffff811115613d0e57613d0d613b4c565b5b613d1a84828501613c8c565b60208301525092915050565b600060208284031215613d3c57613d3b612d3f565b5b600082015167ffffffffffffffff811115613d5a57613d59612d44565b5b613d6684828501613cba565b91505092915050565b60006040820190508181036000830152613d898185612e5b565b9050613d986020830184612f4b565b9392505050565b6000606082019050613db46000830186612f4b565b613dc16020830185613205565b613dce6040830184612f4b565b949350505050565b6000613de182612eb6565b9150613dec83612eb6565b9250828202613dfa81612eb6565b91508282048414831517613e1157613e10613a65565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613e5282612eb6565b9150613e5d83612eb6565b925082613e6d57613e6c613e18565b5b828204905092915050565b7f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000600082015250565b6000613eae601e83612e0f565b9150613eb982613e78565b602082019050919050565b60006020820190508181036000830152613edd81613ea1565b9050919050565b7f5075626c69632073616c65206e6f742061637469766174656400000000000000600082015250565b6000613f1a601983612e0f565b9150613f2582613ee4565b602082019050919050565b60006020820190508181036000830152613f4981613f0d565b9050919050565b7f4e6f206d696e74696e6720726571756573740000000000000000000000000000600082015250565b6000613f86601283612e0f565b9150613f9182613f50565b602082019050919050565b60006020820190508181036000830152613fb581613f79565b9050919050565b7f4e6f7420656e6f7567682066756e647300000000000000000000000000000000600082015250565b6000613ff2601083612e0f565b9150613ffd82613fbc565b602082019050919050565b6000602082019050818103600083015261402181613fe5565b9050919050565b600061403b61403684613066565b61304b565b90508281526020810184848401111561405757614056612fe6565b5b614062848285612e20565b509392505050565b600082601f83011261407f5761407e612fe1565b5b815161408f848260208601614028565b91505092915050565b6000602082840312156140ae576140ad612d3f565b5b600082015167ffffffffffffffff8111156140cc576140cb612d44565b5b6140d88482850161406a565b91505092915050565b600060ff82169050919050565b60006140f9826140e1565b9150614104836140e1565b9250828201905060ff81111561411d5761411c613a65565b5b92915050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026141907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614153565b61419a8683614153565b95508019841693508086168417925050509392505050565b60006141cd6141c86141c384612eb6565b6134a0565b612eb6565b9050919050565b6000819050919050565b6141e7836141b2565b6141fb6141f3826141d4565b848454614160565b825550505050565b600090565b614210614203565b61421b8184846141de565b505050565b5b8181101561423f57614234600082614208565b600181019050614221565b5050565b601f821115614284576142558161412e565b61425e84614143565b8101602085101561426d578190505b61428161427985614143565b830182614220565b50505b505050565b600082821c905092915050565b60006142a760001984600802614289565b1980831691505092915050565b60006142c08383614296565b9150826002028217905092915050565b6142da8383614123565b67ffffffffffffffff8111156142f3576142f2612feb565b5b6142fd8254613975565b614308828285614243565b6000601f8311600181146143375760008415614325578287013590505b61432f85826142b4565b865550614397565b601f1984166143458661412e565b60005b8281101561436d57848901358255600182019150602085019450602081019050614348565b8683101561438a5784890135614386601f891682614296565b8355505b6001600288020188555050505b50505050505050565b600081905092915050565b60006143b68261318e565b6143c081856143a0565b93506143d0818560208601612e20565b80840191505092915050565b6000819050919050565b6143f76143f282612eb6565b6143dc565b82525050565b600061440982856143ab565b915061441582846143e6565b6020820191508190509392505050565b600061443082612eb6565b91506000820361444357614442613a65565b5b600182039050919050565b600061445982612eb6565b915061446483612eb6565b92508261447457614473613e18565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008160601b9050919050565b60006144c6826144ae565b9050919050565b60006144d8826144bb565b9050919050565b6144f06144eb82612f39565b6144cd565b82525050565b600061450282876143e6565b60208201915061451282866143e6565b60208201915061452282856144df565b60148201915061453282846143e6565b60208201915081905095945050505050565b61454d82612e04565b67ffffffffffffffff81111561456657614565612feb565b5b6145708254613975565b61457b828285614243565b600060209050601f8311600181146145ae576000841561459c578287015190505b6145a685826142b4565b86555061460e565b601f1984166145bc8661412e565b60005b828110156145e4578489015182556001820191506020850194506020810190506145bf565b8683101561460157848901516145fd601f891682614296565b8355505b6001600288020188555050505b505050505050565b7f307830323739373032316132376533663337613636333132363736343731383760008201527f633738346634613839336365646539666431313038396237626533666566613560208201527f653937326530373736636265366265663239393063303039613431313338343660408201527f393637353339396264626134396335653937396534366165633730393563663460608201527f323863636465343366363036306333323064363638306237333433326637353760808201527f643836363062626464316534313434363338666462353136623734666137373760a08201527f373861633863363563343262656432643931373665643663663937333936316260c08201527f643162613064366230626335343866646635383362363435616462366637333760e08201527f65356336386162643237376433333831343834333333333039643363633738356101008201527f30393162393238353066346332396631663332646364303938643061646364636101208201527f37303939396138366330393962346232613661383333336637363437333762616101408201527f36633036373433373530363462303465643833333665306637626636616230356101608201527f613000000000000000000000000000000000000000000000000000000000000061018082015250565b600061481a61018283613199565b915061482582614616565b6101a082019050919050565b6000604082019050818103600083015261484b8184612e5b565b9050818103602083015261485e8161480c565b905092915050565b6000806040838503121561487d5761487c612d3f565b5b600083015167ffffffffffffffff81111561489b5761489a612d44565b5b6148a78582860161406a565b925050602083015167ffffffffffffffff8111156148c8576148c7612d44565b5b6148d48582860161406a565b9150509250929050565b60006080820190506148f36000830187612f4b565b6149006020830186612f4b565b61490d6040830185613205565b818103606083015261491f81846131aa565b905095945050505050565b60008151905061493981612d75565b92915050565b60006020828403121561495557614954612d3f565b5b60006149638482850161492a565b91505092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000600082015250565b60006149a2601a83613a03565b91506149ad8261496c565b601a82019050919050565b60006149c382614995565b91506149cf8285613a0e565b91506149db8284613a0e565b91508190509392505050565b6149f0816140e1565b82525050565b6000608082019050614a0b60008301876135d6565b614a1860208301866149e7565b614a2560408301856135d6565b614a3260608301846135d6565b9594505050505056fea26469706673582212200a321f2912382efe39aa65d804bd5b33b7007bb1658c52b857ca53604e13ec3964736f6c63430008160033

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

0000000000000000000000001532bdc14ca87df4a7bd76c0856ddd108314002b000000000000000000000000480f79fed07475bcaf72263b37c11cebea6ca037

-----Decoded View---------------
Arg [0] : filestore_ (address): 0x1532BDC14CA87DF4A7bd76c0856DdD108314002B
Arg [1] : cypherdudesRenderer (address): 0x480F79Fed07475BCAF72263b37C11CEBeA6CA037

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001532bdc14ca87df4a7bd76c0856ddd108314002b
Arg [1] : 000000000000000000000000480f79fed07475bcaf72263b37c11cebea6ca037


Loading...
Loading
Loading...
Loading
[ 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.