Contract 0x51403ed41c73174effc541cc7bbf783b6602d2ca 6

 
Txn Hash Method
Block
From
To
Value
0xaac4385e99da5eea42125fae1e8c53afde80b18ef1fb8d1116b051e44d32124aCashout Reward57667782023-10-26 12:21:43175 days 14 hrs ago0x019fd5586376e182cad26e2d61abd9ba6fd8234f IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0000314314030.000003922
0x06d7246292c4958b9ceb302cd25ccce1cb40d492a07ff4efad2b595781ae0f31Stake Tokens57291582023-10-25 15:27:43176 days 11 hrs ago0x7754bbb775f9821b952f525c8121fa8d35c47273 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0006173901535.100000054
0x8ffd4206454874c6cb0a030e60b5c6432a0d8b9485efe2eb193b3cd0c582df16Stake Tokens57291312023-10-25 15:26:49176 days 11 hrs ago0x7754bbb775f9821b952f525c8121fa8d35c47273 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0006235102455.198000053
0x33d6d23e68496565ac7376611848de6870a9d1423cd14be91d50266e17b1dddfStake Tokens57291002023-10-25 15:25:47176 days 11 hrs ago0x9247b871c06648703f1bdf5395e31ac19d2b4f7f IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0006221025.100000052
0x631a48c6be87e1bb8ccf0591667d09d406ff2f97ec68927dedc6132dbe7a8839Cashout Reward57290702023-10-25 15:24:47176 days 11 hrs ago0x9247b871c06648703f1bdf5395e31ac19d2b4f7f IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0016313085025.100000052
0x503015ec86870f8cb484972a423679bd24d6549fbaed008f7748f7d63354426cStake Tokens57290042023-10-25 15:22:35176 days 11 hrs ago0x7754bbb775f9821b952f525c8121fa8d35c47273 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0020101167045.100000054
0xc08228fbdbecee619f855d5ac5c92e3e0277a40d8efeceace2029cbfe27e97d4Cashout Reward57268892023-10-25 14:12:05176 days 13 hrs ago0x6613d588e89553337aa00451038222812442f000 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0000611452610.004
0x4f36571b1d2f1a8bd610b959b54c86f1328a1afc3eaa533d73d3f83ff500fbb5Stake Tokens57168932023-10-25 8:38:53176 days 18 hrs ago0x019fd5586376e182cad26e2d61abd9ba6fd8234f IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0005419172215.100001352
0x314ff05a00ba943b039e1f5a5fc13d9733a175726af4b3bda8a10759577c1e39Stake Tokens57164032023-10-25 8:22:33176 days 18 hrs ago0xdc49bea6f527e7c889969c9380c5232cea90a3ed IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0012921314565.100007466
0x47204f56838698e3aee81db27902a9f299f80b34af87c0014a1f17c9c12d4467Stake Tokens57135612023-10-25 6:47:49176 days 20 hrs ago0xfe96b73b686a40a5869ef3c86628ef8d8f3d0072 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0010253045425.100082993
0xa9e801d154b8bd84e3f5921d56d8c93381f8317de19cb94bcae5dad7308613c9Stake Tokens57135432023-10-25 6:47:13176 days 20 hrs ago0x46826ba75147a8784078cd4ee8c1bde9068b4382 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0010244529395.100078994
0x65e01ade0ed73c73a035ec6a295716508d46607eae99abe216cd32284354b293Cashout All57135232023-10-25 6:46:33176 days 20 hrs ago0x46826ba75147a8784078cd4ee8c1bde9068b4382 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0014969385825.100085869
0xafbda6571f14f6ae6c267b1d97859ad3e40411039c58788cfe42bb395f392775Cashout All57134862023-10-25 6:45:19176 days 20 hrs ago0xbc62d5178881c4cbe84e649c3dfc58f2e397ca53 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0005242601445.100097471
0x20e9ccf407247f4cc36ca388e2006432a61e32d980d7edfa17bead5151f8604bCashout Reward57134492023-10-25 6:44:05176 days 20 hrs ago0xdf17ab1a67602cd050f0e421f4b36f9568b5b22e IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0009483216965.100116807
0x37dd7846b84d115a5ba8a8dda2b8970f18396913aa18cb54b537a4a5b7f36be2Stake Tokens57134252023-10-25 6:43:17176 days 20 hrs ago0x07a41401397badf7fcd0a4e3f31675313f00f0a0 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0005387379845.100129009
0x9e414841dc1137c9f6106e723a8066e8e7f2a96b9bf03df95dff408a0606894eCashout Reward57133572023-10-25 6:41:01176 days 20 hrs ago0xfe96b73b686a40a5869ef3c86628ef8d8f3d0072 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0004663015135.100132787
0xfe46d5226e3ed07814224a125f7fa3704a83943a2ce7cd7791ad02321a907b89Stake Tokens57096642023-10-25 4:37:55176 days 22 hrs ago0x019fd5586376e182cad26e2d61abd9ba6fd8234f IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0005382748645.100000067
0x8d2f992e2bb74dc35ab8b6f19b4d9c781f4fca9ca3ac1ecf11f26355b78a2caaStake Tokens57096452023-10-25 4:37:17176 days 22 hrs ago0x019fd5586376e182cad26e2d61abd9ba6fd8234f IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0005383285065.100000058
0xbd0b7697dcdd35a224a9ba96c7e6a1f40491b9793a992f6e32089ee5e8e280c1Cashout Reward57085452023-10-25 4:00:37176 days 23 hrs ago0xf6411171fe9cb7085ccec0d8addd8768e0a83a7c IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.000017125590.000135022
0xd72ce18a36108265bb66c95e2da5a5b8de0804f4a31eccc8d03214f58b20b1f3Stake Tokens56775392023-10-24 10:47:05177 days 16 hrs ago0x019fd5586376e182cad26e2d61abd9ba6fd8234f IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0006306735225.100000053
0x354b6bc015b4461ebbbfbf844893b51bbe70ad690634b0c771f46d6427ee3bd2Stake Tokens56771872023-10-24 10:35:21177 days 16 hrs ago0x019fd5586376e182cad26e2d61abd9ba6fd8234f IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0005530491695.100000056
0xe9246e1ef77beb2a7d72201b7b235ddce5e254bc224d9a6df19331bd3ff11b8dStake Tokens56771032023-10-24 10:32:33177 days 16 hrs ago0x019fd5586376e182cad26e2d61abd9ba6fd8234f IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0005559248295.100000055
0xe209f217e158e5047b5b36740e79cee5b1111cc879e180faf1373cb4bcc64914Set Whitelisted56298352023-10-23 8:16:57178 days 19 hrs ago0xea63c8dbb757d41d3f031589d1e2e0e4e0dac921 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0000203999960.004425357
0x56d1ed70f23a1af2841cead1bed9f11f839a00976f8690a52bd4ed4d690a1b12Cashout Reward56274302023-10-23 6:56:47178 days 20 hrs ago0xfe96b73b686a40a5869ef3c86628ef8d8f3d0072 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0015943785365.100142969
0x6adf01d2681eb1cfaa170fde23d56141f83c33d1f52af79e9e2010b6734659aeStake Tokens56273312023-10-23 6:53:29178 days 20 hrs ago0x41eefb7b1e2223563f204c526978d00d6b9c10e3 IN  0x51403ed41c73174effc541cc7bbf783b6602d2ca0 ETH0.0006092314735.110087816
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xdac45ecd113c1442c0743d0465e507355c0e00337d3670d1c1738c528cd8b37b55965222023-10-22 13:46:31179 days 13 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.002 ETH
0xdac45ecd113c1442c0743d0465e507355c0e00337d3670d1c1738c528cd8b37b55965222023-10-22 13:46:31179 days 13 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.018 ETH
0x67a61dd1cb93afae9760840318dbd286f8bb3e1726b980dfe6a38a68b5d0b6cf55960172023-10-22 13:29:41179 days 13 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xa30cd1f748ab601799c1762bc3ab03a24a2718ab0.004 ETH
0x67a61dd1cb93afae9760840318dbd286f8bb3e1726b980dfe6a38a68b5d0b6cf55960172023-10-22 13:29:41179 days 13 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.036 ETH
0x98d8d8c841abc7394899b6de2ff14a49208fbb2f62d20fb59adbb8d54f91628a55822012023-10-22 5:49:09179 days 21 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.002 ETH
0x98d8d8c841abc7394899b6de2ff14a49208fbb2f62d20fb59adbb8d54f91628a55822012023-10-22 5:49:09179 days 21 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.018 ETH
0xcf2cff15376e91d4cd2618969d3cbc37fed6d6f028bff46bfe9f6e73fc4e34f554603132023-10-19 10:06:13182 days 17 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.01 ETH
0xfeedf7a69275b3fef679e1b128da0e20e9d715cde7d639c3c7ed8a842340d00553975772023-10-17 23:15:01184 days 4 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.001 ETH
0xfeedf7a69275b3fef679e1b128da0e20e9d715cde7d639c3c7ed8a842340d00553975772023-10-17 23:15:01184 days 4 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.009 ETH
0xef4e8f2679da675a076b29e0f266e55c4812c2814ebfb331ef1381dbebcc5f3a53975342023-10-17 23:13:35184 days 4 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.001 ETH
0xef4e8f2679da675a076b29e0f266e55c4812c2814ebfb331ef1381dbebcc5f3a53975342023-10-17 23:13:35184 days 4 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.009 ETH
0xb10e10d2134776791181de87bfea4d26c0bd0732bac69e7d3561e3142e01233f52441912023-10-14 10:02:09187 days 17 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb16a696a64213ce259f4ffbb3e301310cc8eb17e0.001 ETH
0xb10e10d2134776791181de87bfea4d26c0bd0732bac69e7d3561e3142e01233f52441912023-10-14 10:02:09187 days 17 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.009 ETH
0x96e1b85214aaa9a04b8584c36bd836d226872a69f970959d29fb84e20f6e3a6751300222023-10-11 18:36:31190 days 8 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.002 ETH
0x96e1b85214aaa9a04b8584c36bd836d226872a69f970959d29fb84e20f6e3a6751300222023-10-11 18:36:31190 days 8 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.018 ETH
0xc0bed85e12137fab7f69c710368ba4b0a947f28f54c34784cb6364e8d81c41ce51114952023-10-11 8:18:57190 days 19 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xeef4b9dfb0a3c4150b3f3d2620c4b7814d5b74b10.002 ETH
0xc0bed85e12137fab7f69c710368ba4b0a947f28f54c34784cb6364e8d81c41ce51114952023-10-11 8:18:57190 days 19 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.018 ETH
0x7c50109aecdf0e913e9d4c126c9e6ee8dba64dbe321b8a36641455930324a51c51080982023-10-11 6:25:43190 days 20 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.001 ETH
0x7c50109aecdf0e913e9d4c126c9e6ee8dba64dbe321b8a36641455930324a51c51080982023-10-11 6:25:43190 days 20 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.009 ETH
0x45a0e1ae85db653c35e1b6e425caa11bf44365597496faea1dbf64aed0f77b8550259992023-10-09 8:49:05192 days 18 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.0006 ETH
0x45a0e1ae85db653c35e1b6e425caa11bf44365597496faea1dbf64aed0f77b8550259992023-10-09 8:49:05192 days 18 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.0054 ETH
0x272d325e1842fa62644a71293978b5b5112fb8101c9981adbe462960278ecb4b50245762023-10-09 8:01:39192 days 19 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.006 ETH
0x272d325e1842fa62644a71293978b5b5112fb8101c9981adbe462960278ecb4b50245762023-10-09 8:01:39192 days 19 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.054 ETH
0xa3d50f8741b3a326897a160824ad6b6cf43c6f031f90bd7bbf2995ffa3440c4250243022023-10-09 7:52:31192 days 19 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.003 ETH
0xa3d50f8741b3a326897a160824ad6b6cf43c6f031f90bd7bbf2995ffa3440c4250243022023-10-09 7:52:31192 days 19 hrs ago 0x51403ed41c73174effc541cc7bbf783b6602d2ca0xb66c29db57a804072b065fe7f36d27c23514d5270.027 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NFTManager

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
istanbul EvmVersion
File 1 of 22 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

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() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

