ETH Price: $3,465.06 (-1.47%)
Gas: 4 Gwei

Token

MaidCoin Clone Nurses (CNURSES)
 

Overview

Max Total Supply

593 CNURSES

Holders

96

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 CNURSES
0x03857cbd95b17180d7a95bded26fd2c2d4deed5a
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
CloneNurses

Compiler Version
v0.8.5+commit.a4f2e591

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 29 : CloneNurses.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.5;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "./libraries/CloneNurseEnumerable.sol";
import "./interfaces/IERC1271.sol";
import "./interfaces/ICloneNurses.sol";
import "./interfaces/IERC2981.sol";

contract CloneNurses is
    Ownable,
    ERC721("MaidCoin Clone Nurses", "CNURSES"),
    CloneNurseEnumerable,
    ERC1155Holder,
    IERC2981,
    ICloneNurses
{
    struct NurseType {
        uint256 partCount;
        uint256 destroyReturn;
        uint256 power;
        uint256 lifetime;
    }

    struct Nurse {
        uint256 nurseType;
        uint256 endBlock;
        uint256 lastClaimedBlock;
    }

    INursePart public immutable override nursePart;
    IMaidCoin public immutable override maidCoin;
    ITheMaster public immutable override theMaster;
    uint256 private immutable theMasterStartBlock;

    mapping(uint256 => uint256) public override supportingRoute;
    mapping(address => uint256) public override supportingTo;
    mapping(uint256 => uint256) public override supportedPower;
    mapping(uint256 => uint256) public override totalRewardsFromSupporters;

    NurseType[] public override nurseTypes;
    Nurse[] public override nurses;

    uint256 private royaltyFee = 25; // out of 1000
    address private royaltyReceiver; // MaidCafe

    constructor(
        INursePart _nursePart,
        IMaidCoin _maidCoin,
        ITheMaster _theMaster,
        address _royaltyReceiver
    ) {
        nursePart = _nursePart;
        maidCoin = _maidCoin;
        theMaster = _theMaster;
        royaltyReceiver = _royaltyReceiver;
        theMasterStartBlock = _theMaster.startBlock();
    }

    function _baseURI() internal pure override returns (string memory) {
        return "https://api.maidcoin.org/clonenurses/";
    }

    function totalSupply() public view override(CloneNurseEnumerable, ICloneNurseEnumerable) returns (uint256) {
        return nurses.length;
    }

    function addNurseType(
        uint256[] calldata partCounts,
        uint256[] calldata destroyReturns,
        uint256[] calldata powers,
        uint256[] calldata lifetimes
    ) external onlyOwner returns (uint256[] memory) {
        uint256 startId = nurseTypes.length;
        uint256[] memory nurseType = new uint256[](partCounts.length);
        for (uint256 i = 0; i < partCounts.length; i += 1) {
            require(partCounts[i] > 1, "CloneNurses: Invalid partCount");
            nurseTypes.push(
                NurseType({
                    partCount: partCounts[i],
                    destroyReturn: destroyReturns[i],
                    power: powers[i],
                    lifetime: lifetimes[i]
                })
            );
            nurseType[i] = (startId + i);
        }
        return nurseType;
    }

    function nurseTypeCount() external view override returns (uint256) {
        return nurseTypes.length;
    }

    function assemble(uint256 _nurseType, uint256 _parts) public override {
        NurseType storage nurseType = nurseTypes[_nurseType];
        uint256 _partCount = nurseType.partCount;
        require(_parts >= _partCount, "CloneNurses: Not enough parts");

        nursePart.safeTransferFrom(msg.sender, address(this), _nurseType, _parts, "");
        nursePart.burn(_nurseType, _parts);
        uint256 lifetime = ((nurseType.lifetime * (_parts - 1)) / (_partCount - 1));
        uint256 startblock = block.number > theMasterStartBlock ? block.number : theMasterStartBlock;
        uint256 endBlock = startblock + lifetime;
        uint256 id = totalSupply();
        theMaster.deposit(2, nurseType.power, id);
        nurses.push(Nurse({nurseType: _nurseType, endBlock: endBlock, lastClaimedBlock: startblock}));
        supportingRoute[id] = id;
        emit ChangeSupportingRoute(id, id);
        _mint(msg.sender, id);
        emit ElongateLifetime(id, lifetime, 0, endBlock);
    }

    function assembleWithPermit(
        uint256 nurseType,
        uint256 _parts,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external override {
        nursePart.permit(msg.sender, address(this), deadline, v, r, s);
        assemble(nurseType, _parts);
    }

    function elongateLifetime(uint256[] calldata ids, uint256[] calldata parts) external override {
        require(ids.length == parts.length, "CloneNurses: Invalid parameters");
        claim(ids);
        for (uint256 i = 0; i < ids.length; i += 1) {
            require(parts[i] > 0, "CloneNurses: Invalid amounts of parts");
            Nurse storage nurse = nurses[ids[i]];
            uint256 _nurseType = nurse.nurseType;
            NurseType storage nurseType = nurseTypes[_nurseType];

            nursePart.safeTransferFrom(msg.sender, address(this), _nurseType, parts[i], "");
            nursePart.burn(_nurseType, parts[i]);

            uint256 oldEndBlock = nurse.endBlock;
            uint256 from;
            if (block.number <= oldEndBlock) from = oldEndBlock;
            else from = block.number;

            uint256 rechagedLifetime = ((nurseType.lifetime * parts[i]) / (nurseType.partCount - 1));
            uint256 newEndBlock = from + rechagedLifetime;
            nurse.endBlock = newEndBlock;
            emit ElongateLifetime(ids[i], rechagedLifetime, oldEndBlock, newEndBlock);
        }
    }

    function destroy(uint256[] calldata ids, uint256[] calldata toIds) external override {
        require(ids.length == toIds.length, "CloneNurses: Invalid parameters");
        for (uint256 i = 0; i < ids.length; i += 1) {
            require(msg.sender == ownerOf(ids[i]), "CloneNurses: Forbidden");
            uint256 power = supportedPower[ids[i]];
            if (power == 0) {
                supportingRoute[ids[i]] = type(uint256).max;
                emit ChangeSupportingRoute(ids[i], type(uint256).max);
            } else {
                require(toIds[i] != ids[i], "CloneNurses: Invalid id, toId");
                require(_exists(toIds[i]), "CloneNurses: Invalid toId");

                supportingRoute[ids[i]] = toIds[i];
                emit ChangeSupportingRoute(ids[i], toIds[i]);
                supportedPower[toIds[i]] += power;
                supportedPower[ids[i]] = 0;
                emit ChangeSupportedPower(toIds[i], int256(power));
            }
            NurseType storage nurseType = nurseTypes[nurses[ids[i]].nurseType];

            uint256 balanceBefore = maidCoin.balanceOf(address(this));
            theMaster.withdraw(2, nurseType.power, ids[i]);
            uint256 balanceAfter = maidCoin.balanceOf(address(this));
            uint256 reward = balanceAfter - balanceBefore;
            _claim(ids[i], reward);

            theMaster.mint(msg.sender, nurseType.destroyReturn);
            _burn(ids[i]);
            delete nurses[ids[i]];
        }
    }

    function claim(uint256[] calldata ids) public override {
        for (uint256 i = 0; i < ids.length; i += 1) {
            require(msg.sender == ownerOf(ids[i]), "CloneNurses: Forbidden");
            uint256 balanceBefore = maidCoin.balanceOf(address(this));
            theMaster.deposit(2, 0, ids[i]);
            uint256 balanceAfter = maidCoin.balanceOf(address(this));
            uint256 reward = balanceAfter - balanceBefore;
            _claim(ids[i], reward);
        }
    }

    function _claim(uint256 id, uint256 reward) internal {
        if (reward == 0) return;
        else {
            Nurse storage nurse = nurses[id];
            uint256 endBlock = nurse.endBlock;
            uint256 lastClaimedBlock = nurse.lastClaimedBlock;
            uint256 burningReward;
            uint256 claimableReward;
            if (endBlock <= lastClaimedBlock) burningReward = reward;
            else if (endBlock < block.number) {
                claimableReward = (reward * (endBlock - lastClaimedBlock)) / (block.number - lastClaimedBlock);
                burningReward = reward - claimableReward;
            } else claimableReward = reward;

            if (burningReward > 0) maidCoin.burn(burningReward);
            if (claimableReward > 0) maidCoin.transfer(msg.sender, claimableReward);
            nurse.lastClaimedBlock = block.number;
            emit Claim(id, msg.sender, claimableReward);
        }
    }

    function pendingReward(uint256 id) external view override returns (uint256 claimableReward) {
        require(_exists(id), "CloneNurses: Invalid id");
        uint256 reward = theMaster.pendingReward(2, id);

        if (reward == 0) return 0;
        else {
            Nurse storage nurse = nurses[id];
            uint256 endBlock = nurse.endBlock;
            uint256 lastClaimedBlock = nurse.lastClaimedBlock;
            if (endBlock <= lastClaimedBlock) return 0;
            else if (endBlock < block.number) {
                claimableReward = (reward * (endBlock - lastClaimedBlock)) / (block.number - lastClaimedBlock);
            } else claimableReward = reward;
        }
    }

    function setSupportingTo(
        address supporter,
        uint256 to,
        uint256 amounts
    ) public override {
        require(msg.sender == address(theMaster), "CloneNurses: Forbidden");
        require(_exists(to), "CloneNurses: Invalid target");
        supportingTo[supporter] = to;
        emit SupportTo(supporter, to);

        if (amounts > 0) {
            supportedPower[to] += amounts;
            emit ChangeSupportedPower(to, int256(amounts));
        }
    }

    function findSupportingTo(address supporter) external view override returns (address, uint256) {
        uint256 _supportingTo = supportingTo[supporter];
        uint256 _route = supportingRoute[_supportingTo];
        if (_route == _supportingTo) return (ownerOf(_supportingTo), _supportingTo);
        while (_route != _supportingTo) {
            _supportingTo = _route;
            _route = supportingRoute[_supportingTo];
        }
        return (ownerOf(_supportingTo), _supportingTo);
    }

    function checkSupportingRoute(address supporter) public override returns (address, uint256) {
        uint256 _supportingTo = supportingTo[supporter];
        uint256 _route = supportingRoute[_supportingTo];
        if (_route == _supportingTo) return (ownerOf(_supportingTo), _supportingTo);
        uint256 initialSupportTo = _supportingTo;
        while (_route != _supportingTo) {
            _supportingTo = _route;
            _route = supportingRoute[_supportingTo];
        }
        supportingTo[supporter] = _supportingTo;
        supportingRoute[initialSupportTo] = _supportingTo;
        emit ChangeSupportingRoute(initialSupportTo, _supportingTo);
        emit SupportTo(supporter, _supportingTo);
        return (ownerOf(_supportingTo), _supportingTo);
    }

    function changeSupportedPower(address supporter, int256 power) public override {
        require(msg.sender == address(theMaster), "CloneNurses: Forbidden");
        (, uint256 id) = checkSupportingRoute(supporter);
        int256 _supportedPower = int256(supportedPower[id]);
        if (power < 0) require(_supportedPower >= (-power), "CloneNurses: Outranged power");
        _supportedPower += power;
        supportedPower[id] = uint256(_supportedPower);
        emit ChangeSupportedPower(id, power);
    }

    function recordRewardsTransfer(
        address supporter,
        uint256 id,
        uint256 amounts
    ) internal {
        totalRewardsFromSupporters[id] += amounts;
        emit TransferSupportingRewards(supporter, id, amounts);
    }

    function shareRewards(
        uint256 pending,
        address supporter,
        uint8 supportingRatio
    ) public override returns (address nurseOwner, uint256 amountToNurseOwner) {
        require(msg.sender == address(theMaster), "CloneNurses: Forbidden");
        amountToNurseOwner = (pending * supportingRatio) / 100;
        uint256 _supportTo;
        if (amountToNurseOwner > 0) {
            (nurseOwner, _supportTo) = checkSupportingRoute(supporter);
            recordRewardsTransfer(supporter, _supportTo, amountToNurseOwner);
        }
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override(ERC721, CloneNurseEnumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, ERC1155Receiver, IERC165)
        returns (bool)
    {
        return interfaceId == 0x2a55205a || super.supportsInterface(interfaceId);
    }

    function royaltyInfo(uint256, uint256 _salePrice) external view override returns (address, uint256) {
        return (royaltyReceiver, (_salePrice * royaltyFee) / 1000);
    }

    function setRoyaltyInfo(address _receiver, uint256 _royaltyFee) external onlyOwner {
        royaltyReceiver = _receiver;
        royaltyFee = _royaltyFee;
    }
    
    function exists(uint256 id) external view override returns (bool) {
        return _exists(id);
    }
}

File 2 of 29 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 3 of 29 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 4 of 29 : CloneNurseEnumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC721.sol";
import "../interfaces/ICloneNurseEnumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.

 * @dev MaidCoin: This is for CloneNurses and the like minted in order from 0 and have burn function.
 * This doesn't have tokenByIndex function.
 */
abstract contract CloneNurseEnumerable is ERC721, ICloneNurseEnumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

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

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

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

    /**
     * @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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

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

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

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

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

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

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

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

File 5 of 29 : IERC1271.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

/// @title Interface for verifying contract-based account signatures
/// @notice Interface that verifies provided signature for the data
/// @dev Interface defined by EIP-1271
interface IERC1271 {
    /// @notice Returns whether the provided signature is valid for the provided data
    /// @dev MUST return the bytes4 magic value 0x1626ba7e when function passes.
    /// MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5).
    /// MUST allow external calls.
    /// @param hash Hash of the data to be signed
    /// @param signature Signature byte array associated with _data
    /// @return magicValue The bytes4 magic value 0x1626ba7e
    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}

File 6 of 29 : ICloneNurses.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "./ICloneNurseEnumerable.sol";
import "./ISupportable.sol";
import "./INursePart.sol";
import "./IMaidCoin.sol";
import "./ITheMaster.sol";

interface ICloneNurses is IERC721, IERC721Metadata, ICloneNurseEnumerable, ISupportable {
    event Claim(uint256 indexed id, address indexed claimer, uint256 reward);
    event ElongateLifetime(uint256 indexed id, uint256 rechargedLifetime, uint256 lastEndBlock, uint256 newEndBlock);

    function nursePart() external view returns (INursePart);

    function maidCoin() external view returns (IMaidCoin);

    function theMaster() external view returns (ITheMaster);

    function nurseTypes(uint256 typeId)
        external
        view
        returns (
            uint256 partCount,
            uint256 destroyReturn,
            uint256 power,
            uint256 lifetime
        );

    function nurseTypeCount() external view returns (uint256);

    function nurses(uint256 id)
        external
        view
        returns (
            uint256 nurseType,
            uint256 endBlock,
            uint256 lastClaimedBlock
        );

    function assemble(uint256 nurseType, uint256 parts) external;

    function assembleWithPermit(
        uint256 nurseType,
        uint256 parts,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function elongateLifetime(uint256[] calldata ids, uint256[] calldata parts) external;

    function destroy(uint256[] calldata ids, uint256[] calldata toIds) external;

    function claim(uint256[] calldata ids) external;

    function pendingReward(uint256 id) external view returns (uint256);

    function findSupportingTo(address supporter) external view returns (address, uint256);

    function exists(uint256 id) external view returns (bool);
}

File 7 of 29 : IERC2981.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.5;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

///
/// @dev Interface for the NFT Royalty Standard
///
interface IERC2981 is IERC165 {
    /// ERC165 bytes to add to interface array - set in parent contract
    /// implementing this standard
    ///
    /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
    /// bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
    /// _registerInterface(_INTERFACE_ID_ERC2981);

    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _salePrice - the sale price of the NFT asset specified by _tokenId
    /// @return receiver - address of who should be sent the royalty payment
    /// @return royaltyAmount - the royalty payment amount for _salePrice
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 8 of 29 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 9 of 29 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId
            || super.supportsInterface(interfaceId);
    }
}

File 10 of 29 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {

    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    )
        external
        returns(bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    )
        external
        returns(bytes4);
}

File 11 of 29 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 12 of 29 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 13 of 29 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.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 ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings 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.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual 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 overriden 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 = ERC721.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];
    }

    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal {
        require(owner != operator, "ERC721: approve to caller");

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

    /**
     * @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 = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, 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);
    }

    /**
     * @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 = ERC721.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);
    }

    /**
     * @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(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        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);
    }

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

    /**
     * @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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).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 {}
}

File 14 of 29 : ICloneNurseEnumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

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

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

File 15 of 29 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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

File 16 of 29 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}

File 17 of 29 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {

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

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

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

File 18 of 29 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 19 of 29 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

File 20 of 29 : ISupportable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface ISupportable {
    event SupportTo(address indexed supporter, uint256 indexed to);
    event ChangeSupportingRoute(uint256 indexed from, uint256 indexed to);
    event ChangeSupportedPower(uint256 indexed id, int256 power);
    event TransferSupportingRewards(address indexed supporter, uint256 indexed id, uint256 amounts);

    function supportingRoute(uint256 id) external view returns (uint256);

    function supportingTo(address supporter) external view returns (uint256);

    function supportedPower(uint256 id) external view returns (uint256);

    function totalRewardsFromSupporters(uint256 id) external view returns (uint256);

    function setSupportingTo(
        address supporter,
        uint256 to,
        uint256 amounts
    ) external;

    function checkSupportingRoute(address supporter) external returns (address, uint256);

    function changeSupportedPower(address supporter, int256 power) external;

    function shareRewards(
        uint256 pending,
        address supporter,
        uint8 supportingRatio
    ) external returns (address nurseOwner, uint256 amountToNurseOwner);
}

File 21 of 29 : INursePart.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

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

interface INursePart is IERC1155 {
    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external view returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function mint(
        address to,
        uint256 id,
        uint256 amount
    ) external;

    function burn(uint256 id, uint256 amount) external;

    function permit(
        address owner,
        address spender,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 22 of 29 : IMaidCoin.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IMaidCoin {
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function INITIAL_SUPPLY() external pure returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function mint(address to, uint256 amount) external;

    function burn(uint256 amount) external;
}

File 23 of 29 : ITheMaster.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

import "./IMaidCoin.sol";
import "./IRewardCalculator.sol";
import "./ISupportable.sol";
import "./IMasterChefModule.sol";

interface ITheMaster is IMasterChefModule {
    event ChangeRewardCalculator(address addr);

    event Add(
        uint256 indexed pid,
        address addr,
        bool indexed delegate,
        bool indexed mintable,
        address supportable,
        uint8 supportingRatio,
        uint256 allocPoint
    );

    event Set(uint256 indexed pid, uint256 allocPoint);
    event Deposit(uint256 indexed userId, uint256 indexed pid, uint256 amount);
    event Withdraw(uint256 indexed userId, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);

    event Support(address indexed supporter, uint256 indexed pid, uint256 amount);
    event Desupport(address indexed supporter, uint256 indexed pid, uint256 amount);
    event EmergencyDesupport(address indexed user, uint256 indexed pid, uint256 amount);

    event SetIsSupporterPool(uint256 indexed pid, bool indexed status);

    function initialRewardPerBlock() external view returns (uint256);

    function decreasingInterval() external view returns (uint256);

    function startBlock() external view returns (uint256);

    function maidCoin() external view returns (IMaidCoin);

    function rewardCalculator() external view returns (IRewardCalculator);

    function poolInfo(uint256 pid)
        external
        view
        returns (
            address addr,
            bool delegate,
            ISupportable supportable,
            uint8 supportingRatio,
            uint256 allocPoint,
            uint256 lastRewardBlock,
            uint256 accRewardPerShare,
            uint256 supply
        );

    function poolCount() external view returns (uint256);

    function userInfo(uint256 pid, uint256 user) external view returns (uint256 amount, uint256 rewardDebt);

    function mintableByAddr(address addr) external view returns (bool);

    function totalAllocPoint() external view returns (uint256);

    function pendingReward(uint256 pid, uint256 userId) external view returns (uint256);

    function rewardPerBlock() external view returns (uint256);

    function changeRewardCalculator(address addr) external;

    function add(
        address addr,
        bool delegate,
        bool mintable,
        address supportable,
        uint8 supportingRatio,
        uint256 allocPoint
    ) external;

    function set(uint256[] calldata pid, uint256[] calldata allocPoint) external;

    function deposit(
        uint256 pid,
        uint256 amount,
        uint256 userId
    ) external;

    function depositWithPermit(
        uint256 pid,
        uint256 amount,
        uint256 userId,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function depositWithPermitMax(
        uint256 pid,
        uint256 amount,
        uint256 userId,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function withdraw(
        uint256 pid,
        uint256 amount,
        uint256 userId
    ) external;

    function emergencyWithdraw(uint256 pid) external;

    function support(
        uint256 pid,
        uint256 amount,
        uint256 supportTo
    ) external;

    function supportWithPermit(
        uint256 pid,
        uint256 amount,
        uint256 supportTo,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function supportWithPermitMax(
        uint256 pid,
        uint256 amount,
        uint256 supportTo,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function desupport(uint256 pid, uint256 amount) external;

    function emergencyDesupport(uint256 pid) external;

    function mint(address to, uint256 amount) external;

    function claimSushiReward(uint256 id) external;

    function pendingSushiReward(uint256 id) external view returns (uint256);
}

File 24 of 29 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 25 of 29 : IRewardCalculator.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IRewardCalculator {
    function rewardPerBlock() external view returns (uint256);
}

File 26 of 29 : IMasterChefModule.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

import "./IMasterChef.sol";
import "../uniswapv2/interfaces/IUniswapV2Pair.sol";

interface IMasterChefModule {
    function lpToken() external view returns (IUniswapV2Pair);

    function sushi() external view returns (IERC20);

    function sushiMasterChef() external view returns (IMasterChef);

    function masterChefPid() external view returns (uint256);

    function sushiLastRewardBlock() external view returns (uint256);

    function accSushiPerShare() external view returns (uint256);
}

File 27 of 29 : IMasterChef.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IMasterChef {
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
    }

    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. SUSHI to distribute per block.
        uint256 lastRewardBlock; // Last block number that SUSHI distribution occurs.
        uint256 accSushiPerShare; // Accumulated SUSHI per share, times 1e12. See below.
    }

    function poolInfo(uint256 pid) external view returns (IMasterChef.PoolInfo memory);

    function userInfo(uint256 pid, address user) external view returns (IMasterChef.UserInfo memory);

    function pendingSushi(uint256 _pid, address _user) external view returns (uint256);

    function deposit(uint256 _pid, uint256 _amount) external;

    function withdraw(uint256 _pid, uint256 _amount) external;
}

File 28 of 29 : IUniswapV2Pair.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint256 amount0In,
        uint256 amount1In,
        uint256 amount0Out,
        uint256 amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to) external returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

File 29 of 29 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract INursePart","name":"_nursePart","type":"address"},{"internalType":"contract IMaidCoin","name":"_maidCoin","type":"address"},{"internalType":"contract ITheMaster","name":"_theMaster","type":"address"},{"internalType":"address","name":"_royaltyReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"int256","name":"power","type":"int256"}],"name":"ChangeSupportedPower","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"from","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"to","type":"uint256"}],"name":"ChangeSupportingRoute","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rechargedLifetime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastEndBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newEndBlock","type":"uint256"}],"name":"ElongateLifetime","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"supporter","type":"address"},{"indexed":true,"internalType":"uint256","name":"to","type":"uint256"}],"name":"SupportTo","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":"supporter","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amounts","type":"uint256"}],"name":"TransferSupportingRewards","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"partCounts","type":"uint256[]"},{"internalType":"uint256[]","name":"destroyReturns","type":"uint256[]"},{"internalType":"uint256[]","name":"powers","type":"uint256[]"},{"internalType":"uint256[]","name":"lifetimes","type":"uint256[]"}],"name":"addNurseType","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nurseType","type":"uint256"},{"internalType":"uint256","name":"_parts","type":"uint256"}],"name":"assemble","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nurseType","type":"uint256"},{"internalType":"uint256","name":"_parts","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"assembleWithPermit","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":"address","name":"supporter","type":"address"},{"internalType":"int256","name":"power","type":"int256"}],"name":"changeSupportedPower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"supporter","type":"address"}],"name":"checkSupportingRoute","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"toIds","type":"uint256[]"}],"name":"destroy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"parts","type":"uint256[]"}],"name":"elongateLifetime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"supporter","type":"address"}],"name":"findSupportingTo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"maidCoin","outputs":[{"internalType":"contract IMaidCoin","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nursePart","outputs":[{"internalType":"contract INursePart","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nurseTypeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nurseTypes","outputs":[{"internalType":"uint256","name":"partCount","type":"uint256"},{"internalType":"uint256","name":"destroyReturn","type":"uint256"},{"internalType":"uint256","name":"power","type":"uint256"},{"internalType":"uint256","name":"lifetime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nurses","outputs":[{"internalType":"uint256","name":"nurseType","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint256","name":"lastClaimedBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"claimableReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_royaltyFee","type":"uint256"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"supporter","type":"address"},{"internalType":"uint256","name":"to","type":"uint256"},{"internalType":"uint256","name":"amounts","type":"uint256"}],"name":"setSupportingTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pending","type":"uint256"},{"internalType":"address","name":"supporter","type":"address"},{"internalType":"uint8","name":"supportingRatio","type":"uint8"}],"name":"shareRewards","outputs":[{"internalType":"address","name":"nurseOwner","type":"address"},{"internalType":"uint256","name":"amountToNurseOwner","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supportedPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supportingRoute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportingTo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"theMaster","outputs":[{"internalType":"contract ITheMaster","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalRewardsFromSupporters","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040526019600f553480156200001757600080fd5b50604051620043f1380380620043f18339810160408190526200003a916200028c565b6040518060400160405280601581526020017f4d616964436f696e20436c6f6e65204e7572736573000000000000000000000081525060405180604001604052806007815260200166434e555253455360c81b8152506000620000a2620001e260201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350815162000101906001906020850190620001e6565b50805162000117906002906020840190620001e6565b5050506001600160601b0319606085811b821660805284811b821660a05283901b1660c052601080546001600160a01b038381166001600160a01b031990921691909117909155604080516348cd4cb160e01b81529051918416916348cd4cb191600480820192602092909190829003018186803b1580156200019957600080fd5b505afa158015620001ae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001d49190620002f4565b60e052506200036492505050565b3390565b828054620001f4906200030e565b90600052602060002090601f01602090048101928262000218576000855562000263565b82601f106200023357805160ff191683800117855562000263565b8280016001018555821562000263579182015b828111156200026357825182559160200191906001019062000246565b506200027192915062000275565b5090565b5b8082111562000271576000815560010162000276565b60008060008060808587031215620002a357600080fd5b8451620002b0816200034b565b6020860151909450620002c3816200034b565b6040860151909350620002d6816200034b565b6060860151909250620002e9816200034b565b939692955090935050565b6000602082840312156200030757600080fd5b5051919050565b600181811c908216806200032357607f821691505b602082108114156200034557634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b03811681146200036157600080fd5b50565b60805160601c60a05160601c60c05160601c60e051613fbe6200043360003960008181611138015261115f01526000818161048b01528181610aca01528181610df3015281816111cb015281816115af01528181611e2401528181611fb1015281816122b201526125e10152600081816104f3015281816115290152818161166e01528181611da601528181611ee701528181612dd20152612e5901526000818161058c015281816108900152818161092c0152818161101101528181611099015261245b0152613fbe6000f3fe608060405234801561001057600080fd5b506004361061027f5760003560e01c806370a082311161015c578063b252144a116100ce578063ddfeacca11610087578063ddfeacca14610665578063e2e784d514610678578063e985e9c51461068b578063f23a6e61146106c7578063f2fde38b146106e6578063fa600f76146106f957600080fd5b8063b252144a146105ae578063b88d4fde146105c1578063bc197c81146105d4578063c05bd4731461060c578063c87b56dd1461061f578063cd5a146e1461063257600080fd5b80639222ce8c116101205780639222ce8c1461052657806395d89b41146105395780639b88772a14610541578063a0881f7614610554578063a22cb46514610574578063b24606b81461058757600080fd5b806370a08231146104c0578063715018a6146104d357806378f210d5146104db578063849e5aff146104ee5780638da5cb5b1461051557600080fd5b806323b872dd116101f55780633a64e0d1116101b95780633a64e0d11461041f57806342842e0e1461044d5780634f558e79146104605780636352211e14610473578063671104c9146104865780636ba4c138146104ad57600080fd5b806323b872dd146103b35780632a55205a146103c65780632b2269b8146103d95780632b76a356146103f95780632f745c591461040c57600080fd5b8063081812fc11610247578063081812fc1461031a578063095ea7b31461034557806311b9e6b21461035857806312f7086c1461037857806318160ddd1461038b578063184935c11461039357600080fd5b806301ffc9a714610284578063031391ab146102ac57806303273bc7146102c1578063060f1938146102f357806306fdde0314610305575b600080fd5b6102976102923660046139f9565b610719565b60405190151581526020015b60405180910390f35b6102bf6102ba3660046138ac565b610744565b005b6102d46102cf366004613a65565b610abc565b604080516001600160a01b0390931683526020830191909152016102a3565b600d545b6040519081526020016102a3565b61030d610b4c565b6040516102a39190613c28565b61032d610328366004613a33565b610bde565b6040516001600160a01b0390911681526020016102a3565b6102bf61035336600461380d565b610c66565b6102f7610366366004613a33565b600b6020526000908152604090205481565b6102f7610386366004613a33565b610d7c565b600e546102f7565b6102f76103a1366004613a33565b600c6020526000908152604090205481565b6102bf6103c13660046136cd565b610f14565b6102d46103d4366004613aa1565b610f45565b6102f76103e7366004613a33565b60096020526000908152604090205481565b6102bf610407366004613aa1565b610f80565b6102f761041a36600461380d565b61134f565b61043261042d366004613a33565b6113e5565b604080519384526020840192909252908201526060016102a3565b6102bf61045b3660046136cd565b611418565b61029761046e366004613a33565b611433565b61032d610481366004613a33565b61143e565b61032d7f000000000000000000000000000000000000000000000000000000000000000081565b6102bf6104bb36600461386a565b6114b5565b6102f76104ce3660046135d5565b61173a565b6102bf6117c1565b6102d46104e93660046135d5565b611835565b61032d7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661032d565b6102d46105343660046135d5565b6118a3565b61030d61198c565b6102bf61054f3660046138ac565b61199b565b610567610562366004613918565b6120a3565b6040516102a39190613be4565b6102bf6105823660046137d6565b612298565b61032d7f000000000000000000000000000000000000000000000000000000000000000081565b6102bf6105bc366004613837565b6122a7565b6102bf6105cf366004613709565b6123ea565b6105f36105e2366004613623565b63bc197c8160e01b95945050505050565b6040516001600160e01b031990911681526020016102a3565b6102bf61061a366004613ac3565b612422565b61030d61062d366004613a33565b6124d1565b610645610640366004613a33565b61259c565b6040805194855260208501939093529183015260608201526080016102a3565b6102bf61067336600461380d565b6125d6565b6102bf61068636600461380d565b6126fd565b6102976106993660046135f0565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6105f36106d5366004613771565b63f23a6e6160e01b95945050505050565b6102bf6106f43660046135d5565b61274d565b6102f76107073660046135d5565b600a6020526000908152604090205481565b600063152a902d60e11b6001600160e01b03198316148061073e575061073e82612837565b92915050565b8281146107985760405162461bcd60e51b815260206004820152601f60248201527f436c6f6e654e75727365733a20496e76616c696420706172616d65746572730060448201526064015b60405180910390fd5b6107a284846114b5565b60005b83811015610ab55760008383838181106107c1576107c1613ef0565b90506020020135116108235760405162461bcd60e51b815260206004820152602560248201527f436c6f6e654e75727365733a20496e76616c696420616d6f756e7473206f6620604482015264706172747360d81b606482015260840161078f565b6000600e86868481811061083957610839613ef0565b905060200201358154811061085057610850613ef0565b906000526020600020906003020190506000816000015490506000600d828154811061087e5761087e613ef0565b906000526020600020906004020190507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f242432a3330858a8a8a8181106108d2576108d2613ef0565b905060200201356040518563ffffffff1660e01b81526004016108f89493929190613bac565b600060405180830381600087803b15801561091257600080fd5b505af1158015610926573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b390c0ab8388888881811061096c5761096c613ef0565b905060200201356040518363ffffffff1660e01b8152600401610999929190918252602082015260400190565b600060405180830381600087803b1580156109b357600080fd5b505af11580156109c7573d6000803e3d6000fd5b50505050600183015460004382106109e05750806109e3565b50435b82546000906109f490600190613e00565b898989818110610a0657610a06613ef0565b905060200201358560030154610a1c9190613de1565b610a269190613dcd565b90506000610a348284613db5565b6001880181905590508b8b89818110610a4f57610a4f613ef0565b6040805186815260208181018a905291810186905291029290920135917ffbf31c722190fd99a8f65945bdc9f3fdd80ea90e908f3bc77f1feeef21684397915060600160405180910390a250505050505050600181610aae9190613db5565b90506107a5565b5050505050565b600080336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b075760405162461bcd60e51b815260040161078f90613c8d565b6064610b1660ff851687613de1565b610b209190613dcd565b905060008115610b4357610b33856118a3565b9093509050610b4385828461285c565b50935093915050565b606060018054610b5b90613e43565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8790613e43565b8015610bd45780601f10610ba957610100808354040283529160200191610bd4565b820191906000526020600020905b815481529060010190602001808311610bb757829003601f168201915b5050505050905090565b6000610be9826128c5565b610c4a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161078f565b506000908152600560205260409020546001600160a01b031690565b6000610c718261143e565b9050806001600160a01b0316836001600160a01b03161415610cdf5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161078f565b336001600160a01b0382161480610cfb5750610cfb8133610699565b610d6d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161078f565b610d7783836128e2565b505050565b6000610d87826128c5565b610dd35760405162461bcd60e51b815260206004820152601760248201527f436c6f6e654e75727365733a20496e76616c6964206964000000000000000000604482015260640161078f565b604051633185c0bd60e01b815260026004820152602481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690633185c0bd9060440160206040518083038186803b158015610e3d57600080fd5b505afa158015610e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e759190613a4c565b905080610e855750600092915050565b6000600e8481548110610e9a57610e9a613ef0565b90600052602060002090600302019050600081600101549050600082600201549050808211610ecf5750600095945050505050565b43821015610f0657610ee18143613e00565b610eeb8284613e00565b610ef59086613de1565b610eff9190613dcd565b9450610f0a565b8394505b5050505b50919050565b610f1e3382612950565b610f3a5760405162461bcd60e51b815260040161078f90613cf2565b610d77838383612a3a565b601054600f5460009182916001600160a01b03909116906103e890610f6a9086613de1565b610f749190613dcd565b915091505b9250929050565b6000600d8381548110610f9557610f95613ef0565b60009182526020909120600490910201805490915080831015610ffa5760405162461bcd60e51b815260206004820152601d60248201527f436c6f6e654e75727365733a204e6f7420656e6f756768207061727473000000604482015260640161078f565b604051637921219560e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f242432a9061104c903390309089908990600401613bac565b600060405180830381600087803b15801561106657600080fd5b505af115801561107a573d6000803e3d6000fd5b505060405163b390c0ab60e01b815260048101879052602481018690527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063b390c0ab9150604401600060405180830381600087803b1580156110e757600080fd5b505af11580156110fb573d6000803e3d6000fd5b50505050600060018261110e9190613e00565b611119600186613e00565b84600301546111289190613de1565b6111329190613dcd565b905060007f00000000000000000000000000000000000000000000000000000000000000004311611183577f0000000000000000000000000000000000000000000000000000000000000000611185565b435b905060006111938383613db5565b905060006111a0600e5490565b600287810154604051625777c560e11b815260048101929092526024820152604481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169062aeef8a90606401600060405180830381600087803b15801561121657600080fd5b505af115801561122a573d6000803e3d6000fd5b5050604080516060810182528b81526020808201878152828401898152600e8054600181018255600091825294517fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd60039096029586015591517fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fe850155517fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3ff90930192909255858252600990528181208590559051849350839250600080516020613f448339815191529190a36113023382612be5565b604080518581526000602082015290810183905281907ffbf31c722190fd99a8f65945bdc9f3fdd80ea90e908f3bc77f1feeef216843979060600160405180910390a25050505050505050565b600061135a8361173a565b82106113bc5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161078f565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b600e81815481106113f557600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b610d77838383604051806020016040528060008152506123ea565b600061073e826128c5565b6000818152600360205260408120546001600160a01b03168061073e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161078f565b60005b81811015610d77576114e18383838181106114d5576114d5613ef0565b9050602002013561143e565b6001600160a01b0316336001600160a01b0316146115115760405162461bcd60e51b815260040161078f90613c8d565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561157357600080fd5b505afa158015611587573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ab9190613a4c565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662aeef8a600260008787878181106115f1576115f1613ef0565b6040516001600160e01b031960e088901b1681526004810195909552602485019390935250602090910201356044820152606401600060405180830381600087803b15801561163f57600080fd5b505af1158015611653573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a082319060240160206040518083038186803b1580156116b957600080fd5b505afa1580156116cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f19190613a4c565b905060006116ff8383613e00565b905061172386868681811061171657611716613ef0565b9050602002013582612d24565b5050506001816117339190613db5565b90506114b8565b60006001600160a01b0382166117a55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161078f565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146117eb5760405162461bcd60e51b815260040161078f90613cbd565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001600160a01b0381166000908152600a602090815260408083205480845260099092528220548291908082141561187b576118708261143e565b959194509092505050565b5b81811461189a5760008181526009602052604090205490915061187c565b6118708261143e565b6001600160a01b0381166000908152600a60209081526040808320548084526009909252822054829190808214156118de576118708261143e565b815b8282146118fe576000828152600960205260409020549192506118e0565b6001600160a01b0386166000908152600a6020908152604080832086905583835260099091528082208590555184918391600080516020613f448339815191529190a360405183906001600160a01b038816907f74afd1219e1106da193179db213370f587f8a6893614bd79eae534375ba60b9a90600090a36119808361143e565b96929550919350505050565b606060028054610b5b90613e43565b8281146119ea5760405162461bcd60e51b815260206004820152601f60248201527f436c6f6e654e75727365733a20496e76616c696420706172616d657465727300604482015260640161078f565b60005b83811015610ab557611a0a8585838181106114d5576114d5613ef0565b6001600160a01b0316336001600160a01b031614611a3a5760405162461bcd60e51b815260040161078f90613c8d565b6000600b6000878785818110611a5257611a52613ef0565b9050602002013581526020019081526020016000205490508060001415611ae05760001960096000888886818110611a8c57611a8c613ef0565b90506020020135815260200190815260200160002081905550600019868684818110611aba57611aba613ef0565b90506020020135600080516020613f4483398151915260405160405180910390a3611d25565b858583818110611af257611af2613ef0565b90506020020135848484818110611b0b57611b0b613ef0565b905060200201351415611b605760405162461bcd60e51b815260206004820152601d60248201527f436c6f6e654e75727365733a20496e76616c69642069642c20746f4964000000604482015260640161078f565b611b81848484818110611b7557611b75613ef0565b905060200201356128c5565b611bcd5760405162461bcd60e51b815260206004820152601960248201527f436c6f6e654e75727365733a20496e76616c696420746f496400000000000000604482015260640161078f565b838383818110611bdf57611bdf613ef0565b9050602002013560096000888886818110611bfc57611bfc613ef0565b90506020020135815260200190815260200160002081905550838383818110611c2757611c27613ef0565b90506020020135868684818110611c4057611c40613ef0565b90506020020135600080516020613f4483398151915260405160405180910390a380600b6000868686818110611c7857611c78613ef0565b9050602002013581526020019081526020016000206000828254611c9c9190613db5565b9091555060009050600b81888886818110611cb957611cb9613ef0565b90506020020135815260200190815260200160002081905550838383818110611ce457611ce4613ef0565b905060200201357f95dbced4d615bf88768e343c98d3d10cd6458a8fab8cc8a1b5ae9cb69167736582604051611d1c91815260200190565b60405180910390a25b6000600d600e888886818110611d3d57611d3d613ef0565b9050602002013581548110611d5457611d54613ef0565b90600052602060002090600302016000015481548110611d7657611d76613ef0565b6000918252602082206040516370a0823160e01b8152306004828101919091529092020192506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b158015611de857600080fd5b505afa158015611dfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e209190613a4c565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a41fe49f600284600201548b8b89818110611e6a57611e6a613ef0565b6040516001600160e01b031960e088901b1681526004810195909552602485019390935250602090910201356044820152606401600060405180830381600087803b158015611eb857600080fd5b505af1158015611ecc573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a082319060240160206040518083038186803b158015611f3257600080fd5b505afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a9190613a4c565b90506000611f788383613e00565b9050611f8f8a8a8881811061171657611716613ef0565b60018401546040516340c10f1960e01b815233600482015260248101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b158015611ffd57600080fd5b505af1158015612011573d6000803e3d6000fd5b505050506120368a8a8881811061202a5761202a613ef0565b90506020020135612f25565b600e8a8a8881811061204a5761204a613ef0565b905060200201358154811061206157612061613ef0565b9060005260206000209060030201600080820160009055600182016000905560028201600090555050505050505060018161209c9190613db5565b90506119ed565b6000546060906001600160a01b031633146120d05760405162461bcd60e51b815260040161078f90613cbd565b600d5460008967ffffffffffffffff8111156120ee576120ee613f06565b604051908082528060200260200182016040528015612117578160200160208202803683370190505b50905060005b8a8110156122895760018c8c8381811061213957612139613ef0565b905060200201351161218d5760405162461bcd60e51b815260206004820152601e60248201527f436c6f6e654e75727365733a20496e76616c69642070617274436f756e740000604482015260640161078f565b600d60405180608001604052808e8e858181106121ac576121ac613ef0565b9050602002013581526020018c8c858181106121ca576121ca613ef0565b9050602002013581526020018a8a858181106121e8576121e8613ef0565b90506020020135815260200188888581811061220657612206613ef0565b602090810292909201359092528354600181810186556000958652948290208451600490920201908155908301519381019390935550604081015160028301556060015160039091015561225a8184613db5565b82828151811061226c5761226c613ef0565b6020908102919091010152612282600182613db5565b905061211d565b509a9950505050505050505050565b6122a3338383612fcc565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146122ef5760405162461bcd60e51b815260040161078f90613c8d565b6122f8826128c5565b6123445760405162461bcd60e51b815260206004820152601b60248201527f436c6f6e654e75727365733a20496e76616c6964207461726765740000000000604482015260640161078f565b6001600160a01b0383166000818152600a6020526040808220859055518492917f74afd1219e1106da193179db213370f587f8a6893614bd79eae534375ba60b9a91a38015610d77576000828152600b6020526040812080548392906123ab908490613db5565b909155505060405181815282907f95dbced4d615bf88768e343c98d3d10cd6458a8fab8cc8a1b5ae9cb6916773659060200160405180910390a2505050565b6123f43383612950565b6124105760405162461bcd60e51b815260040161078f90613cf2565b61241c84848484613093565b50505050565b60405163090c278560e31b81523360048201523060248201526044810185905260ff841660648201526084810183905260a481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348613c289060c401600060405180830381600087803b1580156124a757600080fd5b505af11580156124bb573d6000803e3d6000fd5b505050506124c98686610f80565b505050505050565b60606124dc826128c5565b6125405760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161078f565b600061254a6130c6565b9050600081511161256a5760405180602001604052806000815250612595565b80612574846130e6565b604051602001612585929190613b40565b6040516020818303038152906040525b9392505050565b600d81815481106125ac57600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919350919084565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461261e5760405162461bcd60e51b815260040161078f90613c8d565b6000612629836118a3565b6000818152600b602052604081205491935090915083121561269d5761264e83613ea7565b81121561269d5760405162461bcd60e51b815260206004820152601c60248201527f436c6f6e654e75727365733a204f757472616e67656420706f77657200000000604482015260640161078f565b6126a78382613d74565b6000838152600b6020526040908190208290555190915082907f95dbced4d615bf88768e343c98d3d10cd6458a8fab8cc8a1b5ae9cb691677365906126ef9086815260200190565b60405180910390a250505050565b6000546001600160a01b031633146127275760405162461bcd60e51b815260040161078f90613cbd565b601080546001600160a01b0319166001600160a01b039390931692909217909155600f55565b6000546001600160a01b031633146127775760405162461bcd60e51b815260040161078f90613cbd565b6001600160a01b0381166127dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161078f565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b03198216630271189760e51b148061073e575061073e826131e4565b6000828152600c60205260408120805483929061287a908490613db5565b909155505060405181815282906001600160a01b038516907f6ad72273f2c6a083788e6d2e111a219924ac6344c1bd520d0b318eba5b5cb04a906020015b60405180910390a3505050565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906129178261143e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061295b826128c5565b6129bc5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161078f565b60006129c78361143e565b9050806001600160a01b0316846001600160a01b03161480612a025750836001600160a01b03166129f784610bde565b6001600160a01b0316145b80612a3257506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612a4d8261143e565b6001600160a01b031614612ab55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161078f565b6001600160a01b038216612b175760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161078f565b612b22838383613234565b612b2d6000826128e2565b6001600160a01b0383166000908152600460205260408120805460019290612b56908490613e00565b90915550506001600160a01b0382166000908152600460205260408120805460019290612b84908490613db5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216612c3b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161078f565b612c44816128c5565b15612c915760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161078f565b612c9d60008383613234565b6001600160a01b0382166000908152600460205260408120805460019290612cc6908490613db5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80612d2d575050565b6000600e8381548110612d4257612d42613ef0565b60009182526020822060016003909202019081015460028201549193509180828411612d7057859150612db6565b43841015612db357612d828343613e00565b612d8c8486613e00565b612d969088613de1565b612da09190613dcd565b9050612dac8187613e00565b9150612db6565b50845b8115612e3757604051630852cd8d60e31b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b158015612e1e57600080fd5b505af1158015612e32573d6000803e3d6000fd5b505050505b8015612edf5760405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015612ea557600080fd5b505af1158015612eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612edd91906139dc565b505b436002860155604051818152339088907f3ed1528b0fdc7c5207c1bf935e34a667e13656b9ed165260c522be0bc544f3039060200160405180910390a350505050505050565b6000612f308261143e565b9050612f3e81600084613234565b612f496000836128e2565b6001600160a01b0381166000908152600460205260408120805460019290612f72908490613e00565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b816001600160a01b0316836001600160a01b0316141561302e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161078f565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191016128b8565b61309e848484612a3a565b6130aa8484848461323f565b61241c5760405162461bcd60e51b815260040161078f90613c3b565b6060604051806060016040528060258152602001613f6460259139905090565b60608161310a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613134578061311e81613e78565b915061312d9050600a83613dcd565b915061310e565b60008167ffffffffffffffff81111561314f5761314f613f06565b6040519080825280601f01601f191660200182016040528015613179576020820181803683370190505b5090505b8415612a325761318e600183613e00565b915061319b600a86613e93565b6131a6906030613db5565b60f81b8183815181106131bb576131bb613ef0565b60200101906001600160f81b031916908160001a9053506131dd600a86613dcd565b945061317d565b60006001600160e01b031982166380ac58cd60e01b148061321557506001600160e01b03198216635b5e139f60e01b145b8061073e57506301ffc9a760e01b6001600160e01b031983161461073e565b610d7783838361334c565b60006001600160a01b0384163b1561334157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613283903390899088908890600401613b6f565b602060405180830381600087803b15801561329d57600080fd5b505af19250505080156132cd575060408051601f3d908101601f191682019092526132ca91810190613a16565b60015b613327573d8080156132fb576040519150601f19603f3d011682016040523d82523d6000602084013e613300565b606091505b50805161331f5760405162461bcd60e51b815260040161078f90613c3b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612a32565b506001949350505050565b6001600160a01b03831661336457610d77828261338c565b6001600160a01b03821661337c57610d7783826133d0565b61338683826133d0565b610d7782825b60006133978361173a565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b600060016133dd8461173a565b6133e79190613e00565b60008381526008602052604090205490915080821461343a576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b80356001600160a01b038116811461348457600080fd5b919050565b60008083601f84011261349b57600080fd5b50813567ffffffffffffffff8111156134b357600080fd5b6020830191508360208260051b8501011115610f7957600080fd5b600082601f8301126134df57600080fd5b8135602067ffffffffffffffff8211156134fb576134fb613f06565b8160051b61350a828201613d43565b83815282810190868401838801850189101561352557600080fd5b600093505b8584101561354857803583526001939093019291840191840161352a565b50979650505050505050565b600082601f83011261356557600080fd5b813567ffffffffffffffff81111561357f5761357f613f06565b613592601f8201601f1916602001613d43565b8181528460208386010111156135a757600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff8116811461348457600080fd5b6000602082840312156135e757600080fd5b6125958261346d565b6000806040838503121561360357600080fd5b61360c8361346d565b915061361a6020840161346d565b90509250929050565b600080600080600060a0868803121561363b57600080fd5b6136448661346d565b94506136526020870161346d565b9350604086013567ffffffffffffffff8082111561366f57600080fd5b61367b89838a016134ce565b9450606088013591508082111561369157600080fd5b61369d89838a016134ce565b935060808801359150808211156136b357600080fd5b506136c088828901613554565b9150509295509295909350565b6000806000606084860312156136e257600080fd5b6136eb8461346d565b92506136f96020850161346d565b9150604084013590509250925092565b6000806000806080858703121561371f57600080fd5b6137288561346d565b93506137366020860161346d565b925060408501359150606085013567ffffffffffffffff81111561375957600080fd5b61376587828801613554565b91505092959194509250565b600080600080600060a0868803121561378957600080fd5b6137928661346d565b94506137a06020870161346d565b93506040860135925060608601359150608086013567ffffffffffffffff8111156137ca57600080fd5b6136c088828901613554565b600080604083850312156137e957600080fd5b6137f28361346d565b9150602083013561380281613f1c565b809150509250929050565b6000806040838503121561382057600080fd5b6138298361346d565b946020939093013593505050565b60008060006060848603121561384c57600080fd5b6138558461346d565b95602085013595506040909401359392505050565b6000806020838503121561387d57600080fd5b823567ffffffffffffffff81111561389457600080fd5b6138a085828601613489565b90969095509350505050565b600080600080604085870312156138c257600080fd5b843567ffffffffffffffff808211156138da57600080fd5b6138e688838901613489565b909650945060208701359150808211156138ff57600080fd5b5061390c87828801613489565b95989497509550505050565b6000806000806000806000806080898b03121561393457600080fd5b883567ffffffffffffffff8082111561394c57600080fd5b6139588c838d01613489565b909a50985060208b013591508082111561397157600080fd5b61397d8c838d01613489565b909850965060408b013591508082111561399657600080fd5b6139a28c838d01613489565b909650945060608b01359150808211156139bb57600080fd5b506139c88b828c01613489565b999c989b5096995094979396929594505050565b6000602082840312156139ee57600080fd5b815161259581613f1c565b600060208284031215613a0b57600080fd5b813561259581613f2d565b600060208284031215613a2857600080fd5b815161259581613f2d565b600060208284031215613a4557600080fd5b5035919050565b600060208284031215613a5e57600080fd5b5051919050565b600080600060608486031215613a7a57600080fd5b83359250613a8a6020850161346d565b9150613a98604085016135c4565b90509250925092565b60008060408385031215613ab457600080fd5b50508035926020909101359150565b60008060008060008060c08789031215613adc57600080fd5b863595506020870135945060408701359350613afa606088016135c4565b92506080870135915060a087013590509295509295509295565b60008151808452613b2c816020860160208601613e17565b601f01601f19169290920160200192915050565b60008351613b52818460208801613e17565b835190830190613b66818360208801613e17565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ba290830184613b14565b9695505050505050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6020808252825182820181905260009190848201906040850190845b81811015613c1c57835183529284019291840191600101613c00565b50909695505050505050565b6020815260006125956020830184613b14565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526016908201527521b637b732a73ab939b2b99d102337b93134b23232b760511b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613d6c57613d6c613f06565b604052919050565b600080821280156001600160ff1b0384900385131615613d9657613d96613ec4565b600160ff1b8390038412811615613daf57613daf613ec4565b50500190565b60008219821115613dc857613dc8613ec4565b500190565b600082613ddc57613ddc613eda565b500490565b6000816000190483118215151615613dfb57613dfb613ec4565b500290565b600082821015613e1257613e12613ec4565b500390565b60005b83811015613e32578181015183820152602001613e1a565b8381111561241c5750506000910152565b600181811c90821680613e5757607f821691505b60208210811415610f0e57634e487b7160e01b600052602260045260246000fd5b6000600019821415613e8c57613e8c613ec4565b5060010190565b600082613ea257613ea2613eda565b500690565b6000600160ff1b821415613ebd57613ebd613ec4565b5060000390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114613f2a57600080fd5b50565b6001600160e01b031981168114613f2a57600080fdfe692926c201c1a490c1553d7bd4d53beeae98652233db64a10ec99102aaadc9d368747470733a2f2f6170692e6d616964636f696e2e6f72672f636c6f6e656e75727365732fa26469706673582212200aef82e657c4298c52096c0334600e3aaa1b96b23d124adb988eb86f4ca4b24064736f6c63430008050033000000000000000000000000861f8d5b601054d5109b93d3775cd71c74593f780000000000000000000000004af698b479d0098229dc715655c667ceb6cd8433000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f4984337000000000000000000000000d428f1050adc29976d4339b1ec602832034df701

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061027f5760003560e01c806370a082311161015c578063b252144a116100ce578063ddfeacca11610087578063ddfeacca14610665578063e2e784d514610678578063e985e9c51461068b578063f23a6e61146106c7578063f2fde38b146106e6578063fa600f76146106f957600080fd5b8063b252144a146105ae578063b88d4fde146105c1578063bc197c81146105d4578063c05bd4731461060c578063c87b56dd1461061f578063cd5a146e1461063257600080fd5b80639222ce8c116101205780639222ce8c1461052657806395d89b41146105395780639b88772a14610541578063a0881f7614610554578063a22cb46514610574578063b24606b81461058757600080fd5b806370a08231146104c0578063715018a6146104d357806378f210d5146104db578063849e5aff146104ee5780638da5cb5b1461051557600080fd5b806323b872dd116101f55780633a64e0d1116101b95780633a64e0d11461041f57806342842e0e1461044d5780634f558e79146104605780636352211e14610473578063671104c9146104865780636ba4c138146104ad57600080fd5b806323b872dd146103b35780632a55205a146103c65780632b2269b8146103d95780632b76a356146103f95780632f745c591461040c57600080fd5b8063081812fc11610247578063081812fc1461031a578063095ea7b31461034557806311b9e6b21461035857806312f7086c1461037857806318160ddd1461038b578063184935c11461039357600080fd5b806301ffc9a714610284578063031391ab146102ac57806303273bc7146102c1578063060f1938146102f357806306fdde0314610305575b600080fd5b6102976102923660046139f9565b610719565b60405190151581526020015b60405180910390f35b6102bf6102ba3660046138ac565b610744565b005b6102d46102cf366004613a65565b610abc565b604080516001600160a01b0390931683526020830191909152016102a3565b600d545b6040519081526020016102a3565b61030d610b4c565b6040516102a39190613c28565b61032d610328366004613a33565b610bde565b6040516001600160a01b0390911681526020016102a3565b6102bf61035336600461380d565b610c66565b6102f7610366366004613a33565b600b6020526000908152604090205481565b6102f7610386366004613a33565b610d7c565b600e546102f7565b6102f76103a1366004613a33565b600c6020526000908152604090205481565b6102bf6103c13660046136cd565b610f14565b6102d46103d4366004613aa1565b610f45565b6102f76103e7366004613a33565b60096020526000908152604090205481565b6102bf610407366004613aa1565b610f80565b6102f761041a36600461380d565b61134f565b61043261042d366004613a33565b6113e5565b604080519384526020840192909252908201526060016102a3565b6102bf61045b3660046136cd565b611418565b61029761046e366004613a33565b611433565b61032d610481366004613a33565b61143e565b61032d7f000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f498433781565b6102bf6104bb36600461386a565b6114b5565b6102f76104ce3660046135d5565b61173a565b6102bf6117c1565b6102d46104e93660046135d5565b611835565b61032d7f0000000000000000000000004af698b479d0098229dc715655c667ceb6cd843381565b6000546001600160a01b031661032d565b6102d46105343660046135d5565b6118a3565b61030d61198c565b6102bf61054f3660046138ac565b61199b565b610567610562366004613918565b6120a3565b6040516102a39190613be4565b6102bf6105823660046137d6565b612298565b61032d7f000000000000000000000000861f8d5b601054d5109b93d3775cd71c74593f7881565b6102bf6105bc366004613837565b6122a7565b6102bf6105cf366004613709565b6123ea565b6105f36105e2366004613623565b63bc197c8160e01b95945050505050565b6040516001600160e01b031990911681526020016102a3565b6102bf61061a366004613ac3565b612422565b61030d61062d366004613a33565b6124d1565b610645610640366004613a33565b61259c565b6040805194855260208501939093529183015260608201526080016102a3565b6102bf61067336600461380d565b6125d6565b6102bf61068636600461380d565b6126fd565b6102976106993660046135f0565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6105f36106d5366004613771565b63f23a6e6160e01b95945050505050565b6102bf6106f43660046135d5565b61274d565b6102f76107073660046135d5565b600a6020526000908152604090205481565b600063152a902d60e11b6001600160e01b03198316148061073e575061073e82612837565b92915050565b8281146107985760405162461bcd60e51b815260206004820152601f60248201527f436c6f6e654e75727365733a20496e76616c696420706172616d65746572730060448201526064015b60405180910390fd5b6107a284846114b5565b60005b83811015610ab55760008383838181106107c1576107c1613ef0565b90506020020135116108235760405162461bcd60e51b815260206004820152602560248201527f436c6f6e654e75727365733a20496e76616c696420616d6f756e7473206f6620604482015264706172747360d81b606482015260840161078f565b6000600e86868481811061083957610839613ef0565b905060200201358154811061085057610850613ef0565b906000526020600020906003020190506000816000015490506000600d828154811061087e5761087e613ef0565b906000526020600020906004020190507f000000000000000000000000861f8d5b601054d5109b93d3775cd71c74593f786001600160a01b031663f242432a3330858a8a8a8181106108d2576108d2613ef0565b905060200201356040518563ffffffff1660e01b81526004016108f89493929190613bac565b600060405180830381600087803b15801561091257600080fd5b505af1158015610926573d6000803e3d6000fd5b505050507f000000000000000000000000861f8d5b601054d5109b93d3775cd71c74593f786001600160a01b031663b390c0ab8388888881811061096c5761096c613ef0565b905060200201356040518363ffffffff1660e01b8152600401610999929190918252602082015260400190565b600060405180830381600087803b1580156109b357600080fd5b505af11580156109c7573d6000803e3d6000fd5b50505050600183015460004382106109e05750806109e3565b50435b82546000906109f490600190613e00565b898989818110610a0657610a06613ef0565b905060200201358560030154610a1c9190613de1565b610a269190613dcd565b90506000610a348284613db5565b6001880181905590508b8b89818110610a4f57610a4f613ef0565b6040805186815260208181018a905291810186905291029290920135917ffbf31c722190fd99a8f65945bdc9f3fdd80ea90e908f3bc77f1feeef21684397915060600160405180910390a250505050505050600181610aae9190613db5565b90506107a5565b5050505050565b600080336001600160a01b037f000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f49843371614610b075760405162461bcd60e51b815260040161078f90613c8d565b6064610b1660ff851687613de1565b610b209190613dcd565b905060008115610b4357610b33856118a3565b9093509050610b4385828461285c565b50935093915050565b606060018054610b5b90613e43565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8790613e43565b8015610bd45780601f10610ba957610100808354040283529160200191610bd4565b820191906000526020600020905b815481529060010190602001808311610bb757829003601f168201915b5050505050905090565b6000610be9826128c5565b610c4a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161078f565b506000908152600560205260409020546001600160a01b031690565b6000610c718261143e565b9050806001600160a01b0316836001600160a01b03161415610cdf5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161078f565b336001600160a01b0382161480610cfb5750610cfb8133610699565b610d6d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161078f565b610d7783836128e2565b505050565b6000610d87826128c5565b610dd35760405162461bcd60e51b815260206004820152601760248201527f436c6f6e654e75727365733a20496e76616c6964206964000000000000000000604482015260640161078f565b604051633185c0bd60e01b815260026004820152602481018390526000907f000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f49843376001600160a01b031690633185c0bd9060440160206040518083038186803b158015610e3d57600080fd5b505afa158015610e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e759190613a4c565b905080610e855750600092915050565b6000600e8481548110610e9a57610e9a613ef0565b90600052602060002090600302019050600081600101549050600082600201549050808211610ecf5750600095945050505050565b43821015610f0657610ee18143613e00565b610eeb8284613e00565b610ef59086613de1565b610eff9190613dcd565b9450610f0a565b8394505b5050505b50919050565b610f1e3382612950565b610f3a5760405162461bcd60e51b815260040161078f90613cf2565b610d77838383612a3a565b601054600f5460009182916001600160a01b03909116906103e890610f6a9086613de1565b610f749190613dcd565b915091505b9250929050565b6000600d8381548110610f9557610f95613ef0565b60009182526020909120600490910201805490915080831015610ffa5760405162461bcd60e51b815260206004820152601d60248201527f436c6f6e654e75727365733a204e6f7420656e6f756768207061727473000000604482015260640161078f565b604051637921219560e11b81526001600160a01b037f000000000000000000000000861f8d5b601054d5109b93d3775cd71c74593f78169063f242432a9061104c903390309089908990600401613bac565b600060405180830381600087803b15801561106657600080fd5b505af115801561107a573d6000803e3d6000fd5b505060405163b390c0ab60e01b815260048101879052602481018690527f000000000000000000000000861f8d5b601054d5109b93d3775cd71c74593f786001600160a01b0316925063b390c0ab9150604401600060405180830381600087803b1580156110e757600080fd5b505af11580156110fb573d6000803e3d6000fd5b50505050600060018261110e9190613e00565b611119600186613e00565b84600301546111289190613de1565b6111329190613dcd565b905060007f0000000000000000000000000000000000000000000000000000000000cb2fa04311611183577f0000000000000000000000000000000000000000000000000000000000cb2fa0611185565b435b905060006111938383613db5565b905060006111a0600e5490565b600287810154604051625777c560e11b815260048101929092526024820152604481018290529091507f000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f49843376001600160a01b03169062aeef8a90606401600060405180830381600087803b15801561121657600080fd5b505af115801561122a573d6000803e3d6000fd5b5050604080516060810182528b81526020808201878152828401898152600e8054600181018255600091825294517fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd60039096029586015591517fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fe850155517fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3ff90930192909255858252600990528181208590559051849350839250600080516020613f448339815191529190a36113023382612be5565b604080518581526000602082015290810183905281907ffbf31c722190fd99a8f65945bdc9f3fdd80ea90e908f3bc77f1feeef216843979060600160405180910390a25050505050505050565b600061135a8361173a565b82106113bc5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161078f565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b600e81815481106113f557600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b610d77838383604051806020016040528060008152506123ea565b600061073e826128c5565b6000818152600360205260408120546001600160a01b03168061073e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161078f565b60005b81811015610d77576114e18383838181106114d5576114d5613ef0565b9050602002013561143e565b6001600160a01b0316336001600160a01b0316146115115760405162461bcd60e51b815260040161078f90613c8d565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000004af698b479d0098229dc715655c667ceb6cd84336001600160a01b0316906370a082319060240160206040518083038186803b15801561157357600080fd5b505afa158015611587573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ab9190613a4c565b90507f000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f49843376001600160a01b031662aeef8a600260008787878181106115f1576115f1613ef0565b6040516001600160e01b031960e088901b1681526004810195909552602485019390935250602090910201356044820152606401600060405180830381600087803b15801561163f57600080fd5b505af1158015611653573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f0000000000000000000000004af698b479d0098229dc715655c667ceb6cd84336001600160a01b031691506370a082319060240160206040518083038186803b1580156116b957600080fd5b505afa1580156116cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f19190613a4c565b905060006116ff8383613e00565b905061172386868681811061171657611716613ef0565b9050602002013582612d24565b5050506001816117339190613db5565b90506114b8565b60006001600160a01b0382166117a55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161078f565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146117eb5760405162461bcd60e51b815260040161078f90613cbd565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001600160a01b0381166000908152600a602090815260408083205480845260099092528220548291908082141561187b576118708261143e565b959194509092505050565b5b81811461189a5760008181526009602052604090205490915061187c565b6118708261143e565b6001600160a01b0381166000908152600a60209081526040808320548084526009909252822054829190808214156118de576118708261143e565b815b8282146118fe576000828152600960205260409020549192506118e0565b6001600160a01b0386166000908152600a6020908152604080832086905583835260099091528082208590555184918391600080516020613f448339815191529190a360405183906001600160a01b038816907f74afd1219e1106da193179db213370f587f8a6893614bd79eae534375ba60b9a90600090a36119808361143e565b96929550919350505050565b606060028054610b5b90613e43565b8281146119ea5760405162461bcd60e51b815260206004820152601f60248201527f436c6f6e654e75727365733a20496e76616c696420706172616d657465727300604482015260640161078f565b60005b83811015610ab557611a0a8585838181106114d5576114d5613ef0565b6001600160a01b0316336001600160a01b031614611a3a5760405162461bcd60e51b815260040161078f90613c8d565b6000600b6000878785818110611a5257611a52613ef0565b9050602002013581526020019081526020016000205490508060001415611ae05760001960096000888886818110611a8c57611a8c613ef0565b90506020020135815260200190815260200160002081905550600019868684818110611aba57611aba613ef0565b90506020020135600080516020613f4483398151915260405160405180910390a3611d25565b858583818110611af257611af2613ef0565b90506020020135848484818110611b0b57611b0b613ef0565b905060200201351415611b605760405162461bcd60e51b815260206004820152601d60248201527f436c6f6e654e75727365733a20496e76616c69642069642c20746f4964000000604482015260640161078f565b611b81848484818110611b7557611b75613ef0565b905060200201356128c5565b611bcd5760405162461bcd60e51b815260206004820152601960248201527f436c6f6e654e75727365733a20496e76616c696420746f496400000000000000604482015260640161078f565b838383818110611bdf57611bdf613ef0565b9050602002013560096000888886818110611bfc57611bfc613ef0565b90506020020135815260200190815260200160002081905550838383818110611c2757611c27613ef0565b90506020020135868684818110611c4057611c40613ef0565b90506020020135600080516020613f4483398151915260405160405180910390a380600b6000868686818110611c7857611c78613ef0565b9050602002013581526020019081526020016000206000828254611c9c9190613db5565b9091555060009050600b81888886818110611cb957611cb9613ef0565b90506020020135815260200190815260200160002081905550838383818110611ce457611ce4613ef0565b905060200201357f95dbced4d615bf88768e343c98d3d10cd6458a8fab8cc8a1b5ae9cb69167736582604051611d1c91815260200190565b60405180910390a25b6000600d600e888886818110611d3d57611d3d613ef0565b9050602002013581548110611d5457611d54613ef0565b90600052602060002090600302016000015481548110611d7657611d76613ef0565b6000918252602082206040516370a0823160e01b8152306004828101919091529092020192506001600160a01b037f0000000000000000000000004af698b479d0098229dc715655c667ceb6cd843316906370a082319060240160206040518083038186803b158015611de857600080fd5b505afa158015611dfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e209190613a4c565b90507f000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f49843376001600160a01b031663a41fe49f600284600201548b8b89818110611e6a57611e6a613ef0565b6040516001600160e01b031960e088901b1681526004810195909552602485019390935250602090910201356044820152606401600060405180830381600087803b158015611eb857600080fd5b505af1158015611ecc573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f0000000000000000000000004af698b479d0098229dc715655c667ceb6cd84336001600160a01b031691506370a082319060240160206040518083038186803b158015611f3257600080fd5b505afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a9190613a4c565b90506000611f788383613e00565b9050611f8f8a8a8881811061171657611716613ef0565b60018401546040516340c10f1960e01b815233600482015260248101919091527f000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f49843376001600160a01b0316906340c10f1990604401600060405180830381600087803b158015611ffd57600080fd5b505af1158015612011573d6000803e3d6000fd5b505050506120368a8a8881811061202a5761202a613ef0565b90506020020135612f25565b600e8a8a8881811061204a5761204a613ef0565b905060200201358154811061206157612061613ef0565b9060005260206000209060030201600080820160009055600182016000905560028201600090555050505050505060018161209c9190613db5565b90506119ed565b6000546060906001600160a01b031633146120d05760405162461bcd60e51b815260040161078f90613cbd565b600d5460008967ffffffffffffffff8111156120ee576120ee613f06565b604051908082528060200260200182016040528015612117578160200160208202803683370190505b50905060005b8a8110156122895760018c8c8381811061213957612139613ef0565b905060200201351161218d5760405162461bcd60e51b815260206004820152601e60248201527f436c6f6e654e75727365733a20496e76616c69642070617274436f756e740000604482015260640161078f565b600d60405180608001604052808e8e858181106121ac576121ac613ef0565b9050602002013581526020018c8c858181106121ca576121ca613ef0565b9050602002013581526020018a8a858181106121e8576121e8613ef0565b90506020020135815260200188888581811061220657612206613ef0565b602090810292909201359092528354600181810186556000958652948290208451600490920201908155908301519381019390935550604081015160028301556060015160039091015561225a8184613db5565b82828151811061226c5761226c613ef0565b6020908102919091010152612282600182613db5565b905061211d565b509a9950505050505050505050565b6122a3338383612fcc565b5050565b336001600160a01b037f000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f498433716146122ef5760405162461bcd60e51b815260040161078f90613c8d565b6122f8826128c5565b6123445760405162461bcd60e51b815260206004820152601b60248201527f436c6f6e654e75727365733a20496e76616c6964207461726765740000000000604482015260640161078f565b6001600160a01b0383166000818152600a6020526040808220859055518492917f74afd1219e1106da193179db213370f587f8a6893614bd79eae534375ba60b9a91a38015610d77576000828152600b6020526040812080548392906123ab908490613db5565b909155505060405181815282907f95dbced4d615bf88768e343c98d3d10cd6458a8fab8cc8a1b5ae9cb6916773659060200160405180910390a2505050565b6123f43383612950565b6124105760405162461bcd60e51b815260040161078f90613cf2565b61241c84848484613093565b50505050565b60405163090c278560e31b81523360048201523060248201526044810185905260ff841660648201526084810183905260a481018290527f000000000000000000000000861f8d5b601054d5109b93d3775cd71c74593f786001600160a01b0316906348613c289060c401600060405180830381600087803b1580156124a757600080fd5b505af11580156124bb573d6000803e3d6000fd5b505050506124c98686610f80565b505050505050565b60606124dc826128c5565b6125405760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161078f565b600061254a6130c6565b9050600081511161256a5760405180602001604052806000815250612595565b80612574846130e6565b604051602001612585929190613b40565b6040516020818303038152906040525b9392505050565b600d81815481106125ac57600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919350919084565b336001600160a01b037f000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f4984337161461261e5760405162461bcd60e51b815260040161078f90613c8d565b6000612629836118a3565b6000818152600b602052604081205491935090915083121561269d5761264e83613ea7565b81121561269d5760405162461bcd60e51b815260206004820152601c60248201527f436c6f6e654e75727365733a204f757472616e67656420706f77657200000000604482015260640161078f565b6126a78382613d74565b6000838152600b6020526040908190208290555190915082907f95dbced4d615bf88768e343c98d3d10cd6458a8fab8cc8a1b5ae9cb691677365906126ef9086815260200190565b60405180910390a250505050565b6000546001600160a01b031633146127275760405162461bcd60e51b815260040161078f90613cbd565b601080546001600160a01b0319166001600160a01b039390931692909217909155600f55565b6000546001600160a01b031633146127775760405162461bcd60e51b815260040161078f90613cbd565b6001600160a01b0381166127dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161078f565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b03198216630271189760e51b148061073e575061073e826131e4565b6000828152600c60205260408120805483929061287a908490613db5565b909155505060405181815282906001600160a01b038516907f6ad72273f2c6a083788e6d2e111a219924ac6344c1bd520d0b318eba5b5cb04a906020015b60405180910390a3505050565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906129178261143e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061295b826128c5565b6129bc5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161078f565b60006129c78361143e565b9050806001600160a01b0316846001600160a01b03161480612a025750836001600160a01b03166129f784610bde565b6001600160a01b0316145b80612a3257506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612a4d8261143e565b6001600160a01b031614612ab55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161078f565b6001600160a01b038216612b175760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161078f565b612b22838383613234565b612b2d6000826128e2565b6001600160a01b0383166000908152600460205260408120805460019290612b56908490613e00565b90915550506001600160a01b0382166000908152600460205260408120805460019290612b84908490613db5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216612c3b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161078f565b612c44816128c5565b15612c915760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161078f565b612c9d60008383613234565b6001600160a01b0382166000908152600460205260408120805460019290612cc6908490613db5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80612d2d575050565b6000600e8381548110612d4257612d42613ef0565b60009182526020822060016003909202019081015460028201549193509180828411612d7057859150612db6565b43841015612db357612d828343613e00565b612d8c8486613e00565b612d969088613de1565b612da09190613dcd565b9050612dac8187613e00565b9150612db6565b50845b8115612e3757604051630852cd8d60e31b8152600481018390527f0000000000000000000000004af698b479d0098229dc715655c667ceb6cd84336001600160a01b0316906342966c6890602401600060405180830381600087803b158015612e1e57600080fd5b505af1158015612e32573d6000803e3d6000fd5b505050505b8015612edf5760405163a9059cbb60e01b8152336004820152602481018290527f0000000000000000000000004af698b479d0098229dc715655c667ceb6cd84336001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015612ea557600080fd5b505af1158015612eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612edd91906139dc565b505b436002860155604051818152339088907f3ed1528b0fdc7c5207c1bf935e34a667e13656b9ed165260c522be0bc544f3039060200160405180910390a350505050505050565b6000612f308261143e565b9050612f3e81600084613234565b612f496000836128e2565b6001600160a01b0381166000908152600460205260408120805460019290612f72908490613e00565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b816001600160a01b0316836001600160a01b0316141561302e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161078f565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191016128b8565b61309e848484612a3a565b6130aa8484848461323f565b61241c5760405162461bcd60e51b815260040161078f90613c3b565b6060604051806060016040528060258152602001613f6460259139905090565b60608161310a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613134578061311e81613e78565b915061312d9050600a83613dcd565b915061310e565b60008167ffffffffffffffff81111561314f5761314f613f06565b6040519080825280601f01601f191660200182016040528015613179576020820181803683370190505b5090505b8415612a325761318e600183613e00565b915061319b600a86613e93565b6131a6906030613db5565b60f81b8183815181106131bb576131bb613ef0565b60200101906001600160f81b031916908160001a9053506131dd600a86613dcd565b945061317d565b60006001600160e01b031982166380ac58cd60e01b148061321557506001600160e01b03198216635b5e139f60e01b145b8061073e57506301ffc9a760e01b6001600160e01b031983161461073e565b610d7783838361334c565b60006001600160a01b0384163b1561334157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613283903390899088908890600401613b6f565b602060405180830381600087803b15801561329d57600080fd5b505af19250505080156132cd575060408051601f3d908101601f191682019092526132ca91810190613a16565b60015b613327573d8080156132fb576040519150601f19603f3d011682016040523d82523d6000602084013e613300565b606091505b50805161331f5760405162461bcd60e51b815260040161078f90613c3b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612a32565b506001949350505050565b6001600160a01b03831661336457610d77828261338c565b6001600160a01b03821661337c57610d7783826133d0565b61338683826133d0565b610d7782825b60006133978361173a565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b600060016133dd8461173a565b6133e79190613e00565b60008381526008602052604090205490915080821461343a576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b80356001600160a01b038116811461348457600080fd5b919050565b60008083601f84011261349b57600080fd5b50813567ffffffffffffffff8111156134b357600080fd5b6020830191508360208260051b8501011115610f7957600080fd5b600082601f8301126134df57600080fd5b8135602067ffffffffffffffff8211156134fb576134fb613f06565b8160051b61350a828201613d43565b83815282810190868401838801850189101561352557600080fd5b600093505b8584101561354857803583526001939093019291840191840161352a565b50979650505050505050565b600082601f83011261356557600080fd5b813567ffffffffffffffff81111561357f5761357f613f06565b613592601f8201601f1916602001613d43565b8181528460208386010111156135a757600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff8116811461348457600080fd5b6000602082840312156135e757600080fd5b6125958261346d565b6000806040838503121561360357600080fd5b61360c8361346d565b915061361a6020840161346d565b90509250929050565b600080600080600060a0868803121561363b57600080fd5b6136448661346d565b94506136526020870161346d565b9350604086013567ffffffffffffffff8082111561366f57600080fd5b61367b89838a016134ce565b9450606088013591508082111561369157600080fd5b61369d89838a016134ce565b935060808801359150808211156136b357600080fd5b506136c088828901613554565b9150509295509295909350565b6000806000606084860312156136e257600080fd5b6136eb8461346d565b92506136f96020850161346d565b9150604084013590509250925092565b6000806000806080858703121561371f57600080fd5b6137288561346d565b93506137366020860161346d565b925060408501359150606085013567ffffffffffffffff81111561375957600080fd5b61376587828801613554565b91505092959194509250565b600080600080600060a0868803121561378957600080fd5b6137928661346d565b94506137a06020870161346d565b93506040860135925060608601359150608086013567ffffffffffffffff8111156137ca57600080fd5b6136c088828901613554565b600080604083850312156137e957600080fd5b6137f28361346d565b9150602083013561380281613f1c565b809150509250929050565b6000806040838503121561382057600080fd5b6138298361346d565b946020939093013593505050565b60008060006060848603121561384c57600080fd5b6138558461346d565b95602085013595506040909401359392505050565b6000806020838503121561387d57600080fd5b823567ffffffffffffffff81111561389457600080fd5b6138a085828601613489565b90969095509350505050565b600080600080604085870312156138c257600080fd5b843567ffffffffffffffff808211156138da57600080fd5b6138e688838901613489565b909650945060208701359150808211156138ff57600080fd5b5061390c87828801613489565b95989497509550505050565b6000806000806000806000806080898b03121561393457600080fd5b883567ffffffffffffffff8082111561394c57600080fd5b6139588c838d01613489565b909a50985060208b013591508082111561397157600080fd5b61397d8c838d01613489565b909850965060408b013591508082111561399657600080fd5b6139a28c838d01613489565b909650945060608b01359150808211156139bb57600080fd5b506139c88b828c01613489565b999c989b5096995094979396929594505050565b6000602082840312156139ee57600080fd5b815161259581613f1c565b600060208284031215613a0b57600080fd5b813561259581613f2d565b600060208284031215613a2857600080fd5b815161259581613f2d565b600060208284031215613a4557600080fd5b5035919050565b600060208284031215613a5e57600080fd5b5051919050565b600080600060608486031215613a7a57600080fd5b83359250613a8a6020850161346d565b9150613a98604085016135c4565b90509250925092565b60008060408385031215613ab457600080fd5b50508035926020909101359150565b60008060008060008060c08789031215613adc57600080fd5b863595506020870135945060408701359350613afa606088016135c4565b92506080870135915060a087013590509295509295509295565b60008151808452613b2c816020860160208601613e17565b601f01601f19169290920160200192915050565b60008351613b52818460208801613e17565b835190830190613b66818360208801613e17565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ba290830184613b14565b9695505050505050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6020808252825182820181905260009190848201906040850190845b81811015613c1c57835183529284019291840191600101613c00565b50909695505050505050565b6020815260006125956020830184613b14565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526016908201527521b637b732a73ab939b2b99d102337b93134b23232b760511b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613d6c57613d6c613f06565b604052919050565b600080821280156001600160ff1b0384900385131615613d9657613d96613ec4565b600160ff1b8390038412811615613daf57613daf613ec4565b50500190565b60008219821115613dc857613dc8613ec4565b500190565b600082613ddc57613ddc613eda565b500490565b6000816000190483118215151615613dfb57613dfb613ec4565b500290565b600082821015613e1257613e12613ec4565b500390565b60005b83811015613e32578181015183820152602001613e1a565b8381111561241c5750506000910152565b600181811c90821680613e5757607f821691505b60208210811415610f0e57634e487b7160e01b600052602260045260246000fd5b6000600019821415613e8c57613e8c613ec4565b5060010190565b600082613ea257613ea2613eda565b500690565b6000600160ff1b821415613ebd57613ebd613ec4565b5060000390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114613f2a57600080fd5b50565b6001600160e01b031981168114613f2a57600080fdfe692926c201c1a490c1553d7bd4d53beeae98652233db64a10ec99102aaadc9d368747470733a2f2f6170692e6d616964636f696e2e6f72672f636c6f6e656e75727365732fa26469706673582212200aef82e657c4298c52096c0334600e3aaa1b96b23d124adb988eb86f4ca4b24064736f6c63430008050033

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

000000000000000000000000861f8d5b601054d5109b93d3775cd71c74593f780000000000000000000000004af698b479d0098229dc715655c667ceb6cd8433000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f4984337000000000000000000000000d428f1050adc29976d4339b1ec602832034df701

-----Decoded View---------------
Arg [0] : _nursePart (address): 0x861f8d5b601054D5109B93D3775cd71c74593f78
Arg [1] : _maidCoin (address): 0x4Af698B479D0098229DC715655c667Ceb6cd8433
Arg [2] : _theMaster (address): 0xCD9E5C7969A4C0B4FA8726B243143381f4984337
Arg [3] : _royaltyReceiver (address): 0xD428F1050AdC29976d4339b1ec602832034dF701

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000861f8d5b601054d5109b93d3775cd71c74593f78
Arg [1] : 0000000000000000000000004af698b479d0098229dc715655c667ceb6cd8433
Arg [2] : 000000000000000000000000cd9e5c7969a4c0b4fa8726b243143381f4984337
Arg [3] : 000000000000000000000000d428f1050adc29976d4339b1ec602832034df701


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

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