ETH Price: $3,254.62 (-0.39%)

Contract

0x284a48aA3E435D4b0a5d608ddB6D76a88AC36f52
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CyanWrappedNFTV1

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 17 : CyanWrappedNFTV1.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";

contract CyanWrappedNFTV1 is
    AccessControlUpgradeable,
    ERC721Upgradeable,
    ReentrancyGuardUpgradeable,
    ERC721HolderUpgradeable
{
    using StringsUpgradeable for uint256;
    using SafeERC20Upgradeable for IERC20Upgradeable;

    bytes32 public constant CYAN_ROLE = keccak256("CYAN_ROLE");
    bytes32 public constant CYAN_PAYMENT_PLAN_ROLE =
        keccak256("CYAN_PAYMENT_PLAN_ROLE");

    string private baseURI;
    string private baseExtension;

    address private originalNFT;
    address private cyanVaultAddress;
    ERC721Upgradeable private originalNFTContract;

    event Wrap(
        address indexed from,
        address indexed to,
        uint256 indexed tokenId
    );
    event Unwrap(
        address indexed to,
        uint256 indexed tokenId,
        bool indexed isDefaulted
    );
    event WithdrewERC20(address indexed token, address to, uint256 amount);
    event WithdrewERC721(
        address indexed collection,
        address to,
        uint256 indexed tokenId
    );

    function initialize(
        address _originalNFT,
        address _cyanVaultAddress,
        address cyanPaymentPlanContractAddress,
        address cyanSuperAdmin,
        string memory _name,
        string memory _symbol,
        string memory uri,
        string memory extension
    ) public initializer {
        require(
            _originalNFT != address(0),
            "Original NFT address cannot be zero"
        );
        require(
            _cyanVaultAddress != address(0),
            "Cyan Vault address cannot be zero"
        );

        __AccessControl_init();
        __ReentrancyGuard_init();
        __ERC721Holder_init();
        __ERC721_init(_name, _symbol);

        originalNFT = _originalNFT;
        cyanVaultAddress = _cyanVaultAddress;
        originalNFTContract = ERC721Upgradeable(_originalNFT);

        baseURI = uri;
        baseExtension = extension;

        _setupRole(DEFAULT_ADMIN_ROLE, cyanSuperAdmin);
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(CYAN_PAYMENT_PLAN_ROLE, cyanPaymentPlanContractAddress);
    }

    function wrap(
        address from,
        address to,
        uint256 tokenId
    ) external nonReentrant onlyRole(CYAN_PAYMENT_PLAN_ROLE) {
        require(to != address(0), "Wrap to the zero address");
        require(!_exists(tokenId), "Token already wrapped");

        originalNFTContract.safeTransferFrom(from, address(this), tokenId);
        _safeMint(to, tokenId);

        emit Wrap(from, to, tokenId);
    }

    function unwrap(uint256 tokenId, bool isDefaulted)
        external
        nonReentrant
        onlyRole(CYAN_PAYMENT_PLAN_ROLE)
    {
        require(_exists(tokenId), "Token is not wrapped");

        address to;
        if (isDefaulted) {
            to = cyanVaultAddress;
        } else {
            to = ownerOf(tokenId);
        }

        _burn(tokenId);
        originalNFTContract.safeTransferFrom(address(this), to, tokenId);

        emit Unwrap(to, tokenId, isDefaulted);
    }

    function exists(uint256 tokenId) external view returns (bool) {
        return _exists(tokenId);
    }

    function getOriginalNFTAddress() external view returns (address) {
        return originalNFT;
    }

    function getCyanVaultAddress() external view returns (address) {
        return cyanVaultAddress;
    }

    function updateCyanVaultAddress(address _cyanVaultAddress)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(_cyanVaultAddress != address(0), "Zero Cyan Vault address");
        cyanVaultAddress = _cyanVaultAddress;
    }

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

    function _baseExtension() internal view returns (string memory) {
        return baseExtension;
    }

    function setBaseURI(string calldata newBaseURI)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        baseURI = newBaseURI;
    }

    function setBaseExtension(string calldata newBaseExtension)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        baseExtension = newBaseExtension;
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        require(_exists(tokenId), "Wrapped token does not exist");

        string memory uri = _baseURI();
        if (bytes(uri).length > 0) {
            string memory extension = _baseExtension();
            if (bytes(extension).length > 0) {
                return
                    string(
                        abi.encodePacked(uri, tokenId.toString(), extension)
                    );
            }
            return string(abi.encodePacked(uri, tokenId.toString()));
        }

        return originalNFTContract.tokenURI(tokenId);
    }

    function withdrawAirDroppedERC721(address contractAddress, uint256 tokenId)
        external
        nonReentrant
        onlyRole(CYAN_ROLE)
    {
        require(
            contractAddress != address(this),
            "Cannot withdraw own wrapped token"
        );
        require(
            contractAddress != originalNFT,
            "Cannot withdraw original NFT of the wrapper contract"
        );
        ERC721Upgradeable erc721Contract = ERC721Upgradeable(contractAddress);
        erc721Contract.safeTransferFrom(address(this), msg.sender, tokenId);

        emit WithdrewERC721(contractAddress, msg.sender, tokenId);
    }

    function withdrawAirDroppedERC20(address contractAddress, uint256 amount)
        external
        nonReentrant
        onlyRole(CYAN_ROLE)
    {
        IERC20Upgradeable erc20Contract = IERC20Upgradeable(contractAddress);
        require(
            erc20Contract.balanceOf(address(this)) >= amount,
            "ERC20 balance not enough"
        );
        erc20Contract.safeTransfer(msg.sender, amount);

        emit WithdrewERC20(contractAddress, msg.sender, amount);
    }

    function withdrawApprovedERC20(
        address contractAddress,
        address from,
        uint256 amount
    ) external nonReentrant onlyRole(CYAN_ROLE) {
        IERC20Upgradeable erc20Contract = IERC20Upgradeable(contractAddress);
        require(
            erc20Contract.allowance(from, address(this)) >= amount,
            "ERC20 allowance not enough"
        );
        erc20Contract.safeTransferFrom(from, msg.sender, amount);

        emit WithdrewERC20(contractAddress, msg.sender, amount);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721Upgradeable, AccessControlUpgradeable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}