File 2 of 22 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 3 of 22 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../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: address zero is not a valid owner");
        return _balances[owner];
    }

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

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

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

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

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

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

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

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

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

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

        _owners[tokenId] = to;

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

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

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

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

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

        // Clear approvals
        delete _tokenApprovals[tokenId];

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

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

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(address from, address to, uint256 tokenId) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

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

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

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

        emit Transfer(from, to, tokenId);

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

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

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

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
     * that `ownerOf(tokenId)` is `a`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }
}

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

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

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

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

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

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

    /**
     * @dev See {IERC721Enumerable-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 {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

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

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

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

        uint256 tokenId = firstTokenId;

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

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

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

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

        uint256 lastTokenIndex = 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];
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable 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);

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

File 7 of 22 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

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 8 of 22 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library 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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 22 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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) {
        return msg.data;
    }
}

File 12 of 22 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

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 13 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface 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 14 of 22 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

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

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

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

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

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

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

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 17 of 22 : INFTDescriptor.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.0;
pragma experimental ABIEncoderV2;

/// @title Describes position NFT tokens via URI
interface INFTDescriptor {
    struct ConstructTokenURIParams {
        uint256 tokenId;
        uint8 level;
        uint256 tvl;
        uint256 lockers;
        address ownerAddress;
    }

    function tokenURI(ConstructTokenURIParams memory params)
        external
        view
        returns (string memory);
}

File 18 of 22 : IResource.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.21;

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

interface IResource is IERC20 {
    function mintByTreasury(address account, uint256 amount) external;

    function burnByTreasury(address account, uint256 amount) external;

    function excludeFromFee(address account, bool status) external;

    function setSellFee(uint256 fee) external;
}

File 19 of 22 : ITreasury.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.21;

import "./IUniswapV2Pair.sol";
import "./IUniswapV2Router02.sol";

interface ITreasury {
    function owner() external view returns (address);
    function resource() external view returns (address);
    function nftManager() external view returns (address);
    function masterchef() external view returns (address);
    function feeAddress() external view returns (address);
    function uniswapV2Pair() external view returns (IUniswapV2Pair);
    function swapTokenForETH(address account, uint256 amount) external;
    function rewardByNFTOrChef(address account, uint256 amount) external;
    function burnByNFTOrChef(address account, uint256 amount) external;
    function addLiquidity() external;
}

File 20 of 22 : IUniswapV2Pair.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.21;

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 21 of 22 : IUniswapV2Router02.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.21;

interface IUniswapV2Router02 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

File 22 of 22 : NftManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.21;

import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./interfaces/IResource.sol";
import "./interfaces/ITreasury.sol";
import "./interfaces/INFTDescriptor.sol";

contract NFTManager is
    ERC721Enumerable,
    Ownable,
    ReentrancyGuard
{
    using Address for address;
    struct NFTEntity {
        uint256 id;
        uint256 amount;
        uint256 lastProcessingTimestamp;
        uint256 lastReward;
    }

    struct UserInfo {
        uint256 lastProcessingTimestamp;
        uint256 amount;
    }

    mapping(address => uint256) public userTotalStakedAmount;
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    mapping(address => uint256[]) public nftsOfUser;
    mapping(uint256 => address[]) public usersOfNft;

    mapping(address => mapping(address => uint256)) public stakeReferralAmount;
    mapping(address => mapping(address => uint256)) public nftReferralAmount;
    mapping(address => address[]) public nftReferralsOfUser;
    mapping(address => address[]) public stakeReferralsOfUser;
    uint256 public totalStakeReferralAmount;
    uint256 public totalNftReferralAmount;

    mapping(uint256 => NFTEntity) private _nfts;

    mapping(address => bool) private whitelist;

    uint256 public constant initialLockValue = 2000 * 1e18;
    uint256 public constant maxSupply = 333;

    uint256 public constant processingFee = 10;

    uint256 public totalValueLocked;

    uint256 public mintPrice;
    uint256 public mintPriceWhitelisted;

    IResource public resource;
    ITreasury public treasury;

    address private immutable _descriptor;

    uint256 public startTime = type(uint256).max;

    modifier treasurySet() {
        require(address(treasury) != address(0), "NFTManager: Treasury is 0");
        _;
    }

    modifier whenStarted() {
        require(startTime < block.timestamp, "NFTManager: Not started");
        _;
    }

    receive() external payable {}

    constructor(address _descriptor_, address _resource) ERC721("Unicow", "Unicow") {
        _descriptor = _descriptor_;
        resource = IResource(_resource);
        
        changeMintPrice(1 * 1e17);
        changeMintPriceWhitelisted(67 * 1e15);

        for (uint256 index = 1; index <= 33; index++) {
            _nfts[index] = NFTEntity({
                id: index,
                amount: 0,
                lastProcessingTimestamp: block.timestamp,
                lastReward: 0
            });
            _mint(owner(), index);
        }
    }

    function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) {
        NFTEntity storage nft = _nfts[tokenId];
        address[] memory users = usersOfNft[tokenId];
        (uint8 level, , ) = getNftLevelAndRewardRates(nft.amount);
        return INFTDescriptor(_descriptor).tokenURI(
            INFTDescriptor.ConstructTokenURIParams({
                tokenId: tokenId,
                level: level,
                tvl: nft.amount,
                lockers: users.length,
                ownerAddress: ownerOf(tokenId)
            })
        );
    }

    function createNFT(uint256 nftNumber, address _referrer) external payable nonReentrant whenStarted treasurySet {
        address sender = _msgSender();

        require(nftNumber > 0 && nftNumber < 101, "NFTManager: NFT Number should set between 1-100");
        require(mintPrice * nftNumber == msg.value, "NFTManager: msg.value == mint_price * number");

        for (uint256 index = 0; index < nftNumber; index++) {
            uint256 newNFTId = totalSupply() + 1;

            require(maxSupply >= newNFTId, "NFTManager: total supply can never exceed max supply");

            _nfts[newNFTId] = NFTEntity({
                id: newNFTId,
                amount: initialLockValue,
                lastProcessingTimestamp: block.timestamp,
                lastReward: 0
            });

            _mint(sender, newNFTId);
            totalValueLocked += initialLockValue;
        }

        address referrer = _referrer;
        if (_referrer == sender || _referrer.isContract()) {
            referrer = treasury.feeAddress();
        } else {
            uint256 nftAmount = nftReferralAmount[referrer][sender];
            if (nftAmount == 0) {
                address[] storage _referralUsers = nftReferralsOfUser[referrer];
                _referralUsers.push(sender);
            }
            nftReferralAmount[referrer][sender] = nftAmount + msg.value;
            totalNftReferralAmount += msg.value;
        }

        uint balance = address(this).balance;
        uint referralAmount = balance / 10;
        payable(treasury.feeAddress()).transfer(balance - referralAmount);
        payable(referrer).transfer(referralAmount);
    }

    function createNFTWhitelisted() external payable nonReentrant treasurySet {
        address sender = _msgSender();

        require(whitelist[sender], "NFTManager: not whitelisted");
        require(mintPriceWhitelisted == msg.value, "NFTManager: msg.value == mint_price");

        uint256 newNFTId = totalSupply() + 1;

        require(maxSupply >= newNFTId, "NFTManager: total supply can never exceed max supply");

        _nfts[newNFTId] = NFTEntity({
            id: newNFTId,
            amount: initialLockValue,
            lastProcessingTimestamp: block.timestamp,
            lastReward: 0
        });

        _mint(sender, newNFTId);
        totalValueLocked += initialLockValue;

        payable(treasury.feeAddress()).transfer(msg.value);

        whitelist[sender] = false;
    }

    function stakeTokens(uint256 _nftId, uint256 _amount, address _referrer) external nonReentrant whenStarted treasurySet {
        address sender = _msgSender();
        require(resource.balanceOf(sender) >= _amount, "NFTManager: Balance too low to stake");

        NFTEntity storage nft = _nfts[_nftId];

        UserInfo storage user = userInfo[_nftId][sender];

        if (user.amount > 0) {
            uint256 reward = _getNFTRewards(_nftId, sender, false);
            uint256 fee = (reward * processingFee) / 100;
            
            require(reward > 0, "NFTManager: no reward to compound");
            treasury.rewardByNFTOrChef(address(treasury), fee);
            totalValueLocked += reward;
        }

        if (_amount > 0) {
            if (user.amount == 0) {
                uint256[] storage _nftsOfUser = nftsOfUser[sender];
                _nftsOfUser.push(_nftId);
                address[] storage _usersOfNft = usersOfNft[_nftId];
                _usersOfNft.push(sender);
            }
            treasury.burnByNFTOrChef(sender, _amount);
            totalValueLocked += _amount;
            uint256 delayedTimestamp = block.timestamp - nft.lastProcessingTimestamp;
            ( , uint256 ownerRewardRate, ) = getNftLevelAndRewardRates(nft.amount);
            nft.lastReward += calculateRewardsFromValue(nft.amount, delayedTimestamp, ownerRewardRate);
            nft.amount += _amount;
            nft.lastProcessingTimestamp = block.timestamp;
            user.lastProcessingTimestamp = block.timestamp;
            user.amount += _amount;
            userTotalStakedAmount[sender] += _amount;

            address referrer = _referrer;
            if (_referrer == sender) {
                referrer = address(treasury);
            } else {
                uint256 stakedAmount = stakeReferralAmount[referrer][sender];
                if (stakedAmount == 0) {
                    address[] storage _referralUsers = stakeReferralsOfUser[referrer];
                    _referralUsers.push(sender);
                }
                stakeReferralAmount[referrer][sender] = stakedAmount + _amount;
                totalStakeReferralAmount += _amount;
            }
            treasury.rewardByNFTOrChef(referrer, _amount / 10);
        }
        treasury.addLiquidity();
    }

    function cashoutReward(uint256 _nftId, bool _swapping) external nonReentrant whenStarted treasurySet {
        address account = _msgSender();
        uint256 reward = _getNFTRewards(_nftId, account, true);
        _cashoutReward(reward, _swapping);
    }

    function cashoutAll(bool _swapping) external nonReentrant whenStarted treasurySet {
        address account = _msgSender();
        uint256 rewardsTotal = 0;

        uint256[] memory nfts = nftsOfUser[account];
        for (uint256 i = 0; i < nfts.length; i++) {
            rewardsTotal += _getNFTRewards(nfts[i], account, true);
        }
        uint256[] memory nftsOwned = getOwnedNFTIdsOf(account);
        for (uint256 i = 0; i < nftsOwned.length; i++) {
            rewardsTotal += _getNFTRewards(nftsOwned[i], account, true);
        }
        _cashoutReward(rewardsTotal, _swapping);
    }

    function _cashoutReward(uint256 amount, bool swapping) private {
        require(amount > 0, "NFTManager: no reward to claim");
        address to = _msgSender();
        uint256 feeAmount = (amount * processingFee) / 100;
        if (swapping) {
            treasury.swapTokenForETH(to, amount);
        } else {
            treasury.rewardByNFTOrChef(to, amount);
        }
        treasury.rewardByNFTOrChef(address(treasury), feeAmount);
        treasury.addLiquidity();
    }

    function compoundAll() external nonReentrant whenStarted treasurySet {
        address account = _msgSender();
        uint256 fees = 0;
        uint256 rewards = 0;
        uint256[] memory nfts = nftsOfUser[account];

        for (uint256 i = 0; i < nfts.length; i++) {
            uint256 reward = _getNFTRewards(nfts[i], account, false);
            uint256 fee = (reward * processingFee) / 100;
            if (reward > 0) {
                fees += fee;
                rewards += reward;
            }
        }

        require(rewards > 0, "NFTManager: no reward to compound");
        treasury.rewardByNFTOrChef(address(treasury), fees);
        totalValueLocked += rewards;
        treasury.addLiquidity();
    }

    function _getNFTRewards(uint256 _nftId, address _account, bool _cashout) private returns (uint256) {
        UserInfo storage user = userInfo[_nftId][_account];
        NFTEntity storage nft = _nfts[_nftId];

        uint256 userDelayedTimestamp = block.timestamp - user.lastProcessingTimestamp;
        uint256 nftDelayedTimestamp = block.timestamp - nft.lastProcessingTimestamp;

        uint256 userRewardRate = getUserRewardRate(user.amount);
        ( , uint256 ownerRewardRate, uint256 extraRewardRate) = getNftLevelAndRewardRates(nft.amount);

        uint256 reward = calculateRewardsFromValue(user.amount, userDelayedTimestamp, userRewardRate + extraRewardRate);
        uint256 ownerReward = calculateRewardsFromValue(nft.amount, nftDelayedTimestamp, ownerRewardRate);

        if (_cashout) {
            if (isOwnerOfNFT(_account, _nftId)) {
                reward += nft.lastReward + ownerReward;
                nft.lastReward = 0;
                nft.lastProcessingTimestamp = block.timestamp;
            }
        } else {
            user.amount += reward;
            userTotalStakedAmount[_account] += reward;
            nft.lastReward += ownerReward;
            nft.lastProcessingTimestamp = block.timestamp;
            nft.amount += reward;
        }

        user.lastProcessingTimestamp = block.timestamp;
        return reward;
    }

    function calculateRewardsFromValue(
        uint256 _amount,
        uint256 _duration,
        uint256 _rewardRate
    ) public pure returns (uint256) {
        return (_amount * _duration * _rewardRate) / 100000000000;
    }

    function getNftReferralsOfUser(address _account) external view returns (address[] memory) {
        return nftReferralsOfUser[_account];
    }

    function getStakeReferralsOfUser(address _account) external view returns (address[] memory) {
        return stakeReferralsOfUser[_account];
    }

    function isOwnerOfNFT(address account, uint256 _nftId) public view returns (bool) {
        return ownerOf(_nftId) == account;
    }

    function getUserRewardRate(uint256 _amount) public pure returns (uint256) {
        if (_amount >= 20000 * (10**18)) {
            return 28935; // 2.5%
        } else if (_amount >= 5000 * (10**18)) {
            return 25463; // 2.2%
        } else if (_amount >= 1000 * (10**18)) {
            return 24305; // 2.1%
        } else {
            return 23148; // 2.0%
        }
    }

    function getNftLevelAndRewardRates(uint256 _amount) public pure returns (uint8, uint256, uint256) {
        if (_amount >= 100000 * (10**18)) {
            return (3, 4051, 5787); // (0.35%, 0.5%)
        } else if (_amount >= 50000 * (10**18)) {
            return (2, 3588, 2315); // (0.31%, 0.2%)
        } else if (_amount >= 5000 * (10**18)) {
            return (1, 3241, 1157); // (0.28%, 0.1%)
        } else {
            return (0, 2894, 0); // (0.25%, 0%)
        }
    }

    function getOwnedNFTIdsOf(address account) public view returns (uint256[] memory) {
        uint256 numberOfNFTs = balanceOf(account);
        uint256[] memory nftIds = new uint256[](numberOfNFTs);
        for (uint256 i = 0; i < numberOfNFTs; i++) {
            uint256 nftId = tokenOfOwnerByIndex(account, i);
            nftIds[i] = nftId;
        }
        return nftIds;
    }

    function getAvailableNFTIdsOf(address account) external view returns (uint256[] memory) {
        uint256[] memory nftIds = nftsOfUser[account];
        return nftIds;
    }

    function getUsersOf(uint256[] memory _nftIds) external view returns (address[][] memory) {
        address[][] memory users_list = new address[][](_nftIds.length);
        for (uint256 i = 0; i < _nftIds.length; i++) {
            uint256 nftId = _nftIds[i];
            address[] memory users = usersOfNft[nftId];
            users_list[i] = users;
        }
        return users_list;
    }

    function getNFTsByIds(uint256[] memory _nftIds) external view returns (NFTEntity[] memory) {
        NFTEntity[] memory nftsInfo = new NFTEntity[](_nftIds.length);

        for (uint256 i = 0; i < _nftIds.length; i++) {
            uint256 nftId = _nftIds[i];
            NFTEntity memory nft = _nfts[nftId];
            nftsInfo[i] = nft;
        }
        return nftsInfo;
    }

    function setStartTime(uint256 _startTime) external onlyOwner {
        require(block.timestamp < startTime && block.timestamp < _startTime, "!_startTime!");
        startTime = _startTime;
    }

    function setTreasury(address _treasury) external onlyOwner {
        require(_treasury != address(0), "NFTManager: !_treasury");
        require(address(treasury) == address(0), "NFTManager: treasury");
        treasury = ITreasury(_treasury);
    }

    function changeMintPrice(uint256 _mintPrice) public onlyOwner {
        require(_mintPrice > 0 && _mintPrice <= 2 * 1e17, "NFTManager: !mintPrice!");
        mintPrice = _mintPrice;
    }

    function changeMintPriceWhitelisted(uint256 _mintPrice) public onlyOwner {
        require(_mintPrice > 0 && _mintPrice <= 2 * 1e17, "NFTManager: !mintPrice");
        mintPriceWhitelisted = _mintPrice;
    }

    function setWhitelisted(address[] memory accounts, bool status) external onlyOwner {
        for (uint256 i = 0; i < accounts.length; i++) {
            require(accounts[i] != address(0), "NFTManager: an account is 0");
            whitelist[accounts[i]] = status;
        }
    }

    function recoverLostETH() external onlyOwner {
        payable(owner()).transfer(address(this).balance);
    }

    function recoverLostTokens(
        address _token,
        address _to,
        uint256 _amount
    ) external onlyOwner {
        require(address(resource) != _token, "NFTManager: !resource");
        IERC20(_token).transfer(_to, _amount);
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "metadata": {
    "bytecodeHash": "none",
    "useLiteralContent": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_descriptor_","type":"address"},{"internalType":"address","name":"_resource","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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_rewardRate","type":"uint256"}],"name":"calculateRewardsFromValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bool","name":"_swapping","type":"bool"}],"name":"cashoutAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"bool","name":"_swapping","type":"bool"}],"name":"cashoutReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"}],"name":"changeMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"}],"name":"changeMintPriceWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"compoundAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftNumber","type":"uint256"},{"internalType":"address","name":"_referrer","type":"address"}],"name":"createNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"createNFTWhitelisted","outputs":[],"stateMutability":"payable","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":"account","type":"address"}],"name":"getAvailableNFTIdsOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_nftIds","type":"uint256[]"}],"name":"getNFTsByIds","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"lastProcessingTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastReward","type":"uint256"}],"internalType":"struct NFTManager.NFTEntity[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getNftLevelAndRewardRates","outputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getNftReferralsOfUser","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getOwnedNFTIdsOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getStakeReferralsOfUser","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getUserRewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_nftIds","type":"uint256[]"}],"name":"getUsersOf","outputs":[{"internalType":"address[][]","name":"","type":"address[][]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialLockValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"isOwnerOfNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPriceWhitelisted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"nftReferralAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftReferralsOfUser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftsOfUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"processingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recoverLostETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverLostTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resource","outputs":[{"internalType":"contract IResource","name":"","type":"address"}],"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":"uint256","name":"_startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"stakeReferralAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakeReferralsOfUser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_referrer","type":"address"}],"name":"stakeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","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":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalNftReferralAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakeReferralAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalValueLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"contract ITreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"lastProcessingTimestamp","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userTotalStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"usersOfNft","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a0604052600019601d553480156200001757600080fd5b506040516200652a3803806200652a8339810160408190526200003a916200085d565b604080518082018252600680825265556e69636f7760d01b60208084018290528451808601909552918452908301529060006200007883826200093a565b5060016200008782826200093a565b505050620000a46200009e6200018660201b60201c565b6200018a565b6001600b556001600160a01b03828116608052601b80546001600160a01b031916918316919091179055620000e167016345785d8a0000620001dc565b620000f366ee08251ff3800062000256565b60015b602181116200017d576040805160808101825282815260006020808301828152428486019081526060850184815287855260169093529490922092518355905160018301559151600282015590516003909101556200016862000161600a546001600160a01b031690565b82620002cc565b80620001748162000a1c565b915050620000f6565b50505062000a80565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001e66200046d565b600081118015620001ff57506702c68af0bb1400008111155b620002515760405162461bcd60e51b815260206004820152601760248201527f4e46544d616e616765723a20216d696e7450726963652100000000000000000060448201526064015b60405180910390fd5b601955565b620002606200046d565b6000811180156200027957506702c68af0bb1400008111155b620002c75760405162461bcd60e51b815260206004820152601660248201527f4e46544d616e616765723a20216d696e74507269636500000000000000000000604482015260640162000248565b601a55565b6001600160a01b038216620003245760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000248565b6000818152600260205260409020546001600160a01b0316156200038b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000248565b6200039b600083836001620004cb565b6000818152600260205260409020546001600160a01b031615620004025760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000248565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600a546001600160a01b03163314620004c95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000248565b565b6001811115620005445760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f727465640000000000000000000000606482015260840162000248565b816001600160a01b038516620005a3576200059d81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b620005c9565b836001600160a01b0316856001600160a01b031614620005c957620005c9858262000616565b6001600160a01b038416620005e957620005e381620006b8565b6200060f565b846001600160a01b0316846001600160a01b0316146200060f576200060f848262000772565b5050505050565b600060016200062584620007b8565b62000631919062000a38565b60008381526007602052604090205490915080821462000685576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090620006cc9060019062000a38565b60008381526009602052604081205460088054939450909284908110620006f757620006f762000a54565b9060005260206000200154905080600883815481106200071b576200071b62000a54565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548062000756576200075662000a6a565b6001900381819060005260206000200160009055905550505050565b60006200077f83620007b8565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b038216620008245760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840162000248565b506001600160a01b031660009081526003602052604090205490565b80516001600160a01b03811681146200085857600080fd5b919050565b600080604083850312156200087157600080fd5b6200087c8362000840565b91506200088c6020840162000840565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620008c057607f821691505b602082108103620008e157634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200093557600081815260208120601f850160051c81016020861015620009105750805b601f850160051c820191505b8181101562000931578281556001016200091c565b5050505b505050565b81516001600160401b0381111562000956576200095662000895565b6200096e81620009678454620008ab565b84620008e7565b602080601f831160018114620009a657600084156200098d5750858301515b600019600386901b1c1916600185901b17855562000931565b600085815260208120601f198616915b82811015620009d757888601518255948401946001909101908401620009b6565b5085821015620009f65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b60006001820162000a315762000a3162000a06565b5060010190565b8181038181111562000a4e5762000a4e62000a06565b92915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b608051615a8e62000a9c600039600061343c0152615a8e6000f3fe6080604052600436106103a65760003560e01c8063715018a6116101e7578063bbcc500a1161010d578063e985e9c5116100a0578063f2fde38b1161006f578063f2fde38b14610b68578063f3c4b70414610b88578063f63952dd14610ba8578063faf254b014610bd557600080fd5b8063e985e9c514610abc578063ebcda6f914610b12578063ec18154e14610b32578063f0f4426014610b4857600080fd5b8063d6685f0f116100dc578063d6685f0f14610a51578063ddce749714610a67578063de1881a814610a87578063e1781cec14610a9c57600080fd5b8063bbcc500a146109c3578063bee793e9146109fb578063c87b56dd14610a1b578063d5abeb0114610a3b57600080fd5b806395d89b4111610185578063a065546511610154578063a065546514610943578063a22cb46514610963578063a522aa8914610983578063b88d4fde146109a357600080fd5b806395d89b41146108d957806395e92c15146108ee5780639b05ddb31461090e5780639b6305ca1461092357600080fd5b80638da5cb5b116101c15780638da5cb5b146108245780638de6ff281461084f57806390ff489b1461086f57806393f1a40b1461088557600080fd5b8063715018a6146107e357806378e97925146107f85780638a7906991461080e57600080fd5b80633e0a322d116102cc578063599a46771161026a5780636352211e116102395780636352211e1461076d57806367dbd3411461078d5780636817c76c146107ad57806370a08231146107c357600080fd5b8063599a4677146106d35780635ed43cf1146106f357806361d027b31461072057806361dec3541461074d57600080fd5b806342842e0e116102a657806342842e0e146106345780634c7f2dfb146106545780634eee860a146106935780634f6ccce7146106b357600080fd5b80633e0a322d146105ec5780633fd173661461060c5780633fd397f61461062c57600080fd5b80631be2f1f5116103445780632ecf44df116103135780632ecf44df1461056a5780632f745c591461058a578063302f627d146105aa5780633a63d886146105bf57600080fd5b80631be2f1f5146104d357806323b872dd146104f05780632b3b1e0a146105105780632da9d6821461053d57600080fd5b8063081812fc11610380578063081812fc1461043a578063095ea7b31461047f57806311407ed8146104a157806318160ddd146104b457600080fd5b8063016ae931146103b257806301ffc9a7146103e857806306fdde031461041857600080fd5b366103ad57005b600080fd5b3480156103be57600080fd5b506103d26103cd366004615106565b610c0d565b6040516103df919061519c565b60405180910390f35b3480156103f457600080fd5b5061040861040336600461522e565b610d38565b60405190151581526020016103df565b34801561042457600080fd5b5061042d610d94565b6040516103df91906152c0565b34801561044657600080fd5b5061045a6104553660046152d3565b610e26565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103df565b34801561048b57600080fd5b5061049f61049a36600461530e565b610e5a565b005b61049f6104af36600461533a565b610feb565b3480156104c057600080fd5b506008545b6040519081526020016103df565b3480156104df57600080fd5b506104c5686c6b935b8bbd40000081565b3480156104fc57600080fd5b5061049f61050b36600461536a565b611679565b34801561051c57600080fd5b5061053061052b3660046153ab565b61171a565b6040516103df91906153c8565b34801561054957600080fd5b5061055d6105583660046153ab565b611793565b6040516103df919061545d565b34801561057657600080fd5b5061055d6105853660046153ab565b611823565b34801561059657600080fd5b506104c56105a536600461530e565b6118b1565b3480156105b657600080fd5b5061049f611980565b3480156105cb57600080fd5b50601b5461045a9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105f857600080fd5b5061049f6106073660046152d3565b6119d1565b34801561061857600080fd5b5061049f6106273660046152d3565b611a54565b61049f611adf565b34801561064057600080fd5b5061049f61064f36600461536a565b611eca565b34801561066057600080fd5b5061067461066f3660046152d3565b611ee5565b6040805160ff90941684526020840192909252908201526060016103df565b34801561069f57600080fd5b5061045a6106ae36600461530e565b611f66565b3480156106bf57600080fd5b506104c56106ce3660046152d3565b611fab565b3480156106df57600080fd5b506104c56106ee3660046152d3565b612069565b3480156106ff57600080fd5b506104c561070e3660046153ab565b600c6020526000908152604090205481565b34801561072c57600080fd5b50601c5461045a9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561075957600080fd5b5061049f61076836600461536a565b6120c6565b34801561077957600080fd5b5061045a6107883660046152d3565b6121f1565b34801561079957600080fd5b506104c56107a8366004615470565b61227d565b3480156107b957600080fd5b506104c560195481565b3480156107cf57600080fd5b506104c56107de3660046153ab565b6122ac565b3480156107ef57600080fd5b5061049f61237a565b34801561080457600080fd5b506104c5601d5481565b34801561081a57600080fd5b506104c560145481565b34801561083057600080fd5b50600a5473ffffffffffffffffffffffffffffffffffffffff1661045a565b34801561085b57600080fd5b5061045a61086a36600461549c565b61238c565b34801561087b57600080fd5b506104c560155481565b34801561089157600080fd5b506108c46108a036600461533a565b600d6020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016103df565b3480156108e557600080fd5b5061042d6123a8565b3480156108fa57600080fd5b506104c561090936600461530e565b6123b7565b34801561091a57600080fd5b5061049f6123e8565b34801561092f57600080fd5b5061049f61093e3660046154d7565b612783565b34801561094f57600080fd5b5061049f61095e3660046154f4565b612995565b34801561096f57600080fd5b5061049f61097e366004615519565b612aae565b34801561098f57600080fd5b5061045a61099e36600461530e565b612ab9565b3480156109af57600080fd5b5061049f6109be36600461558d565b612ad5565b3480156109cf57600080fd5b506104c56109de366004615637565b601160209081526000928352604080842090915290825290205481565b348015610a0757600080fd5b5061049f610a16366004615665565b612b77565b348015610a2757600080fd5b5061042d610a363660046152d3565b6133a9565b348015610a4757600080fd5b506104c561014d81565b348015610a5d57600080fd5b506104c5601a5481565b348015610a7357600080fd5b50610530610a823660046153ab565b613594565b348015610a9357600080fd5b506104c5600a81565b348015610aa857600080fd5b50610408610ab736600461530e565b61363c565b348015610ac857600080fd5b50610408610ad7366004615637565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610b1e57600080fd5b5061049f610b2d3660046152d3565b61367c565b348015610b3e57600080fd5b506104c560185481565b348015610b5457600080fd5b5061049f610b633660046153ab565b613707565b348015610b7457600080fd5b5061049f610b833660046153ab565b613853565b348015610b9457600080fd5b5061049f610ba336600461569e565b613907565b348015610bb457600080fd5b50610bc8610bc3366004615106565b613a50565b6040516103df919061574a565b348015610be157600080fd5b506104c5610bf0366004615637565b601060209081526000928352604080842090915290825290205481565b60606000825167ffffffffffffffff811115610c2b57610c2b615064565b604051908082528060200260200182016040528015610c8757816020015b610c746040518060800160405280600081526020016000815260200160008152602001600081525090565b815260200190600190039081610c495790505b50905060005b8351811015610d31576000848281518110610caa57610caa6157ca565b60200260200101519050600060166000838152602001908152602001600020604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050905080848481518110610d1157610d116157ca565b602002602001018190525050508080610d2990615828565b915050610c8d565b5092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610d8e5750610d8e82613b7e565b92915050565b606060008054610da390615860565b80601f0160208091040260200160405190810160405280929190818152602001828054610dcf90615860565b8015610e1c5780601f10610df157610100808354040283529160200191610e1c565b820191906000526020600020905b815481529060010190602001808311610dff57829003601f168201915b5050505050905090565b6000610e3182613c61565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610e65826121f1565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff82161480610f505750610f508133610ad7565b610fdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610f1e565b610fe68383613cec565b505050565b610ff3613d8c565b42601d541061105e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff166110dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b3382158015906110ed5750606583105b611179576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4e46544d616e616765723a204e4654204e756d6265722073686f756c6420736560448201527f74206265747765656e20312d31303000000000000000000000000000000000006064820152608401610f1e565b348360195461118891906158b3565b14611215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4e46544d616e616765723a206d73672e76616c7565203d3d206d696e745f707260448201527f696365202a206e756d62657200000000000000000000000000000000000000006064820152608401610f1e565b60005b8381101561135e57600061122b60085490565b6112369060016158ca565b90508061014d10156112ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4e46544d616e616765723a20746f74616c20737570706c792063616e206e657660448201527f657220657863656564206d617820737570706c790000000000000000000000006064820152608401610f1e565b60408051608081018252828152686c6b935b8bbd40000060208083019182524283850190815260006060850181815287825260169093529490942092518355905160018301559151600282015590516003909101556113298382613dff565b686c6b935b8bbd4000006018600082825461134491906158ca565b90915550829150611356905081615828565b915050611218565b508173ffffffffffffffffffffffffffffffffffffffff808216908316148061139d575073ffffffffffffffffffffffffffffffffffffffff83163b15155b1561143a57601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663412753586040518163ffffffff1660e01b8152600401602060405180830381865afa15801561140f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143391906158dd565b9050611536565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152601160209081526040808320938616835292905290812054908190036114db5773ffffffffffffffffffffffffffffffffffffffff82811660009081526012602090815260408220805460018101825590835291200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169185169190911790555b6114e534826158ca565b73ffffffffffffffffffffffffffffffffffffffff80841660009081526011602090815260408083209388168352929052908120919091556015805434929061152f9084906158ca565b9091555050505b476000611544600a836158fa565b9050601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663412753586040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d791906158dd565b73ffffffffffffffffffffffffffffffffffffffff166108fc6115fa8385615935565b6040518115909202916000818181858888f19350505050158015611622573d6000803e3d6000fd5b5060405173ffffffffffffffffffffffffffffffffffffffff84169082156108fc029083906000818181858888f19350505050158015611666573d6000803e3d6000fd5b50505050506116756001600b55565b5050565b6116833382614032565b61170f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610f1e565b610fe68383836140f1565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600e6020908152604080832080548251818502810185019093528083526060949383018282801561178657602002820191906000526020600020905b815481526020019060010190808311611772575b5093979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526012602090815260409182902080548351818402810184019094528084526060939283018282801561181757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116117ec575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601360209081526040918290208054835181840281018401909452808452606093928301828280156118175760200282019190600052602060002090815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116117ec5750505050509050919050565b60006118bc836122ac565b821061194a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610f1e565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205490565b6119886143f9565b600a5460405173ffffffffffffffffffffffffffffffffffffffff909116904780156108fc02916000818181858888f193505050501580156119ce573d6000803e3d6000fd5b50565b6119d96143f9565b601d54421080156119e957508042105b611a4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f215f737461727454696d652100000000000000000000000000000000000000006044820152606401610f1e565b601d55565b611a5c6143f9565b600081118015611a7457506702c68af0bb1400008111155b611ada576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a20216d696e745072696365210000000000000000006044820152606401610f1e565b601955565b611ae7613d8c565b601c5473ffffffffffffffffffffffffffffffffffffffff16611b66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b3360008181526017602052604090205460ff16611bdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e46544d616e616765723a206e6f742077686974656c697374656400000000006044820152606401610f1e565b34601a5414611c70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4e46544d616e616765723a206d73672e76616c7565203d3d206d696e745f707260448201527f69636500000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b6000611c7b60085490565b611c869060016158ca565b90508061014d1015611d1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4e46544d616e616765723a20746f74616c20737570706c792063616e206e657660448201527f657220657863656564206d617820737570706c790000000000000000000000006064820152608401610f1e565b60408051608081018252828152686c6b935b8bbd4000006020808301918252428385019081526000606085018181528782526016909352949094209251835590516001830155915160028201559051600390910155611d798282613dff565b686c6b935b8bbd40000060186000828254611d9491906158ca565b9091555050601c54604080517f41275358000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216916341275358916004808201926020929091908290030181865afa158015611e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2d91906158dd565b73ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015611e72573d6000803e3d6000fd5b505073ffffffffffffffffffffffffffffffffffffffff16600090815260176020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055611ec86001600b55565b565b610fe683838360405180602001604052806000815250612ad5565b600080600069152d02c7e14af68000008410611f0d575060039150610fd3905061169b611f5f565b690a968163f0a57b4000008410611f30575060029150610e04905061090b611f5f565b69010f0cf064dd592000008410611f53575060019150610ca99050610485611f5f565b5060009150610b4e9050815b9193909250565b60136020528160005260406000208181548110611f8257600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169150829050565b6000611fb660085490565b8210612044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610f1e565b60088281548110612057576120576157ca565b90600052602060002001549050919050565b600069043c33c193756480000082106120855750617107919050565b69010f0cf064dd59200000821061209f5750616377919050565b683635c9adc5dea0000082106120b85750615ef1919050565b50615a6c919050565b919050565b6120ce6143f9565b601b5473ffffffffffffffffffffffffffffffffffffffff808516911603612152576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e46544d616e616765723a20217265736f7572636500000000000000000000006044820152606401610f1e565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af11580156121c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121eb9190615948565b50505050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610d8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610f1e565b600064174876e8008261229085876158b3565b61229a91906158b3565b6122a491906158fa565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff8216612351576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610f1e565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6123826143f9565b611ec8600061447a565b600f6020528160005260406000208181548110611f8257600080fd5b606060018054610da390615860565b600e60205281600052604060002081815481106123d357600080fd5b90600052602060002001600091509150505481565b6123f0613d8c565b42601d541061245b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff166124da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b336000818152600e6020908152604080832080548251818502810185019093528083528493849392919083018282801561253357602002820191906000526020600020905b81548152602001906001019080831161251f575b5050505050905060005b81518110156125be57600061256d83838151811061255d5761255d6157ca565b60200260200101518760006144f1565b90506000606461257e600a846158b3565b61258891906158fa565b905081156125a95761259a81876158ca565b95506125a682866158ca565b94505b505080806125b690615828565b91505061253d565b506000821161264f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4e46544d616e616765723a206e6f2072657761726420746f20636f6d706f756e60448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b601c546040517f65f0a55600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820181905260248201859052906365f0a55690604401600060405180830381600087803b1580156126c257600080fd5b505af11580156126d6573d6000803e3d6000fd5b5050505081601860008282546126ec91906158ca565b9091555050601c54604080517fe8078d94000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169163e8078d949160048082019260009290919082900301818387803b15801561275d57600080fd5b505af1158015612771573d6000803e3d6000fd5b5050505050505050611ec86001600b55565b61278b613d8c565b42601d54106127f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff16612875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b336000818152600e60209081526040808320805482518185028101850190935280835284938301828280156128c957602002820191906000526020600020905b8154815260200190600101908083116128b5575b5050505050905060005b815181101561291f576129018282815181106128f1576128f16157ca565b60200260200101518560016144f1565b61290b90846158ca565b92508061291781615828565b9150506128d3565b50600061292b84613594565b905060005b815181101561297c5761295e82828151811061294e5761294e6157ca565b60200260200101518660016144f1565b61296890856158ca565b93508061297481615828565b915050612930565b506129878386614689565b505050506119ce6001600b55565b61299d613d8c565b42601d5410612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff16612a87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b336000612a96848360016144f1565b9050612aa28184614689565b50506116756001600b55565b611675338383614946565b60126020528160005260406000208181548110611f8257600080fd5b612adf3383614032565b612b6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610f1e565b6121eb84848484614a73565b612b7f613d8c565b42601d5410612bea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff16612c69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b600033601b546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80841660048301529293508592909116906370a0823190602401602060405180830381865afa158015612ce1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d059190615965565b1015612d92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4e46544d616e616765723a2042616c616e636520746f6f206c6f7720746f207360448201527f74616b65000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b6000848152601660209081526040808320600d835281842073ffffffffffffffffffffffffffffffffffffffff86168552909252909120600181015415612f33576000612de1878560006144f1565b905060006064612df2600a846158b3565b612dfc91906158fa565b905060008211612e8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4e46544d616e616765723a206e6f2072657761726420746f20636f6d706f756e60448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b601c546040517f65f0a55600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820181905260248201839052906365f0a55690604401600060405180830381600087803b158015612f0157600080fd5b505af1158015612f15573d6000803e3d6000fd5b505050508160186000828254612f2b91906158ca565b909155505050505b841561331a578060010154600003612fc05773ffffffffffffffffffffffffffffffffffffffff83166000818152600e60209081526040808320805460018181018355918552838520018b90558a8452600f835290832080549182018155835291200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690911790555b601c546040517fde5bb65700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018890529091169063de5bb65790604401600060405180830381600087803b15801561303457600080fd5b505af1158015613048573d6000803e3d6000fd5b50505050846018600082825461305e91906158ca565b909155505060028201546000906130759042615935565b905060006130868460010154611ee5565b509150506130998460010154838361227d565b8460030160008282546130ac91906158ca565b92505081905550868460010160008282546130c791906158ca565b9091555050426002850181905583556001830180548891906000906130ed9084906158ca565b909155505073ffffffffffffffffffffffffffffffffffffffff85166000908152600c6020526040812080548992906131279084906158ca565b9091555086905073ffffffffffffffffffffffffffffffffffffffff8087169082160361316d5750601c5473ffffffffffffffffffffffffffffffffffffffff16613269565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152601060209081526040808320938a168352929052908120549081900361320e5773ffffffffffffffffffffffffffffffffffffffff82811660009081526013602090815260408220805460018101825590835291200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169189169190911790555b61321889826158ca565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152601060209081526040808320938c16835292905290812091909155601480548b92906132629084906158ca565b9091555050505b601c5473ffffffffffffffffffffffffffffffffffffffff166365f0a55682613293600a8c6158fa565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b1580156132fe57600080fd5b505af1158015613312573d6000803e3d6000fd5b505050505050505b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e8078d946040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561338457600080fd5b505af1158015613398573d6000803e3d6000fd5b50505050505050610fe66001600b55565b6000818152601660209081526040808320600f83528184208054835181860281018601909452808452606095929492939283018282801561342057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116133f5575b5050505050905060006134368360010154611ee5565b505090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16630e3e5b4b6040518060a001604052808881526020018460ff16815260200186600101548152602001855181526020016134aa896121f1565b73ffffffffffffffffffffffffffffffffffffffff908116909152604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815283516004820152602084015160ff1660248201529083015160448201526060830151606482015260809092015116608482015260a401600060405180830381865afa158015613545573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261358b919081019061597e565b95945050505050565b606060006135a1836122ac565b905060008167ffffffffffffffff8111156135be576135be615064565b6040519080825280602002602001820160405280156135e7578160200160208202803683370190505b50905060005b8281101561363457600061360186836118b1565b905080838381518110613616576136166157ca565b6020908102919091010152508061362c81615828565b9150506135ed565b509392505050565b60008273ffffffffffffffffffffffffffffffffffffffff1661365e836121f1565b73ffffffffffffffffffffffffffffffffffffffff16149392505050565b6136846143f9565b60008111801561369c57506702c68af0bb1400008111155b613702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e46544d616e616765723a20216d696e745072696365000000000000000000006044820152606401610f1e565b601a55565b61370f6143f9565b73ffffffffffffffffffffffffffffffffffffffff811661378c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e46544d616e616765723a20215f7472656173757279000000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff161561380c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e46544d616e616765723a2074726561737572790000000000000000000000006044820152606401610f1e565b601c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61385b6143f9565b73ffffffffffffffffffffffffffffffffffffffff81166138fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f1e565b6119ce8161447a565b61390f6143f9565b60005b8251811015610fe657600073ffffffffffffffffffffffffffffffffffffffff16838281518110613945576139456157ca565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036139ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e46544d616e616765723a20616e206163636f756e74206973203000000000006044820152606401610f1e565b81601760008584815181106139e1576139e16157ca565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905580613a4881615828565b915050613912565b60606000825167ffffffffffffffff811115613a6e57613a6e615064565b604051908082528060200260200182016040528015613aa157816020015b6060815260200190600190039081613a8c5790505b50905060005b8351811015610d31576000848281518110613ac457613ac46157ca565b602002602001015190506000600f6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015613b4457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311613b19575b5050505050905080848481518110613b5e57613b5e6157ca565b602002602001018190525050508080613b7690615828565b915050613aa7565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480613c1157507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610d8e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610d8e565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff166119ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610f1e565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190613d46826121f1565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6002600b5403613df8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f1e565b6002600b55565b73ffffffffffffffffffffffffffffffffffffffff8216613e7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610f1e565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613f08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610f1e565b613f16600083836001614b16565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613fa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610f1e565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260036020908152604080832080546001019055848352600290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008061403e836121f1565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806140ac575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b806122a457508373ffffffffffffffffffffffffffffffffffffffff166140d284610e26565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16614111826121f1565b73ffffffffffffffffffffffffffffffffffffffff16146141b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610f1e565b73ffffffffffffffffffffffffffffffffffffffff8216614256576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b6142638383836001614b16565b8273ffffffffffffffffffffffffffffffffffffffff16614283826121f1565b73ffffffffffffffffffffffffffffffffffffffff1614614326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610f1e565b600081815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526003855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611ec8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f1e565b600a805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000838152600d6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452825280832086845260169092528220815483906145389042615935565b9050600082600201544261454c9190615935565b9050600061455d8560010154612069565b905060008061456f8660010154611ee5565b9250925050600061458b88600101548784876107a891906158ca565b9050600061459e8860010154878661227d565b90508a156145e4576145b08c8e61363c565b156145df578088600301546145c591906158ca565b6145cf90836158ca565b600060038a01554260028a015591505b614675565b818960010160008282546145f891906158ca565b909155505073ffffffffffffffffffffffffffffffffffffffff8c166000908152600c6020526040812080548492906146329084906158ca565b925050819055508088600301600082825461464d91906158ca565b909155505042600289015560018801805483919060009061466f9084906158ca565b90915550505b504290975550949998505050505050505050565b600082116146f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e46544d616e616765723a206e6f2072657761726420746f20636c61696d00006044820152606401610f1e565b3360006064614703600a866158b3565b61470d91906158fa565b905082156147a657601c546040517f6a42d90600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820187905290911690636a42d90690604401600060405180830381600087803b15801561478957600080fd5b505af115801561479d573d6000803e3d6000fd5b50505050614833565b601c546040517f65f0a55600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201879052909116906365f0a55690604401600060405180830381600087803b15801561481a57600080fd5b505af115801561482e573d6000803e3d6000fd5b505050505b601c546040517f65f0a55600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820181905260248201839052906365f0a55690604401600060405180830381600087803b1580156148a657600080fd5b505af11580156148ba573d6000803e3d6000fd5b50505050601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e8078d946040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561492857600080fd5b505af115801561493c573d6000803e3d6000fd5b5050505050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036149db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610f1e565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b614a7e8484846140f1565b614a8a84848484614cba565b6121eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610f1e565b6001811115614ba7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f7274656400000000000000000000006064820152608401610f1e565b8173ffffffffffffffffffffffffffffffffffffffff8516614c1057614c0b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b614c4d565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614614c4d57614c4d8582614ead565b73ffffffffffffffffffffffffffffffffffffffff8416614c7657614c7181614f64565b614cb3565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614614cb357614cb38482615013565b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15614ea2576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290614d319033908990889088906004016159ec565b6020604051808303816000875af1925050508015614d8a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252614d8791810190615a35565b60015b614e57573d808015614db8576040519150601f19603f3d011682016040523d82523d6000602084013e614dbd565b606091505b508051600003614e4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610f1e565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506122a4565b506001949350505050565b60006001614eba846122ac565b614ec49190615935565b600083815260076020526040902054909150808214614f245773ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b50600091825260076020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600681528383209183525290812055565b600854600090614f7690600190615935565b60008381526009602052604081205460088054939450909284908110614f9e57614f9e6157ca565b906000526020600020015490508060088381548110614fbf57614fbf6157ca565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614ff757614ff7615a52565b6001900381819060005260206000200160009055905550505050565b600061501e836122ac565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156150da576150da615064565b604052919050565b600067ffffffffffffffff8211156150fc576150fc615064565b5060051b60200190565b6000602080838503121561511957600080fd5b823567ffffffffffffffff81111561513057600080fd5b8301601f8101851361514157600080fd5b803561515461514f826150e2565b615093565b81815260059190911b8201830190838101908783111561517357600080fd5b928401925b8284101561519157833582529284019290840190615178565b979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156151f3578151805185528681015187860152858101518686015260609081015190850152608090930192908501906001016151b9565b5091979650505050505050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146119ce57600080fd5b60006020828403121561524057600080fd5b813561524b81615200565b9392505050565b60005b8381101561526d578181015183820152602001615255565b50506000910152565b6000815180845261528e816020860160208601615252565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061524b6020830184615276565b6000602082840312156152e557600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146119ce57600080fd5b6000806040838503121561532157600080fd5b823561532c816152ec565b946020939093013593505050565b6000806040838503121561534d57600080fd5b82359150602083013561535f816152ec565b809150509250929050565b60008060006060848603121561537f57600080fd5b833561538a816152ec565b9250602084013561539a816152ec565b929592945050506040919091013590565b6000602082840312156153bd57600080fd5b813561524b816152ec565b6020808252825182820181905260009190848201906040850190845b81811015615400578351835292840192918401916001016153e4565b50909695505050505050565b600081518084526020808501945080840160005b8381101561545257815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101615420565b509495945050505050565b60208152600061524b602083018461540c565b60008060006060848603121561548557600080fd5b505081359360208301359350604090920135919050565b600080604083850312156154af57600080fd5b50508035926020909101359150565b80151581146119ce57600080fd5b80356120c1816154be565b6000602082840312156154e957600080fd5b813561524b816154be565b6000806040838503121561550757600080fd5b82359150602083013561535f816154be565b6000806040838503121561552c57600080fd5b8235615537816152ec565b9150602083013561535f816154be565b600067ffffffffffffffff82111561556157615561615064565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600080600080608085870312156155a357600080fd5b84356155ae816152ec565b935060208501356155be816152ec565b925060408501359150606085013567ffffffffffffffff8111156155e157600080fd5b8501601f810187136155f257600080fd5b803561560061514f82615547565b81815288602083850101111561561557600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b6000806040838503121561564a57600080fd5b8235615655816152ec565b9150602083013561535f816152ec565b60008060006060848603121561567a57600080fd5b83359250602084013591506040840135615693816152ec565b809150509250925092565b600080604083850312156156b157600080fd5b823567ffffffffffffffff8111156156c857600080fd5b8301601f810185136156d957600080fd5b803560206156e961514f836150e2565b82815260059290921b8301810191818101908884111561570857600080fd5b938201935b8385101561572f578435615720816152ec565b8252938201939082019061570d565b955061573e90508682016154cc565b93505050509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156157bd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526157ab85835161540c565b94509285019290850190600101615771565b5092979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615859576158596157f9565b5060010190565b600181811c9082168061587457607f821691505b6020821081036158ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8082028115828204841417610d8e57610d8e6157f9565b80820180821115610d8e57610d8e6157f9565b6000602082840312156158ef57600080fd5b815161524b816152ec565b600082615930577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b81810381811115610d8e57610d8e6157f9565b60006020828403121561595a57600080fd5b815161524b816154be565b60006020828403121561597757600080fd5b5051919050565b60006020828403121561599057600080fd5b815167ffffffffffffffff8111156159a757600080fd5b8201601f810184136159b857600080fd5b80516159c661514f82615547565b8181528560208385010111156159db57600080fd5b61358b826020830160208601615252565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152615a2b6080830184615276565b9695505050505050565b600060208284031215615a4757600080fd5b815161524b81615200565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000815000a00000000000000000000000072a6287bfd6ac82b034972e0fea4dbefcbd065af000000000000000000000000117908e5fbc5f77daf07d4263ba79ee810b092f4

Deployed Bytecode

0x6080604052600436106103a65760003560e01c8063715018a6116101e7578063bbcc500a1161010d578063e985e9c5116100a0578063f2fde38b1161006f578063f2fde38b14610b68578063f3c4b70414610b88578063f63952dd14610ba8578063faf254b014610bd557600080fd5b8063e985e9c514610abc578063ebcda6f914610b12578063ec18154e14610b32578063f0f4426014610b4857600080fd5b8063d6685f0f116100dc578063d6685f0f14610a51578063ddce749714610a67578063de1881a814610a87578063e1781cec14610a9c57600080fd5b8063bbcc500a146109c3578063bee793e9146109fb578063c87b56dd14610a1b578063d5abeb0114610a3b57600080fd5b806395d89b4111610185578063a065546511610154578063a065546514610943578063a22cb46514610963578063a522aa8914610983578063b88d4fde146109a357600080fd5b806395d89b41146108d957806395e92c15146108ee5780639b05ddb31461090e5780639b6305ca1461092357600080fd5b80638da5cb5b116101c15780638da5cb5b146108245780638de6ff281461084f57806390ff489b1461086f57806393f1a40b1461088557600080fd5b8063715018a6146107e357806378e97925146107f85780638a7906991461080e57600080fd5b80633e0a322d116102cc578063599a46771161026a5780636352211e116102395780636352211e1461076d57806367dbd3411461078d5780636817c76c146107ad57806370a08231146107c357600080fd5b8063599a4677146106d35780635ed43cf1146106f357806361d027b31461072057806361dec3541461074d57600080fd5b806342842e0e116102a657806342842e0e146106345780634c7f2dfb146106545780634eee860a146106935780634f6ccce7146106b357600080fd5b80633e0a322d146105ec5780633fd173661461060c5780633fd397f61461062c57600080fd5b80631be2f1f5116103445780632ecf44df116103135780632ecf44df1461056a5780632f745c591461058a578063302f627d146105aa5780633a63d886146105bf57600080fd5b80631be2f1f5146104d357806323b872dd146104f05780632b3b1e0a146105105780632da9d6821461053d57600080fd5b8063081812fc11610380578063081812fc1461043a578063095ea7b31461047f57806311407ed8146104a157806318160ddd146104b457600080fd5b8063016ae931146103b257806301ffc9a7146103e857806306fdde031461041857600080fd5b366103ad57005b600080fd5b3480156103be57600080fd5b506103d26103cd366004615106565b610c0d565b6040516103df919061519c565b60405180910390f35b3480156103f457600080fd5b5061040861040336600461522e565b610d38565b60405190151581526020016103df565b34801561042457600080fd5b5061042d610d94565b6040516103df91906152c0565b34801561044657600080fd5b5061045a6104553660046152d3565b610e26565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103df565b34801561048b57600080fd5b5061049f61049a36600461530e565b610e5a565b005b61049f6104af36600461533a565b610feb565b3480156104c057600080fd5b506008545b6040519081526020016103df565b3480156104df57600080fd5b506104c5686c6b935b8bbd40000081565b3480156104fc57600080fd5b5061049f61050b36600461536a565b611679565b34801561051c57600080fd5b5061053061052b3660046153ab565b61171a565b6040516103df91906153c8565b34801561054957600080fd5b5061055d6105583660046153ab565b611793565b6040516103df919061545d565b34801561057657600080fd5b5061055d6105853660046153ab565b611823565b34801561059657600080fd5b506104c56105a536600461530e565b6118b1565b3480156105b657600080fd5b5061049f611980565b3480156105cb57600080fd5b50601b5461045a9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105f857600080fd5b5061049f6106073660046152d3565b6119d1565b34801561061857600080fd5b5061049f6106273660046152d3565b611a54565b61049f611adf565b34801561064057600080fd5b5061049f61064f36600461536a565b611eca565b34801561066057600080fd5b5061067461066f3660046152d3565b611ee5565b6040805160ff90941684526020840192909252908201526060016103df565b34801561069f57600080fd5b5061045a6106ae36600461530e565b611f66565b3480156106bf57600080fd5b506104c56106ce3660046152d3565b611fab565b3480156106df57600080fd5b506104c56106ee3660046152d3565b612069565b3480156106ff57600080fd5b506104c561070e3660046153ab565b600c6020526000908152604090205481565b34801561072c57600080fd5b50601c5461045a9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561075957600080fd5b5061049f61076836600461536a565b6120c6565b34801561077957600080fd5b5061045a6107883660046152d3565b6121f1565b34801561079957600080fd5b506104c56107a8366004615470565b61227d565b3480156107b957600080fd5b506104c560195481565b3480156107cf57600080fd5b506104c56107de3660046153ab565b6122ac565b3480156107ef57600080fd5b5061049f61237a565b34801561080457600080fd5b506104c5601d5481565b34801561081a57600080fd5b506104c560145481565b34801561083057600080fd5b50600a5473ffffffffffffffffffffffffffffffffffffffff1661045a565b34801561085b57600080fd5b5061045a61086a36600461549c565b61238c565b34801561087b57600080fd5b506104c560155481565b34801561089157600080fd5b506108c46108a036600461533a565b600d6020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016103df565b3480156108e557600080fd5b5061042d6123a8565b3480156108fa57600080fd5b506104c561090936600461530e565b6123b7565b34801561091a57600080fd5b5061049f6123e8565b34801561092f57600080fd5b5061049f61093e3660046154d7565b612783565b34801561094f57600080fd5b5061049f61095e3660046154f4565b612995565b34801561096f57600080fd5b5061049f61097e366004615519565b612aae565b34801561098f57600080fd5b5061045a61099e36600461530e565b612ab9565b3480156109af57600080fd5b5061049f6109be36600461558d565b612ad5565b3480156109cf57600080fd5b506104c56109de366004615637565b601160209081526000928352604080842090915290825290205481565b348015610a0757600080fd5b5061049f610a16366004615665565b612b77565b348015610a2757600080fd5b5061042d610a363660046152d3565b6133a9565b348015610a4757600080fd5b506104c561014d81565b348015610a5d57600080fd5b506104c5601a5481565b348015610a7357600080fd5b50610530610a823660046153ab565b613594565b348015610a9357600080fd5b506104c5600a81565b348015610aa857600080fd5b50610408610ab736600461530e565b61363c565b348015610ac857600080fd5b50610408610ad7366004615637565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610b1e57600080fd5b5061049f610b2d3660046152d3565b61367c565b348015610b3e57600080fd5b506104c560185481565b348015610b5457600080fd5b5061049f610b633660046153ab565b613707565b348015610b7457600080fd5b5061049f610b833660046153ab565b613853565b348015610b9457600080fd5b5061049f610ba336600461569e565b613907565b348015610bb457600080fd5b50610bc8610bc3366004615106565b613a50565b6040516103df919061574a565b348015610be157600080fd5b506104c5610bf0366004615637565b601060209081526000928352604080842090915290825290205481565b60606000825167ffffffffffffffff811115610c2b57610c2b615064565b604051908082528060200260200182016040528015610c8757816020015b610c746040518060800160405280600081526020016000815260200160008152602001600081525090565b815260200190600190039081610c495790505b50905060005b8351811015610d31576000848281518110610caa57610caa6157ca565b60200260200101519050600060166000838152602001908152602001600020604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050905080848481518110610d1157610d116157ca565b602002602001018190525050508080610d2990615828565b915050610c8d565b5092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610d8e5750610d8e82613b7e565b92915050565b606060008054610da390615860565b80601f0160208091040260200160405190810160405280929190818152602001828054610dcf90615860565b8015610e1c5780601f10610df157610100808354040283529160200191610e1c565b820191906000526020600020905b815481529060010190602001808311610dff57829003601f168201915b5050505050905090565b6000610e3182613c61565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610e65826121f1565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff82161480610f505750610f508133610ad7565b610fdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610f1e565b610fe68383613cec565b505050565b610ff3613d8c565b42601d541061105e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff166110dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b3382158015906110ed5750606583105b611179576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4e46544d616e616765723a204e4654204e756d6265722073686f756c6420736560448201527f74206265747765656e20312d31303000000000000000000000000000000000006064820152608401610f1e565b348360195461118891906158b3565b14611215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4e46544d616e616765723a206d73672e76616c7565203d3d206d696e745f707260448201527f696365202a206e756d62657200000000000000000000000000000000000000006064820152608401610f1e565b60005b8381101561135e57600061122b60085490565b6112369060016158ca565b90508061014d10156112ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4e46544d616e616765723a20746f74616c20737570706c792063616e206e657660448201527f657220657863656564206d617820737570706c790000000000000000000000006064820152608401610f1e565b60408051608081018252828152686c6b935b8bbd40000060208083019182524283850190815260006060850181815287825260169093529490942092518355905160018301559151600282015590516003909101556113298382613dff565b686c6b935b8bbd4000006018600082825461134491906158ca565b90915550829150611356905081615828565b915050611218565b508173ffffffffffffffffffffffffffffffffffffffff808216908316148061139d575073ffffffffffffffffffffffffffffffffffffffff83163b15155b1561143a57601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663412753586040518163ffffffff1660e01b8152600401602060405180830381865afa15801561140f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143391906158dd565b9050611536565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152601160209081526040808320938616835292905290812054908190036114db5773ffffffffffffffffffffffffffffffffffffffff82811660009081526012602090815260408220805460018101825590835291200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169185169190911790555b6114e534826158ca565b73ffffffffffffffffffffffffffffffffffffffff80841660009081526011602090815260408083209388168352929052908120919091556015805434929061152f9084906158ca565b9091555050505b476000611544600a836158fa565b9050601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663412753586040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d791906158dd565b73ffffffffffffffffffffffffffffffffffffffff166108fc6115fa8385615935565b6040518115909202916000818181858888f19350505050158015611622573d6000803e3d6000fd5b5060405173ffffffffffffffffffffffffffffffffffffffff84169082156108fc029083906000818181858888f19350505050158015611666573d6000803e3d6000fd5b50505050506116756001600b55565b5050565b6116833382614032565b61170f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610f1e565b610fe68383836140f1565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600e6020908152604080832080548251818502810185019093528083526060949383018282801561178657602002820191906000526020600020905b815481526020019060010190808311611772575b5093979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526012602090815260409182902080548351818402810184019094528084526060939283018282801561181757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116117ec575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601360209081526040918290208054835181840281018401909452808452606093928301828280156118175760200282019190600052602060002090815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116117ec5750505050509050919050565b60006118bc836122ac565b821061194a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610f1e565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205490565b6119886143f9565b600a5460405173ffffffffffffffffffffffffffffffffffffffff909116904780156108fc02916000818181858888f193505050501580156119ce573d6000803e3d6000fd5b50565b6119d96143f9565b601d54421080156119e957508042105b611a4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f215f737461727454696d652100000000000000000000000000000000000000006044820152606401610f1e565b601d55565b611a5c6143f9565b600081118015611a7457506702c68af0bb1400008111155b611ada576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a20216d696e745072696365210000000000000000006044820152606401610f1e565b601955565b611ae7613d8c565b601c5473ffffffffffffffffffffffffffffffffffffffff16611b66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b3360008181526017602052604090205460ff16611bdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e46544d616e616765723a206e6f742077686974656c697374656400000000006044820152606401610f1e565b34601a5414611c70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4e46544d616e616765723a206d73672e76616c7565203d3d206d696e745f707260448201527f69636500000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b6000611c7b60085490565b611c869060016158ca565b90508061014d1015611d1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4e46544d616e616765723a20746f74616c20737570706c792063616e206e657660448201527f657220657863656564206d617820737570706c790000000000000000000000006064820152608401610f1e565b60408051608081018252828152686c6b935b8bbd4000006020808301918252428385019081526000606085018181528782526016909352949094209251835590516001830155915160028201559051600390910155611d798282613dff565b686c6b935b8bbd40000060186000828254611d9491906158ca565b9091555050601c54604080517f41275358000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216916341275358916004808201926020929091908290030181865afa158015611e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2d91906158dd565b73ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015611e72573d6000803e3d6000fd5b505073ffffffffffffffffffffffffffffffffffffffff16600090815260176020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055611ec86001600b55565b565b610fe683838360405180602001604052806000815250612ad5565b600080600069152d02c7e14af68000008410611f0d575060039150610fd3905061169b611f5f565b690a968163f0a57b4000008410611f30575060029150610e04905061090b611f5f565b69010f0cf064dd592000008410611f53575060019150610ca99050610485611f5f565b5060009150610b4e9050815b9193909250565b60136020528160005260406000208181548110611f8257600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169150829050565b6000611fb660085490565b8210612044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610f1e565b60088281548110612057576120576157ca565b90600052602060002001549050919050565b600069043c33c193756480000082106120855750617107919050565b69010f0cf064dd59200000821061209f5750616377919050565b683635c9adc5dea0000082106120b85750615ef1919050565b50615a6c919050565b919050565b6120ce6143f9565b601b5473ffffffffffffffffffffffffffffffffffffffff808516911603612152576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e46544d616e616765723a20217265736f7572636500000000000000000000006044820152606401610f1e565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af11580156121c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121eb9190615948565b50505050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610d8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610f1e565b600064174876e8008261229085876158b3565b61229a91906158b3565b6122a491906158fa565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff8216612351576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610f1e565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6123826143f9565b611ec8600061447a565b600f6020528160005260406000208181548110611f8257600080fd5b606060018054610da390615860565b600e60205281600052604060002081815481106123d357600080fd5b90600052602060002001600091509150505481565b6123f0613d8c565b42601d541061245b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff166124da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b336000818152600e6020908152604080832080548251818502810185019093528083528493849392919083018282801561253357602002820191906000526020600020905b81548152602001906001019080831161251f575b5050505050905060005b81518110156125be57600061256d83838151811061255d5761255d6157ca565b60200260200101518760006144f1565b90506000606461257e600a846158b3565b61258891906158fa565b905081156125a95761259a81876158ca565b95506125a682866158ca565b94505b505080806125b690615828565b91505061253d565b506000821161264f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4e46544d616e616765723a206e6f2072657761726420746f20636f6d706f756e60448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b601c546040517f65f0a55600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820181905260248201859052906365f0a55690604401600060405180830381600087803b1580156126c257600080fd5b505af11580156126d6573d6000803e3d6000fd5b5050505081601860008282546126ec91906158ca565b9091555050601c54604080517fe8078d94000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169163e8078d949160048082019260009290919082900301818387803b15801561275d57600080fd5b505af1158015612771573d6000803e3d6000fd5b5050505050505050611ec86001600b55565b61278b613d8c565b42601d54106127f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff16612875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b336000818152600e60209081526040808320805482518185028101850190935280835284938301828280156128c957602002820191906000526020600020905b8154815260200190600101908083116128b5575b5050505050905060005b815181101561291f576129018282815181106128f1576128f16157ca565b60200260200101518560016144f1565b61290b90846158ca565b92508061291781615828565b9150506128d3565b50600061292b84613594565b905060005b815181101561297c5761295e82828151811061294e5761294e6157ca565b60200260200101518660016144f1565b61296890856158ca565b93508061297481615828565b915050612930565b506129878386614689565b505050506119ce6001600b55565b61299d613d8c565b42601d5410612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff16612a87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b336000612a96848360016144f1565b9050612aa28184614689565b50506116756001600b55565b611675338383614946565b60126020528160005260406000208181548110611f8257600080fd5b612adf3383614032565b612b6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610f1e565b6121eb84848484614a73565b612b7f613d8c565b42601d5410612bea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e46544d616e616765723a204e6f7420737461727465640000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff16612c69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e46544d616e616765723a2054726561737572792069732030000000000000006044820152606401610f1e565b600033601b546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80841660048301529293508592909116906370a0823190602401602060405180830381865afa158015612ce1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d059190615965565b1015612d92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4e46544d616e616765723a2042616c616e636520746f6f206c6f7720746f207360448201527f74616b65000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b6000848152601660209081526040808320600d835281842073ffffffffffffffffffffffffffffffffffffffff86168552909252909120600181015415612f33576000612de1878560006144f1565b905060006064612df2600a846158b3565b612dfc91906158fa565b905060008211612e8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4e46544d616e616765723a206e6f2072657761726420746f20636f6d706f756e60448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b601c546040517f65f0a55600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820181905260248201839052906365f0a55690604401600060405180830381600087803b158015612f0157600080fd5b505af1158015612f15573d6000803e3d6000fd5b505050508160186000828254612f2b91906158ca565b909155505050505b841561331a578060010154600003612fc05773ffffffffffffffffffffffffffffffffffffffff83166000818152600e60209081526040808320805460018181018355918552838520018b90558a8452600f835290832080549182018155835291200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690911790555b601c546040517fde5bb65700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018890529091169063de5bb65790604401600060405180830381600087803b15801561303457600080fd5b505af1158015613048573d6000803e3d6000fd5b50505050846018600082825461305e91906158ca565b909155505060028201546000906130759042615935565b905060006130868460010154611ee5565b509150506130998460010154838361227d565b8460030160008282546130ac91906158ca565b92505081905550868460010160008282546130c791906158ca565b9091555050426002850181905583556001830180548891906000906130ed9084906158ca565b909155505073ffffffffffffffffffffffffffffffffffffffff85166000908152600c6020526040812080548992906131279084906158ca565b9091555086905073ffffffffffffffffffffffffffffffffffffffff8087169082160361316d5750601c5473ffffffffffffffffffffffffffffffffffffffff16613269565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152601060209081526040808320938a168352929052908120549081900361320e5773ffffffffffffffffffffffffffffffffffffffff82811660009081526013602090815260408220805460018101825590835291200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169189169190911790555b61321889826158ca565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152601060209081526040808320938c16835292905290812091909155601480548b92906132629084906158ca565b9091555050505b601c5473ffffffffffffffffffffffffffffffffffffffff166365f0a55682613293600a8c6158fa565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b1580156132fe57600080fd5b505af1158015613312573d6000803e3d6000fd5b505050505050505b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e8078d946040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561338457600080fd5b505af1158015613398573d6000803e3d6000fd5b50505050505050610fe66001600b55565b6000818152601660209081526040808320600f83528184208054835181860281018601909452808452606095929492939283018282801561342057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116133f5575b5050505050905060006134368360010154611ee5565b505090507f00000000000000000000000072a6287bfd6ac82b034972e0fea4dbefcbd065af73ffffffffffffffffffffffffffffffffffffffff16630e3e5b4b6040518060a001604052808881526020018460ff16815260200186600101548152602001855181526020016134aa896121f1565b73ffffffffffffffffffffffffffffffffffffffff908116909152604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815283516004820152602084015160ff1660248201529083015160448201526060830151606482015260809092015116608482015260a401600060405180830381865afa158015613545573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261358b919081019061597e565b95945050505050565b606060006135a1836122ac565b905060008167ffffffffffffffff8111156135be576135be615064565b6040519080825280602002602001820160405280156135e7578160200160208202803683370190505b50905060005b8281101561363457600061360186836118b1565b905080838381518110613616576136166157ca565b6020908102919091010152508061362c81615828565b9150506135ed565b509392505050565b60008273ffffffffffffffffffffffffffffffffffffffff1661365e836121f1565b73ffffffffffffffffffffffffffffffffffffffff16149392505050565b6136846143f9565b60008111801561369c57506702c68af0bb1400008111155b613702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e46544d616e616765723a20216d696e745072696365000000000000000000006044820152606401610f1e565b601a55565b61370f6143f9565b73ffffffffffffffffffffffffffffffffffffffff811661378c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e46544d616e616765723a20215f7472656173757279000000000000000000006044820152606401610f1e565b601c5473ffffffffffffffffffffffffffffffffffffffff161561380c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e46544d616e616765723a2074726561737572790000000000000000000000006044820152606401610f1e565b601c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61385b6143f9565b73ffffffffffffffffffffffffffffffffffffffff81166138fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f1e565b6119ce8161447a565b61390f6143f9565b60005b8251811015610fe657600073ffffffffffffffffffffffffffffffffffffffff16838281518110613945576139456157ca565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036139ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e46544d616e616765723a20616e206163636f756e74206973203000000000006044820152606401610f1e565b81601760008584815181106139e1576139e16157ca565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905580613a4881615828565b915050613912565b60606000825167ffffffffffffffff811115613a6e57613a6e615064565b604051908082528060200260200182016040528015613aa157816020015b6060815260200190600190039081613a8c5790505b50905060005b8351811015610d31576000848281518110613ac457613ac46157ca565b602002602001015190506000600f6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015613b4457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311613b19575b5050505050905080848481518110613b5e57613b5e6157ca565b602002602001018190525050508080613b7690615828565b915050613aa7565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480613c1157507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610d8e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610d8e565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff166119ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610f1e565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190613d46826121f1565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6002600b5403613df8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f1e565b6002600b55565b73ffffffffffffffffffffffffffffffffffffffff8216613e7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610f1e565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613f08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610f1e565b613f16600083836001614b16565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613fa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610f1e565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260036020908152604080832080546001019055848352600290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008061403e836121f1565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806140ac575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b806122a457508373ffffffffffffffffffffffffffffffffffffffff166140d284610e26565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16614111826121f1565b73ffffffffffffffffffffffffffffffffffffffff16146141b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610f1e565b73ffffffffffffffffffffffffffffffffffffffff8216614256576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610f1e565b6142638383836001614b16565b8273ffffffffffffffffffffffffffffffffffffffff16614283826121f1565b73ffffffffffffffffffffffffffffffffffffffff1614614326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610f1e565b600081815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526003855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611ec8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f1e565b600a805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000838152600d6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452825280832086845260169092528220815483906145389042615935565b9050600082600201544261454c9190615935565b9050600061455d8560010154612069565b905060008061456f8660010154611ee5565b9250925050600061458b88600101548784876107a891906158ca565b9050600061459e8860010154878661227d565b90508a156145e4576145b08c8e61363c565b156145df578088600301546145c591906158ca565b6145cf90836158ca565b600060038a01554260028a015591505b614675565b818960010160008282546145f891906158ca565b909155505073ffffffffffffffffffffffffffffffffffffffff8c166000908152600c6020526040812080548492906146329084906158ca565b925050819055508088600301600082825461464d91906158ca565b909155505042600289015560018801805483919060009061466f9084906158ca565b90915550505b504290975550949998505050505050505050565b600082116146f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e46544d616e616765723a206e6f2072657761726420746f20636c61696d00006044820152606401610f1e565b3360006064614703600a866158b3565b61470d91906158fa565b905082156147a657601c546040517f6a42d90600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820187905290911690636a42d90690604401600060405180830381600087803b15801561478957600080fd5b505af115801561479d573d6000803e3d6000fd5b50505050614833565b601c546040517f65f0a55600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201879052909116906365f0a55690604401600060405180830381600087803b15801561481a57600080fd5b505af115801561482e573d6000803e3d6000fd5b505050505b601c546040517f65f0a55600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820181905260248201839052906365f0a55690604401600060405180830381600087803b1580156148a657600080fd5b505af11580156148ba573d6000803e3d6000fd5b50505050601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e8078d946040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561492857600080fd5b505af115801561493c573d6000803e3d6000fd5b5050505050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036149db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610f1e565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b614a7e8484846140f1565b614a8a84848484614cba565b6121eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610f1e565b6001811115614ba7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f7274656400000000000000000000006064820152608401610f1e565b8173ffffffffffffffffffffffffffffffffffffffff8516614c1057614c0b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b614c4d565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614614c4d57614c4d8582614ead565b73ffffffffffffffffffffffffffffffffffffffff8416614c7657614c7181614f64565b614cb3565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614614cb357614cb38482615013565b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15614ea2576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290614d319033908990889088906004016159ec565b6020604051808303816000875af1925050508015614d8a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252614d8791810190615a35565b60015b614e57573d808015614db8576040519150601f19603f3d011682016040523d82523d6000602084013e614dbd565b606091505b508051600003614e4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610f1e565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506122a4565b506001949350505050565b60006001614eba846122ac565b614ec49190615935565b600083815260076020526040902054909150808214614f245773ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b50600091825260076020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600681528383209183525290812055565b600854600090614f7690600190615935565b60008381526009602052604081205460088054939450909284908110614f9e57614f9e6157ca565b906000526020600020015490508060088381548110614fbf57614fbf6157ca565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614ff757614ff7615a52565b6001900381819060005260206000200160009055905550505050565b600061501e836122ac565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156150da576150da615064565b604052919050565b600067ffffffffffffffff8211156150fc576150fc615064565b5060051b60200190565b6000602080838503121561511957600080fd5b823567ffffffffffffffff81111561513057600080fd5b8301601f8101851361514157600080fd5b803561515461514f826150e2565b615093565b81815260059190911b8201830190838101908783111561517357600080fd5b928401925b8284101561519157833582529284019290840190615178565b979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156151f3578151805185528681015187860152858101518686015260609081015190850152608090930192908501906001016151b9565b5091979650505050505050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146119ce57600080fd5b60006020828403121561524057600080fd5b813561524b81615200565b9392505050565b60005b8381101561526d578181015183820152602001615255565b50506000910152565b6000815180845261528e816020860160208601615252565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061524b6020830184615276565b6000602082840312156152e557600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146119ce57600080fd5b6000806040838503121561532157600080fd5b823561532c816152ec565b946020939093013593505050565b6000806040838503121561534d57600080fd5b82359150602083013561535f816152ec565b809150509250929050565b60008060006060848603121561537f57600080fd5b833561538a816152ec565b9250602084013561539a816152ec565b929592945050506040919091013590565b6000602082840312156153bd57600080fd5b813561524b816152ec565b6020808252825182820181905260009190848201906040850190845b81811015615400578351835292840192918401916001016153e4565b50909695505050505050565b600081518084526020808501945080840160005b8381101561545257815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101615420565b509495945050505050565b60208152600061524b602083018461540c565b60008060006060848603121561548557600080fd5b505081359360208301359350604090920135919050565b600080604083850312156154af57600080fd5b50508035926020909101359150565b80151581146119ce57600080fd5b80356120c1816154be565b6000602082840312156154e957600080fd5b813561524b816154be565b6000806040838503121561550757600080fd5b82359150602083013561535f816154be565b6000806040838503121561552c57600080fd5b8235615537816152ec565b9150602083013561535f816154be565b600067ffffffffffffffff82111561556157615561615064565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600080600080608085870312156155a357600080fd5b84356155ae816152ec565b935060208501356155be816152ec565b925060408501359150606085013567ffffffffffffffff8111156155e157600080fd5b8501601f810187136155f257600080fd5b803561560061514f82615547565b81815288602083850101111561561557600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b6000806040838503121561564a57600080fd5b8235615655816152ec565b9150602083013561535f816152ec565b60008060006060848603121561567a57600080fd5b83359250602084013591506040840135615693816152ec565b809150509250925092565b600080604083850312156156b157600080fd5b823567ffffffffffffffff8111156156c857600080fd5b8301601f810185136156d957600080fd5b803560206156e961514f836150e2565b82815260059290921b8301810191818101908884111561570857600080fd5b938201935b8385101561572f578435615720816152ec565b8252938201939082019061570d565b955061573e90508682016154cc565b93505050509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156157bd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526157ab85835161540c565b94509285019290850190600101615771565b5092979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615859576158596157f9565b5060010190565b600181811c9082168061587457607f821691505b6020821081036158ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8082028115828204841417610d8e57610d8e6157f9565b80820180821115610d8e57610d8e6157f9565b6000602082840312156158ef57600080fd5b815161524b816152ec565b600082615930577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b81810381811115610d8e57610d8e6157f9565b60006020828403121561595a57600080fd5b815161524b816154be565b60006020828403121561597757600080fd5b5051919050565b60006020828403121561599057600080fd5b815167ffffffffffffffff8111156159a757600080fd5b8201601f810184136159b857600080fd5b80516159c661514f82615547565b8181528560208385010111156159db57600080fd5b61358b826020830160208601615252565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152615a2b6080830184615276565b9695505050505050565b600060208284031215615a4757600080fd5b815161524b81615200565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000815000a

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

00000000000000000000000072a6287bfd6ac82b034972e0fea4dbefcbd065af000000000000000000000000117908e5fbc5f77daf07d4263ba79ee810b092f4

-----Decoded View---------------
Arg [0] : _descriptor_ (address): 0x72A6287bFd6Ac82B034972e0fea4DBEfcbd065af
Arg [1] : _resource (address): 0x117908E5fbC5F77DAF07D4263bA79eE810b092f4

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000072a6287bfd6ac82b034972e0fea4dbefcbd065af
Arg [1] : 000000000000000000000000117908e5fbc5f77daf07d4263ba79ee810b092f4


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.