POL Price: $0.215071 (+0.12%)
 

Overview

Max Total Supply

0 GUILD

Holders

0

Total Transfers

-

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
BasicGuildRewardNFT

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 27 : BasicGuildRewardNFT.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import { IBasicGuildRewardNFT } from "./interfaces/IBasicGuildRewardNFT.sol";
import { IGuildRewardNFTFactory } from "./interfaces/IGuildRewardNFTFactory.sol";
import { ITreasuryManager } from "./interfaces/ITreasuryManager.sol";
import { LibTransfer } from "./lib/LibTransfer.sol";
import { SoulboundERC721 } from "./token/SoulboundERC721.sol";
import { TreasuryManager } from "./utils/TreasuryManager.sol";
import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

/// @title An NFT distributed as a reward for Guild.xyz users.
contract BasicGuildRewardNFT is
    IBasicGuildRewardNFT,
    Initializable,
    OwnableUpgradeable,
    SoulboundERC721,
    TreasuryManager
{
    using ECDSA for bytes32;
    using LibTransfer for address;
    using LibTransfer for address payable;

    address public factoryProxy;

    /// @notice The cid for tokenURI.
    string internal cid;

    /// @notice The number of claimed tokens by userIds.
    mapping(uint256 userId => uint256 claimed) internal claimedTokens;

    function initialize(
        string calldata name,
        string calldata symbol,
        string calldata _cid,
        address tokenOwner,
        address payable treasury,
        uint256 tokenFee,
        address factoryProxyAddress
    ) public initializer {
        cid = _cid;
        factoryProxy = factoryProxyAddress;

        __SoulboundERC721_init(name, symbol);
        __TreasuryManager_init(treasury, tokenFee);

        _transferOwnership(tokenOwner);
    }

    function claim(address receiver, uint256 userId, bytes calldata signature) external payable {
        if (balanceOf(receiver) > 0 || claimedTokens[userId] > 0) revert AlreadyClaimed();
        if (!isValidSignature(receiver, userId, signature)) revert IncorrectSignature();

        uint256 tokenId = totalSupply();

        (uint256 guildFee, address payable guildTreasury) = ITreasuryManager(factoryProxy).getFeeData();

        claimedTokens[userId]++;

        // Fee collection
        if (msg.value == guildFee + fee) {
            guildTreasury.sendEther(guildFee);
            treasury.sendEther(fee);
        } else revert IncorrectFee(msg.value, guildFee + fee);

        _safeMint(receiver, tokenId);

        emit Claimed(receiver, tokenId);
    }

    function burn(uint256 tokenId, uint256 userId, bytes calldata signature) external {
        if (msg.sender != ownerOf(tokenId)) revert IncorrectSender();
        if (!isValidSignature(msg.sender, userId, signature)) revert IncorrectSignature();

        claimedTokens[userId]--;

        _burn(tokenId);
    }

    function updateTokenURI(string calldata newCid) external onlyOwner {
        cid = newCid;
        emit MetadataUpdate();
    }

    function hasClaimed(address account) external view returns (bool claimed) {
        return balanceOf(account) > 0;
    }

    function hasTheUserIdClaimed(uint256 userId) external view returns (bool claimed) {
        return claimedTokens[userId] > 0;
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        if (!_exists(tokenId)) revert NonExistentToken(tokenId);

        return string.concat("ipfs://", cid);
    }

    /// @notice Checks the validity of the signature for the given params.
    function isValidSignature(address receiver, uint256 userId, bytes calldata signature) internal view returns (bool) {
        if (signature.length != 65) revert IncorrectSignature();
        bytes32 message = keccak256(abi.encode(receiver, userId, block.chainid, address(this)))
            .toEthSignedMessageHash();
        return message.recover(signature) == IGuildRewardNFTFactory(factoryProxy).validSigner();
    }
}

File 2 of 27 : IBasicGuildRewardNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title An NFT distributed as a reward for Guild.xyz users.
interface IBasicGuildRewardNFT {
    /// @notice The address of the proxy to be used when interacting with the factory.
    /// @dev Used to access the factory's address when interacting through minimal proxies.
    /// @return factoryAddress The address of the factory.
    function factoryProxy() external view returns (address factoryAddress);

    /// @notice Returns true if the address has already claimed their token.
    /// @param account The user's address.
    /// @return claimed Whether the address has claimed their token.
    function hasClaimed(address account) external view returns (bool claimed);

    /// @notice Whether a userId has minted a token.
    /// @dev Used to prevent double mints in the same block.
    /// @param userId The id of the user on Guild.
    /// @return claimed Whether the userId has claimed any tokens.
    function hasTheUserIdClaimed(uint256 userId) external view returns (bool claimed);

    /// @notice Sets metadata and the associated addresses.
    /// @dev Initializer function callable only once.
    /// @param name The name of the token.
    /// @param symbol The symbol of the token.
    /// @param cid The cid used to construct the tokenURI for the token to be minted.
    /// @param tokenOwner The address that will be the owner of the deployed token.
    /// @param treasury The address that will receive the price paid for the token.
    /// @param tokenFee The price of every mint in wei.
    /// @param factoryProxyAddress The address of the factory.
    function initialize(
        string memory name,
        string memory symbol,
        string calldata cid,
        address tokenOwner,
        address payable treasury,
        uint256 tokenFee,
        address factoryProxyAddress
    ) external;

    /// @notice Claims tokens to the given address.
    /// @param receiver The address that receives the token.
    /// @param userId The id of the user on Guild.
    /// @param signature The following signed by validSigner: receiver, userId, chainId, the contract's address.
    function claim(address receiver, uint256 userId, bytes calldata signature) external payable;

    /// @notice Burns a token from the sender.
    /// @param tokenId The id of the token to burn.
    /// @param userId The id of the user on Guild.
    /// @param signature The following signed by validSigner: receiver, userId, chainId, the contract's address.
    function burn(uint256 tokenId, uint256 userId, bytes calldata signature) external;

    /// @notice Updates the cid for tokenURI.
    /// @dev Only callable by the owner.
    /// @param newCid The new cid that points to the updated image.
    function updateTokenURI(string calldata newCid) external;

    /// @notice Event emitted whenever a claim succeeds.
    /// @param receiver The address that received the tokens.
    /// @param tokenId The id of the token.
    event Claimed(address indexed receiver, uint256 tokenId);

    /// @notice Event emitted whenever the cid is updated.
    event MetadataUpdate();

    /// @notice Error thrown when the token is already claimed.
    error AlreadyClaimed();

    /// @notice Error thrown when an incorrect amount of fee is attempted to be paid.
    /// @param paid The amount of funds received.
    /// @param requiredAmount The amount of fees required for minting.
    error IncorrectFee(uint256 paid, uint256 requiredAmount);

    /// @notice Error thrown when the sender is not permitted to do a specific action.
    error IncorrectSender();

    /// @notice Error thrown when the supplied signature is invalid.
    error IncorrectSignature();

    /// @notice Error thrown when trying to query info about a token that's not (yet) minted.
    /// @param tokenId The queried id.
    error NonExistentToken(uint256 tokenId);
}

File 3 of 27 : IGuildRewardNFTFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title A simple factory deploying minimal proxy contracts for Guild reward NFTs.
interface IGuildRewardNFTFactory {
    /// @notice The type of the contract.
    /// @dev Used as an identifier. Should be expanded in future updates.
    enum ContractType {
        BASIC_NFT
    }

    /// @notice Information about a specific deployment.
    /// @param contractAddress The address where the contract/clone is deployed.
    /// @param contractType The type of the contract.
    struct Deployment {
        address contractAddress;
        ContractType contractType;
    }

    /// @return signer The address that signs the metadata.
    function validSigner() external view returns (address signer);

    /// @notice Maps deployed implementation contract addresses to contract types.
    /// @param contractType The type of the contract.
    /// @return contractAddress The address of the deployed NFT contract.
    function nftImplementations(ContractType contractType) external view returns (address contractAddress);

    /// @notice Sets the associated addresses.
    /// @dev Initializer function callable only once.
    /// @param treasuryAddress The address that will receive the fees.
    /// @param fee The Guild base fee for every deployment.
    /// @param validSignerAddress The address that will sign the metadata.
    function initialize(address payable treasuryAddress, uint256 fee, address validSignerAddress) external;

    /// @notice Deploys a minimal proxy for a basic NFT.
    /// @param name The name of the NFT to be created.
    /// @param symbol The symbol of the NFT to be created.
    /// @param cid The cid used to construct the tokenURI of the NFT to be created.
    /// @param tokenOwner The address that will be the owner of the deployed token.
    /// @param tokenTreasury The address that will collect the prices of the minted deployed tokens.
    /// @param tokenFee The price of every mint in wei.
    function deployBasicNFT(
        string calldata name,
        string calldata symbol,
        string calldata cid,
        address tokenOwner,
        address payable tokenTreasury,
        uint256 tokenFee
    ) external;

    /// @notice Returns the reward NFT addresses for a guild.
    /// @param deployer The address that deployed the tokens.
    /// @return tokens The addresses of the tokens deployed by deployer.
    function getDeployedTokenContracts(address deployer) external view returns (Deployment[] memory tokens);

    /// @notice Sets the address that signs the metadata.
    /// @dev Callable only by the owner.
    /// @param newValidSigner The new address of validSigner.
    function setValidSigner(address newValidSigner) external;

    /// @notice Sets the address of the contract where a specific NFT is implemented.
    /// @dev Callable only by the owner.
    /// @param contractType The type of the contract.
    /// @param newNFT The address of the deployed NFT contract.
    function setNFTImplementation(ContractType contractType, address newNFT) external;

    /// @notice Event emitted when an NFT implementation is changed.
    /// @param contractType The type of the contract.
    /// @param newNFT The new address of the NFT implementation.
    event ImplementationChanged(ContractType contractType, address newNFT);

    /// @notice Event emitted when a new NFT is deployed.
    /// @param deployer The address that deployed the token.
    /// @param tokenAddress The address of the token.
    event RewardNFTDeployed(address deployer, address tokenAddress);

    /// @notice Event emitted when the validSigner is changed.
    /// @param newValidSigner The new address of validSigner.
    event ValidSignerChanged(address newValidSigner);
}

File 4 of 27 : ITreasuryManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title A contract that manages fee-related functionality.
interface ITreasuryManager {
    /// @notice Sets the minting fee.
    /// @dev Callable only by the owner.
    /// @param newFee The new fee in base units.
    function setFee(uint256 newFee) external;

    /// @notice Sets the address that receives the fees.
    /// @dev Callable only by the owner.
    /// @param newTreasury The new address of the treasury.
    function setTreasury(address payable newTreasury) external;

    /// @notice The minting fee of a token.
    /// @return fee The amount of the fee in base units.
    function fee() external view returns (uint256 fee);

    /// @notice Gets both the fee and the treasury address for optimization purposes.
    /// @return tokenFee The fee for the token in base units.
    /// @return treasuryAddress The address of the treasury.
    function getFeeData() external view returns (uint256 tokenFee, address payable treasuryAddress);

    /// @notice Returns the address that receives the fees.
    function treasury() external view returns (address payable);

    /// @notice Event emitted when a token's fee is changed.
    /// @param newFee The new amount of fee in base units.
    event FeeChanged(uint256 newFee);

    /// @notice Event emitted when the treasury address is changed.
    /// @param newTreasury The new address of the treasury.
    event TreasuryChanged(address newTreasury);
}