File 2 of 17 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {
    function __AccessControl_init() internal onlyInitializing {
    }

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        StringsUpgradeable.toHexString(uint160(account), 20),
                        " is missing role ",
                        StringsUpgradeable.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @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 4 of 17 : ERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        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) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        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 owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _owners[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) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        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);

        _balances[to] += 1;
        _owners[tokenId] = to;

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

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

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

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

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

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

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal 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);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {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 a {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 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 {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @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 5 of 17 : ERC721HolderUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721HolderUpgradeable is Initializable, IERC721ReceiverUpgradeable {
    function __ERC721Holder_init() internal onlyInitializing {
    }

    function __ERC721Holder_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }

    /**
     * @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 6 of 17 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

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

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

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

    uint256 private _status;

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

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

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

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

        _;

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

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

File 7 of 17 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 8 of 17 : IAccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControlUpgradeable {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 9 of 17 : 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 17 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 11 of 17 : 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 12 of 17 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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

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

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

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

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = _setInitializedVersion(1);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

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

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

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

    function _setInitializedVersion(uint8 version) private returns (bool) {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level
        // of initializers, because in other contexts the contract may have been reentered.
        if (_initializing) {
            require(
                version == 1 && !AddressUpgradeable.isContract(address(this)),
                "Initializable: contract is already initialized"
            );
            return false;
        } else {
            require(_initialized < version, "Initializable: contract is already initialized");
            _initialized = version;
            return true;
        }
    }
}

File 13 of 17 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 14 of 17 : 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 15 of 17 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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 be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

File 16 of 17 : 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 17 of 17 : 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);
}

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

Contract Security Audit

Contract ABI

[{"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":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bool","name":"isDefaulted","type":"bool"}],"name":"Unwrap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrewERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"WithdrewERC721","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":"Wrap","type":"event"},{"inputs":[],"name":"CYAN_PAYMENT_PLAN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CYAN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"getCyanVaultAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOriginalNFTAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_originalNFT","type":"address"},{"internalType":"address","name":"_cyanVaultAddress","type":"address"},{"internalType":"address","name":"cyanPaymentPlanContractAddress","type":"address"},{"internalType":"address","name":"cyanSuperAdmin","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"string","name":"extension","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseExtension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"isDefaulted","type":"bool"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_cyanVaultAddress","type":"address"}],"name":"updateCyanVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawAirDroppedERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawAirDroppedERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawApprovedERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506133b5806100206000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80636352211e1161011a578063a217fddf116100ad578063c87b56dd1161007c578063c87b56dd146104d1578063cdf1bb74146104e4578063d547741f146104f6578063da3ef23f14610509578063e985e9c51461051c57600080fd5b8063a217fddf1461047c578063a22cb46514610484578063a930daf414610497578063b88d4fde146104be57600080fd5b806387acb02c116100e957806387acb02c146104155780638e924aba1461042857806391d148541461043b57806395d89b411461047457600080fd5b80636352211e146103ca57806364fcb44a146103dd57806370a08231146103ef5780637567b6eb1461040257600080fd5b806336568abe1161019d57806345e1aa3c1161016c57806345e1aa3c1461035757806346fe120e1461036a5780634f558e791461039157806355f804b3146103a457806362355638146103b757600080fd5b806336568abe1461030b5780634089854b1461031e57806342842e0e146103315780634498db981461034457600080fd5b8063150b7a02116101d9578063150b7a021461028857806323b872dd146102b4578063248a9ca3146102c75780632f2ff15d146102f857600080fd5b806301ffc9a71461020b57806306fdde0314610233578063081812fc14610248578063095ea7b314610273575b600080fd5b61021e610219366004612b59565b610558565b60405190151581526020015b60405180910390f35b61023b610569565b60405161022a9190612bce565b61025b610256366004612be1565b6105fb565b6040516001600160a01b03909116815260200161022a565b610286610281366004612c11565b610695565b005b61029b610296366004612ce8565b6107aa565b6040516001600160e01b0319909116815260200161022a565b6102866102c2366004612d64565b6107bb565b6102ea6102d5366004612be1565b60009081526065602052604090206001015490565b60405190815260200161022a565b610286610306366004612da0565b610836565b610286610319366004612da0565b61085b565b61028661032c366004612dda565b6108e7565b61028661033f366004612d64565b610aae565b610286610352366004612c11565b610ac9565b610286610365366004612d64565b610ce4565b6102ea7f321163fcbab3bac890d4fb1f03b22c5c6bd95bc472ee55584937974a1db0335681565b61021e61039f366004612be1565b610e8c565b6102866103b2366004612e0a565b610eab565b6102866103c5366004612d64565b610ec9565b61025b6103d8366004612be1565b6110c8565b610130546001600160a01b031661025b565b6102ea6103fd366004612e7c565b61113f565b610286610410366004612e7c565b6111c6565b610286610423366004612c11565b61124b565b610286610436366004612eb7565b6113e9565b61021e610449366004612da0565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61023b6115eb565b6102ea600081565b610286610492366004612fa7565b6115fa565b6102ea7f507793b6688804c17fc033a24c049858152fd713503d8768de9c67313c5a3afd81565b6102866104cc366004612ce8565b611605565b61023b6104df366004612be1565b611681565b61012f546001600160a01b031661025b565b610286610504366004612da0565b6117d9565b610286610517366004612e0a565b6117fe565b61021e61052a366004612fd3565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b600061056382611816565b92915050565b60606097805461057890612ffd565b80601f01602080910402602001604051908101604052809291908181526020018280546105a490612ffd565b80156105f15780601f106105c6576101008083540402835291602001916105f1565b820191906000526020600020905b8154815290600101906020018083116105d457829003601f168201915b5050505050905090565b6000818152609960205260408120546001600160a01b03166106795760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609b60205260409020546001600160a01b031690565b60006106a0826110c8565b9050806001600160a01b0316836001600160a01b03160361070d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610670565b336001600160a01b03821614806107295750610729813361052a565b61079b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610670565b6107a58383611856565b505050565b630a85bd0160e11b5b949350505050565b6107c533826118c4565b61082b5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610670565b6107a58383836119ba565b60008281526065602052604090206001015461085181611b56565b6107a58383611b63565b6001600160a01b03811633146108d95760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610670565b6108e38282611c05565b5050565b600260c954036109395760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f507793b6688804c17fc033a24c049858152fd713503d8768de9c67313c5a3afd61096881611b56565b6000838152609960205260409020546001600160a01b03166109cc5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206973206e6f7420777261707065640000000000000000000000006044820152606401610670565b600082156109e75750610130546001600160a01b03166109f3565b6109f0846110c8565b90505b6109fc84611c88565b61013154604051632142170760e11b81523060048201526001600160a01b03838116602483015260448201879052909116906342842e0e90606401600060405180830381600087803b158015610a5157600080fd5b505af1158015610a65573d6000803e3d6000fd5b5050505082151584826001600160a01b03167f2b8a0ce9be291a00dcabecabcbbff0eaf2f9af92350f7e87bf9fcc7110b1ed6460405160405180910390a45050600160c9555050565b6107a583838360405180602001604052806000815250611605565b600260c95403610b1b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f321163fcbab3bac890d4fb1f03b22c5c6bd95bc472ee55584937974a1db03356610b4a81611b56565b306001600160a01b03841603610bac5760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f74207769746864726177206f776e207772617070656420746f6b656044820152603760f91b6064820152608401610670565b61012f546001600160a01b0390811690841603610c315760405162461bcd60e51b815260206004820152603460248201527f43616e6e6f74207769746864726177206f726967696e616c204e4654206f662060448201527f746865207772617070657220636f6e74726163740000000000000000000000006064820152608401610670565b604051632142170760e11b81523060048201523360248201526044810183905283906001600160a01b038216906342842e0e90606401600060405180830381600087803b158015610c8157600080fd5b505af1158015610c95573d6000803e3d6000fd5b50506040513381528592506001600160a01b03871691507f760366092dec37cc9f0e5cfe45487dda85255614a6b7d143561d9ef106eb79939060200160405180910390a35050600160c9555050565b600260c95403610d365760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f321163fcbab3bac890d4fb1f03b22c5c6bd95bc472ee55584937974a1db03356610d6581611b56565b604051636eb1769f60e11b81526001600160a01b0384811660048301523060248301528591849183169063dd62ed3e90604401602060405180830381865afa158015610db5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd99190613037565b1015610e275760405162461bcd60e51b815260206004820152601a60248201527f455243323020616c6c6f77616e6365206e6f7420656e6f7567680000000000006044820152606401610670565b610e3c6001600160a01b038216853386611d23565b60408051338152602081018590526001600160a01b038716917fa14466d832b5a1ff01be72c58e51196498a8e10751ab9c227fe73c4730dedc41910160405180910390a25050600160c955505050565b6000818152609960205260408120546001600160a01b03161515610563565b6000610eb681611b56565b610ec361012d8484612a36565b50505050565b600260c95403610f1b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f507793b6688804c17fc033a24c049858152fd713503d8768de9c67313c5a3afd610f4a81611b56565b6001600160a01b038316610fa05760405162461bcd60e51b815260206004820152601860248201527f5772617020746f20746865207a65726f206164647265737300000000000000006044820152606401610670565b6000828152609960205260409020546001600160a01b0316156110055760405162461bcd60e51b815260206004820152601560248201527f546f6b656e20616c7265616479207772617070656400000000000000000000006044820152606401610670565b61013154604051632142170760e11b81526001600160a01b03868116600483015230602483015260448201859052909116906342842e0e90606401600060405180830381600087803b15801561105a57600080fd5b505af115801561106e573d6000803e3d6000fd5b5050505061107c8383611da3565b81836001600160a01b0316856001600160a01b03167f32771713d1bc9f76444ca8b47f67bb9a592b559397cf27cfea344efa0fdb7d8b60405160405180910390a45050600160c9555050565b6000818152609960205260408120546001600160a01b0316806105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610670565b60006001600160a01b0382166111aa5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610670565b506001600160a01b03166000908152609a602052604090205490565b60006111d181611b56565b6001600160a01b0382166112275760405162461bcd60e51b815260206004820152601760248201527f5a65726f204379616e205661756c7420616464726573730000000000000000006044820152606401610670565b5061013080546001600160a01b0319166001600160a01b0392909216919091179055565b600260c9540361129d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f321163fcbab3bac890d4fb1f03b22c5c6bd95bc472ee55584937974a1db033566112cc81611b56565b6040516370a0823160e01b8152306004820152839083906001600160a01b038316906370a0823190602401602060405180830381865afa158015611314573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113389190613037565b10156113865760405162461bcd60e51b815260206004820152601860248201527f45524332302062616c616e6365206e6f7420656e6f75676800000000000000006044820152606401610670565b61139a6001600160a01b0382163385611dbd565b60408051338152602081018590526001600160a01b038616917fa14466d832b5a1ff01be72c58e51196498a8e10751ab9c227fe73c4730dedc41910160405180910390a25050600160c9555050565b60006113f56001611ded565b9050801561140d576000805461ff0019166101001790555b6001600160a01b03891661146f5760405162461bcd60e51b815260206004820152602360248201527f4f726967696e616c204e465420616464726573732063616e6e6f74206265207a60448201526265726f60e81b6064820152608401610670565b6001600160a01b0388166114cf5760405162461bcd60e51b815260206004820152602160248201527f4379616e205661756c7420616464726573732063616e6e6f74206265207a65726044820152606f60f81b6064820152608401610670565b6114d7611f08565b6114df611f31565b6114e7611f08565b6114f18585611f60565b61012f80546001600160a01b03808c166001600160a01b031992831681179093556101308054918c169183169190911790556101318054909116909117905582516115449061012d906020860190612aba565b5081516115599061012e906020850190612aba565b50611565600087611f91565b611570600033611f91565b61159a7f507793b6688804c17fc033a24c049858152fd713503d8768de9c67313c5a3afd88611f91565b80156115e0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b60606098805461057890612ffd565b6108e3338383611f9b565b61160f33836118c4565b6116755760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610670565b610ec384848484612069565b6000818152609960205260409020546060906001600160a01b03166116e85760405162461bcd60e51b815260206004820152601c60248201527f5772617070656420746f6b656e20646f6573206e6f74206578697374000000006044820152606401610670565b60006116f26120e7565b8051909150156117605760006117066120f7565b805190915015611745578161171a85612107565b8260405160200161172d93929190613050565b60405160208183030381529060405292505050919050565b8161174f85612107565b60405160200161172d929190613093565b6101315460405163c87b56dd60e01b8152600481018590526001600160a01b039091169063c87b56dd90602401600060405180830381865afa1580156117aa573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117d291908101906130c2565b9392505050565b6000828152606560205260409020600101546117f481611b56565b6107a58383611c05565b600061180981611b56565b610ec361012e8484612a36565b60006001600160e01b031982166380ac58cd60e01b148061184757506001600160e01b03198216635b5e139f60e01b145b80610563575061056382612208565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061188b826110c8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152609960205260408120546001600160a01b031661193d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610670565b6000611948836110c8565b9050806001600160a01b0316846001600160a01b0316148061198f57506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b806107b35750836001600160a01b03166119a8846105fb565b6001600160a01b031614949350505050565b826001600160a01b03166119cd826110c8565b6001600160a01b031614611a315760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610670565b6001600160a01b038216611a935760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610670565b611a9e600082611856565b6001600160a01b0383166000908152609a60205260408120805460019290611ac790849061314f565b90915550506001600160a01b0382166000908152609a60205260408120805460019290611af5908490613166565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611b60813361223d565b50565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166108e35760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611bc13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156108e35760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611c93826110c8565b9050611ca0600083611856565b6001600160a01b0381166000908152609a60205260408120805460019290611cc990849061314f565b909155505060008281526099602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6040516001600160a01b0380851660248301528316604482015260648101829052610ec39085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091526122bd565b6108e382826040518060200160405280600081525061238f565b6040516001600160a01b0383166024820152604481018290526107a590849063a9059cbb60e01b90606401611d57565b60008054610100900460ff1615611e7b578160ff166001148015611e105750303b155b611e735760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610670565b506000919050565b60005460ff808416911610611ee95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610670565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff16611f2f5760405162461bcd60e51b81526004016106709061317e565b565b600054610100900460ff16611f585760405162461bcd60e51b81526004016106709061317e565b611f2f61240d565b600054610100900460ff16611f875760405162461bcd60e51b81526004016106709061317e565b6108e3828261243b565b6108e38282611b63565b816001600160a01b0316836001600160a01b031603611ffc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610670565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6120748484846119ba565b61208084848484612489565b610ec35760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610670565b606061012d805461057890612ffd565b606061012e805461057890612ffd565b60608160000361212e5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121585780612142816131c9565b91506121519050600a836131f8565b9150612132565b60008167ffffffffffffffff81111561217357612173612c3b565b6040519080825280601f01601f19166020018201604052801561219d576020820181803683370190505b5090505b84156107b3576121b260018361314f565b91506121bf600a8661320c565b6121ca906030613166565b60f81b8183815181106121df576121df613220565b60200101906001600160f81b031916908160001a905350612201600a866131f8565b94506121a1565b60006001600160e01b03198216637965db0b60e01b148061056357506301ffc9a760e01b6001600160e01b0319831614610563565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166108e35761227b816001600160a01b031660146125d2565b6122868360206125d2565b604051602001612297929190613236565b60408051601f198184030181529082905262461bcd60e51b825261067091600401612bce565b6000612312826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661277b9092919063ffffffff16565b8051909150156107a5578080602001905181019061233091906132b7565b6107a55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610670565b612399838361278a565b6123a66000848484612489565b6107a55760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610670565b600054610100900460ff166124345760405162461bcd60e51b81526004016106709061317e565b600160c955565b600054610100900460ff166124625760405162461bcd60e51b81526004016106709061317e565b8151612475906097906020850190612aba565b5080516107a5906098906020840190612aba565b60006001600160a01b0384163b156125ca57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906124cd9033908990889088906004016132d4565b6020604051808303816000875af1925050508015612508575060408051601f3d908101601f1916820190925261250591810190613310565b60015b6125b0573d808015612536576040519150601f19603f3d011682016040523d82523d6000602084013e61253b565b606091505b5080516000036125a85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610670565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107b3565b5060016107b3565b606060006125e183600261332d565b6125ec906002613166565b67ffffffffffffffff81111561260457612604612c3b565b6040519080825280601f01601f19166020018201604052801561262e576020820181803683370190505b509050600360fc1b8160008151811061264957612649613220565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061267857612678613220565b60200101906001600160f81b031916908160001a905350600061269c84600261332d565b6126a7906001613166565b90505b600181111561272c577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106126e8576126e8613220565b1a60f81b8282815181106126fe576126fe613220565b60200101906001600160f81b031916908160001a90535060049490941c936127258161334c565b90506126aa565b5083156117d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610670565b60606107b384846000856128cc565b6001600160a01b0382166127e05760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610670565b6000818152609960205260409020546001600160a01b0316156128455760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610670565b6001600160a01b0382166000908152609a6020526040812080546001929061286e908490613166565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60608247101561292d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610670565b6001600160a01b0385163b6129845760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610670565b600080866001600160a01b031685876040516129a09190613363565b60006040518083038185875af1925050503d80600081146129dd576040519150601f19603f3d011682016040523d82523d6000602084013e6129e2565b606091505b50915091506129f28282866129fd565b979650505050505050565b60608315612a0c5750816117d2565b825115612a1c5782518084602001fd5b8160405162461bcd60e51b81526004016106709190612bce565b828054612a4290612ffd565b90600052602060002090601f016020900481019282612a645760008555612aaa565b82601f10612a7d5782800160ff19823516178555612aaa565b82800160010185558215612aaa579182015b82811115612aaa578235825591602001919060010190612a8f565b50612ab6929150612b2e565b5090565b828054612ac690612ffd565b90600052602060002090601f016020900481019282612ae85760008555612aaa565b82601f10612b0157805160ff1916838001178555612aaa565b82800160010185558215612aaa579182015b82811115612aaa578251825591602001919060010190612b13565b5b80821115612ab65760008155600101612b2f565b6001600160e01b031981168114611b6057600080fd5b600060208284031215612b6b57600080fd5b81356117d281612b43565b60005b83811015612b91578181015183820152602001612b79565b83811115610ec35750506000910152565b60008151808452612bba816020860160208601612b76565b601f01601f19169290920160200192915050565b6020815260006117d26020830184612ba2565b600060208284031215612bf357600080fd5b5035919050565b80356001600160a01b0381168114611f0357600080fd5b60008060408385031215612c2457600080fd5b612c2d83612bfa565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c7a57612c7a612c3b565b604052919050565b600067ffffffffffffffff821115612c9c57612c9c612c3b565b50601f01601f191660200190565b6000612cbd612cb884612c82565b612c51565b9050828152838383011115612cd157600080fd5b828260208301376000602084830101529392505050565b60008060008060808587031215612cfe57600080fd5b612d0785612bfa565b9350612d1560208601612bfa565b925060408501359150606085013567ffffffffffffffff811115612d3857600080fd5b8501601f81018713612d4957600080fd5b612d5887823560208401612caa565b91505092959194509250565b600080600060608486031215612d7957600080fd5b612d8284612bfa565b9250612d9060208501612bfa565b9150604084013590509250925092565b60008060408385031215612db357600080fd5b82359150612dc360208401612bfa565b90509250929050565b8015158114611b6057600080fd5b60008060408385031215612ded57600080fd5b823591506020830135612dff81612dcc565b809150509250929050565b60008060208385031215612e1d57600080fd5b823567ffffffffffffffff80821115612e3557600080fd5b818501915085601f830112612e4957600080fd5b813581811115612e5857600080fd5b866020828501011115612e6a57600080fd5b60209290920196919550909350505050565b600060208284031215612e8e57600080fd5b6117d282612bfa565b600082601f830112612ea857600080fd5b6117d283833560208501612caa565b600080600080600080600080610100898b031215612ed457600080fd5b612edd89612bfa565b9750612eeb60208a01612bfa565b9650612ef960408a01612bfa565b9550612f0760608a01612bfa565b9450608089013567ffffffffffffffff80821115612f2457600080fd5b612f308c838d01612e97565b955060a08b0135915080821115612f4657600080fd5b612f528c838d01612e97565b945060c08b0135915080821115612f6857600080fd5b612f748c838d01612e97565b935060e08b0135915080821115612f8a57600080fd5b50612f978b828c01612e97565b9150509295985092959890939650565b60008060408385031215612fba57600080fd5b612fc383612bfa565b91506020830135612dff81612dcc565b60008060408385031215612fe657600080fd5b612fef83612bfa565b9150612dc360208401612bfa565b600181811c9082168061301157607f821691505b60208210810361303157634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561304957600080fd5b5051919050565b60008451613062818460208901612b76565b845190830190613076818360208901612b76565b8451910190613089818360208801612b76565b0195945050505050565b600083516130a5818460208801612b76565b8351908301906130b9818360208801612b76565b01949350505050565b6000602082840312156130d457600080fd5b815167ffffffffffffffff8111156130eb57600080fd5b8201601f810184136130fc57600080fd5b805161310a612cb882612c82565b81815285602083850101111561311f57600080fd5b613130826020830160208601612b76565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b60008282101561316157613161613139565b500390565b6000821982111561317957613179613139565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000600182016131db576131db613139565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082613207576132076131e2565b500490565b60008261321b5761321b6131e2565b500690565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161326e816017850160208801612b76565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516132ab816028840160208801612b76565b01602801949350505050565b6000602082840312156132c957600080fd5b81516117d281612dcc565b60006001600160a01b038087168352808616602084015250836040830152608060608301526133066080830184612ba2565b9695505050505050565b60006020828403121561332257600080fd5b81516117d281612b43565b600081600019048311821515161561334757613347613139565b500290565b60008161335b5761335b613139565b506000190190565b60008251613375818460208701612b76565b919091019291505056fea2646970667358221220654bbb5ad408a6c2b46e693549e95e49fd73f1b54bc772eb3da69ad75e7a795e64736f6c634300080d0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102065760003560e01c80636352211e1161011a578063a217fddf116100ad578063c87b56dd1161007c578063c87b56dd146104d1578063cdf1bb74146104e4578063d547741f146104f6578063da3ef23f14610509578063e985e9c51461051c57600080fd5b8063a217fddf1461047c578063a22cb46514610484578063a930daf414610497578063b88d4fde146104be57600080fd5b806387acb02c116100e957806387acb02c146104155780638e924aba1461042857806391d148541461043b57806395d89b411461047457600080fd5b80636352211e146103ca57806364fcb44a146103dd57806370a08231146103ef5780637567b6eb1461040257600080fd5b806336568abe1161019d57806345e1aa3c1161016c57806345e1aa3c1461035757806346fe120e1461036a5780634f558e791461039157806355f804b3146103a457806362355638146103b757600080fd5b806336568abe1461030b5780634089854b1461031e57806342842e0e146103315780634498db981461034457600080fd5b8063150b7a02116101d9578063150b7a021461028857806323b872dd146102b4578063248a9ca3146102c75780632f2ff15d146102f857600080fd5b806301ffc9a71461020b57806306fdde0314610233578063081812fc14610248578063095ea7b314610273575b600080fd5b61021e610219366004612b59565b610558565b60405190151581526020015b60405180910390f35b61023b610569565b60405161022a9190612bce565b61025b610256366004612be1565b6105fb565b6040516001600160a01b03909116815260200161022a565b610286610281366004612c11565b610695565b005b61029b610296366004612ce8565b6107aa565b6040516001600160e01b0319909116815260200161022a565b6102866102c2366004612d64565b6107bb565b6102ea6102d5366004612be1565b60009081526065602052604090206001015490565b60405190815260200161022a565b610286610306366004612da0565b610836565b610286610319366004612da0565b61085b565b61028661032c366004612dda565b6108e7565b61028661033f366004612d64565b610aae565b610286610352366004612c11565b610ac9565b610286610365366004612d64565b610ce4565b6102ea7f321163fcbab3bac890d4fb1f03b22c5c6bd95bc472ee55584937974a1db0335681565b61021e61039f366004612be1565b610e8c565b6102866103b2366004612e0a565b610eab565b6102866103c5366004612d64565b610ec9565b61025b6103d8366004612be1565b6110c8565b610130546001600160a01b031661025b565b6102ea6103fd366004612e7c565b61113f565b610286610410366004612e7c565b6111c6565b610286610423366004612c11565b61124b565b610286610436366004612eb7565b6113e9565b61021e610449366004612da0565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61023b6115eb565b6102ea600081565b610286610492366004612fa7565b6115fa565b6102ea7f507793b6688804c17fc033a24c049858152fd713503d8768de9c67313c5a3afd81565b6102866104cc366004612ce8565b611605565b61023b6104df366004612be1565b611681565b61012f546001600160a01b031661025b565b610286610504366004612da0565b6117d9565b610286610517366004612e0a565b6117fe565b61021e61052a366004612fd3565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b600061056382611816565b92915050565b60606097805461057890612ffd565b80601f01602080910402602001604051908101604052809291908181526020018280546105a490612ffd565b80156105f15780601f106105c6576101008083540402835291602001916105f1565b820191906000526020600020905b8154815290600101906020018083116105d457829003601f168201915b5050505050905090565b6000818152609960205260408120546001600160a01b03166106795760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609b60205260409020546001600160a01b031690565b60006106a0826110c8565b9050806001600160a01b0316836001600160a01b03160361070d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610670565b336001600160a01b03821614806107295750610729813361052a565b61079b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610670565b6107a58383611856565b505050565b630a85bd0160e11b5b949350505050565b6107c533826118c4565b61082b5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610670565b6107a58383836119ba565b60008281526065602052604090206001015461085181611b56565b6107a58383611b63565b6001600160a01b03811633146108d95760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610670565b6108e38282611c05565b5050565b600260c954036109395760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f507793b6688804c17fc033a24c049858152fd713503d8768de9c67313c5a3afd61096881611b56565b6000838152609960205260409020546001600160a01b03166109cc5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206973206e6f7420777261707065640000000000000000000000006044820152606401610670565b600082156109e75750610130546001600160a01b03166109f3565b6109f0846110c8565b90505b6109fc84611c88565b61013154604051632142170760e11b81523060048201526001600160a01b03838116602483015260448201879052909116906342842e0e90606401600060405180830381600087803b158015610a5157600080fd5b505af1158015610a65573d6000803e3d6000fd5b5050505082151584826001600160a01b03167f2b8a0ce9be291a00dcabecabcbbff0eaf2f9af92350f7e87bf9fcc7110b1ed6460405160405180910390a45050600160c9555050565b6107a583838360405180602001604052806000815250611605565b600260c95403610b1b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f321163fcbab3bac890d4fb1f03b22c5c6bd95bc472ee55584937974a1db03356610b4a81611b56565b306001600160a01b03841603610bac5760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f74207769746864726177206f776e207772617070656420746f6b656044820152603760f91b6064820152608401610670565b61012f546001600160a01b0390811690841603610c315760405162461bcd60e51b815260206004820152603460248201527f43616e6e6f74207769746864726177206f726967696e616c204e4654206f662060448201527f746865207772617070657220636f6e74726163740000000000000000000000006064820152608401610670565b604051632142170760e11b81523060048201523360248201526044810183905283906001600160a01b038216906342842e0e90606401600060405180830381600087803b158015610c8157600080fd5b505af1158015610c95573d6000803e3d6000fd5b50506040513381528592506001600160a01b03871691507f760366092dec37cc9f0e5cfe45487dda85255614a6b7d143561d9ef106eb79939060200160405180910390a35050600160c9555050565b600260c95403610d365760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f321163fcbab3bac890d4fb1f03b22c5c6bd95bc472ee55584937974a1db03356610d6581611b56565b604051636eb1769f60e11b81526001600160a01b0384811660048301523060248301528591849183169063dd62ed3e90604401602060405180830381865afa158015610db5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd99190613037565b1015610e275760405162461bcd60e51b815260206004820152601a60248201527f455243323020616c6c6f77616e6365206e6f7420656e6f7567680000000000006044820152606401610670565b610e3c6001600160a01b038216853386611d23565b60408051338152602081018590526001600160a01b038716917fa14466d832b5a1ff01be72c58e51196498a8e10751ab9c227fe73c4730dedc41910160405180910390a25050600160c955505050565b6000818152609960205260408120546001600160a01b03161515610563565b6000610eb681611b56565b610ec361012d8484612a36565b50505050565b600260c95403610f1b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f507793b6688804c17fc033a24c049858152fd713503d8768de9c67313c5a3afd610f4a81611b56565b6001600160a01b038316610fa05760405162461bcd60e51b815260206004820152601860248201527f5772617020746f20746865207a65726f206164647265737300000000000000006044820152606401610670565b6000828152609960205260409020546001600160a01b0316156110055760405162461bcd60e51b815260206004820152601560248201527f546f6b656e20616c7265616479207772617070656400000000000000000000006044820152606401610670565b61013154604051632142170760e11b81526001600160a01b03868116600483015230602483015260448201859052909116906342842e0e90606401600060405180830381600087803b15801561105a57600080fd5b505af115801561106e573d6000803e3d6000fd5b5050505061107c8383611da3565b81836001600160a01b0316856001600160a01b03167f32771713d1bc9f76444ca8b47f67bb9a592b559397cf27cfea344efa0fdb7d8b60405160405180910390a45050600160c9555050565b6000818152609960205260408120546001600160a01b0316806105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610670565b60006001600160a01b0382166111aa5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610670565b506001600160a01b03166000908152609a602052604090205490565b60006111d181611b56565b6001600160a01b0382166112275760405162461bcd60e51b815260206004820152601760248201527f5a65726f204379616e205661756c7420616464726573730000000000000000006044820152606401610670565b5061013080546001600160a01b0319166001600160a01b0392909216919091179055565b600260c9540361129d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610670565b600260c9557f321163fcbab3bac890d4fb1f03b22c5c6bd95bc472ee55584937974a1db033566112cc81611b56565b6040516370a0823160e01b8152306004820152839083906001600160a01b038316906370a0823190602401602060405180830381865afa158015611314573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113389190613037565b10156113865760405162461bcd60e51b815260206004820152601860248201527f45524332302062616c616e6365206e6f7420656e6f75676800000000000000006044820152606401610670565b61139a6001600160a01b0382163385611dbd565b60408051338152602081018590526001600160a01b038616917fa14466d832b5a1ff01be72c58e51196498a8e10751ab9c227fe73c4730dedc41910160405180910390a25050600160c9555050565b60006113f56001611ded565b9050801561140d576000805461ff0019166101001790555b6001600160a01b03891661146f5760405162461bcd60e51b815260206004820152602360248201527f4f726967696e616c204e465420616464726573732063616e6e6f74206265207a60448201526265726f60e81b6064820152608401610670565b6001600160a01b0388166114cf5760405162461bcd60e51b815260206004820152602160248201527f4379616e205661756c7420616464726573732063616e6e6f74206265207a65726044820152606f60f81b6064820152608401610670565b6114d7611f08565b6114df611f31565b6114e7611f08565b6114f18585611f60565b61012f80546001600160a01b03808c166001600160a01b031992831681179093556101308054918c169183169190911790556101318054909116909117905582516115449061012d906020860190612aba565b5081516115599061012e906020850190612aba565b50611565600087611f91565b611570600033611f91565b61159a7f507793b6688804c17fc033a24c049858152fd713503d8768de9c67313c5a3afd88611f91565b80156115e0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b60606098805461057890612ffd565b6108e3338383611f9b565b61160f33836118c4565b6116755760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610670565b610ec384848484612069565b6000818152609960205260409020546060906001600160a01b03166116e85760405162461bcd60e51b815260206004820152601c60248201527f5772617070656420746f6b656e20646f6573206e6f74206578697374000000006044820152606401610670565b60006116f26120e7565b8051909150156117605760006117066120f7565b805190915015611745578161171a85612107565b8260405160200161172d93929190613050565b60405160208183030381529060405292505050919050565b8161174f85612107565b60405160200161172d929190613093565b6101315460405163c87b56dd60e01b8152600481018590526001600160a01b039091169063c87b56dd90602401600060405180830381865afa1580156117aa573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117d291908101906130c2565b9392505050565b6000828152606560205260409020600101546117f481611b56565b6107a58383611c05565b600061180981611b56565b610ec361012e8484612a36565b60006001600160e01b031982166380ac58cd60e01b148061184757506001600160e01b03198216635b5e139f60e01b145b80610563575061056382612208565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061188b826110c8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152609960205260408120546001600160a01b031661193d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610670565b6000611948836110c8565b9050806001600160a01b0316846001600160a01b0316148061198f57506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b806107b35750836001600160a01b03166119a8846105fb565b6001600160a01b031614949350505050565b826001600160a01b03166119cd826110c8565b6001600160a01b031614611a315760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610670565b6001600160a01b038216611a935760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610670565b611a9e600082611856565b6001600160a01b0383166000908152609a60205260408120805460019290611ac790849061314f565b90915550506001600160a01b0382166000908152609a60205260408120805460019290611af5908490613166565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611b60813361223d565b50565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166108e35760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611bc13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156108e35760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611c93826110c8565b9050611ca0600083611856565b6001600160a01b0381166000908152609a60205260408120805460019290611cc990849061314f565b909155505060008281526099602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6040516001600160a01b0380851660248301528316604482015260648101829052610ec39085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091526122bd565b6108e382826040518060200160405280600081525061238f565b6040516001600160a01b0383166024820152604481018290526107a590849063a9059cbb60e01b90606401611d57565b60008054610100900460ff1615611e7b578160ff166001148015611e105750303b155b611e735760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610670565b506000919050565b60005460ff808416911610611ee95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610670565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff16611f2f5760405162461bcd60e51b81526004016106709061317e565b565b600054610100900460ff16611f585760405162461bcd60e51b81526004016106709061317e565b611f2f61240d565b600054610100900460ff16611f875760405162461bcd60e51b81526004016106709061317e565b6108e3828261243b565b6108e38282611b63565b816001600160a01b0316836001600160a01b031603611ffc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610670565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6120748484846119ba565b61208084848484612489565b610ec35760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610670565b606061012d805461057890612ffd565b606061012e805461057890612ffd565b60608160000361212e5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121585780612142816131c9565b91506121519050600a836131f8565b9150612132565b60008167ffffffffffffffff81111561217357612173612c3b565b6040519080825280601f01601f19166020018201604052801561219d576020820181803683370190505b5090505b84156107b3576121b260018361314f565b91506121bf600a8661320c565b6121ca906030613166565b60f81b8183815181106121df576121df613220565b60200101906001600160f81b031916908160001a905350612201600a866131f8565b94506121a1565b60006001600160e01b03198216637965db0b60e01b148061056357506301ffc9a760e01b6001600160e01b0319831614610563565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166108e35761227b816001600160a01b031660146125d2565b6122868360206125d2565b604051602001612297929190613236565b60408051601f198184030181529082905262461bcd60e51b825261067091600401612bce565b6000612312826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661277b9092919063ffffffff16565b8051909150156107a5578080602001905181019061233091906132b7565b6107a55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610670565b612399838361278a565b6123a66000848484612489565b6107a55760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610670565b600054610100900460ff166124345760405162461bcd60e51b81526004016106709061317e565b600160c955565b600054610100900460ff166124625760405162461bcd60e51b81526004016106709061317e565b8151612475906097906020850190612aba565b5080516107a5906098906020840190612aba565b60006001600160a01b0384163b156125ca57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906124cd9033908990889088906004016132d4565b6020604051808303816000875af1925050508015612508575060408051601f3d908101601f1916820190925261250591810190613310565b60015b6125b0573d808015612536576040519150601f19603f3d011682016040523d82523d6000602084013e61253b565b606091505b5080516000036125a85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610670565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107b3565b5060016107b3565b606060006125e183600261332d565b6125ec906002613166565b67ffffffffffffffff81111561260457612604612c3b565b6040519080825280601f01601f19166020018201604052801561262e576020820181803683370190505b509050600360fc1b8160008151811061264957612649613220565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061267857612678613220565b60200101906001600160f81b031916908160001a905350600061269c84600261332d565b6126a7906001613166565b90505b600181111561272c577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106126e8576126e8613220565b1a60f81b8282815181106126fe576126fe613220565b60200101906001600160f81b031916908160001a90535060049490941c936127258161334c565b90506126aa565b5083156117d25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610670565b60606107b384846000856128cc565b6001600160a01b0382166127e05760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610670565b6000818152609960205260409020546001600160a01b0316156128455760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610670565b6001600160a01b0382166000908152609a6020526040812080546001929061286e908490613166565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60608247101561292d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610670565b6001600160a01b0385163b6129845760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610670565b600080866001600160a01b031685876040516129a09190613363565b60006040518083038185875af1925050503d80600081146129dd576040519150601f19603f3d011682016040523d82523d6000602084013e6129e2565b606091505b50915091506129f28282866129fd565b979650505050505050565b60608315612a0c5750816117d2565b825115612a1c5782518084602001fd5b8160405162461bcd60e51b81526004016106709190612bce565b828054612a4290612ffd565b90600052602060002090601f016020900481019282612a645760008555612aaa565b82601f10612a7d5782800160ff19823516178555612aaa565b82800160010185558215612aaa579182015b82811115612aaa578235825591602001919060010190612a8f565b50612ab6929150612b2e565b5090565b828054612ac690612ffd565b90600052602060002090601f016020900481019282612ae85760008555612aaa565b82601f10612b0157805160ff1916838001178555612aaa565b82800160010185558215612aaa579182015b82811115612aaa578251825591602001919060010190612b13565b5b80821115612ab65760008155600101612b2f565b6001600160e01b031981168114611b6057600080fd5b600060208284031215612b6b57600080fd5b81356117d281612b43565b60005b83811015612b91578181015183820152602001612b79565b83811115610ec35750506000910152565b60008151808452612bba816020860160208601612b76565b601f01601f19169290920160200192915050565b6020815260006117d26020830184612ba2565b600060208284031215612bf357600080fd5b5035919050565b80356001600160a01b0381168114611f0357600080fd5b60008060408385031215612c2457600080fd5b612c2d83612bfa565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c7a57612c7a612c3b565b604052919050565b600067ffffffffffffffff821115612c9c57612c9c612c3b565b50601f01601f191660200190565b6000612cbd612cb884612c82565b612c51565b9050828152838383011115612cd157600080fd5b828260208301376000602084830101529392505050565b60008060008060808587031215612cfe57600080fd5b612d0785612bfa565b9350612d1560208601612bfa565b925060408501359150606085013567ffffffffffffffff811115612d3857600080fd5b8501601f81018713612d4957600080fd5b612d5887823560208401612caa565b91505092959194509250565b600080600060608486031215612d7957600080fd5b612d8284612bfa565b9250612d9060208501612bfa565b9150604084013590509250925092565b60008060408385031215612db357600080fd5b82359150612dc360208401612bfa565b90509250929050565b8015158114611b6057600080fd5b60008060408385031215612ded57600080fd5b823591506020830135612dff81612dcc565b809150509250929050565b60008060208385031215612e1d57600080fd5b823567ffffffffffffffff80821115612e3557600080fd5b818501915085601f830112612e4957600080fd5b813581811115612e5857600080fd5b866020828501011115612e6a57600080fd5b60209290920196919550909350505050565b600060208284031215612e8e57600080fd5b6117d282612bfa565b600082601f830112612ea857600080fd5b6117d283833560208501612caa565b600080600080600080600080610100898b031215612ed457600080fd5b612edd89612bfa565b9750612eeb60208a01612bfa565b9650612ef960408a01612bfa565b9550612f0760608a01612bfa565b9450608089013567ffffffffffffffff80821115612f2457600080fd5b612f308c838d01612e97565b955060a08b0135915080821115612f4657600080fd5b612f528c838d01612e97565b945060c08b0135915080821115612f6857600080fd5b612f748c838d01612e97565b935060e08b0135915080821115612f8a57600080fd5b50612f978b828c01612e97565b9150509295985092959890939650565b60008060408385031215612fba57600080fd5b612fc383612bfa565b91506020830135612dff81612dcc565b60008060408385031215612fe657600080fd5b612fef83612bfa565b9150612dc360208401612bfa565b600181811c9082168061301157607f821691505b60208210810361303157634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561304957600080fd5b5051919050565b60008451613062818460208901612b76565b845190830190613076818360208901612b76565b8451910190613089818360208801612b76565b0195945050505050565b600083516130a5818460208801612b76565b8351908301906130b9818360208801612b76565b01949350505050565b6000602082840312156130d457600080fd5b815167ffffffffffffffff8111156130eb57600080fd5b8201601f810184136130fc57600080fd5b805161310a612cb882612c82565b81815285602083850101111561311f57600080fd5b613130826020830160208601612b76565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b60008282101561316157613161613139565b500390565b6000821982111561317957613179613139565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000600182016131db576131db613139565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082613207576132076131e2565b500490565b60008261321b5761321b6131e2565b500690565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161326e816017850160208801612b76565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516132ab816028840160208801612b76565b01602801949350505050565b6000602082840312156132c957600080fd5b81516117d281612dcc565b60006001600160a01b038087168352808616602084015250836040830152608060608301526133066080830184612ba2565b9695505050505050565b60006020828403121561332257600080fd5b81516117d281612b43565b600081600019048311821515161561334757613347613139565b500290565b60008161335b5761335b613139565b506000190190565b60008251613375818460208701612b76565b919091019291505056fea2646970667358221220654bbb5ad408a6c2b46e693549e95e49fd73f1b54bc772eb3da69ad75e7a795e64736f6c634300080d0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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