File 5 of 27 : LibTransfer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title Library for functions related to transfers.
library LibTransfer {
    /// @notice Error thrown when sending ether fails.
    /// @param recipient The address that could not receive the ether.
    error FailedToSendEther(address recipient);

    /// @notice Error thrown when an ERC20 transfer failed.
    /// @param from The sender of the token.
    /// @param to The recipient of the token.
    error TransferFailed(address from, address to);

    /// @notice Sends ether to an address, forwarding all available gas and reverting on errors.
    /// @param recipient The recipient of the ether.
    /// @param amount The amount of ether to send in base units.
    function sendEther(address payable recipient, uint256 amount) internal {
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, ) = recipient.call{ value: amount }("");
        if (!success) revert FailedToSendEther(recipient);
    }

    /// @notice Sends an ERC20 token to an address and reverts if the transfer returns false.
    /// @dev Wrapper for {IERC20-transfer}.
    /// @param to The recipient of the tokens.
    /// @param token The address of the token to send.
    /// @param amount The amount of the token to send in base units.
    function sendToken(address to, address token, uint256 amount) internal {
        if (!IERC20(token).transfer(to, amount)) revert TransferFailed(msg.sender, address(this));
    }

    /// @notice Sends an ERC20 token to an address from another address and reverts if transferFrom returns false.
    /// @dev Wrapper for {IERC20-transferFrom}.
    /// @param to The recipient of the tokens.
    /// @param token The address of the token to send.
    /// @param from The source of the tokens.
    /// @param amount The amount of the token to send in base units.
    function sendTokenFrom(address to, address from, address token, uint256 amount) internal {
        if (!IERC20(token).transferFrom(from, to, amount)) revert TransferFailed(msg.sender, address(this));
    }
}

File 6 of 27 : SoulboundERC721.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

/* solhint-disable max-line-length */

import { ERC721Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import { IERC721Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
import { ERC721EnumerableUpgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import { IERC721EnumerableUpgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol";

/* solhint-enable max-line-length */

/// @title An enumerable soulbound ERC721.
/// @notice Allowance and transfer-related functions are disabled.
/// @dev Inheriting from upgradeable contracts here - even though we're using it in a non-upgradeable way,
/// we still want it to be initializable
contract SoulboundERC721 is ERC721Upgradeable, ERC721EnumerableUpgradeable {
    /// @notice Error thrown when a function's execution is not possible, because this is a soulbound NFT.
    error Soulbound();

    // solhint-disable-next-line func-name-mixedcase
    function __SoulboundERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC721_init(name_, symbol_);
        __ERC721Enumerable_init();
    }

    /// @inheritdoc ERC721EnumerableUpgradeable
    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC721EnumerableUpgradeable, ERC721Upgradeable) returns (bool) {
        return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);
    }

    function approve(
        address /* to */,
        uint256 /* tokenId */
    ) public virtual override(IERC721Upgradeable, ERC721Upgradeable) {
        revert Soulbound();
    }

    function setApprovalForAll(
        address /* operator */,
        bool /* approved */
    ) public virtual override(IERC721Upgradeable, ERC721Upgradeable) {
        revert Soulbound();
    }

    function isApprovedForAll(
        address /* owner */,
        address /* operator */
    ) public view virtual override(IERC721Upgradeable, ERC721Upgradeable) returns (bool) {
        revert Soulbound();
    }

    function transferFrom(
        address /* from */,
        address /* to */,
        uint256 /* tokenId */
    ) public virtual override(IERC721Upgradeable, ERC721Upgradeable) {
        revert Soulbound();
    }

    function safeTransferFrom(
        address /* from */,
        address /* to */,
        uint256 /* tokenId */
    ) public virtual override(IERC721Upgradeable, ERC721Upgradeable) {
        revert Soulbound();
    }

    function safeTransferFrom(
        address /* from */,
        address /* to */,
        uint256 /* tokenId */,
        bytes memory /* data */
    ) public virtual override(IERC721Upgradeable, ERC721Upgradeable) {
        revert Soulbound();
    }

    /// @dev Still used for minting/burning.
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override(ERC721EnumerableUpgradeable, ERC721Upgradeable) {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);
    }
}

File 7 of 27 : TreasuryManager.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import { ITreasuryManager } from "../interfaces/ITreasuryManager.sol";
import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/// @title A contract that manages fee-related functionality.
contract TreasuryManager is ITreasuryManager, Initializable, OwnableUpgradeable {
    address payable public treasury;

    uint256 public fee;

    /// @notice Empty space reserved for future updates.
    uint256[48] private __gap;

    /// @param treasury_ The address that will receive the fees.
    /// @param fee_ The fee amount in wei.
    // solhint-disable-next-line func-name-mixedcase
    function __TreasuryManager_init(address payable treasury_, uint256 fee_) internal onlyInitializing {
        treasury = treasury_;
        fee = fee_;
    }

    function setFee(uint256 newFee) external onlyOwner {
        fee = newFee;
        emit FeeChanged(newFee);
    }

    function setTreasury(address payable newTreasury) external onlyOwner {
        treasury = newTreasury;
        emit TreasuryChanged(newTreasury);
    }

    function getFeeData() external view returns (uint256 tokenFee, address payable treasuryAddress) {
        return (fee, treasury);
    }
}

File 8 of 27 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. 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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

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

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

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

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

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

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

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

File 10 of 27 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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

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

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

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

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

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

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

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

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 11 of 27 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 12 of 27 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

File 13 of 27 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

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

    /**
     * @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), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(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) {
        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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        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 keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 14 of 27 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @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 up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (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; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                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.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 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.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            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 (rounding == Rounding.Up && 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 down.
     *
     * 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 15 of 27 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @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 16 of 27 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 17 of 27 : ERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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}.
 */
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

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

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC721_init_unchained(name_, symbol_);
    }

    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

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

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

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

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(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 override {
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner or approved for all"
        );

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");

        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @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.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - 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, bytes memory data) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _ownerOf(tokenId) != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * 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 virtual {
        _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);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @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 virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId, 1);
    }

    /**
     * @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 virtual {
        address owner = ERC721Upgradeable.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId, 1);

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721Upgradeable.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId, 1);
    }

    /**
     * @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 virtual {
        require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

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

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * 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
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being 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`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }

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

File 18 of 27 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @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 caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

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

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

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

pragma solidity ^0.8.0;

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

File 20 of 27 : IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721ReceiverUpgradeable {
    /**
     * @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 21 of 27 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @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 22 of 27 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/MathUpgradeable.sol";
import "./math/SignedMathUpgradeable.sol";

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = MathUpgradeable.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), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMathUpgradeable.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, MathUpgradeable.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) {
        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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        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 keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 23 of 27 : MathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library MathUpgradeable {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @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 up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (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; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                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.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 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.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            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 (rounding == Rounding.Up && 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 down.
     *
     * 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 24 of 27 : SignedMathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMathUpgradeable {
    /**
     * @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 25 of 27 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

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

File 26 of 27 : ERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721Upgradeable.sol";
import "./IERC721EnumerableUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {
    function __ERC721Enumerable_init() internal onlyInitializing {
    }

    function __ERC721Enumerable_init_unchained() internal onlyInitializing {
    }
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721Upgradeable.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }

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

File 27 of 27 : IERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721EnumerableUpgradeable is IERC721Upgradeable {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"FailedToSendEther","type":"error"},{"inputs":[{"internalType":"uint256","name":"paid","type":"uint256"},{"internalType":"uint256","name":"requiredAmount","type":"uint256"}],"name":"IncorrectFee","type":"error"},{"inputs":[],"name":"IncorrectSender","type":"error"},{"inputs":[],"name":"IncorrectSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NonExistentToken","type":"error"},{"inputs":[],"name":"Soulbound","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":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[],"name":"MetadataUpdate","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTreasury","type":"address"}],"name":"TreasuryChanged","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"userId","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"userId","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factoryProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeData","outputs":[{"internalType":"uint256","name":"tokenFee","type":"uint256"},{"internalType":"address payable","name":"treasuryAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"hasClaimed","outputs":[{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"userId","type":"uint256"}],"name":"hasTheUserIdClaimed","outputs":[{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"_cid","type":"string"},{"internalType":"address","name":"tokenOwner","type":"address"},{"internalType":"address payable","name":"treasury","type":"address"},{"internalType":"uint256","name":"tokenFee","type":"uint256"},{"internalType":"address","name":"factoryProxyAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newTreasury","type":"address"}],"name":"setTreasury","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"newCid","type":"string"}],"name":"updateTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506125c8806100206000396000f3fe6080604052600436106101d85760003560e01c806370a082311161010257806398cd615311610095578063ddca3f4311610064578063ddca3f431461053a578063e985e9c514610550578063f0f4426014610570578063f2fde38b1461059057600080fd5b806398cd6153146104c4578063a22cb465146104e4578063b88d4fde146104ff578063c87b56dd1461051a57600080fd5b806380a5a371116100d157806380a5a3711461045e5780638da5cb5b1461047e5780638f0bc1521461049c57806395d89b41146104af57600080fd5b806370a08231146103e8578063715018a61461040857806373b2e80e1461041d5780637509c39b1461043d57600080fd5b8063256a49351161017a5780635d6e61ca116101495780635d6e61ca1461036857806361d027b3146103885780636352211e146103a857806369fe0e2d146103c857600080fd5b8063256a4935146102f85780632f745c591461032857806342842e0e146102dd5780634f6ccce71461034857600080fd5b8063095ea7b3116101b6578063095ea7b31461026c57806318160ddd1461028e57806321a2fe03146102ad57806323b872dd146102dd57600080fd5b806301ffc9a7146101dd57806306fdde0314610212578063081812fc14610234575b600080fd5b3480156101e957600080fd5b506101fd6101f8366004611c7a565b6105b0565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b506102276105db565b6040516102099190611ce4565b34801561024057600080fd5b5061025461024f366004611cf7565b61066d565b6040516001600160a01b039091168152602001610209565b34801561027857600080fd5b5061028c610287366004611d35565b610694565b005b34801561029a57600080fd5b506099545b604051908152602001610209565b3480156102b957600080fd5b506101fd6102c8366004611cf7565b600090815261012f6020526040902054151590565b3480156102e957600080fd5b5061028c610287366004611d61565b34801561030457600080fd5b5060fc5460fb54604080519283526001600160a01b03909116602083015201610209565b34801561033457600080fd5b5061029f610343366004611d35565b6106ad565b34801561035457600080fd5b5061029f610363366004611cf7565b610748565b34801561037457600080fd5b5061028c610383366004611de4565b6107db565b34801561039457600080fd5b5060fb54610254906001600160a01b031681565b3480156103b457600080fd5b506102546103c3366004611cf7565b61099d565b3480156103d457600080fd5b5061028c6103e3366004611cf7565b6109fd565b3480156103f457600080fd5b5061029f610403366004611ebc565b610a41565b34801561041457600080fd5b5061028c610ac7565b34801561042957600080fd5b506101fd610438366004611ebc565b610adb565b34801561044957600080fd5b5061012d54610254906001600160a01b031681565b34801561046a57600080fd5b5061028c610479366004611ed9565b610aee565b34801561048a57600080fd5b5060c9546001600160a01b0316610254565b61028c6104aa366004611f2c565b610b80565b3480156104bb57600080fd5b50610227610d59565b3480156104d057600080fd5b5061028c6104df366004611f70565b610d68565b3480156104f057600080fd5b5061028c610287366004611fb2565b34801561050b57600080fd5b5061028c610287366004612006565b34801561052657600080fd5b50610227610535366004611cf7565b610dac565b34801561054657600080fd5b5061029f60fc5481565b34801561055c57600080fd5b506101fd61056b3660046120e6565b610e10565b34801561057c57600080fd5b5061028c61058b366004611ebc565b610e2b565b34801561059c57600080fd5b5061028c6105ab366004611ebc565b610e81565b60006001600160e01b0319821663780e9d6360e01b14806105d557506105d582610efa565b92915050565b6060606580546105ea90612114565b80601f016020809104026020016040519081016040528092919081815260200182805461061690612114565b80156106635780601f1061063857610100808354040283529160200191610663565b820191906000526020600020905b81548152906001019060200180831161064657829003601f168201915b5050505050905090565b600061067882610f1f565b506000908152606960205260409020546001600160a01b031690565b60405163a4420a9560e01b815260040160405180910390fd5b60006106b883610a41565b821061071f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084015b60405180910390fd5b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b600061075360995490565b82106107b65760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610716565b609982815481106107c9576107c961214e565b90600052602060002001549050919050565b600054610100900460ff16158080156107fb5750600054600160ff909116105b806108155750303b158015610815575060005460ff166001145b6108785760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610716565b6000805460ff19166001179055801561089b576000805461ff0019166101001790555b61012e6108a98789836121b2565b5061012d80546001600160a01b0319166001600160a01b038416179055604080516020601f8d018190048102820181019092528b8152610937918d908d908190840183828082843760009201919091525050604080516020601f8f018190048102820181019092528d815292508d91508c9081908401838280828437600092019190915250610f7e92505050565b6109418484610fbb565b61094a85611008565b8015610990576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000818152606760205260408120546001600160a01b0316806105d55760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610716565b610a0561105a565b60fc8190556040518181527f6bbc57480a46553fa4d156ce702beef5f3ad66303b0ed1a5d4cb44966c6584c3906020015b60405180910390a150565b60006001600160a01b038216610aab5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610716565b506001600160a01b031660009081526068602052604090205490565b610acf61105a565b610ad96000611008565b565b600080610ae783610a41565b1192915050565b610af78461099d565b6001600160a01b0316336001600160a01b031614610b2857604051637d1c29f360e01b815260040160405180910390fd5b610b34338484846110b4565b610b515760405163c1606c2f60e01b815260040160405180910390fd5b600083815261012f60205260408120805491610b6c83612288565b9190505550610b7a8461122a565b50505050565b6000610b8b85610a41565b1180610ba55750600083815261012f602052604090205415155b15610bc357604051630c8d9eab60e31b815260040160405180910390fd5b610bcf848484846110b4565b610bec5760405163c1606c2f60e01b815260040160405180910390fd5b6000610bf760995490565b61012d546040805163256a493560e01b8152815193945060009384936001600160a01b03169263256a493592600480820193918290030181865afa158015610c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c67919061229f565b600088815261012f602052604081208054939550919350610c87836122c4565b909155505060fc54610c9990836122dd565b3403610cd257610cb26001600160a01b038216836112cd565b60fc5460fb54610ccd916001600160a01b03909116906112cd565b610d03565b3460fc5483610ce191906122dd565b60405163dcf6afcb60e01b815260048101929092526024820152604401610716565b610d0d8784611351565b866001600160a01b03167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a84604051610d4891815260200190565b60405180910390a250505050505050565b6060606680546105ea90612114565b610d7061105a565b61012e610d7e8284836121b2565b506040517f22e4f6d6e52498ce761f4a367a6aaff84750f8bfb036d99abbb027e50eddacd990600090a15050565b6000818152606760205260409020546060906001600160a01b0316610de7576040516338077a2b60e01b815260048101839052602401610716565b61012e604051602001610dfa91906122f0565b6040516020818303038152906040529050919050565b600060405163a4420a9560e01b815260040160405180910390fd5b610e3361105a565b60fb80546001600160a01b0319166001600160a01b0383169081179091556040519081527fc714d22a2f08b695f81e7c707058db484aa5b4d6b4c9fd64beb10fe85832f60890602001610a36565b610e8961105a565b6001600160a01b038116610eee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610716565b610ef781611008565b50565b60006001600160e01b0319821663780e9d6360e01b14806105d557506105d58261136b565b6000818152606760205260409020546001600160a01b0316610ef75760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610716565b600054610100900460ff16610fa55760405162461bcd60e51b81526004016107169061237f565b610faf82826113bb565b610fb76113ec565b5050565b600054610100900460ff16610fe25760405162461bcd60e51b81526004016107169061237f565b60fb80546001600160a01b0319166001600160a01b03939093169290921790915560fc55565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60c9546001600160a01b03163314610ad95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610716565b6000604182146110d75760405163c1606c2f60e01b815260040160405180910390fd5b604080516001600160a01b038716602082015290810185905246606082015230608082015260009061114f9060a001604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b905061012d60009054906101000a90046001600160a01b03166001600160a01b0316631cc7d7436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c991906123ca565b6001600160a01b031661121485858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086939250506114139050565b6001600160a01b0316149150505b949350505050565b60006112358261099d565b9050611245816000846001611437565b61124e8261099d565b600083815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526068845282852080546000190190558785526067909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461131a576040519150601f19603f3d011682016040523d82523d6000602084013e61131f565b606091505b505090508061134c57604051632499e3bb60e11b81526001600160a01b0384166004820152602401610716565b505050565b610fb7828260405180602001604052806000815250611443565b60006001600160e01b031982166380ac58cd60e01b148061139c57506001600160e01b03198216635b5e139f60e01b145b806105d557506301ffc9a760e01b6001600160e01b03198316146105d5565b600054610100900460ff166113e25760405162461bcd60e51b81526004016107169061237f565b610fb78282611476565b600054610100900460ff16610ad95760405162461bcd60e51b81526004016107169061237f565b600080600061142285856114b6565b9150915061142f816114fb565b509392505050565b610b7a84848484611645565b61144d8383611779565b61145a6000848484611912565b61134c5760405162461bcd60e51b8152600401610716906123e7565b600054610100900460ff1661149d5760405162461bcd60e51b81526004016107169061237f565b60656114a98382612439565b50606661134c8282612439565b60008082516041036114ec5760208301516040840151606085015160001a6114e087828585611a10565b945094505050506114f4565b506000905060025b9250929050565b600081600481111561150f5761150f6124f9565b036115175750565b600181600481111561152b5761152b6124f9565b036115785760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610716565b600281600481111561158c5761158c6124f9565b036115d95760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610716565b60038160048111156115ed576115ed6124f9565b03610ef75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610716565b60018111156116b45760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610716565b816001600160a01b0385166117105761170b81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b611733565b836001600160a01b0316856001600160a01b031614611733576117338582611ad4565b6001600160a01b03841661174f5761174a81611b71565b611772565b846001600160a01b0316846001600160a01b031614611772576117728482611c20565b5050505050565b6001600160a01b0382166117cf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610716565b6000818152606760205260409020546001600160a01b0316156118345760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b611842600083836001611437565b6000818152606760205260409020546001600160a01b0316156118a75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b6001600160a01b038216600081815260686020908152604080832080546001019055848352606790915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15611a0857604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061195690339089908890889060040161250f565b6020604051808303816000875af1925050508015611991575060408051601f3d908101601f1916820190925261198e9181019061254c565b60015b6119ee573d8080156119bf576040519150601f19603f3d011682016040523d82523d6000602084013e6119c4565b606091505b5080516000036119e65760405162461bcd60e51b8152600401610716906123e7565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611222565b506001611222565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611a475750600090506003611acb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611a9b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611ac457600060019250925050611acb565b9150600090505b94509492505050565b60006001611ae184610a41565b611aeb9190612569565b600083815260986020526040902054909150808214611b3e576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090611b8390600190612569565b6000838152609a602052604081205460998054939450909284908110611bab57611bab61214e565b906000526020600020015490508060998381548110611bcc57611bcc61214e565b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480611c0457611c0461257c565b6001900381819060005260206000200160009055905550505050565b6000611c2b83610a41565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160e01b031981168114610ef757600080fd5b600060208284031215611c8c57600080fd5b8135611c9781611c64565b9392505050565b6000815180845260005b81811015611cc457602081850181015186830182015201611ca8565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611c976020830184611c9e565b600060208284031215611d0957600080fd5b5035919050565b6001600160a01b0381168114610ef757600080fd5b8035611d3081611d10565b919050565b60008060408385031215611d4857600080fd5b8235611d5381611d10565b946020939093013593505050565b600080600060608486031215611d7657600080fd5b8335611d8181611d10565b92506020840135611d9181611d10565b929592945050506040919091013590565b60008083601f840112611db457600080fd5b50813567ffffffffffffffff811115611dcc57600080fd5b6020830191508360208285010111156114f457600080fd5b60008060008060008060008060008060e08b8d031215611e0357600080fd5b8a3567ffffffffffffffff80821115611e1b57600080fd5b611e278e838f01611da2565b909c509a5060208d0135915080821115611e4057600080fd5b611e4c8e838f01611da2565b909a50985060408d0135915080821115611e6557600080fd5b50611e728d828e01611da2565b90975095505060608b0135611e8681611d10565b935060808b0135611e9681611d10565b925060a08b01359150611eab60c08c01611d25565b90509295989b9194979a5092959850565b600060208284031215611ece57600080fd5b8135611c9781611d10565b60008060008060608587031215611eef57600080fd5b8435935060208501359250604085013567ffffffffffffffff811115611f1457600080fd5b611f2087828801611da2565b95989497509550505050565b60008060008060608587031215611f4257600080fd5b8435611f4d81611d10565b935060208501359250604085013567ffffffffffffffff811115611f1457600080fd5b60008060208385031215611f8357600080fd5b823567ffffffffffffffff811115611f9a57600080fd5b611fa685828601611da2565b90969095509350505050565b60008060408385031215611fc557600080fd5b8235611fd081611d10565b915060208301358015158114611fe557600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561201c57600080fd5b843561202781611d10565b9350602085013561203781611d10565b925060408501359150606085013567ffffffffffffffff8082111561205b57600080fd5b818701915087601f83011261206f57600080fd5b81358181111561208157612081611ff0565b604051601f8201601f19908116603f011681019083821181831017156120a9576120a9611ff0565b816040528281528a60208487010111156120c257600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156120f957600080fd5b823561210481611d10565b91506020830135611fe581611d10565b600181811c9082168061212857607f821691505b60208210810361214857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b601f82111561134c57600081815260208120601f850160051c8101602086101561218b5750805b601f850160051c820191505b818110156121aa57828155600101612197565b505050505050565b67ffffffffffffffff8311156121ca576121ca611ff0565b6121de836121d88354612114565b83612164565b6000601f84116001811461221257600085156121fa5750838201355b600019600387901b1c1916600186901b178355611772565b600083815260209020601f19861690835b828110156122435786850135825560209485019460019092019101612223565b50868210156122605760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b60008161229757612297612272565b506000190190565b600080604083850312156122b257600080fd5b825191506020830151611fe581611d10565b6000600182016122d6576122d6612272565b5060010190565b808201808211156105d5576105d5612272565b66697066733a2f2f60c81b8152600060076000845461230e81612114565b60018281168015612326576001811461233f57612372565b60ff198416888701528215158302880186019450612372565b8860005260208060002060005b858110156123675781548b82018a015290840190820161234c565b505050858389010194505b5092979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156123dc57600080fd5b8151611c9781611d10565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b815167ffffffffffffffff81111561245357612453611ff0565b612467816124618454612114565b84612164565b602080601f83116001811461249c57600084156124845750858301515b600019600386901b1c1916600185901b1785556121aa565b600085815260208120601f198616915b828110156124cb578886015182559484019460019091019084016124ac565b50858210156124e95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061254290830184611c9e565b9695505050505050565b60006020828403121561255e57600080fd5b8151611c9781611c64565b818103818111156105d5576105d5612272565b634e487b7160e01b600052603160045260246000fdfea26469706673582212203dc0d90733d4f9c99054ad3824004fbf162cdfab346fcf57cd7acf121b26d2f364736f6c63430008130033

Deployed Bytecode

0x6080604052600436106101d85760003560e01c806370a082311161010257806398cd615311610095578063ddca3f4311610064578063ddca3f431461053a578063e985e9c514610550578063f0f4426014610570578063f2fde38b1461059057600080fd5b806398cd6153146104c4578063a22cb465146104e4578063b88d4fde146104ff578063c87b56dd1461051a57600080fd5b806380a5a371116100d157806380a5a3711461045e5780638da5cb5b1461047e5780638f0bc1521461049c57806395d89b41146104af57600080fd5b806370a08231146103e8578063715018a61461040857806373b2e80e1461041d5780637509c39b1461043d57600080fd5b8063256a49351161017a5780635d6e61ca116101495780635d6e61ca1461036857806361d027b3146103885780636352211e146103a857806369fe0e2d146103c857600080fd5b8063256a4935146102f85780632f745c591461032857806342842e0e146102dd5780634f6ccce71461034857600080fd5b8063095ea7b3116101b6578063095ea7b31461026c57806318160ddd1461028e57806321a2fe03146102ad57806323b872dd146102dd57600080fd5b806301ffc9a7146101dd57806306fdde0314610212578063081812fc14610234575b600080fd5b3480156101e957600080fd5b506101fd6101f8366004611c7a565b6105b0565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b506102276105db565b6040516102099190611ce4565b34801561024057600080fd5b5061025461024f366004611cf7565b61066d565b6040516001600160a01b039091168152602001610209565b34801561027857600080fd5b5061028c610287366004611d35565b610694565b005b34801561029a57600080fd5b506099545b604051908152602001610209565b3480156102b957600080fd5b506101fd6102c8366004611cf7565b600090815261012f6020526040902054151590565b3480156102e957600080fd5b5061028c610287366004611d61565b34801561030457600080fd5b5060fc5460fb54604080519283526001600160a01b03909116602083015201610209565b34801561033457600080fd5b5061029f610343366004611d35565b6106ad565b34801561035457600080fd5b5061029f610363366004611cf7565b610748565b34801561037457600080fd5b5061028c610383366004611de4565b6107db565b34801561039457600080fd5b5060fb54610254906001600160a01b031681565b3480156103b457600080fd5b506102546103c3366004611cf7565b61099d565b3480156103d457600080fd5b5061028c6103e3366004611cf7565b6109fd565b3480156103f457600080fd5b5061029f610403366004611ebc565b610a41565b34801561041457600080fd5b5061028c610ac7565b34801561042957600080fd5b506101fd610438366004611ebc565b610adb565b34801561044957600080fd5b5061012d54610254906001600160a01b031681565b34801561046a57600080fd5b5061028c610479366004611ed9565b610aee565b34801561048a57600080fd5b5060c9546001600160a01b0316610254565b61028c6104aa366004611f2c565b610b80565b3480156104bb57600080fd5b50610227610d59565b3480156104d057600080fd5b5061028c6104df366004611f70565b610d68565b3480156104f057600080fd5b5061028c610287366004611fb2565b34801561050b57600080fd5b5061028c610287366004612006565b34801561052657600080fd5b50610227610535366004611cf7565b610dac565b34801561054657600080fd5b5061029f60fc5481565b34801561055c57600080fd5b506101fd61056b3660046120e6565b610e10565b34801561057c57600080fd5b5061028c61058b366004611ebc565b610e2b565b34801561059c57600080fd5b5061028c6105ab366004611ebc565b610e81565b60006001600160e01b0319821663780e9d6360e01b14806105d557506105d582610efa565b92915050565b6060606580546105ea90612114565b80601f016020809104026020016040519081016040528092919081815260200182805461061690612114565b80156106635780601f1061063857610100808354040283529160200191610663565b820191906000526020600020905b81548152906001019060200180831161064657829003601f168201915b5050505050905090565b600061067882610f1f565b506000908152606960205260409020546001600160a01b031690565b60405163a4420a9560e01b815260040160405180910390fd5b60006106b883610a41565b821061071f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084015b60405180910390fd5b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b600061075360995490565b82106107b65760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610716565b609982815481106107c9576107c961214e565b90600052602060002001549050919050565b600054610100900460ff16158080156107fb5750600054600160ff909116105b806108155750303b158015610815575060005460ff166001145b6108785760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610716565b6000805460ff19166001179055801561089b576000805461ff0019166101001790555b61012e6108a98789836121b2565b5061012d80546001600160a01b0319166001600160a01b038416179055604080516020601f8d018190048102820181019092528b8152610937918d908d908190840183828082843760009201919091525050604080516020601f8f018190048102820181019092528d815292508d91508c9081908401838280828437600092019190915250610f7e92505050565b6109418484610fbb565b61094a85611008565b8015610990576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000818152606760205260408120546001600160a01b0316806105d55760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610716565b610a0561105a565b60fc8190556040518181527f6bbc57480a46553fa4d156ce702beef5f3ad66303b0ed1a5d4cb44966c6584c3906020015b60405180910390a150565b60006001600160a01b038216610aab5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610716565b506001600160a01b031660009081526068602052604090205490565b610acf61105a565b610ad96000611008565b565b600080610ae783610a41565b1192915050565b610af78461099d565b6001600160a01b0316336001600160a01b031614610b2857604051637d1c29f360e01b815260040160405180910390fd5b610b34338484846110b4565b610b515760405163c1606c2f60e01b815260040160405180910390fd5b600083815261012f60205260408120805491610b6c83612288565b9190505550610b7a8461122a565b50505050565b6000610b8b85610a41565b1180610ba55750600083815261012f602052604090205415155b15610bc357604051630c8d9eab60e31b815260040160405180910390fd5b610bcf848484846110b4565b610bec5760405163c1606c2f60e01b815260040160405180910390fd5b6000610bf760995490565b61012d546040805163256a493560e01b8152815193945060009384936001600160a01b03169263256a493592600480820193918290030181865afa158015610c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c67919061229f565b600088815261012f602052604081208054939550919350610c87836122c4565b909155505060fc54610c9990836122dd565b3403610cd257610cb26001600160a01b038216836112cd565b60fc5460fb54610ccd916001600160a01b03909116906112cd565b610d03565b3460fc5483610ce191906122dd565b60405163dcf6afcb60e01b815260048101929092526024820152604401610716565b610d0d8784611351565b866001600160a01b03167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a84604051610d4891815260200190565b60405180910390a250505050505050565b6060606680546105ea90612114565b610d7061105a565b61012e610d7e8284836121b2565b506040517f22e4f6d6e52498ce761f4a367a6aaff84750f8bfb036d99abbb027e50eddacd990600090a15050565b6000818152606760205260409020546060906001600160a01b0316610de7576040516338077a2b60e01b815260048101839052602401610716565b61012e604051602001610dfa91906122f0565b6040516020818303038152906040529050919050565b600060405163a4420a9560e01b815260040160405180910390fd5b610e3361105a565b60fb80546001600160a01b0319166001600160a01b0383169081179091556040519081527fc714d22a2f08b695f81e7c707058db484aa5b4d6b4c9fd64beb10fe85832f60890602001610a36565b610e8961105a565b6001600160a01b038116610eee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610716565b610ef781611008565b50565b60006001600160e01b0319821663780e9d6360e01b14806105d557506105d58261136b565b6000818152606760205260409020546001600160a01b0316610ef75760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610716565b600054610100900460ff16610fa55760405162461bcd60e51b81526004016107169061237f565b610faf82826113bb565b610fb76113ec565b5050565b600054610100900460ff16610fe25760405162461bcd60e51b81526004016107169061237f565b60fb80546001600160a01b0319166001600160a01b03939093169290921790915560fc55565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60c9546001600160a01b03163314610ad95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610716565b6000604182146110d75760405163c1606c2f60e01b815260040160405180910390fd5b604080516001600160a01b038716602082015290810185905246606082015230608082015260009061114f9060a001604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b905061012d60009054906101000a90046001600160a01b03166001600160a01b0316631cc7d7436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c991906123ca565b6001600160a01b031661121485858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086939250506114139050565b6001600160a01b0316149150505b949350505050565b60006112358261099d565b9050611245816000846001611437565b61124e8261099d565b600083815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526068845282852080546000190190558785526067909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461131a576040519150601f19603f3d011682016040523d82523d6000602084013e61131f565b606091505b505090508061134c57604051632499e3bb60e11b81526001600160a01b0384166004820152602401610716565b505050565b610fb7828260405180602001604052806000815250611443565b60006001600160e01b031982166380ac58cd60e01b148061139c57506001600160e01b03198216635b5e139f60e01b145b806105d557506301ffc9a760e01b6001600160e01b03198316146105d5565b600054610100900460ff166113e25760405162461bcd60e51b81526004016107169061237f565b610fb78282611476565b600054610100900460ff16610ad95760405162461bcd60e51b81526004016107169061237f565b600080600061142285856114b6565b9150915061142f816114fb565b509392505050565b610b7a84848484611645565b61144d8383611779565b61145a6000848484611912565b61134c5760405162461bcd60e51b8152600401610716906123e7565b600054610100900460ff1661149d5760405162461bcd60e51b81526004016107169061237f565b60656114a98382612439565b50606661134c8282612439565b60008082516041036114ec5760208301516040840151606085015160001a6114e087828585611a10565b945094505050506114f4565b506000905060025b9250929050565b600081600481111561150f5761150f6124f9565b036115175750565b600181600481111561152b5761152b6124f9565b036115785760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610716565b600281600481111561158c5761158c6124f9565b036115d95760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610716565b60038160048111156115ed576115ed6124f9565b03610ef75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610716565b60018111156116b45760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610716565b816001600160a01b0385166117105761170b81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b611733565b836001600160a01b0316856001600160a01b031614611733576117338582611ad4565b6001600160a01b03841661174f5761174a81611b71565b611772565b846001600160a01b0316846001600160a01b031614611772576117728482611c20565b5050505050565b6001600160a01b0382166117cf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610716565b6000818152606760205260409020546001600160a01b0316156118345760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b611842600083836001611437565b6000818152606760205260409020546001600160a01b0316156118a75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b6001600160a01b038216600081815260686020908152604080832080546001019055848352606790915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15611a0857604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061195690339089908890889060040161250f565b6020604051808303816000875af1925050508015611991575060408051601f3d908101601f1916820190925261198e9181019061254c565b60015b6119ee573d8080156119bf576040519150601f19603f3d011682016040523d82523d6000602084013e6119c4565b606091505b5080516000036119e65760405162461bcd60e51b8152600401610716906123e7565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611222565b506001611222565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611a475750600090506003611acb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611a9b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611ac457600060019250925050611acb565b9150600090505b94509492505050565b60006001611ae184610a41565b611aeb9190612569565b600083815260986020526040902054909150808214611b3e576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090611b8390600190612569565b6000838152609a602052604081205460998054939450909284908110611bab57611bab61214e565b906000526020600020015490508060998381548110611bcc57611bcc61214e565b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480611c0457611c0461257c565b6001900381819060005260206000200160009055905550505050565b6000611c2b83610a41565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160e01b031981168114610ef757600080fd5b600060208284031215611c8c57600080fd5b8135611c9781611c64565b9392505050565b6000815180845260005b81811015611cc457602081850181015186830182015201611ca8565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611c976020830184611c9e565b600060208284031215611d0957600080fd5b5035919050565b6001600160a01b0381168114610ef757600080fd5b8035611d3081611d10565b919050565b60008060408385031215611d4857600080fd5b8235611d5381611d10565b946020939093013593505050565b600080600060608486031215611d7657600080fd5b8335611d8181611d10565b92506020840135611d9181611d10565b929592945050506040919091013590565b60008083601f840112611db457600080fd5b50813567ffffffffffffffff811115611dcc57600080fd5b6020830191508360208285010111156114f457600080fd5b60008060008060008060008060008060e08b8d031215611e0357600080fd5b8a3567ffffffffffffffff80821115611e1b57600080fd5b611e278e838f01611da2565b909c509a5060208d0135915080821115611e4057600080fd5b611e4c8e838f01611da2565b909a50985060408d0135915080821115611e6557600080fd5b50611e728d828e01611da2565b90975095505060608b0135611e8681611d10565b935060808b0135611e9681611d10565b925060a08b01359150611eab60c08c01611d25565b90509295989b9194979a5092959850565b600060208284031215611ece57600080fd5b8135611c9781611d10565b60008060008060608587031215611eef57600080fd5b8435935060208501359250604085013567ffffffffffffffff811115611f1457600080fd5b611f2087828801611da2565b95989497509550505050565b60008060008060608587031215611f4257600080fd5b8435611f4d81611d10565b935060208501359250604085013567ffffffffffffffff811115611f1457600080fd5b60008060208385031215611f8357600080fd5b823567ffffffffffffffff811115611f9a57600080fd5b611fa685828601611da2565b90969095509350505050565b60008060408385031215611fc557600080fd5b8235611fd081611d10565b915060208301358015158114611fe557600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561201c57600080fd5b843561202781611d10565b9350602085013561203781611d10565b925060408501359150606085013567ffffffffffffffff8082111561205b57600080fd5b818701915087601f83011261206f57600080fd5b81358181111561208157612081611ff0565b604051601f8201601f19908116603f011681019083821181831017156120a9576120a9611ff0565b816040528281528a60208487010111156120c257600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156120f957600080fd5b823561210481611d10565b91506020830135611fe581611d10565b600181811c9082168061212857607f821691505b60208210810361214857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b601f82111561134c57600081815260208120601f850160051c8101602086101561218b5750805b601f850160051c820191505b818110156121aa57828155600101612197565b505050505050565b67ffffffffffffffff8311156121ca576121ca611ff0565b6121de836121d88354612114565b83612164565b6000601f84116001811461221257600085156121fa5750838201355b600019600387901b1c1916600186901b178355611772565b600083815260209020601f19861690835b828110156122435786850135825560209485019460019092019101612223565b50868210156122605760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b60008161229757612297612272565b506000190190565b600080604083850312156122b257600080fd5b825191506020830151611fe581611d10565b6000600182016122d6576122d6612272565b5060010190565b808201808211156105d5576105d5612272565b66697066733a2f2f60c81b8152600060076000845461230e81612114565b60018281168015612326576001811461233f57612372565b60ff198416888701528215158302880186019450612372565b8860005260208060002060005b858110156123675781548b82018a015290840190820161234c565b505050858389010194505b5092979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156123dc57600080fd5b8151611c9781611d10565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b815167ffffffffffffffff81111561245357612453611ff0565b612467816124618454612114565b84612164565b602080601f83116001811461249c57600084156124845750858301515b600019600386901b1c1916600185901b1785556121aa565b600085815260208120601f198616915b828110156124cb578886015182559484019460019091019084016124ac565b50858210156124e95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061254290830184611c9e565b9695505050505050565b60006020828403121561255e57600080fd5b8151611c9781611c64565b818103818111156105d5576105d5612272565b634e487b7160e01b600052603160045260246000fdfea26469706673582212203dc0d90733d4f9c99054ad3824004fbf162cdfab346fcf57cd7acf121b26d2f364736f6c63430008130033

Deployed Bytecode Sourcemap

810:3139:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1393:278:5;;;;;;;;;;-1:-1:-1;1393:278:5;;;;;:::i;:::-;;:::i;:::-;;;565:14:27;;558:22;540:41;;528:2;513:18;1393:278:5;;;;;;;;2932:98:9;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;4407:167::-;;;;;;;;;;-1:-1:-1;4407:167:9;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1594:32:27;;;1576:51;;1564:2;1549:18;4407:167:9;1430:203:27;1677:178:5;;;;;;;;;;-1:-1:-1;1677:178:5;;;;;:::i;:::-;;:::i;:::-;;1950:111:12;;;;;;;;;;-1:-1:-1;2037:10:12;:17;1950:111;;;2379:25:27;;;2367:2;2352:18;1950:111:12;2233:177:27;3111:131:0;;;;;;;;;;-1:-1:-1;3111:131:0;;;;;:::i;:::-;3179:12;3210:21;;;:13;:21;;;;;;:25;;;3111:131;2276:211:5;;;;;;;;;;-1:-1:-1;2276:211:5;;;;;:::i;1231:135:6:-;;;;;;;;;;-1:-1:-1;1345:3:6;;1350:8;;1231:135;;;3066:25:27;;;-1:-1:-1;;;;;1350:8:6;;;3122:2:27;3107:18;;3100:60;3039:18;1231:135:6;2876:290:27;1615:264:12;;;;;;;;;;-1:-1:-1;1615:264:12;;;;;:::i;:::-;;:::i;2133:241::-;;;;;;;;;;-1:-1:-1;2133:241:12;;;;;:::i;:::-;;:::i;1293:473:0:-;;;;;;;;;;-1:-1:-1;1293:473:0;;;;;:::i;:::-;;:::i;480:31:6:-;;;;;;;;;;-1:-1:-1;480:31:6;;;;-1:-1:-1;;;;;480:31:6;;;2651:219:9;;;;;;;;;;-1:-1:-1;2651:219:9;;;;;:::i;:::-;;:::i;955:113:6:-;;;;;;;;;;-1:-1:-1;955:113:6;;;;;:::i;:::-;;:::i;2390:204:9:-;;;;;;;;;;-1:-1:-1;2390:204:9;;;;;:::i;:::-;;:::i;2064:101:7:-;;;;;;;;;;;;;:::i;2985:120:0:-;;;;;;;;;;-1:-1:-1;2985:120:0;;;;;:::i;:::-;;:::i;1066:27::-;;;;;;;;;;-1:-1:-1;1066:27:0;;;;-1:-1:-1;;;;;1066:27:0;;;2537:309;;;;;;;;;;-1:-1:-1;2537:309:0;;;;;:::i;:::-;;:::i;1441:85:7:-;;;;;;;;;;-1:-1:-1;1513:6:7;;-1:-1:-1;;;;;1513:6:7;1441:85;;1772:759:0;;;;;;:::i;:::-;;:::i;3094:102:9:-;;;;;;;;;;;;;:::i;2852:127:0:-;;;;;;;;;;-1:-1:-1;2852:127:0;;;;;:::i;:::-;;:::i;1861:192:5:-;;;;;;;;;;-1:-1:-1;1861:192:5;;;;;:::i;2714:248::-;;;;;;;;;;-1:-1:-1;2714:248:5;;;;;:::i;3248:199:0:-;;;;;;;;;;-1:-1:-1;3248:199:0;;;;;:::i;:::-;;:::i;518:18:6:-;;;;;;;;;;;;;;;;2059:211:5;;;;;;;;;;-1:-1:-1;2059:211:5;;;;;:::i;:::-;;:::i;1074:151:6:-;;;;;;;;;;-1:-1:-1;1074:151:6;;;;;:::i;:::-;;:::i;2314:198:7:-;;;;;;;;;;-1:-1:-1;2314:198:7;;;;;:::i;:::-;;:::i;1393:278:5:-;1540:4;-1:-1:-1;;;;;;1563:61:5;;-1:-1:-1;;;1563:61:5;;:101;;;1628:36;1652:11;1628:23;:36::i;:::-;1556:108;1393:278;-1:-1:-1;;1393:278:5:o;2932:98:9:-;2986:13;3018:5;3011:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2932:98;:::o;4407:167::-;4483:7;4502:23;4517:7;4502:14;:23::i;:::-;-1:-1:-1;4543:24:9;;;;:15;:24;;;;;;-1:-1:-1;;;;;4543:24:9;;4407:167::o;1677:178:5:-;1837:11;;-1:-1:-1;;;1837:11:5;;;;;;;;;;;1615:264:12;1712:7;1747:34;1775:5;1747:27;:34::i;:::-;1739:5;:42;1731:98;;;;-1:-1:-1;;;1731:98:12;;10094:2:27;1731:98:12;;;10076:21:27;10133:2;10113:18;;;10106:30;10172:34;10152:18;;;10145:62;-1:-1:-1;;;10223:18:27;;;10216:41;10274:19;;1731:98:12;;;;;;;;;-1:-1:-1;;;;;;1846:19:12;;;;;;;;:12;:19;;;;;;;;:26;;;;;;;;;1615:264::o;2133:241::-;2208:7;2243:41;2037:10;:17;;1950:111;2243:41;2235:5;:49;2227:106;;;;-1:-1:-1;;;2227:106:12;;10506:2:27;2227:106:12;;;10488:21:27;10545:2;10525:18;;;10518:30;10584:34;10564:18;;;10557:62;-1:-1:-1;;;10635:18:27;;;10628:42;10687:19;;2227:106:12;10304:408:27;2227:106:12;2350:10;2361:5;2350:17;;;;;;;;:::i;:::-;;;;;;;;;2343:24;;2133:241;;;:::o;1293:473:0:-;3279:19:8;3302:13;;;;;;3301:14;;3347:34;;;;-1:-1:-1;3365:12:8;;3380:1;3365:12;;;;:16;3347:34;3346:108;;;-1:-1:-1;3426:4:8;1713:19:15;:23;;;3387:66:8;;-1:-1:-1;3436:12:8;;;;;:17;3387:66;3325:201;;;;-1:-1:-1;;;3325:201:8;;11051:2:27;3325:201:8;;;11033:21:27;11090:2;11070:18;;;11063:30;11129:34;11109:18;;;11102:62;-1:-1:-1;;;11180:18:27;;;11173:44;11234:19;;3325:201:8;10849:410:27;3325:201:8;3536:12;:16;;-1:-1:-1;;3536:16:8;3551:1;3536:16;;;3562:65;;;;3596:13;:20;;-1:-1:-1;;3596:20:8;;;;;3562:65;1565:3:0::1;:10;1571:4:::0;;1565:3;:10:::1;:::i;:::-;-1:-1:-1::0;1585:12:0::1;:34:::0;;-1:-1:-1;;;;;;1585:34:0::1;-1:-1:-1::0;;;;;1585:34:0;::::1;;::::0;;1630:36:::1;::::0;;::::1;;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;::::1;::::0;1653:4;;1630:36;;;;;::::1;1653:4:::0;1630:36;;1653:4;1630:36;::::1;;::::0;::::1;::::0;;;;-1:-1:-1;;1630:36:0::1;::::0;;::::1;;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;;-1:-1:-1;1659:6:0;;-1:-1:-1;1659:6:0;;;;1630:36;::::1;1659:6:::0;;;;1630:36;::::1;;::::0;::::1;::::0;;;;-1:-1:-1;1630:22:0::1;::::0;-1:-1:-1;;;1630:36:0:i:1;:::-;1676:42;1699:8;1709;1676:22;:42::i;:::-;1729:30;1748:10;1729:18;:30::i;:::-;3651:14:8::0;3647:99;;;3697:5;3681:21;;-1:-1:-1;;3681:21:8;;;3721:14;;-1:-1:-1;13474:36:27;;3721:14:8;;13462:2:27;13447:18;3721:14:8;;;;;;;3647:99;3269:483;1293:473:0;;;;;;;;;;:::o;2651:219:9:-;2723:7;7266:16;;;:7;:16;;;;;;-1:-1:-1;;;;;7266:16:9;;2785:56;;;;-1:-1:-1;;;2785:56:9;;13723:2:27;2785:56:9;;;13705:21:27;13762:2;13742:18;;;13735:30;-1:-1:-1;;;13781:18:27;;;13774:54;13845:18;;2785:56:9;13521:348:27;955:113:6;1334:13:7;:11;:13::i;:::-;1016:3:6::1;:12:::0;;;1043:18:::1;::::0;2379:25:27;;;1043:18:6::1;::::0;2367:2:27;2352:18;1043::6::1;;;;;;;;955:113:::0;:::o;2390:204:9:-;2462:7;-1:-1:-1;;;;;2489:19:9;;2481:73;;;;-1:-1:-1;;;2481:73:9;;14076:2:27;2481:73:9;;;14058:21:27;14115:2;14095:18;;;14088:30;14154:34;14134:18;;;14127:62;-1:-1:-1;;;14205:18:27;;;14198:39;14254:19;;2481:73:9;13874:405:27;2481:73:9;-1:-1:-1;;;;;;2571:16:9;;;;;:9;:16;;;;;;;2390:204::o;2064:101:7:-;1334:13;:11;:13::i;:::-;2128:30:::1;2155:1;2128:18;:30::i;:::-;2064:101::o:0;2985:120:0:-;3045:12;3097:1;3076:18;3086:7;3076:9;:18::i;:::-;:22;;2985:120;-1:-1:-1;;2985:120:0:o;2537:309::-;2647:16;2655:7;2647;:16::i;:::-;-1:-1:-1;;;;;2633:30:0;:10;-1:-1:-1;;;;;2633:30:0;;2629:60;;2672:17;;-1:-1:-1;;;2672:17:0;;;;;;;;;;;2629:60;2704:47;2721:10;2733:6;2741:9;;2704:16;:47::i;:::-;2699:81;;2760:20;;-1:-1:-1;;;2760:20:0;;;;;;;;;;;2699:81;2791:21;;;;:13;:21;;;;;:23;;;;;;:::i;:::-;;;;;;2825:14;2831:7;2825:5;:14::i;:::-;2537:309;;;;:::o;1772:759::-;1900:1;1878:19;1888:8;1878:9;:19::i;:::-;:23;:52;;;-1:-1:-1;1929:1:0;1905:21;;;:13;:21;;;;;;:25;;1878:52;1874:81;;;1939:16;;-1:-1:-1;;;1939:16:0;;;;;;;;;;;1874:81;1970:45;1987:8;1997:6;2005:9;;1970:16;:45::i;:::-;1965:79;;2024:20;;-1:-1:-1;;;2024:20:0;;;;;;;;;;;1965:79;2055:15;2073:13;2037:10:12;:17;;1950:111;2073:13:0;2166:12;;2149:43;;;-1:-1:-1;;;2149:43:0;;;;2055:31;;-1:-1:-1;2098:16:0;;;;-1:-1:-1;;;;;2166:12:0;;2149:41;;:43;;;;;;;;;;;2166:12;2149:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2203:21;;;;:13;:21;;;;;:23;;2097:95;;-1:-1:-1;2097:95:0;;-1:-1:-1;2203:23:0;;;:::i;:::-;;;;-1:-1:-1;;2291:3:0;;2280:14;;:8;:14;:::i;:::-;2267:9;:27;2263:180;;2310:33;-1:-1:-1;;;;;2310:23:0;;2334:8;2310:23;:33::i;:::-;2376:3;;2357:8;;:23;;-1:-1:-1;;;;;2357:8:0;;;;:18;:23::i;:::-;2263:180;;;2417:9;2439:3;;2428:8;:14;;;;:::i;:::-;2404:39;;-1:-1:-1;;;2404:39:0;;;;;15326:25:27;;;;15367:18;;;15360:34;15299:18;;2404:39:0;15152:248:27;2263:180:0;2454:28;2464:8;2474:7;2454:9;:28::i;:::-;2506:8;-1:-1:-1;;;;;2498:26:0;;2516:7;2498:26;;;;2379:25:27;;2367:2;2352:18;;2233:177;2498:26:0;;;;;;;;1864:667;;;1772:759;;;;:::o;3094:102:9:-;3150:13;3182:7;3175:14;;;;;:::i;2852:127:0:-;1334:13:7;:11;:13::i;:::-;2929:3:0::1;:12;2935:6:::0;;2929:3;:12:::1;:::i;:::-;-1:-1:-1::0;2956:16:0::1;::::0;::::1;::::0;;;::::1;2852:127:::0;;:::o;3248:199::-;7657:4:9;7266:16;;;:7;:16;;;;;;3313:13:0;;-1:-1:-1;;;;;7266:16:9;3338:55:0;;3368:25;;-1:-1:-1;;;3368:25:0;;;;;2379::27;;;2352:18;;3368:25:0;2233:177:27;3338:55:0;3436:3;3411:29;;;;;;;;:::i;:::-;;;;;;;;;;;;;3404:36;;3248:199;;;:::o;2059:211:5:-;2229:4;2252:11;;-1:-1:-1;;;2252:11:5;;;;;;;;;;;1074:151:6;1334:13:7;:11;:13::i;:::-;1153:8:6::1;:22:::0;;-1:-1:-1;;;;;;1153:22:6::1;-1:-1:-1::0;;;;;1153:22:6;::::1;::::0;;::::1;::::0;;;1190:28:::1;::::0;1576:51:27;;;1190:28:6::1;::::0;1564:2:27;1549:18;1190:28:6::1;1430:203:27::0;2314:198:7;1334:13;:11;:13::i;:::-;-1:-1:-1;;;;;2402:22:7;::::1;2394:73;;;::::0;-1:-1:-1;;;2394:73:7;;16847:2:27;2394:73:7::1;::::0;::::1;16829:21:27::0;16886:2;16866:18;;;16859:30;16925:34;16905:18;;;16898:62;-1:-1:-1;;;16976:18:27;;;16969:36;17022:19;;2394:73:7::1;16645:402:27::0;2394:73:7::1;2477:28;2496:8;2477:18;:28::i;:::-;2314:198:::0;:::o;1281:255:12:-;1405:4;-1:-1:-1;;;;;;1428:61:12;;-1:-1:-1;;;1428:61:12;;:101;;;1493:36;1517:11;1493:23;:36::i;13778:133:9:-;7657:4;7266:16;;;:7;:16;;;;;;-1:-1:-1;;;;;7266:16:9;13851:53;;;;-1:-1:-1;;;13851:53:9;;13723:2:27;13851:53:9;;;13705:21:27;13762:2;13742:18;;;13735:30;-1:-1:-1;;;13781:18:27;;;13774:54;13845:18;;13851:53:9;13521:348:27;1156:183:5;5374:13:8;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:8;;;;;;;:::i;:::-;1268:29:5::1;1282:5;1289:7;1268:13;:29::i;:::-;1307:25;:23;:25::i;:::-;1156:183:::0;;:::o;793:156:6:-;5374:13:8;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:8;;;;;;;:::i;:::-;902:8:6::1;:20:::0;;-1:-1:-1;;;;;;902:20:6::1;-1:-1:-1::0;;;;;902:20:6;;;::::1;::::0;;;::::1;::::0;;;932:3:::1;:10:::0;793:156::o;2666:187:7:-;2758:6;;;-1:-1:-1;;;;;2774:17:7;;;-1:-1:-1;;;;;;2774:17:7;;;;;;;2806:40;;2758:6;;;2774:17;2758:6;;2806:40;;2739:16;;2806:40;2729:124;2666:187;:::o;1599:130::-;1513:6;;-1:-1:-1;;;;;1513:6:7;929:10:16;1662:23:7;1654:68;;;;-1:-1:-1;;;1654:68:7;;17666:2:27;1654:68:7;;;17648:21:27;;;17685:18;;;17678:30;17744:34;17724:18;;;17717:62;17796:18;;1654:68:7;17464:356:27;3528:419:0;3637:4;3677:2;3657:22;;3653:55;;3688:20;;-1:-1:-1;;;3688:20:0;;;;;;;;;;;3653:55;3746:58;;;-1:-1:-1;;;;;18112:15:27;;3746:58:0;;;18094:34:27;18144:18;;;18137:34;;;3775:13:0;18187:18:27;;;18180:34;3798:4:0;18230:18:27;;;18223:43;3718:15:0;;3736:107;;18028:19:27;;3746:58:0;;;;;;;;;;;;3736:69;;;;;;7389:34:24;7189:15;7376:48;;;7444:4;7437:18;;;;7495:4;7479:21;;;7120:396;3736:107:0;3718:125;;3913:12;;;;;;;;;-1:-1:-1;;;;;3913:12:0;-1:-1:-1;;;;;3890:48:0;;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;3860:80:0;:26;3876:9;;3860:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3860:7:0;;:26;-1:-1:-1;;3860:15:0;:26;-1:-1:-1;3860:26:0:i;:::-;-1:-1:-1;;;;;3860:80:0;;3853:87;;;3528:419;;;;;;;:::o;10654:784:9:-;10713:13;10729:34;10755:7;10729:25;:34::i;:::-;10713:50;;10774:51;10795:5;10810:1;10814:7;10823:1;10774:20;:51::i;:::-;10935:34;10961:7;10935:25;:34::i;:::-;11014:24;;;;:15;:24;;;;;;;;11007:31;;-1:-1:-1;;;;;;11007:31:9;;;;;;-1:-1:-1;;;;;11254:16:9;;;;;:9;:16;;;;;:21;;-1:-1:-1;;11254:21:9;;;11302:16;;;:7;:16;;;;;;11295:23;;;;;;;11334:36;10927:42;;-1:-1:-1;11030:7:9;;11334:36;;11014:24;;11334:36;1156:183:5;;:::o;806:260:4:-;947:12;965:9;-1:-1:-1;;;;;965:14:4;988:6;965:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;946:54;;;1015:7;1010:49;;1031:28;;-1:-1:-1;;;1031:28:4;;-1:-1:-1;;;;;1594:32:27;;1031:28:4;;;1576:51:27;1549:18;;1031:28:4;1430:203:27;1010:49:4;877:189;806:260;;:::o;8478:108:9:-;8553:26;8563:2;8567:7;8553:26;;;;;;;;;;;;:9;:26::i;1987:344::-;2111:4;-1:-1:-1;;;;;;2146:51:9;;-1:-1:-1;;;2146:51:9;;:126;;-1:-1:-1;;;;;;;2213:59:9;;-1:-1:-1;;;2213:59:9;2146:126;:178;;;-1:-1:-1;;;;;;;;;;1168:51:18;;;2288:36:9;1060:166:18;1605:149:9;5374:13:8;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:8;;;;;;;:::i;:::-;1708:39:9::1;1732:5;1739:7;1708:23;:39::i;601:68:12:-:0;5374:13:8;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:8;;;;;;;:::i;3661:227:24:-;3739:7;3759:17;3778:18;3800:27;3811:4;3817:9;3800:10;:27::i;:::-;3758:69;;;;3837:18;3849:5;3837:11;:18::i;:::-;-1:-1:-1;3872:9:24;3661:227;-1:-1:-1;;;3661:227:24:o;3013:287:5:-;3232:61;3259:4;3265:2;3269:12;3283:9;3232:26;:61::i;8807:279:9:-;8901:18;8907:2;8911:7;8901:5;:18::i;:::-;8950:53;8981:1;8985:2;8989:7;8998:4;8950:22;:53::i;:::-;8929:150;;;;-1:-1:-1;;;8929:150:9;;;;;;;:::i;1760:160::-;5374:13:8;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:8;;;;;;;:::i;:::-;1873:5:9::1;:13;1881:5:::0;1873;:13:::1;:::i;:::-;-1:-1:-1::0;1896:7:9::1;:17;1906:7:::0;1896;:17:::1;:::i;2145:730:24:-:0;2226:7;2235:12;2263:9;:16;2283:2;2263:22;2259:610;;2599:4;2584:20;;2578:27;2648:4;2633:20;;2627:27;2705:4;2690:20;;2684:27;2301:9;2676:36;2746:25;2757:4;2676:36;2578:27;2627;2746:10;:25::i;:::-;2739:32;;;;;;;;;2259:610;-1:-1:-1;2818:1:24;;-1:-1:-1;2822:35:24;2259:610;2145:730;;;;;:::o;570:511::-;647:20;638:5;:29;;;;;;;;:::i;:::-;;634:441;;570:511;:::o;634:441::-;743:29;734:5;:38;;;;;;;;:::i;:::-;;730:345;;788:34;;-1:-1:-1;;;788:34:24;;20853:2:27;788:34:24;;;20835:21:27;20892:2;20872:18;;;20865:30;20931:26;20911:18;;;20904:54;20975:18;;788:34:24;20651:348:27;730:345:24;852:35;843:5;:44;;;;;;;;:::i;:::-;;839:236;;903:41;;-1:-1:-1;;;903:41:24;;21206:2:27;903:41:24;;;21188:21:27;21245:2;21225:18;;;21218:30;21284:33;21264:18;;;21257:61;21335:18;;903:41:24;21004:355:27;839:236:24;974:30;965:5;:39;;;;;;;;:::i;:::-;;961:114;;1020:44;;-1:-1:-1;;;1020:44:24;;21566:2:27;1020:44:24;;;21548:21:27;21605:2;21585:18;;;21578:30;21644:34;21624:18;;;21617:62;-1:-1:-1;;;21695:18:27;;;21688:32;21737:19;;1020:44:24;21364:398:27;2443:890:12;2702:1;2690:9;:13;2686:219;;;2831:63;;-1:-1:-1;;;2831:63:12;;21969:2:27;2831:63:12;;;21951:21:27;22008:2;21988:18;;;21981:30;22047:34;22027:18;;;22020:62;-1:-1:-1;;;22098:18:27;;;22091:51;22159:19;;2831:63:12;21767:417:27;2686:219:12;2933:12;-1:-1:-1;;;;;2960:18:12;;2956:183;;2994:40;3026:7;4153:10;:17;;4126:24;;;;:15;:24;;;;;:44;;;4180:24;;;;;;;;;;;;4050:161;2994:40;2956:183;;;3063:2;-1:-1:-1;;;;;3055:10:12;:4;-1:-1:-1;;;;;3055:10:12;;3051:88;;3081:47;3114:4;3120:7;3081:32;:47::i;:::-;-1:-1:-1;;;;;3152:16:12;;3148:179;;3184:45;3221:7;3184:36;:45::i;:::-;3148:179;;;3256:4;-1:-1:-1;;;;;3250:10:12;:2;-1:-1:-1;;;;;3250:10:12;;3246:81;;3276:40;3304:2;3308:7;3276:27;:40::i;:::-;2604:729;2443:890;;;;:::o;9408:920:9:-;-1:-1:-1;;;;;9487:16:9;;9479:61;;;;-1:-1:-1;;;9479:61:9;;22391:2:27;9479:61:9;;;22373:21:27;;;22410:18;;;22403:30;22469:34;22449:18;;;22442:62;22521:18;;9479:61:9;22189:356:27;9479:61:9;7657:4;7266:16;;;:7;:16;;;;;;-1:-1:-1;;;;;7266:16:9;7680:31;9550:58;;;;-1:-1:-1;;;9550:58:9;;22752:2:27;9550:58:9;;;22734:21:27;22791:2;22771:18;;;22764:30;22830;22810:18;;;22803:58;22878:18;;9550:58:9;22550:352:27;9550:58:9;9619:48;9648:1;9652:2;9656:7;9665:1;9619:20;:48::i;:::-;7657:4;7266:16;;;:7;:16;;;;;;-1:-1:-1;;;;;7266:16:9;7680:31;9754:58;;;;-1:-1:-1;;;9754:58:9;;22752:2:27;9754:58:9;;;22734:21:27;22791:2;22771:18;;;22764:30;22830;22810:18;;;22803:58;22878:18;;9754:58:9;22550:352:27;9754:58:9;-1:-1:-1;;;;;10154:13:9;;;;;;:9;:13;;;;;;;;:18;;10171:1;10154:18;;;10193:16;;;:7;:16;;;;;;:21;;-1:-1:-1;;;;;;10193:21:9;;;;;10230:33;10201:7;;10154:13;;10230:33;;10154:13;;10230:33;1156:183:5;;:::o;14463:853:9:-;14612:4;-1:-1:-1;;;;;14632:13:9;;1713:19:15;:23;14628:682:9;;14667:82;;-1:-1:-1;;;14667:82:9;;-1:-1:-1;;;;;14667:47:9;;;;;:82;;929:10:16;;14729:4:9;;14735:7;;14744:4;;14667:82;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14667:82:9;;;;;;;;-1:-1:-1;;14667:82:9;;;;;;;;;;;;:::i;:::-;;;14663:595;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14927:6;:13;14944:1;14927:18;14923:321;;14969:60;;-1:-1:-1;;;14969:60:9;;;;;;;:::i;14923:321::-;15196:6;15190:13;15181:6;15177:2;15173:15;15166:38;14663:595;-1:-1:-1;;;;;;14799:62:9;-1:-1:-1;;;14799:62:9;;-1:-1:-1;14792:69:9;;14628:682;-1:-1:-1;15295:4:9;15288:11;;5009:1456:24;5097:7;;6021:66;6008:79;;6004:161;;;-1:-1:-1;6119:1:24;;-1:-1:-1;6123:30:24;6103:51;;6004:161;6276:24;;;6259:14;6276:24;;;;;;;;;23882:25:27;;;23955:4;23943:17;;23923:18;;;23916:45;;;;23977:18;;;23970:34;;;24020:18;;;24013:34;;;6276:24:24;;23854:19:27;;6276:24:24;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6276:24:24;;-1:-1:-1;;6276:24:24;;;-1:-1:-1;;;;;;;6314:20:24;;6310:101;;6366:1;6370:29;6350:50;;;;;;;6310:101;6429:6;-1:-1:-1;6437:20:24;;-1:-1:-1;5009:1456:24;;;;;;;;:::o;4828:981:12:-;5090:22;5151:1;5115:33;5143:4;5115:27;:33::i;:::-;:37;;;;:::i;:::-;5162:18;5183:26;;;:17;:26;;;;;;5090:62;;-1:-1:-1;5313:28:12;;;5309:323;;-1:-1:-1;;;;;5379:18:12;;5357:19;5379:18;;;:12;:18;;;;;;;;:34;;;;;;;;;5428:30;;;;;;:44;;;5544:30;;:17;:30;;;;;:43;;;5309:323;-1:-1:-1;5725:26:12;;;;:17;:26;;;;;;;;5718:33;;;-1:-1:-1;;;;;5768:18:12;;;;;:12;:18;;;;;:34;;;;;;;5761:41;4828:981::o;6097:1061::-;6371:10;:17;6346:22;;6371:21;;6391:1;;6371:21;:::i;:::-;6402:18;6423:24;;;:15;:24;;;;;;6791:10;:26;;6346:46;;-1:-1:-1;6423:24:12;;6346:46;;6791:26;;;;;;:::i;:::-;;;;;;;;;6769:48;;6853:11;6828:10;6839;6828:22;;;;;;;;:::i;:::-;;;;;;;;;;;;:36;;;;6932:28;;;:15;:28;;;;;;;:41;;;7101:24;;;;;7094:31;7135:10;:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;6168:990;;;6097:1061;:::o;3627:228::-;3711:14;3728:31;3756:2;3728:27;:31::i;:::-;-1:-1:-1;;;;;3769:16:12;;;;;;;:12;:16;;;;;;;;:24;;;;;;;;:34;;;3813:26;;;:17;:26;;;;;;:35;;;;-1:-1:-1;3627:228:12:o;14:131:27:-;-1:-1:-1;;;;;;88:32:27;;78:43;;68:71;;135:1;132;125:12;150:245;208:6;261:2;249:9;240:7;236:23;232:32;229:52;;;277:1;274;267:12;229:52;316:9;303:23;335:30;359:5;335:30;:::i;:::-;384:5;150:245;-1:-1:-1;;;150:245:27:o;592:423::-;634:3;672:5;666:12;699:6;694:3;687:19;724:1;734:162;748:6;745:1;742:13;734:162;;;810:4;866:13;;;862:22;;856:29;838:11;;;834:20;;827:59;763:12;734:162;;;738:3;941:1;934:4;925:6;920:3;916:16;912:27;905:38;1004:4;997:2;993:7;988:2;980:6;976:15;972:29;967:3;963:39;959:50;952:57;;;592:423;;;;:::o;1020:220::-;1169:2;1158:9;1151:21;1132:4;1189:45;1230:2;1219:9;1215:18;1207:6;1189:45;:::i;1245:180::-;1304:6;1357:2;1345:9;1336:7;1332:23;1328:32;1325:52;;;1373:1;1370;1363:12;1325:52;-1:-1:-1;1396:23:27;;1245:180;-1:-1:-1;1245:180:27:o;1638:131::-;-1:-1:-1;;;;;1713:31:27;;1703:42;;1693:70;;1759:1;1756;1749:12;1774:134;1842:20;;1871:31;1842:20;1871:31;:::i;:::-;1774:134;;;:::o;1913:315::-;1981:6;1989;2042:2;2030:9;2021:7;2017:23;2013:32;2010:52;;;2058:1;2055;2048:12;2010:52;2097:9;2084:23;2116:31;2141:5;2116:31;:::i;:::-;2166:5;2218:2;2203:18;;;;2190:32;;-1:-1:-1;;;1913:315:27:o;2415:456::-;2492:6;2500;2508;2561:2;2549:9;2540:7;2536:23;2532:32;2529:52;;;2577:1;2574;2567:12;2529:52;2616:9;2603:23;2635:31;2660:5;2635:31;:::i;:::-;2685:5;-1:-1:-1;2742:2:27;2727:18;;2714:32;2755:33;2714:32;2755:33;:::i;:::-;2415:456;;2807:7;;-1:-1:-1;;;2861:2:27;2846:18;;;;2833:32;;2415:456::o;3171:348::-;3223:8;3233:6;3287:3;3280:4;3272:6;3268:17;3264:27;3254:55;;3305:1;3302;3295:12;3254:55;-1:-1:-1;3328:20:27;;3371:18;3360:30;;3357:50;;;3403:1;3400;3393:12;3357:50;3440:4;3432:6;3428:17;3416:29;;3492:3;3485:4;3476:6;3468;3464:19;3460:30;3457:39;3454:59;;;3509:1;3506;3499:12;3524:1440;3681:6;3689;3697;3705;3713;3721;3729;3737;3745;3753;3806:3;3794:9;3785:7;3781:23;3777:33;3774:53;;;3823:1;3820;3813:12;3774:53;3863:9;3850:23;3892:18;3933:2;3925:6;3922:14;3919:34;;;3949:1;3946;3939:12;3919:34;3988:59;4039:7;4030:6;4019:9;4015:22;3988:59;:::i;:::-;4066:8;;-1:-1:-1;3962:85:27;-1:-1:-1;4154:2:27;4139:18;;4126:32;;-1:-1:-1;4170:16:27;;;4167:36;;;4199:1;4196;4189:12;4167:36;4238:61;4291:7;4280:8;4269:9;4265:24;4238:61;:::i;:::-;4318:8;;-1:-1:-1;4212:87:27;-1:-1:-1;4406:2:27;4391:18;;4378:32;;-1:-1:-1;4422:16:27;;;4419:36;;;4451:1;4448;4441:12;4419:36;;4490:61;4543:7;4532:8;4521:9;4517:24;4490:61;:::i;:::-;4570:8;;-1:-1:-1;4464:87:27;-1:-1:-1;;4655:2:27;4640:18;;4627:32;4668:31;4627:32;4668:31;:::i;:::-;4718:5;-1:-1:-1;4775:3:27;4760:19;;4747:33;4789;4747;4789;:::i;:::-;4841:7;-1:-1:-1;4895:3:27;4880:19;;4867:33;;-1:-1:-1;4919:39:27;4953:3;4938:19;;4919:39;:::i;:::-;4909:49;;3524:1440;;;;;;;;;;;;;:::o;5193:247::-;5252:6;5305:2;5293:9;5284:7;5280:23;5276:32;5273:52;;;5321:1;5318;5311:12;5273:52;5360:9;5347:23;5379:31;5404:5;5379:31;:::i;5445:546::-;5533:6;5541;5549;5557;5610:2;5598:9;5589:7;5585:23;5581:32;5578:52;;;5626:1;5623;5616:12;5578:52;5662:9;5649:23;5639:33;;5719:2;5708:9;5704:18;5691:32;5681:42;;5774:2;5763:9;5759:18;5746:32;5801:18;5793:6;5790:30;5787:50;;;5833:1;5830;5823:12;5787:50;5872:59;5923:7;5914:6;5903:9;5899:22;5872:59;:::i;:::-;5445:546;;;;-1:-1:-1;5950:8:27;-1:-1:-1;;;;5445:546:27:o;5996:613::-;6084:6;6092;6100;6108;6161:2;6149:9;6140:7;6136:23;6132:32;6129:52;;;6177:1;6174;6167:12;6129:52;6216:9;6203:23;6235:31;6260:5;6235:31;:::i;:::-;6285:5;-1:-1:-1;6337:2:27;6322:18;;6309:32;;-1:-1:-1;6392:2:27;6377:18;;6364:32;6419:18;6408:30;;6405:50;;;6451:1;6448;6441:12;6614:411;6685:6;6693;6746:2;6734:9;6725:7;6721:23;6717:32;6714:52;;;6762:1;6759;6752:12;6714:52;6802:9;6789:23;6835:18;6827:6;6824:30;6821:50;;;6867:1;6864;6857:12;6821:50;6906:59;6957:7;6948:6;6937:9;6933:22;6906:59;:::i;:::-;6984:8;;6880:85;;-1:-1:-1;6614:411:27;-1:-1:-1;;;;6614:411:27:o;7030:416::-;7095:6;7103;7156:2;7144:9;7135:7;7131:23;7127:32;7124:52;;;7172:1;7169;7162:12;7124:52;7211:9;7198:23;7230:31;7255:5;7230:31;:::i;:::-;7280:5;-1:-1:-1;7337:2:27;7322:18;;7309:32;7379:15;;7372:23;7360:36;;7350:64;;7410:1;7407;7400:12;7350:64;7433:7;7423:17;;;7030:416;;;;;:::o;7451:127::-;7512:10;7507:3;7503:20;7500:1;7493:31;7543:4;7540:1;7533:15;7567:4;7564:1;7557:15;7583:1266;7678:6;7686;7694;7702;7755:3;7743:9;7734:7;7730:23;7726:33;7723:53;;;7772:1;7769;7762:12;7723:53;7811:9;7798:23;7830:31;7855:5;7830:31;:::i;:::-;7880:5;-1:-1:-1;7937:2:27;7922:18;;7909:32;7950:33;7909:32;7950:33;:::i;:::-;8002:7;-1:-1:-1;8056:2:27;8041:18;;8028:32;;-1:-1:-1;8111:2:27;8096:18;;8083:32;8134:18;8164:14;;;8161:34;;;8191:1;8188;8181:12;8161:34;8229:6;8218:9;8214:22;8204:32;;8274:7;8267:4;8263:2;8259:13;8255:27;8245:55;;8296:1;8293;8286:12;8245:55;8332:2;8319:16;8354:2;8350;8347:10;8344:36;;;8360:18;;:::i;:::-;8435:2;8429:9;8403:2;8489:13;;-1:-1:-1;;8485:22:27;;;8509:2;8481:31;8477:40;8465:53;;;8533:18;;;8553:22;;;8530:46;8527:72;;;8579:18;;:::i;:::-;8619:10;8615:2;8608:22;8654:2;8646:6;8639:18;8694:7;8689:2;8684;8680;8676:11;8672:20;8669:33;8666:53;;;8715:1;8712;8705:12;8666:53;8771:2;8766;8762;8758:11;8753:2;8745:6;8741:15;8728:46;8816:1;8811:2;8806;8798:6;8794:15;8790:24;8783:35;8837:6;8827:16;;;;;;;7583:1266;;;;;;;:::o;8854:388::-;8922:6;8930;8983:2;8971:9;8962:7;8958:23;8954:32;8951:52;;;8999:1;8996;8989:12;8951:52;9038:9;9025:23;9057:31;9082:5;9057:31;:::i;:::-;9107:5;-1:-1:-1;9164:2:27;9149:18;;9136:32;9177:33;9136:32;9177:33;:::i;9507:380::-;9586:1;9582:12;;;;9629;;;9650:61;;9704:4;9696:6;9692:17;9682:27;;9650:61;9757:2;9749:6;9746:14;9726:18;9723:38;9720:161;;9803:10;9798:3;9794:20;9791:1;9784:31;9838:4;9835:1;9828:15;9866:4;9863:1;9856:15;9720:161;;9507:380;;;:::o;10717:127::-;10778:10;10773:3;10769:20;10766:1;10759:31;10809:4;10806:1;10799:15;10833:4;10830:1;10823:15;11390:545;11492:2;11487:3;11484:11;11481:448;;;11528:1;11553:5;11549:2;11542:17;11598:4;11594:2;11584:19;11668:2;11656:10;11652:19;11649:1;11645:27;11639:4;11635:38;11704:4;11692:10;11689:20;11686:47;;;-1:-1:-1;11727:4:27;11686:47;11782:2;11777:3;11773:12;11770:1;11766:20;11760:4;11756:31;11746:41;;11837:82;11855:2;11848:5;11845:13;11837:82;;;11900:17;;;11881:1;11870:13;11837:82;;;11841:3;;;11390:545;;;:::o;12111:1206::-;12235:18;12230:3;12227:27;12224:53;;;12257:18;;:::i;:::-;12286:94;12376:3;12336:38;12368:4;12362:11;12336:38;:::i;:::-;12330:4;12286:94;:::i;:::-;12406:1;12431:2;12426:3;12423:11;12448:1;12443:616;;;;13103:1;13120:3;13117:93;;;-1:-1:-1;13176:19:27;;;13163:33;13117:93;-1:-1:-1;;12068:1:27;12064:11;;;12060:24;12056:29;12046:40;12092:1;12088:11;;;12043:57;13223:78;;12416:895;;12443:616;11337:1;11330:14;;;11374:4;11361:18;;-1:-1:-1;;12479:17:27;;;12580:9;12602:229;12616:7;12613:1;12610:14;12602:229;;;12705:19;;;12692:33;12677:49;;12812:4;12797:20;;;;12765:1;12753:14;;;;12632:12;12602:229;;;12606:3;12859;12850:7;12847:16;12844:159;;;12983:1;12979:6;12973:3;12967;12964:1;12960:11;12956:21;12952:34;12948:39;12935:9;12930:3;12926:19;12913:33;12909:79;12901:6;12894:95;12844:159;;;13046:1;13040:3;13037:1;13033:11;13029:19;13023:4;13016:33;12416:895;;12111:1206;;;:::o;14284:127::-;14345:10;14340:3;14336:20;14333:1;14326:31;14376:4;14373:1;14366:15;14400:4;14397:1;14390:15;14416:136;14455:3;14483:5;14473:39;;14492:18;;:::i;:::-;-1:-1:-1;;;14528:18:27;;14416:136::o;14557:320::-;14644:6;14652;14705:2;14693:9;14684:7;14680:23;14676:32;14673:52;;;14721:1;14718;14711:12;14673:52;14750:9;14744:16;14734:26;;14803:2;14792:9;14788:18;14782:25;14816:31;14841:5;14816:31;:::i;14882:135::-;14921:3;14942:17;;;14939:43;;14962:18;;:::i;:::-;-1:-1:-1;15009:1:27;14998:13;;14882:135::o;15022:125::-;15087:9;;;15108:10;;;15105:36;;;15121:18;;:::i;15405:1019::-;-1:-1:-1;;;15648:3:27;15641:22;15623:3;15682:1;15703;15736:6;15730:13;15766:36;15792:9;15766:36;:::i;:::-;15821:1;15838:18;;;15865:151;;;;16030:1;16025:374;;;;15831:568;;15865:151;-1:-1:-1;;15907:24:27;;15893:12;;;15886:46;15984:14;;15977:22;15965:35;;15956:45;;15952:54;;;-1:-1:-1;15865:151:27;;16025:374;16056:6;16053:1;16046:17;16086:4;16131:2;16128:1;16118:16;16156:1;16170:174;16184:6;16181:1;16178:13;16170:174;;;16271:14;;16253:11;;;16249:20;;16242:44;16314:16;;;;16199:10;;16170:174;;;16174:3;;;16386:2;16377:6;16372:3;16368:16;16364:25;16357:32;;15831:568;-1:-1:-1;16415:3:27;;15405:1019;-1:-1:-1;;;;;;;15405:1019:27:o;17052:407::-;17254:2;17236:21;;;17293:2;17273:18;;;17266:30;17332:34;17327:2;17312:18;;17305:62;-1:-1:-1;;;17398:2:27;17383:18;;17376:41;17449:3;17434:19;;17052:407::o;18277:251::-;18347:6;18400:2;18388:9;18379:7;18375:23;18371:32;18368:52;;;18416:1;18413;18406:12;18368:52;18448:9;18442:16;18467:31;18492:5;18467:31;:::i;18743:414::-;18945:2;18927:21;;;18984:2;18964:18;;;18957:30;19023:34;19018:2;19003:18;;18996:62;-1:-1:-1;;;19089:2:27;19074:18;;19067:48;19147:3;19132:19;;18743:414::o;19162:1352::-;19288:3;19282:10;19315:18;19307:6;19304:30;19301:56;;;19337:18;;:::i;:::-;19366:97;19456:6;19416:38;19448:4;19442:11;19416:38;:::i;:::-;19410:4;19366:97;:::i;:::-;19518:4;;19582:2;19571:14;;19599:1;19594:663;;;;20301:1;20318:6;20315:89;;;-1:-1:-1;20370:19:27;;;20364:26;20315:89;-1:-1:-1;;12068:1:27;12064:11;;;12060:24;12056:29;12046:40;12092:1;12088:11;;;12043:57;20417:81;;19564:944;;19594:663;11337:1;11330:14;;;11374:4;11361:18;;-1:-1:-1;;19630:20:27;;;19748:236;19762:7;19759:1;19756:14;19748:236;;;19851:19;;;19845:26;19830:42;;19943:27;;;;19911:1;19899:14;;;;19778:19;;19748:236;;;19752:3;20012:6;20003:7;20000:19;19997:201;;;20073:19;;;20067:26;-1:-1:-1;;20156:1:27;20152:14;;;20168:3;20148:24;20144:37;20140:42;20125:58;20110:74;;19997:201;-1:-1:-1;;;;;20244:1:27;20228:14;;;20224:22;20211:36;;-1:-1:-1;19162:1352:27:o;20519:127::-;20580:10;20575:3;20571:20;20568:1;20561:31;20611:4;20608:1;20601:15;20635:4;20632:1;20625:15;22907:489;-1:-1:-1;;;;;23176:15:27;;;23158:34;;23228:15;;23223:2;23208:18;;23201:43;23275:2;23260:18;;23253:34;;;23323:3;23318:2;23303:18;;23296:31;;;23101:4;;23344:46;;23370:19;;23362:6;23344:46;:::i;:::-;23336:54;22907:489;-1:-1:-1;;;;;;22907:489:27:o;23401:249::-;23470:6;23523:2;23511:9;23502:7;23498:23;23494:32;23491:52;;;23539:1;23536;23529:12;23491:52;23571:9;23565:16;23590:30;23614:5;23590:30;:::i;24058:128::-;24125:9;;;24146:11;;;24143:37;;;24160:18;;:::i;24191:127::-;24252:10;24247:3;24243:20;24240:1;24233:31;24283:4;24280:1;24273:15;24307:4;24304:1;24297:15

Swarm Source

ipfs://3dc0d90733d4f9c99054ad3824004fbf162cdfab346fcf57cd7acf121b26d2f3
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.