Contract 0xc7728354f9fe0e43514b1227162d5b0e40fad410 3

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x72a7d809d2ad47a8d1b8c61ab830568bb45b897fe8bafc329a4d6543a3f11a29Close Position409488872023-03-30 18:39:323 hrs 23 mins ago0x09354244bbcb3a66b8c5db192860cc363767390c IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.01104996375998.483647737
0xbd8d883537929317e0958d5c7ec4498a5cb621977525b5b441293514d92e19ccClose Position409464152023-03-30 17:10:324 hrs 52 mins ago0xb5744a7bb49d7b99045d2ccf213396a256906494 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.030691204196273.53770641
0x3207686a85a713e87c5674539c70f3f9befcab2e9638dcf84d01b7b386f4f58dClose Position409445342023-03-30 16:02:206 hrs ago0xf0824653f79f01e52fe1dbfc2c2451d7d69431a8 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.030667560107273.326976656
0x0d5ac5df1d21944e520c17473e73e5b767350155874bd831b390bc6dee39cba5Close Position409444602023-03-30 15:59:426 hrs 2 mins ago0x79c8756d9352d63c858658f897a02fce5606b3bd IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.038566936214280.517410734
0x1859a99b3f10c883f3b56d92cade899890b522ad0312d815246d1713951d755bClose Position409438722023-03-30 15:38:546 hrs 23 mins ago0x552a01a663472468250a78cec50821cad4e66a17 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.024512838121172.279847643
0x586b5598fb9cee0138d7eca6dd47bcd69777f71fd2908283cd6cfe835fc753e8Claim Referrer R...409429202023-03-30 15:04:066 hrs 58 mins ago0x5a1c8ab805d35406a28c1f6848ff14fb2ed28ea4 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.00568012726 141.525532837
0x2801d59655a60ee750ae339dfaa52cb08c1ff3791d585c00f443af87389f892bOpen Position409426712023-03-30 14:55:167 hrs 7 mins ago0x15808922d263113916cab7223c0dfed489911059 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad410100 MATIC0.295674800066269.444388815
0x5a951b02b6d1fc9f623698a36ea80e6f4cbee4b962f03209ccfb31f333a4e761Claim Referrer R...409392772023-03-30 12:53:169 hrs 9 mins ago0x28792a283d33a72bd5bbd95155e882e0e03665d0 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.009460073647235.706332328
0xd3e810077f016540a86adfc268875145183c0ee3fffd5fe1faa54f869bf77312Close Position409391482023-03-30 12:48:299 hrs 14 mins ago0xf53aa1f52ce5ecd645764764af32aae996b6f601 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.024389158491256.422975741
0x5019aa16ea2811fdf54b7eb8ef4b60e33b8850615d64edd32203d4412791e43cClaim Referrer R...409383012023-03-30 12:17:559 hrs 44 mins ago0xc14d010feeb9379de0373ac47c3d3961a6049313 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.008404887419 146.848736252
0x7a38a2b7a07493ab593d140671d6003c966545bae154f21f005495e1dd3e0a10Claim Referrer R...409382902023-03-30 12:17:339 hrs 45 mins ago0xf770048685cbbfc678eaec89422969b78977384c IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.008826831795 154.220875264
0x07eeb0f5534a447e534c6cd3fdf61493b4e64a2dc57619a67eec991620b9d76aClaim Referrer R...409382762023-03-30 12:16:419 hrs 46 mins ago0x61c8212b698ece073f1395377d9de46bbe98dbf4 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.006851549235 119.709080722
0xe133bf60ec28fcd3646cbe6a7f8694eedaccb6dacdaa6780de82924ecaaf8a9aClose Position409371262023-03-30 11:34:0810 hrs 28 mins ago0x8dbb7507baa873e574198ba7c9927b1fda79ea03 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.023950646128185.231716139
0xf0fb0dbc9106314a2e42cf02f6f6671d292af0222058696ab0a04961abf05fdeClaim Referrer R...409363892023-03-30 11:07:3010 hrs 55 mins ago0x44a51c45bebc5fde8271137e152c299625af5dbb IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.00673265067 117.631705608
0x12ede24b547cac444c973f07a1a733bc28d715bfc09111129e96bda73d3d93b9Claim Referrer R...409363472023-03-30 11:06:0010 hrs 56 mins ago0x1bc3fc262b401da8b292475cc3f27591478fdbf8 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.005947863239 103.92003563
0x0f30c3406acb6c1a13f399aa8f4e7627043b0b3f61ff061e3cca52e0cfaa405aClaim Referrer R...409360652023-03-30 10:56:0211 hrs 6 mins ago0x0c2d7fe44ffcb9a4af5de52d6c1d5e4c353b3279 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.009399493621234.196925904
0xfe9ef85ac80099e973bd876b7fca1c7a12c0ef48333dceb96b659a11db7c28d8Close Position409353602023-03-30 10:30:3011 hrs 32 mins ago0xc62d4ff91dec5b867645aef3147d7597bd655bf5 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.028109632921250.529254834
0x7353815fe8245370138a6d17de531562d2d8fb80efc684442d626106d584b3ebClaim Referrer R...409353192023-03-30 10:29:0211 hrs 33 mins ago0xc62d4ff91dec5b867645aef3147d7597bd655bf5 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.009557286347238.128475083
0xa45338632d81003e0662b1d0b8afba11841a09bc2a42a4ec09f3a9fd7fcabd9dClose Position409348302023-03-30 10:10:5511 hrs 51 mins ago0xfb9fcc47079740accec72411d543bb686ae88e6d IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.026628930753237.332383434
0x4c553aa9809dc280f411035f812e053df7527037a24b7f4dd7cb22e8f2497945Close Position409342302023-03-30 9:49:0212 hrs 13 mins ago0x20623bea448025c6ae771f2851023198a75524c4 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.028822696641256.884489809
0x945f36a690add9e909a4044e8400bce1d7c138b6011a278be729ddaee0aed306Claim Referrer R...409340072023-03-30 9:40:0412 hrs 22 mins ago0x57bc8bccc403012c20bc296624f7eda92241bddc IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.005479744568 136.532815964
0x50ec68113f77e77a6803b96c34a645985f1743885ac089cc229ff7276e388751Close Position409339392023-03-30 9:37:4012 hrs 25 mins ago0x0af96db3b38bb7a88637b2f3bb4e3ab18ae9a21c IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.013733697998122.402634543
0xf23890d7fd40d8e3db116a776fd767cdeb2d77b849e81572aa03701c1f7df1d9Close Position409316752023-03-30 8:14:4813 hrs 47 mins ago0x189c1307fe97b3c8ceeb121619209569df6ee865 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.032661197664252.598183035
0x1dee9db7799b24dd9398fd7ce99c3fdf5992754ed91871dc36b6633f8bdd7bc6Claim Referrer R...409313502023-03-30 8:02:4613 hrs 59 mins ago0x67a2751847c64ca56437370c759ebdfc60ce89e0 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.014507316117253.469312797
0x3f0b3dd62f7b0013f14820c003c8e4bc595919b4405c2ba26afb814a24f7b568Claim Referrer R...409313322023-03-30 8:02:0814 hrs ago0x755468125764e64cbcbea694087624f989a9f8a5 IN  0xc7728354f9fe0e43514b1227162d5b0e40fad4100 MATIC0.014919027299260.6626592
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x72a7d809d2ad47a8d1b8c61ab830568bb45b897fe8bafc329a4d6543a3f11a29409488872023-03-30 18:39:323 hrs 23 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x09354244bbcb3a66b8c5db192860cc363767390c195 MATIC
0xbd8d883537929317e0958d5c7ec4498a5cb621977525b5b441293514d92e19cc409464152023-03-30 17:10:324 hrs 52 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100xb5744a7bb49d7b99045d2ccf213396a256906494579.8 MATIC
0x3207686a85a713e87c5674539c70f3f9befcab2e9638dcf84d01b7b386f4f58d409445342023-03-30 16:02:206 hrs ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100xf0824653f79f01e52fe1dbfc2c2451d7d69431a8650 MATIC
0x0d5ac5df1d21944e520c17473e73e5b767350155874bd831b390bc6dee39cba5409444602023-03-30 15:59:426 hrs 2 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x79c8756d9352d63c858658f897a02fce5606b3bd981.97 MATIC
0x1859a99b3f10c883f3b56d92cade899890b522ad0312d815246d1713951d755b409438722023-03-30 15:38:546 hrs 23 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x552a01a663472468250a78cec50821cad4e66a17597.5 MATIC
0x586b5598fb9cee0138d7eca6dd47bcd69777f71fd2908283cd6cfe835fc753e8409429202023-03-30 15:04:066 hrs 58 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x5a1c8ab805d35406a28c1f6848ff14fb2ed28ea41.8216 MATIC
0x2801d59655a60ee750ae339dfaa52cb08c1ff3791d585c00f443af87389f892b409426712023-03-30 14:55:167 hrs 7 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad410 0x9ca75d0d97f0b86dea852eb0a626f7839673d9d92 MATIC
0x5a951b02b6d1fc9f623698a36ea80e6f4cbee4b962f03209ccfb31f333a4e761409392772023-03-30 12:53:169 hrs 9 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x28792a283d33a72bd5bbd95155e882e0e03665d00.884 MATIC
0xd3e810077f016540a86adfc268875145183c0ee3fffd5fe1faa54f869bf77312409391482023-03-30 12:48:299 hrs 14 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100xf53aa1f52ce5ecd645764764af32aae996b6f601351 MATIC
0x5019aa16ea2811fdf54b7eb8ef4b60e33b8850615d64edd32203d4412791e43c409383012023-03-30 12:17:559 hrs 44 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100xc14d010feeb9379de0373ac47c3d3961a60493131.8 MATIC
0x7a38a2b7a07493ab593d140671d6003c966545bae154f21f005495e1dd3e0a10409382902023-03-30 12:17:339 hrs 45 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100xf770048685cbbfc678eaec89422969b78977384c27.42 MATIC
0x07eeb0f5534a447e534c6cd3fdf61493b4e64a2dc57619a67eec991620b9d76a409382762023-03-30 12:16:419 hrs 46 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x61c8212b698ece073f1395377d9de46bbe98dbf428.74 MATIC
0xe133bf60ec28fcd3646cbe6a7f8694eedaccb6dacdaa6780de82924ecaaf8a9a409371262023-03-30 11:34:0810 hrs 28 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x8dbb7507baa873e574198ba7c9927b1fda79ea0365 MATIC
0xf0fb0dbc9106314a2e42cf02f6f6671d292af0222058696ab0a04961abf05fde409363892023-03-30 11:07:3010 hrs 55 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x44a51c45bebc5fde8271137e152c299625af5dbb0.24 MATIC
0x12ede24b547cac444c973f07a1a733bc28d715bfc09111129e96bda73d3d93b9409363472023-03-30 11:06:0010 hrs 56 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x1bc3fc262b401da8b292475cc3f27591478fdbf82.1648 MATIC
0x0f30c3406acb6c1a13f399aa8f4e7627043b0b3f61ff061e3cca52e0cfaa405a409360652023-03-30 10:56:0211 hrs 6 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x0c2d7fe44ffcb9a4af5de52d6c1d5e4c353b32790.612 MATIC
0xfe9ef85ac80099e973bd876b7fca1c7a12c0ef48333dceb96b659a11db7c28d8409353602023-03-30 10:30:3011 hrs 32 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100xc62d4ff91dec5b867645aef3147d7597bd655bf5390 MATIC
0x7353815fe8245370138a6d17de531562d2d8fb80efc684442d626106d584b3eb409353192023-03-30 10:29:0211 hrs 33 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100xc62d4ff91dec5b867645aef3147d7597bd655bf522.68 MATIC
0xa45338632d81003e0662b1d0b8afba11841a09bc2a42a4ec09f3a9fd7fcabd9d409348302023-03-30 10:10:5511 hrs 51 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100xfb9fcc47079740accec72411d543bb686ae88e6d325 MATIC
0x4c553aa9809dc280f411035f812e053df7527037a24b7f4dd7cb22e8f2497945409342302023-03-30 9:49:0212 hrs 13 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x20623bea448025c6ae771f2851023198a75524c465.65 MATIC
0x945f36a690add9e909a4044e8400bce1d7c138b6011a278be729ddaee0aed306409340072023-03-30 9:40:0412 hrs 22 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x57bc8bccc403012c20bc296624f7eda92241bddc8 MATIC
0x50ec68113f77e77a6803b96c34a645985f1743885ac089cc229ff7276e388751409339392023-03-30 9:37:4012 hrs 25 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x0af96db3b38bb7a88637b2f3bb4e3ab18ae9a21c135.2 MATIC
0xf23890d7fd40d8e3db116a776fd767cdeb2d77b849e81572aa03701c1f7df1d9409316752023-03-30 8:14:4813 hrs 47 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x189c1307fe97b3c8ceeb121619209569df6ee86565 MATIC
0x1dee9db7799b24dd9398fd7ce99c3fdf5992754ed91871dc36b6633f8bdd7bc6409313502023-03-30 8:02:4613 hrs 59 mins ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x67a2751847c64ca56437370c759ebdfc60ce89e07.26 MATIC
0x3f0b3dd62f7b0013f14820c003c8e4bc595919b4405c2ba26afb814a24f7b568409313322023-03-30 8:02:0814 hrs ago 0xc7728354f9fe0e43514b1227162d5b0e40fad4100x755468125764e64cbcbea694087624f989a9f8a50.264 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Avatar

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 3 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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;
    }
}

File 2 of 3 : Avatar.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

// ReetrancyGuard
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./Bucket.sol";

contract Avatar is ReentrancyGuard, Bucket {
    uint256 public constant PRINCIPAL_RATIO = 650000; // 65%
    uint256 public constant INVEST_RATIO = 260000; // 26%
    uint256 public constant PLATFORM_RATIO = 20000; // 2%
    uint256 public constant REFERRER_RATIO = 60000; // 6%
    uint256 public constant INCENTIVE_RATIO = 10000; // 1%
    uint256 public constant PRICE_PRECISION = 1e6;

    uint256 public constant DEFAULT_INVEST_RETURN_RATE = 10000; // 1%
    uint256 public constant BOOST_INVEST_RETURN_RATE = 5000; // 0.5%

    uint256 public constant MAX_INVEST = 1e21; // 1000
    uint256 public constant MIN_INVEST = 1e20; // 100

    uint256 public constant TIME_UNIT = 1 days;
    uint256[6] public DEFAULT_TARGET_AMOUNTS = [13e22, 25e22, 35e22, 50e22, 75e22, 125e22];

    uint256 public constant MAX_SEARCH_DEPTH = 50;
    uint256 public constant RANKED_INCENTIVE = 60;

    address public platformAddress; // will be paymentsplitter contract address

    uint256[6] public currentEpochs;

    // ledge type => round epoch => address => position index => position info
    mapping(uint256 => mapping(address => PositionInfo[]))[6] public roundLedgers;
    //
    mapping(uint256 => RoundInfo)[6] public roundInfos;
    //
    mapping(address => UserRoundInfo[])[6] public userRoundsInfos;

    mapping(address => UserGlobalInfo) public userGlobalInfos;

    mapping(address => address[]) public children; // used for easily retrieve the referrer tree structure from front-end

    // temp admin
    address public tempAdmin;
    address public operator;
    bool public gamePaused;

    struct FundTarget {
        uint256 lastCheckTime;
        uint256 amount;
        uint256 achievedAmount;
    }

    struct UserGlobalInfo {
        // referrer chain to record the referrer relationship
        address referrer;
        // referrer rearward vault
        uint256 totalReferrerReward;
        uint256 referrerRewardClaimed;
        // boost credit
        uint256 boostCredit;
        // sales record
        uint256 maxChildrenSales;
        uint256 sales;
        uint256 totalPositionAmount;
        uint256 reportedSales;
        uint8 salesLevel;
    }

    struct PositionInfo {
        uint256 amount;
        uint256 openTime;
        uint256 expiryTime;
        uint256 investReturnRate;
        uint256 withdrawnAmount;
        uint256 incentiveAmount;
        uint256 investReturnAmount;
        uint256 index;
        bool incentiveClaimable;
    }

    struct LinkedPosition {
        address user;
        uint256 userPositionIndex;
    }

    struct RoundInfo {
        FundTarget fundTarget;
        uint256 totalPositionAmount; // total amount of all positions
        uint256 currentPrincipalAmount; // current principal amount
        uint256 currentInvestAmount; // current invest amount
        uint256 totalPositionCount; // total count of all positions
        uint256 currentPositionCount; // total count of all open positions
        uint256 currentIncentiveAmount; // current incentive amount
        uint256 incentiveSnapshot; // check total position of last N positions
        uint256 head; // head of linked position for last N positions
        mapping(uint256 => LinkedPosition) linkedPositions; // used for incentive track
        mapping(address => uint256) ledgerRoundToUserRoundIndex; // this round index in userRoundsInfos
        bool stopLoss; // default false means the round is running
    }

    struct UserRoundInfo {
        uint256 epoch;
        uint256 totalPositionAmount;
        uint256 currentPrincipalAmount;
        uint256 totalWithdrawnAmount;
        uint256 totalIncentiveClaimedAmount;
        uint256 totalClosedPositionCount;
        uint256 returnRateBoostedAmount;
    }

    struct ReferrerSearch {
        uint256 currentUserSales;
        uint256 currentReferrerSales;
        address currentReferrer;
        uint256 currentReferrerAmount;
        uint256 levelDiffAmount;
        uint256 leftLevelDiffAmount;
        uint256 levelDiffAmountPerLevel;
        uint256 levelSearchAmount;
        uint256 leftLevelSearchAmount;
        uint256 levelSearchAmountPerReferrer;
        uint256 levelSearchSales;
        uint256 currentReferrerMaxChildSales;
        uint256 currentUserTotalPosAmount;
        uint256 currentUserReportedSales;
        address currentUser;
        uint8 depth;
        uint8 levelSearchStep;
        uint8 currentLevelDiff;
        uint8 numLevelSearchCandidate;
        uint8 baseSalesLevel;
        uint8 currentReferrerLevel;
        bool levelDiffDone;
        bool levelSearchDone;
        bool levelSalesDone;
    }

    struct OpenPositionParams {
        uint256 principalAmount;
        uint256 investAmount;
        uint256 referrerAmount;
        uint256 incentiveAmount;
        uint256 investReturnRate;
    }

    event PositionOpened(
        address indexed user,
        uint256 indexed ledgeType,
        uint256 indexed epoch,
        uint256 positionIndex,
        uint256 amount
    );

    event PositionClosed(
        address indexed user,
        uint256 indexed ledgeType,
        uint256 indexed epoch,
        uint256 positionIndex,
        uint256 amount
    );

    event NewReferrer(address indexed user, address indexed referrer);
    event NewRound(uint256 indexed epoch, uint256 indexed ledgeType);
    event ReferrerRewardAdded(address indexed user, uint256 amount, uint256 indexed rewardType); // type 0 for levelDiff, 1 for levelSearch, 2 for levelSearch
    event ReferrerRewardClaimed(address indexed user, uint256 amount);
    event SalesLevelUpdated(address indexed user, uint8 level);
    event IncentiveClaimed(address indexed user, uint256 amount);

    modifier notContract() {
        require(msg.sender == tx.origin, "Contract not allowed");
        _;
    }

    /**
     * @param _platformAddress The address of the platform
     * @param _tempAdmin The address of the temp admin
     * @param _operator The address of the operator
     */
    constructor(
        address _platformAddress,
        address _tempAdmin,
        address _operator
    ) {
        require(
            _platformAddress != address(0) && _tempAdmin != address(0) && _operator != address(0),
            "Invalid address provided"
        );
        emit NewRound(0, 0);
        emit NewRound(0, 1);
        emit NewRound(0, 2);
        emit NewRound(0, 3);
        emit NewRound(0, 4);
        emit NewRound(0, 5);

        tempAdmin = _tempAdmin;
        operator = _operator;
        platformAddress = _platformAddress;
        gamePaused = true;
    }

    /**
     * @notice Set the game paused status
     * @param _paused: The game paused status
     */
    function setPause(bool _paused) external {
        require(msg.sender == operator, "Only operator");
        // make sure the admin has dropped when game is unpaused
        if (!_paused) {
            require(tempAdmin == address(0), "Temp admin not dropped");
        }
        gamePaused = _paused;
    }

    /**
     * @notice Transfer operator
     */
    function transferOperator(address _operator) external {
        require(msg.sender == operator, "Only operator");
        require(_operator != address(0), "Invalid address");
        operator = _operator;
    }

    /**
     * @notice Drop the temp admin privilege
     */
    function dropTempAdmin() external {
        require(msg.sender == tempAdmin, "Only admin");
        tempAdmin = address(0);
    }

    /**
     * @notice Batch set referrer information for users
     * @param users: The users to set
     * @param referrers: The referrers to set
     * @param salesLevels: The sales levels to set
     */
    function batchSetReferrerInfo(
        address[] calldata users,
        address[] calldata referrers,
        uint8[] calldata salesLevels
    ) external {
        require(msg.sender == tempAdmin, "Only admin");
        require(users.length == referrers.length && users.length == salesLevels.length, "Invalid input");
        UserGlobalInfo storage userGlobalInfo;
        uint256 userLength = users.length;
        for (uint256 i = 0; i < userLength; ++i) {
            require(users[i] != address(0), "Invalid address provided");
            userGlobalInfo = userGlobalInfos[users[i]];
            require(userGlobalInfo.referrer == address(0), "Referrer already set");
            userGlobalInfo.referrer = referrers[i];
            userGlobalInfo.salesLevel = salesLevels[i];
            children[referrers[i]].push(users[i]);
        }
    }

    /**
     * @notice Set fixed stock distribution to specific ledger type
     * @param ledgerType: The ledger type to set
     * @param typeDays: The days to set
     * @param stock: The stock to set
     */
    function setStock(
        uint256 ledgerType,
        uint8[] calldata typeDays,
        uint16[] calldata stock
    ) external {
        require(ledgerType > 0, "Invalid ledger type");
        require(ledgerType < 6, "Invalid ledger type");
        require(msg.sender == tempAdmin, "Only admin");
        require(stock.length > 0, "Invalid stock array");
        require(typeDays.length == stock.length, "Invalid params");

        _setStock(ledgerType, typeDays, stock);
    }

    /**
     * @notice Open a new position
     * @param ledgerType: The ledger type to open
     * @param targetEpoch: The target epoch to open
     * @param targetRate: The target ratio to open
     * @param referrer: The expected referrer
     * @param useBoost: Whether to use boost for this position
     */
    function openPosition(
        uint256 ledgerType,
        uint256 targetEpoch,
        uint256 targetRate,
        address referrer,
        bool useBoost
    ) external payable notContract nonReentrant {
        require(ledgerType < 6, "Invalid ledger type");
        require(targetEpoch == currentEpochs[ledgerType], "Invalid epoch");
        require(msg.value >= MIN_INVEST, "Too small");
        require(msg.value <= MAX_INVEST, "Too large");
        require(!gamePaused, "Paused");

        // load user global info
        UserGlobalInfo storage userGlobalInfo = userGlobalInfos[msg.sender];
        // load global round info
        RoundInfo storage roundInfo = roundInfos[ledgerType][targetEpoch];
        // placeholder for user round info
        UserRoundInfo storage userRoundInfo;

        // determine referrer
        {
            address _referrer = userGlobalInfo.referrer;
            // if referrer is already set or msg.sender is the root user whose referrer is address(0)
            if (_referrer == address(0) && children[msg.sender].length == 0) {
                // if referrer is not set, set it and make sure it is a valid referrer
                require(referrer != address(0) && referrer != msg.sender, "Invalid referrer");
                // make sure referrer is registered already
                require(
                    userGlobalInfos[referrer].referrer != address(0) || children[referrer].length > 0,
                    "Invalid referrer"
                );

                // update storage
                userGlobalInfo.referrer = referrer;
                children[referrer].push(msg.sender);
                emit NewReferrer(msg.sender, referrer);
            }
        }

        // calculate each part of the amount
        OpenPositionParams memory params = OpenPositionParams({
            principalAmount: (msg.value * PRINCIPAL_RATIO) / PRICE_PRECISION,
            investAmount: (msg.value * INVEST_RATIO) / PRICE_PRECISION,
            referrerAmount: (msg.value * REFERRER_RATIO) / PRICE_PRECISION,
            incentiveAmount: (msg.value * INCENTIVE_RATIO) / PRICE_PRECISION,
            investReturnRate: _safeProcessFundTargetGetInvestReturnRate(roundInfo, ledgerType)
        });

        // check target ratio
        require(targetRate <= params.investReturnRate, "Invalid ratio");

        // update user's current ledger and current round info
        uint256 userRoundInfoLength = userRoundsInfos[ledgerType][msg.sender].length;
        if (
            userRoundInfoLength == 0 ||
            userRoundsInfos[ledgerType][msg.sender][userRoundInfoLength - 1].epoch < targetEpoch
        ) {
            // this is users first position in this round of this ledger type
            UserRoundInfo memory _userRoundInfo;
            _userRoundInfo = UserRoundInfo({
                epoch: targetEpoch,
                totalPositionAmount: 0,
                currentPrincipalAmount: 0,
                totalWithdrawnAmount: 0,
                totalIncentiveClaimedAmount: 0,
                totalClosedPositionCount: 0,
                returnRateBoostedAmount: 0
            });
            // push roundInfo to storage
            userRoundsInfos[ledgerType][msg.sender].push(_userRoundInfo);
            roundInfo.ledgerRoundToUserRoundIndex[msg.sender] = userRoundInfoLength;
            userRoundInfoLength += 1;
        }

        // fetch back the roundInfo from storage for further direct modification
        userRoundInfo = userRoundsInfos[ledgerType][msg.sender][userRoundInfoLength - 1];
        userRoundInfo.totalPositionAmount += msg.value;
        userRoundInfo.currentPrincipalAmount += params.principalAmount;

        if (useBoost) {
            uint256 boostCredit = userGlobalInfo.boostCredit;
            require(boostCredit >= msg.value, "Exceed boost credit");
            params.investReturnRate += BOOST_INVEST_RETURN_RATE; // + 0.5%
            userGlobalInfo.boostCredit -= msg.value;
        }

        // update ledger round info
        roundInfo.totalPositionAmount += msg.value;
        roundInfo.currentPrincipalAmount += params.principalAmount;
        roundInfo.currentInvestAmount += params.investAmount;
        roundInfo.currentPositionCount += 1;
        roundInfo.currentIncentiveAmount += params.incentiveAmount;
        roundInfo.incentiveSnapshot += msg.value;
        roundInfo.totalPositionCount += 1;

        uint256 userTotalPositionCount = roundLedgers[ledgerType][targetEpoch][msg.sender].length;
        // construct position info
        {
            uint256 expiryTime = block.timestamp;
            if (ledgerType == 0) {
                expiryTime += TIME_UNIT;
            } else {
                expiryTime += _pickDay(ledgerType, roundInfo.totalPositionCount) * TIME_UNIT;
            }

            PositionInfo memory positionInfo = PositionInfo({
                amount: msg.value,
                openTime: block.timestamp,
                expiryTime: expiryTime,
                investReturnRate: params.investReturnRate,
                withdrawnAmount: 0,
                incentiveAmount: 0,
                investReturnAmount: 0,
                index: userTotalPositionCount,
                incentiveClaimable: true
            });

            // push position info to round ledgers
            roundLedgers[ledgerType][targetEpoch][msg.sender].push(positionInfo);
        }

        // distribute referrer funds
        _distributeReferrerReward(msg.sender, params.referrerAmount);

        {
            // ranked incentive track
            mapping(uint256 => LinkedPosition) storage linkedPositions = roundInfo.linkedPositions;

            // update the latest position (which is the current position) node
            LinkedPosition storage linkedPosition = linkedPositions[roundInfo.totalPositionCount - 1];
            linkedPosition.user = msg.sender;
            linkedPosition.userPositionIndex = userTotalPositionCount;

            // adjust head in order to keep track last N positions
            if (roundInfo.totalPositionCount - roundInfo.head > RANKED_INCENTIVE) {
                // fetch current head node
                LinkedPosition storage headLinkedPosition = linkedPositions[roundInfo.head];
                PositionInfo storage headPositionInfo = roundLedgers[ledgerType][targetEpoch][headLinkedPosition.user][
                    headLinkedPosition.userPositionIndex
                ];
                // previous head position now is not eligible for incentive
                headPositionInfo.incentiveClaimable = false;
                // subtract head position amount, because we only keep the last RANKED_INCENTIVE positions
                roundInfo.incentiveSnapshot -= headPositionInfo.amount;
                // shift head to next global position to keep track the last N positions
                roundInfo.head += 1;
            }
        }

        // do transfer to platform
        {
            (bool success, ) = platformAddress.call{
                value: msg.value -
                    params.principalAmount -
                    params.investAmount -
                    params.referrerAmount -
                    params.incentiveAmount
            }("");
            require(success, "Transfer failed.");
        }
        // emit event
        emit PositionOpened(msg.sender, ledgerType, targetEpoch, userTotalPositionCount, msg.value);
    }

    /**
     * @notice Close position
     * @param ledgerType: Ledger type
     * @param epoch: Epoch of the ledger
     * @param positionIndex: Position index of the user
     */
    function closePosition(
        uint256 ledgerType,
        uint256 epoch,
        uint256 positionIndex
    ) external notContract nonReentrant {
        require(ledgerType < 6, "Invalid ledger type");
        require(epoch <= currentEpochs[ledgerType], "Invalid epoch");

        // check index is valid
        PositionInfo[] storage positionInfos = roundLedgers[ledgerType][epoch][msg.sender];
        require(positionIndex < positionInfos.length, "Invalid position index");

        // get position Info
        PositionInfo storage positionInfo = positionInfos[positionIndex];

        // get roundIno
        RoundInfo storage roundInfo = roundInfos[ledgerType][epoch];

        // user global info
        UserGlobalInfo storage userGlobalInfo = userGlobalInfos[msg.sender];

        _safeClosePosition(ledgerType, epoch, positionIndex, positionInfo, roundInfo, userGlobalInfo);
    }

    /**
     * @notice Close a batch of positions
     * @param ledgerType: Ledger type
     * @param epoch: Epoch of the ledger
     * @param positionIndexes: Position indexes of the user
     */
    function batchClosePositions(
        uint256 ledgerType,
        uint256 epoch,
        uint256[] calldata positionIndexes
    ) external nonReentrant {
        require(ledgerType < 6, "Invalid ledger type");
        require(epoch <= currentEpochs[ledgerType], "Invalid epoch");
        require(positionIndexes.length > 0, "Invalid position indexes");

        // check index is valid
        PositionInfo[] storage positionInfos = roundLedgers[ledgerType][epoch][msg.sender];

        // get roundIno
        RoundInfo storage roundInfo = roundInfos[ledgerType][epoch];

        // position info placeholder
        PositionInfo storage positionInfo;

        // user global info
        UserGlobalInfo storage userGlobalInfo = userGlobalInfos[msg.sender];

        uint256 positionIndexesLength = positionIndexes.length;
        uint256 positionInfosLength = positionInfos.length;
        for (uint256 i = 0; i < positionIndexesLength; ++i) {
            require(positionIndexes[i] < positionInfosLength, "Invalid position index");
            // get position Info
            positionInfo = positionInfos[positionIndexes[i]];
            _safeClosePosition(ledgerType, epoch, positionIndexes[i], positionInfo, roundInfo, userGlobalInfo);
        }
    }

    /**
     * @notice Claim a batch of incentive claimable positions
     * @param ledgerType: Ledger type
     * @param epoch: Epoch of the ledger
     * @param positionIndexes: Position indexes of the user
     */
    function batchClaimPositionIncentiveReward(
        uint256 ledgerType,
        uint256 epoch,
        uint256[] calldata positionIndexes
    ) external notContract nonReentrant {
        require(ledgerType < 6, "Invalid ledger type");
        require(epoch < currentEpochs[ledgerType], "Epoch not finished");

        // get position infos
        PositionInfo[] storage positionInfos = roundLedgers[ledgerType][epoch][msg.sender];

        // get roundInfo
        RoundInfo storage roundInfo = roundInfos[ledgerType][epoch];

        // get user round info
        uint256 userRoundIndex = roundInfo.ledgerRoundToUserRoundIndex[msg.sender];
        UserRoundInfo storage userRoundInfo = userRoundsInfos[ledgerType][msg.sender][userRoundIndex];

        // position info placeholder
        PositionInfo storage positionInfo;

        // collect payout
        uint256 payoutAmount;
        uint256 positionIndex;
        uint256 positionIndexesLength = positionIndexes.length;
        uint256 positionInfosLength = positionInfos.length;
        for (uint256 i = 0; i < positionIndexesLength; ++i) {
            positionIndex = positionIndexes[i];
            require(positionIndex < positionInfosLength, "Invalid position index");
            // get position Info
            positionInfo = positionInfos[positionIndex];
            require(positionInfo.incentiveClaimable, "Position not eligible");
            // update positionInfo
            payoutAmount += _safeProcessIncentiveAmount(positionInfo, roundInfo);
        }

        // transfer
        {
            (bool success, ) = msg.sender.call{value: payoutAmount}("");
            require(success, "Transfer failed.");
        }

        // update userRoundInfo
        userRoundInfo.totalIncentiveClaimedAmount += payoutAmount;
        emit IncentiveClaimed(msg.sender, payoutAmount);
    }

    /**
     * @notice Report a batch users' sales
     * @param users: list of users
     */
    function batchReportSales(address[] calldata users) external {
        uint256 usersLength = users.length;
        for (uint256 i = 0; i < usersLength; ++i) {
            _safeReportSales(users[i]);
        }
    }

    /**
     * @notice Claim referrer reward
     * @param referrer: referrer address
     */
    function claimReferrerReward(address referrer) external notContract nonReentrant {
        require(referrer != address(0), "Invalid referrer address");

        // get user global info
        UserGlobalInfo storage userGlobalInfo = userGlobalInfos[referrer];

        // get claimable amount
        uint256 claimableAmount = userGlobalInfo.totalReferrerReward - userGlobalInfo.referrerRewardClaimed;

        require(claimableAmount > 0, "No claimable amount");

        // update state
        userGlobalInfo.referrerRewardClaimed += claimableAmount;

        // do transfer
        {
            (bool success, ) = referrer.call{value: claimableAmount}("");
            require(success, "Transfer failed.");
        }

        // emit event
        emit ReferrerRewardClaimed(referrer, claimableAmount);
    }

    function getLinkedPositionInfo(
        uint256 ledgerType,
        uint256 epoch,
        uint256 cursor,
        uint256 size
    ) external view returns (LinkedPosition[] memory, uint256) {
        uint256 length = size;
        uint256 positionCount = roundInfos[ledgerType][epoch].totalPositionCount;
        if (cursor + length > positionCount) {
            length = positionCount - cursor;
        }
        LinkedPosition[] memory linkedPositions = new LinkedPosition[](length);
        RoundInfo storage roundInfo = roundInfos[ledgerType][epoch];
        for (uint256 i = 0; i < length; ++i) {
            linkedPositions[i] = roundInfo.linkedPositions[cursor + i];
        }
        return (linkedPositions, cursor + length);
    }

    function getUserRounds(
        uint256 ledgerType,
        address user,
        uint256 cursor,
        uint256 size
    ) external view returns (UserRoundInfo[] memory, uint256) {
        uint256 length = size;
        uint256 roundCount = userRoundsInfos[ledgerType][user].length;
        if (cursor + length > roundCount) {
            length = roundCount - cursor;
        }

        UserRoundInfo[] memory userRoundInfos = new UserRoundInfo[](length);
        for (uint256 i = 0; i < length; ++i) {
            userRoundInfos[i] = userRoundsInfos[ledgerType][user][cursor + i];
        }

        return (userRoundInfos, cursor + length);
    }

    function getUserRoundsLength(uint256 ledgerType, address user) external view returns (uint256) {
        return userRoundsInfos[ledgerType][user].length;
    }

    function getUserRoundLedgers(
        uint256 ledgerType,
        uint256 epoch,
        address user,
        uint256 cursor,
        uint256 size
    ) external view returns (PositionInfo[] memory, uint256) {
        uint256 length = size;
        uint256 positionCount = roundLedgers[ledgerType][epoch][user].length;
        if (cursor + length > positionCount) {
            length = positionCount - cursor;
        }

        PositionInfo[] memory positionInfos = new PositionInfo[](length);
        for (uint256 i = 0; i < length; ++i) {
            positionInfos[i] = roundLedgers[ledgerType][epoch][user][cursor + i];
        }

        return (positionInfos, cursor + length);
    }

    function getUserRoundLedgersLength(
        uint256 ledgerType,
        uint256 epoch,
        address user
    ) external view returns (uint256) {
        return roundLedgers[ledgerType][epoch][user].length;
    }

    function getChildren(
        address user,
        uint256 cursor,
        uint256 size
    ) external view returns (address[] memory, uint256) {
        uint256 length = size;
        uint256 childrenCount = children[user].length;
        if (cursor + length > childrenCount) {
            length = childrenCount - cursor;
        }

        address[] memory _children = new address[](length);
        for (uint256 i = 0; i < length; ++i) {
            _children[i] = children[user][cursor + i];
        }

        return (_children, cursor + length);
    }

    function getLedgerRoundToUserRoundIndex(
        uint256 ledgerType,
        uint256 epoch,
        address user
    ) external view returns (uint256) {
        return roundInfos[ledgerType][epoch].ledgerRoundToUserRoundIndex[user];
    }

    function getChildrenLength(address user) external view returns (uint256) {
        return children[user].length;
    }

    function getUserDepartSalesAndLevel(address user) external view returns (uint256, uint8) {
        UserGlobalInfo storage userGlobalInfo = userGlobalInfos[user];
        return (userGlobalInfo.sales - userGlobalInfo.maxChildrenSales, userGlobalInfo.salesLevel);
    }

    /**
     * @notice close a given position
     * @param ledgerType: ledger type
     * @param epoch: epoch of the ledger
     * @param positionIndex: position index of the user
     * @param positionInfo: storage of the position info
     * @param roundInfo: storage of the round info
     */
    function _safeClosePosition(
        uint256 ledgerType,
        uint256 epoch,
        uint256 positionIndex,
        PositionInfo storage positionInfo,
        RoundInfo storage roundInfo,
        UserGlobalInfo storage userGlobalInfo
    ) internal {
        require(positionInfo.withdrawnAmount == 0, "Position already claimed");
        require(positionInfo.expiryTime <= block.timestamp || roundInfo.stopLoss, "Position not expired");

        // get user round info from storage
        uint256 targetRoundInfoIndex = roundInfo.ledgerRoundToUserRoundIndex[msg.sender];
        UserRoundInfo storage userRoundInfo = userRoundsInfos[ledgerType][msg.sender][targetRoundInfoIndex];

        // calculate the amount to withdraw
        uint256 payoutAmount;
        uint256 principalAmount = (positionInfo.amount * PRINCIPAL_RATIO) / PRICE_PRECISION;

        // get back the principal amount
        payoutAmount += principalAmount;

        // update roundInfo
        roundInfo.currentPositionCount -= 1;
        roundInfo.currentPrincipalAmount -= principalAmount;

        if (!roundInfo.stopLoss) {
            // calculate expected invest return amount
            // how many days passed
            uint256 daysPassed;
            if (ledgerType == 0) {
                // 1 day
                daysPassed = (block.timestamp - positionInfo.openTime);
            } else {
                daysPassed = (positionInfo.expiryTime - positionInfo.openTime);
            }
            uint256 expectedInvestReturnAmount = (positionInfo.amount * positionInfo.investReturnRate * daysPassed) /
                PRICE_PRECISION /
                TIME_UNIT;

            // calculate the amount should be paid back from invest pool
            // 35% to total amount + expected return amount
            uint256 investReturnAmount = positionInfo.amount - principalAmount + expectedInvestReturnAmount;

            // compare if current invest pool has enough amount
            if (roundInfo.currentInvestAmount < investReturnAmount) {
                // not enough, then just pay back the current invest pool amount
                investReturnAmount = roundInfo.currentInvestAmount;
                roundInfo.currentInvestAmount = 0;
            } else {
                // update round info
                unchecked {
                    roundInfo.currentInvestAmount -= investReturnAmount;
                }
            }

            // check round is stop loss
            if (roundInfo.currentInvestAmount == 0) {
                roundInfo.stopLoss = true;
                currentEpochs[ledgerType] += 1;
                _refillStock(ledgerType);
                emit NewRound(currentEpochs[ledgerType], ledgerType);
            }

            // update payout amount
            payoutAmount += investReturnAmount;

            // update positionInfo
            positionInfo.investReturnAmount = investReturnAmount;
        }

        uint256 incentiveAmount = 0;
        // calculate incentive amount if eligible
        if (roundInfo.stopLoss && positionInfo.incentiveClaimable) {
            incentiveAmount = _safeProcessIncentiveAmount(positionInfo, roundInfo);

            // update payout amount
            payoutAmount += incentiveAmount;

            // update incentive info to storage
            userRoundInfo.totalIncentiveClaimedAmount += incentiveAmount;

            emit IncentiveClaimed(msg.sender, incentiveAmount);
        }

        // update user round info
        userRoundInfo.totalWithdrawnAmount += payoutAmount;
        userRoundInfo.currentPrincipalAmount -= principalAmount;

        // update positionInfo
        positionInfo.withdrawnAmount = payoutAmount;

        // accumulate user's boost credit
        if (payoutAmount - incentiveAmount < positionInfo.amount) {
            userGlobalInfo.boostCredit += positionInfo.amount;
        }

        // do transfer
        {
            (bool success, ) = msg.sender.call{value: payoutAmount}("");
            require(success, "Transfer failed.");
        }

        // emit event
        emit PositionClosed(msg.sender, ledgerType, epoch, positionIndex, payoutAmount);
    }

    /**
     * @notice process current round's fund target and return the updated invest return rate
     * @param roundInfo: storage of the round info
     */
    function _safeProcessFundTargetGetInvestReturnRate(RoundInfo storage roundInfo, uint256 ledgerType)
        internal
        returns (uint256)
    {
        FundTarget storage fundTarget = roundInfo.fundTarget;
        uint256 targetAmount = fundTarget.amount;
        uint256 achievedAmount = fundTarget.achievedAmount;
        // this is amount of total locked position
        uint256 currentTotalAmount_d6 = roundInfo.currentPrincipalAmount * PRICE_PRECISION;

        // process target fund
        {
            // check if this is the first time to process fund target
            if (fundTarget.lastCheckTime == 0) {
                // first check will use default parameter
                targetAmount = DEFAULT_TARGET_AMOUNTS[ledgerType];

                // update check time and target amount to storage
                fundTarget.lastCheckTime = block.timestamp;
                fundTarget.amount = targetAmount;
            } else {
                // check if over 24 hours since last check
                if (block.timestamp - fundTarget.lastCheckTime > TIME_UNIT) {
                    // recalculate target amount
                    targetAmount =
                        (((currentTotalAmount_d6 * 361) / 1000 / PRINCIPAL_RATIO - roundInfo.currentInvestAmount) *
                            PRICE_PRECISION) /
                        260000;

                    // update check time and target amount to storage
                    fundTarget.lastCheckTime = block.timestamp;
                    fundTarget.amount = targetAmount;
                    // reset achieved amount
                    fundTarget.achievedAmount = 0;
                    // reset achievedAmount in memory as well, because this will be the first position after adjusting the FundTarget
                    achievedAmount = 0;
                }
            }
            // update achieved amount in storage
            fundTarget.achievedAmount += msg.value;
        }

        // calculate return rate
        // notice: no need to include current invest amount
        if (achievedAmount <= targetAmount) {
            return DEFAULT_INVEST_RETURN_RATE;
        }

        // decrease 0.05% per 20% over target amount till 0.3%
        uint256 ratioDiff = (achievedAmount * PRICE_PRECISION) / targetAmount - PRICE_PRECISION;
        uint256 times = ratioDiff / (200000) + 1;
        if (ratioDiff % (200000) == 0) {
            times -= 1;
        }
        if (times > 14) {
            times = 14;
        }

        return DEFAULT_INVEST_RETURN_RATE - (times * 500);
    }

    /**
     * @notice process positionInfo and return incentive amount
     * @param positionInfo: storage of the position info
     * @param roundInfo: storage of the round info
     */
    function _safeProcessIncentiveAmount(PositionInfo storage positionInfo, RoundInfo storage roundInfo)
        internal
        returns (uint256)
    {
        // calculate incentive amount
        uint256 incentiveAmount = (positionInfo.amount * roundInfo.totalPositionAmount * INCENTIVE_RATIO) /
            roundInfo.incentiveSnapshot /
            PRICE_PRECISION;

        // with PRICE_PRECISION is due to the precision of division may result in a few wei left over
        if (roundInfo.currentIncentiveAmount < incentiveAmount + PRICE_PRECISION) {
            // clean up incentive amount
            incentiveAmount = roundInfo.currentIncentiveAmount;
            roundInfo.currentIncentiveAmount = 0;
        } else {
            roundInfo.currentIncentiveAmount -= incentiveAmount;
        }

        // this position is no longer eligible for incentive
        positionInfo.incentiveClaimable = false;

        // update positionInfo
        positionInfo.incentiveAmount = incentiveAmount;

        return incentiveAmount;
    }

    /**
     * @notice process user's level info and return the current level
     * @param currentLevel: user current level
     * @param user: user address
     * @param currentSales: user current sales
     * @param userGlobalInfo: storage of the user global info
     */
    function _safeProcessSalesLevel(
        uint8 currentLevel,
        address user,
        uint256 currentSales,
        UserGlobalInfo storage userGlobalInfo
    ) internal returns (uint8) {
        uint8 newLevel = _getSalesToLevel(currentSales);
        if (newLevel > currentLevel) {
            userGlobalInfo.salesLevel = newLevel;
            emit SalesLevelUpdated(user, newLevel);
        } else {
            newLevel = currentLevel;
        }
        return newLevel;
    }

    /**
     * @notice report user's sales and update its referrer sales level
     * @param user: user address
     */
    function _safeReportSales(address user) internal {
        UserGlobalInfo storage userGlobalInfo = userGlobalInfos[user];
        address referrer = userGlobalInfo.referrer;
        uint256 userSales = userGlobalInfo.sales;
        uint256 userReportedSales = userGlobalInfo.reportedSales;

        // get user's un-reported sales
        uint256 unreportedSales = userSales - userReportedSales;

        if (unreportedSales > 0) {
            // get referrer global info from storage
            UserGlobalInfo storage referrerGlobalInfo = userGlobalInfos[referrer];
            // fill up the sales to the referrer
            referrerGlobalInfo.sales += unreportedSales;
            // update user's reported sales
            userGlobalInfo.reportedSales = userSales;

            // all reported sales + user's own contributed position will be current user's final sales
            userSales += userGlobalInfo.totalPositionAmount;
            // current referrer's max children sales
            uint256 maxChildrenSales = referrerGlobalInfo.maxChildrenSales;
            // update max children sales if needed
            if (userSales > maxChildrenSales) {
                // referrer's max children sales is updated
                referrerGlobalInfo.maxChildrenSales = userSales;
                // update cache of max children sales
                maxChildrenSales = userSales;
            }
            // process referrer's sales level
            _safeProcessSalesLevel(
                referrerGlobalInfo.salesLevel,
                referrer,
                referrerGlobalInfo.sales - maxChildrenSales, // sales for level calculation is sales - max children sales
                referrerGlobalInfo
            );
        }
    }

    /**
     * @notice distribute referrer reward
     * @param user: user address
     * @param referrerAmount: total amount of referrer reward
     */
    function _distributeReferrerReward(address user, uint256 referrerAmount) internal virtual {
        UserGlobalInfo storage userGlobalInfo = userGlobalInfos[user];
        UserGlobalInfo storage referrerGlobalInfo;
        uint256 positionAmount = msg.value;

        // init all local variables as a search struct
        ReferrerSearch memory search;
        search.baseSalesLevel = 0;
        search.currentReferrer = userGlobalInfo.referrer;
        search.levelDiffAmount = (referrerAmount * 80) / 100;
        search.leftLevelDiffAmount = search.levelDiffAmount;
        search.levelDiffAmountPerLevel = search.levelDiffAmount / 12;
        search.levelSearchAmount = referrerAmount - search.levelDiffAmount;
        search.leftLevelSearchAmount = search.levelSearchAmount;
        search.levelSearchAmountPerReferrer = search.levelSearchAmount / 10;
        search.currentUserTotalPosAmount = userGlobalInfo.totalPositionAmount + positionAmount;
        userGlobalInfo.totalPositionAmount = search.currentUserTotalPosAmount;
        search.currentUser = user;

        while (search.depth < MAX_SEARCH_DEPTH) {
            // stop if current referrer is the root
            if (search.currentReferrer == address(0)) {
                break;
            }

            // this position does not counted as reported sales for first user himself
            if (search.depth > 0) userGlobalInfo.reportedSales += positionAmount;

            // cache current user information
            search.currentUserSales = userGlobalInfo.sales;
            search.currentUserReportedSales = userGlobalInfo.reportedSales;

            // cache current referrer information
            referrerGlobalInfo = userGlobalInfos[search.currentReferrer];

            // update referrer sales
            {
                search.currentReferrerSales = referrerGlobalInfo.sales;
                // add current sales to current referrer
                search.currentReferrerSales += positionAmount;
                // check unreported sales
                if (search.currentUserReportedSales < search.currentUserSales) {
                    // update referrerSales to include unreported sales
                    search.currentReferrerSales += search.currentUserSales - search.currentUserReportedSales;
                    // update current node storage for reported sales
                    userGlobalInfo.reportedSales = search.currentUserSales;
                }
                // update sales for current referrer
                referrerGlobalInfo.sales = search.currentReferrerSales;
            }

            // update referrer max children sales
            {
                // add current user's total position amount to current user's sales
                search.currentUserSales += search.currentUserTotalPosAmount;
                // check referrer's max child sales
                search.currentReferrerMaxChildSales = referrerGlobalInfo.maxChildrenSales;
                if (search.currentReferrerMaxChildSales < search.currentUserSales) {
                    // update max child sales
                    referrerGlobalInfo.maxChildrenSales = search.currentUserSales;
                    search.currentReferrerMaxChildSales = search.currentUserSales;
                }
            }

            // process referrer's sales level
            // @notice: current referrer sales level should ignore its max child sales
            search.currentReferrerLevel = _safeProcessSalesLevel(
                referrerGlobalInfo.salesLevel,
                search.currentReferrer,
                search.currentReferrerSales - search.currentReferrerMaxChildSales,
                referrerGlobalInfo
            );

            // start level diff calculation
            if (!search.levelDiffDone) {
                // compare the current referrer's level with the base sales level
                if (search.currentReferrerLevel > search.baseSalesLevel) {
                    // level diff
                    search.currentLevelDiff = search.currentReferrerLevel - search.baseSalesLevel;

                    // update base level
                    search.baseSalesLevel = search.currentReferrerLevel;

                    // calculate the referrer amount
                    search.currentReferrerAmount = search.currentLevelDiff * search.levelDiffAmountPerLevel;

                    // check left referrer amount
                    if (search.currentReferrerAmount + PRICE_PRECISION > search.leftLevelDiffAmount) {
                        search.currentReferrerAmount = search.leftLevelDiffAmount;
                    }

                    // update referrer's referrer amount
                    referrerGlobalInfo.totalReferrerReward += search.currentReferrerAmount;
                    emit ReferrerRewardAdded(search.currentReferrer, search.currentReferrerAmount, 0);

                    unchecked {
                        search.leftLevelDiffAmount -= search.currentReferrerAmount;
                    }

                    if (search.leftLevelDiffAmount == 0) {
                        search.levelDiffDone = true;
                    }
                }
            }
            if (!search.levelSearchDone) {
                // level search use referrer's real level
                search.levelSearchStep = _getLevelToLevelSearchStep(
                    _getSalesToLevel(search.currentReferrerSales - search.currentReferrerMaxChildSales)
                );

                if (search.numLevelSearchCandidate + 1 <= search.levelSearchStep) {
                    search.numLevelSearchCandidate += 1;

                    // check left referrer amount
                    if (search.levelSearchAmountPerReferrer + PRICE_PRECISION > search.leftLevelSearchAmount) {
                        search.levelSearchAmountPerReferrer = search.leftLevelSearchAmount;
                    }

                    // update referrer's referrer amount
                    referrerGlobalInfo.totalReferrerReward += search.levelSearchAmountPerReferrer;
                    emit ReferrerRewardAdded(search.currentReferrer, search.levelSearchAmountPerReferrer, 1);

                    unchecked {
                        search.leftLevelSearchAmount -= search.levelSearchAmountPerReferrer;
                    }

                    if (search.leftLevelSearchAmount == 0) {
                        search.levelSearchDone = true;
                    }
                }
            }

            search.currentUser = search.currentReferrer;
            search.currentReferrer = referrerGlobalInfo.referrer;

            userGlobalInfo = referrerGlobalInfo;
            search.currentUserTotalPosAmount = userGlobalInfo.totalPositionAmount;

            unchecked {
                search.depth += 1;
            }
        }

        // check residual referrer amount
        if (search.leftLevelDiffAmount > 0) {
            userGlobalInfos[user].totalReferrerReward += search.leftLevelDiffAmount;
            emit ReferrerRewardAdded(user, search.leftLevelDiffAmount, 0);
        }
        if (search.leftLevelSearchAmount > 0) {
            userGlobalInfos[user].totalReferrerReward += search.leftLevelSearchAmount;
            emit ReferrerRewardAdded(user, search.leftLevelSearchAmount, 1);
        }
    }

    /**
     * @notice get sales level from sales amount
     * @param amount: sales amount
     */
    function _getSalesToLevel(uint256 amount) internal pure virtual returns (uint8) {
        /* istanbul ignore else  */
        if (amount < 10000 ether) {
            return 0;
        } else if (amount < 100000 ether) {
            return 1;
        } else if (amount < 400000 ether) {
            return 2;
        } else if (amount < 800000 ether) {
            return 3;
        } else if (amount < 1500000 ether) {
            return 4;
        } else if (amount < 3000000 ether) {
            return 5;
        } else if (amount < 6000000 ether) {
            return 6;
        } else if (amount < 12000000 ether) {
            return 7;
        } else if (amount < 30000000 ether) {
            return 8;
        } else if (amount < 60000000 ether) {
            return 9;
        } else if (amount < 120000000 ether) {
            return 10;
        } else if (amount < 240000000 ether) {
            return 11;
        }
        return 12;
    }

    /**
     * @notice level search step from level
     * @param level: sales level (0-12)
     */
    function _getLevelToLevelSearchStep(uint8 level) internal pure returns (uint8) {
        unchecked {
            if (level < 5) return level * 2;
        }
        return 10;
    }
}

File 3 of 3 : Bucket.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

contract Bucket {
    struct BucketStock {
        uint8[] typeDays;
        uint16[] stockPrefixSum;
        uint16 currentBucketStock;
        mapping(uint16 => uint16) ledgerStockIndex;
        uint256 stockSize;
    }

    mapping(uint256 => BucketStock) public ledgerBucketStock;

    /**
     * @dev set an array of stock for the blind box
     */
    function _setStock(
        uint256 ledgerType,
        uint8[] calldata typeDays,
        uint16[] calldata stock
    ) internal {
        BucketStock storage bucketStock = ledgerBucketStock[ledgerType];
        uint16 itemCount = 0;
        uint16[] storage stockPrefixSum = bucketStock.stockPrefixSum;
        uint8[] storage typeDaysStorage = bucketStock.typeDays;
        uint256 stockLength = stock.length;
        for (uint16 i = 0; i < stockLength; ++i) {
            itemCount += stock[i];
            stockPrefixSum.push(itemCount);
            typeDaysStorage.push(typeDays[i]);
        }
        bucketStock.currentBucketStock = itemCount;
        bucketStock.stockSize = itemCount;
        require(stockPrefixSum.length <= 2e16, "stock length too long");
    }

    /**
     * @dev refill the stock of the bucket
     * @param ledgerType the type of the ledger
     */
    function _refillStock(uint256 ledgerType) internal {
        BucketStock storage bucketStock = ledgerBucketStock[ledgerType];
        bucketStock.currentBucketStock = uint16(bucketStock.stockSize);
    }

    /**
     * @dev Buy only one box
     */
    function _pickDay(uint256 ledgerType, uint256 seed) internal returns (uint16) {
        BucketStock storage bucketStock = ledgerBucketStock[ledgerType];
        uint16 randIndex = _getRandomIndex(seed, bucketStock.currentBucketStock);
        uint16 location = _pickLocation(randIndex, bucketStock);
        uint16 category = binarySearch(bucketStock.stockPrefixSum, location);
        return bucketStock.typeDays[category];
    }

    function _pickLocation(uint16 index, BucketStock storage bucketStock) internal returns (uint16) {
        uint16 location = bucketStock.ledgerStockIndex[index];
        if (location == 0) {
            location = index + 1;
        }
        uint16 lastIndexLocation = bucketStock.ledgerStockIndex[bucketStock.currentBucketStock - 1];

        if (lastIndexLocation == 0) {
            lastIndexLocation = bucketStock.currentBucketStock;
        }
        bucketStock.ledgerStockIndex[index] = lastIndexLocation;
        bucketStock.currentBucketStock--;
        bucketStock.ledgerStockIndex[bucketStock.currentBucketStock] = location;

        // refill the bucket
        if (bucketStock.currentBucketStock == 0) {
            bucketStock.currentBucketStock = uint16(bucketStock.stockSize);
        }
        return location - 1;
    }

    function _getRandomIndex(uint256 seed, uint16 size) internal view returns (uint16) {
        // NOTICE: We do not to prevent miner from front-running the transaction and the contract.
        return
            uint16(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            block.difficulty,
                            block.timestamp,
                            msg.sender,
                            blockhash(block.number - 1),
                            seed,
                            size
                        )
                    )
                ) % size
            );
    }

    function getBucketInfo(uint256 ledgerType) external view returns (uint8[] memory, uint16[] memory) {
        BucketStock storage bucketStock = ledgerBucketStock[ledgerType];
        return (bucketStock.typeDays, bucketStock.stockPrefixSum);
    }

    function binarySearch(uint16[] storage array, uint16 target) internal view returns (uint16) {
        uint256 left = 0;
        uint256 right = array.length - 1;
        uint256 mid;
        while (left < right - 1) {
            mid = left + (right - left) / 2;
            if (array[mid] > target) {
                right = mid;
            } else {
                left = mid + 1;
            }
        }
        if (target < array[left]) {
            return uint16(left);
        } else {
            return uint16(right);
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_platformAddress","type":"address"},{"internalType":"address","name":"_tempAdmin","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"IncentiveClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"referrer","type":"address"}],"name":"NewReferrer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"ledgeType","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"ledgeType","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"positionIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PositionClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"ledgeType","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"positionIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PositionOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"rewardType","type":"uint256"}],"name":"ReferrerRewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReferrerRewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint8","name":"level","type":"uint8"}],"name":"SalesLevelUpdated","type":"event"},{"inputs":[],"name":"BOOST_INVEST_RETURN_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_INVEST_RETURN_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"DEFAULT_TARGET_AMOUNTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INCENTIVE_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INVEST_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_INVEST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SEARCH_DEPTH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_INVEST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PLATFORM_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRINCIPAL_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RANKED_INCENTIVE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REFERRER_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIME_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256[]","name":"positionIndexes","type":"uint256[]"}],"name":"batchClaimPositionIncentiveReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256[]","name":"positionIndexes","type":"uint256[]"}],"name":"batchClosePositions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"}],"name":"batchReportSales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"address[]","name":"referrers","type":"address[]"},{"internalType":"uint8[]","name":"salesLevels","type":"uint8[]"}],"name":"batchSetReferrerInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"children","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"}],"name":"claimReferrerReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"positionIndex","type":"uint256"}],"name":"closePosition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"currentEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dropTempAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gamePaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"}],"name":"getBucketInfo","outputs":[{"internalType":"uint8[]","name":"","type":"uint8[]"},{"internalType":"uint16[]","name":"","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"getChildren","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getChildrenLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getLedgerRoundToUserRoundIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"getLinkedPositionInfo","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"userPositionIndex","type":"uint256"}],"internalType":"struct Avatar.LinkedPosition[]","name":"","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserDepartSalesAndLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"getUserRoundLedgers","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"openTime","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"uint256","name":"investReturnRate","type":"uint256"},{"internalType":"uint256","name":"withdrawnAmount","type":"uint256"},{"internalType":"uint256","name":"incentiveAmount","type":"uint256"},{"internalType":"uint256","name":"investReturnAmount","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"bool","name":"incentiveClaimable","type":"bool"}],"internalType":"struct Avatar.PositionInfo[]","name":"","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getUserRoundLedgersLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"getUserRounds","outputs":[{"components":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"totalPositionAmount","type":"uint256"},{"internalType":"uint256","name":"currentPrincipalAmount","type":"uint256"},{"internalType":"uint256","name":"totalWithdrawnAmount","type":"uint256"},{"internalType":"uint256","name":"totalIncentiveClaimedAmount","type":"uint256"},{"internalType":"uint256","name":"totalClosedPositionCount","type":"uint256"},{"internalType":"uint256","name":"returnRateBoostedAmount","type":"uint256"}],"internalType":"struct Avatar.UserRoundInfo[]","name":"","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getUserRoundsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ledgerBucketStock","outputs":[{"internalType":"uint16","name":"currentBucketStock","type":"uint16"},{"internalType":"uint256","name":"stockSize","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"uint256","name":"targetEpoch","type":"uint256"},{"internalType":"uint256","name":"targetRate","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"bool","name":"useBoost","type":"bool"}],"name":"openPosition","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundInfos","outputs":[{"components":[{"internalType":"uint256","name":"lastCheckTime","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"achievedAmount","type":"uint256"}],"internalType":"struct Avatar.FundTarget","name":"fundTarget","type":"tuple"},{"internalType":"uint256","name":"totalPositionAmount","type":"uint256"},{"internalType":"uint256","name":"currentPrincipalAmount","type":"uint256"},{"internalType":"uint256","name":"currentInvestAmount","type":"uint256"},{"internalType":"uint256","name":"totalPositionCount","type":"uint256"},{"internalType":"uint256","name":"currentPositionCount","type":"uint256"},{"internalType":"uint256","name":"currentIncentiveAmount","type":"uint256"},{"internalType":"uint256","name":"incentiveSnapshot","type":"uint256"},{"internalType":"uint256","name":"head","type":"uint256"},{"internalType":"bool","name":"stopLoss","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundLedgers","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"openTime","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"uint256","name":"investReturnRate","type":"uint256"},{"internalType":"uint256","name":"withdrawnAmount","type":"uint256"},{"internalType":"uint256","name":"incentiveAmount","type":"uint256"},{"internalType":"uint256","name":"investReturnAmount","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"bool","name":"incentiveClaimable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ledgerType","type":"uint256"},{"internalType":"uint8[]","name":"typeDays","type":"uint8[]"},{"internalType":"uint16[]","name":"stock","type":"uint16[]"}],"name":"setStock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tempAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userGlobalInfos","outputs":[{"internalType":"address","name":"referrer","type":"address"},{"internalType":"uint256","name":"totalReferrerReward","type":"uint256"},{"internalType":"uint256","name":"referrerRewardClaimed","type":"uint256"},{"internalType":"uint256","name":"boostCredit","type":"uint256"},{"internalType":"uint256","name":"maxChildrenSales","type":"uint256"},{"internalType":"uint256","name":"sales","type":"uint256"},{"internalType":"uint256","name":"totalPositionAmount","type":"uint256"},{"internalType":"uint256","name":"reportedSales","type":"uint256"},{"internalType":"uint8","name":"salesLevel","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRoundsInfos","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"totalPositionAmount","type":"uint256"},{"internalType":"uint256","name":"currentPrincipalAmount","type":"uint256"},{"internalType":"uint256","name":"totalWithdrawnAmount","type":"uint256"},{"internalType":"uint256","name":"totalIncentiveClaimedAmount","type":"uint256"},{"internalType":"uint256","name":"totalClosedPositionCount","type":"uint256"},{"internalType":"uint256","name":"returnRateBoostedAmount","type":"uint256"}],"stateMutability":"view","type":"function"}]

610140604052691b87506a3e7b0d40000060809081526934f086f3b33b6840000060a052694a1d89bb94865ec0000060c0526969e10de76676d080000060e052699ed194db19b238c00000610100526a0108b2a2c2802909400000610120526200006e9060029060066200022a565b503480156200007c57600080fd5b5060405162005ffd38038062005ffd8339810160408190526200009f91620002ac565b60016000556001600160a01b03831615801590620000c557506001600160a01b03821615155b8015620000da57506001600160a01b03811615155b6200012b5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420616464726573732070726f76696465640000000000000000604482015260640160405180910390fd5b604051600090819060008051602062005fdd833981519152908290a360405160019060009060008051602062005fdd833981519152908290a360405160029060009060008051602062005fdd833981519152908290a360405160039060009060008051602062005fdd833981519152908290a360405160049060009060008051602062005fdd833981519152908290a360405160059060009060008051602062005fdd833981519152908290a3602380546001600160a01b039384166001600160a01b031991821617909155602480546008805496861696909316959095179091556001600160a81b0319909316911617600160a01b179055620002f6565b826006810192821562000266579160200282015b828111156200026657825182906001600160581b03169055916020019190600101906200023e565b506200027492915062000278565b5090565b5b8082111562000274576000815560010162000279565b80516001600160a01b0381168114620002a757600080fd5b919050565b600080600060608486031215620002c257600080fd5b620002cd846200028f565b9250620002dd602085016200028f565b9150620002ed604085016200028f565b90509250925092565b615cd780620003066000396000f3fe6080604052600436106102fd5760003560e01c8063990ef19a1161018f578063d16f2c11116100e1578063e7f2a8dd1161008a578063e890ffb611610064578063e890ffb614610a95578063eddab34714610ac3578063f76da15714610ae357600080fd5b8063e7f2a8dd14610a05578063e7f481ae14610a18578063e81e1e4f14610a2f57600080fd5b8063dd840a25116100bb578063dd840a25146109c5578063e6128c1514610352578063e6c30103146109e557600080fd5b8063d16f2c1114610962578063d4518f3e14610982578063dbe55e561461099857600080fd5b8063b6fbb58b11610143578063c3de1ab91161011d578063c3de1ab9146108a6578063ccaccef8146108e8578063cfd8cc3a1461091f57600080fd5b8063b6fbb58b14610839578063bedb86fb14610866578063bf291a511461088657600080fd5b8063acecd3f811610174578063acecd3f8146107cb578063af7c0e9a146107f9578063b35648d71461081957600080fd5b8063990ef19a14610794578063ab0f54d1146107b457600080fd5b806354d8db47116102535780637e156a44116101fc57806390e49755116101d657806390e497551461074757806392682e9e1461075d57806395082d251461077d57600080fd5b80637e156a44146106ec5780638501aea91461070257806385cded551461071957600080fd5b806357e6ce631161022d57806357e6ce63146105c05780636ca87f5a146105e0578063706cabd5146106be57600080fd5b806354d8db4714610526578063570ca7351461053b578063575246791461056857600080fd5b806335a051fb116102b55780634280d3591161028f5780634280d3591461049e578063466f087f146104cc5780634e94f499146104e157600080fd5b806335a051fb1461040c57806339fb11a6146104615780633ae47adc1461048157600080fd5b80632681cb82116102e65780632681cb821461035257806329605e7714610368578063325e6a9d1461038a57600080fd5b806301639fd1146103025780631b85aa4914610335575b600080fd5b34801561030e57600080fd5b5061032261031d3660046152af565b610af8565b6040519081526020015b60405180910390f35b34801561034157600080fd5b5061032268056bc75e2d6310000081565b34801561035e57600080fd5b5061032261271081565b34801561037457600080fd5b506103886103833660046152db565b610b3c565b005b34801561039657600080fd5b506103aa6103a53660046152f6565b610c86565b604080518b5181526020808d0151908201529a810151908b015260608a0198909852608089019690965260a088019490945260c087019290925260e086015261010085015261012084015261014083015215156101608201526101800161032c565b34801561041857600080fd5b5061042c610427366004615318565b610d10565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e00161032c565b34801561046d57600080fd5b5061038861047c366004615399565b610d7b565b34801561048d57600080fd5b50610322683635c9adc5dea0000081565b3480156104aa57600080fd5b506104be6104b93660046153ec565b61104a565b60405161032c92919061541f565b3480156104d857600080fd5b506103886111b2565b3480156104ed57600080fd5b506105016104fc36600461547d565b61125d565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161032c565b34801561053257600080fd5b50610322603c81565b34801561054757600080fd5b506024546105019073ffffffffffffffffffffffffffffffffffffffff1681565b34801561057457600080fd5b506105a66105833660046154a7565b6001602052600090815260409020600281015460049091015461ffff9091169082565b6040805161ffff909316835260208301919091520161032c565b3480156105cc57600080fd5b506103226105db3660046154c0565b6112a2565b3480156105ec57600080fd5b506106606105fb3660046152db565b60216020526000908152604090208054600182015460028301546003840154600485015460058601546006870154600788015460089098015473ffffffffffffffffffffffffffffffffffffffff909716979596949593949293919290919060ff1689565b6040805173ffffffffffffffffffffffffffffffffffffffff909a168a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e083015260ff166101008201526101200161032c565b3480156106ca57600080fd5b506106de6106d93660046154a7565b6112f2565b60405161032c9291906154f5565b3480156106f857600080fd5b5061032261138881565b34801561070e57600080fd5b506103226209eb1081565b34801561072557600080fd5b50610739610734366004615577565b6113fb565b60405161032c9291906155a9565b34801561075357600080fd5b50610322614e2081565b34801561076957600080fd5b50610388610778366004615612565b611574565b34801561078957600080fd5b50610322620f424081565b3480156107a057600080fd5b506103226107af3660046154a7565b6117ad565b3480156107c057600080fd5b506103226203f7a081565b3480156107d757600080fd5b506107eb6107e636600461568c565b6117c4565b60405161032c9291906156c7565b34801561080557600080fd5b506103226108143660046154a7565b6119b8565b34801561082557600080fd5b50610388610834366004615750565b6119c8565b34801561084557600080fd5b506023546105019073ffffffffffffffffffffffffffffffffffffffff1681565b34801561087257600080fd5b5061038861088136600461578c565b611c35565b34801561089257600080fd5b506103886108a13660046157a7565b611d85565b3480156108b257600080fd5b506024546108d89074010000000000000000000000000000000000000000900460ff1681565b604051901515815260200161032c565b3480156108f457600080fd5b506109086109033660046152db565b611dd0565b6040805192835260ff90911660208301520161032c565b34801561092b57600080fd5b5061032261093a3660046152db565b73ffffffffffffffffffffffffffffffffffffffff1660009081526022602052604090205490565b34801561096e57600080fd5b5061038861097d366004615399565b611e1f565b34801561098e57600080fd5b5061032261ea6081565b3480156109a457600080fd5b506008546105019073ffffffffffffffffffffffffffffffffffffffff1681565b3480156109d157600080fd5b506103226109e03660046154c0565b612285565b3480156109f157600080fd5b50610388610a003660046152db565b6122d1565b610388610a133660046157e9565b6125a8565b348015610a2457600080fd5b506103226201518081565b348015610a3b57600080fd5b50610a4f610a4a366004615839565b6133f1565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e083015215156101008201526101200161032c565b348015610aa157600080fd5b50610ab5610ab0366004615876565b613478565b60405161032c9291906158bd565b348015610acf57600080fd5b50610388610ade36600461594a565b6136af565b348015610aef57600080fd5b50610322603281565b6000601b8360068110610b0d57610b0d6159e4565b73ffffffffffffffffffffffffffffffffffffffff841660009081529101602052604090205490505b92915050565b60245473ffffffffffffffffffffffffffffffffffffffff163314610bc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4f6e6c79206f70657261746f720000000000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610c3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610bb9565b602480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60158260068110610c9657600080fd5b01602090815260009182526040918290208251606081018452815481526001820154928101929092526002810154928201929092526003820154600483015460058401546006850154600786015460088701546009880154600a890154600d90990154979950959794969395929491939092919060ff168a565b601b8360068110610d2057600080fd5b016020528160005260406000208181548110610d3b57600080fd5b6000918252602090912060079091020180546001820154600283015460038401546004850154600586015460069096015494985092965090945092909187565b610d83613ad7565b60068410610ded576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964206c65646765722074797065000000000000000000000000006044820152606401610bb9565b60098460068110610e0057610e006159e4565b0154831115610e6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642065706f6368000000000000000000000000000000000000006044820152606401610bb9565b80610ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c696420706f736974696f6e20696e646578657300000000000000006044820152606401610bb9565b6000600f8560068110610ee757610ee76159e4565b60008681529101602090815260408083203384529091528120915060158660068110610f1557610f156159e4565b6000878152910160209081526040808320338452602190925282208454919350908590835b828110156110335781898983818110610f5557610f556159e4565b9050602002013510610fc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420706f736974696f6e20696e646578000000000000000000006044820152606401610bb9565b86898983818110610fd657610fd66159e4565b9050602002013581548110610fed57610fed6159e4565b906000526020600020906009020194506110238b8b8b8b85818110611014576110146159e4565b90506020020135888a89613b4a565b61102c81615a42565b9050610f3a565b505050505050506110446001600055565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260226020526040812054606091908390806110818388615a7a565b1115611094576110918682615a92565b91505b60008267ffffffffffffffff8111156110af576110af615aa9565b6040519080825280602002602001820160405280156110d8578160200160208202803683370190505b50905060005b838110156111975773ffffffffffffffffffffffffffffffffffffffff89166000908152602260205260409020611115828a615a7a565b81548110611125576111256159e4565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110611162576111626159e4565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015261119081615a42565b90506110de565b50806111a38489615a7a565b94509450505050935093915050565b60235473ffffffffffffffffffffffffffffffffffffffff163314611233576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4f6e6c792061646d696e000000000000000000000000000000000000000000006044820152606401610bb9565b602380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6022602052816000526040600020818154811061127957600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169150829050565b6000601584600681106112b7576112b76159e4565b6000948552016020908152604080852073ffffffffffffffffffffffffffffffffffffffff949094168552600c909301905250902054919050565b6000818152600160208181526040928390208054845181840281018401909552808552606094859492938493840192849183018282801561137057602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116113415790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156113ea57602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116113b15790505b505050505090509250925050915091565b60606000828160158860068110611414576114146159e4565b6000898152910160205260409020600601549050806114338388615a7a565b1115611446576114438682615a92565b91505b60008267ffffffffffffffff81111561146157611461615aa9565b6040519080825280602002602001820160405280156114a657816020015b604080518082019091526000808252602082015281526020019060019003908161147f5790505b509050600060158a600681106114be576114be6159e4565b60008b815291016020526040812091505b8481101561155757600b820160006114e7838c615a7a565b815260208082019290925260409081016000208151808301909252805473ffffffffffffffffffffffffffffffffffffffff1682526001015491810191909152835184908390811061153b5761153b6159e4565b60200260200101819052508061155090615a42565b90506114cf565b5081611563858a615a7a565b955095505050505094509492505050565b600085116115de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964206c65646765722074797065000000000000000000000000006044820152606401610bb9565b60068510611648576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964206c65646765722074797065000000000000000000000000006044820152606401610bb9565b60235473ffffffffffffffffffffffffffffffffffffffff1633146116c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4f6e6c792061646d696e000000000000000000000000000000000000000000006044820152606401610bb9565b80611730576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c69642073746f636b206172726179000000000000000000000000006044820152606401610bb9565b828114611799576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f496e76616c696420706172616d730000000000000000000000000000000000006044820152606401610bb9565b6117a685858585856140ad565b5050505050565b600281600681106117bd57600080fd5b0154905081565b606060008281601b88600681106117dd576117dd6159e4565b73ffffffffffffffffffffffffffffffffffffffff89166000908152910160205260409020549050806118108388615a7a565b1115611823576118208682615a92565b91505b60008267ffffffffffffffff81111561183e5761183e615aa9565b6040519080825280602002602001820160405280156118af57816020015b61189c6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b81526020019060019003908161185c5790505b50905060005b8381101561199c57601b8a600681106118d0576118d06159e4565b73ffffffffffffffffffffffffffffffffffffffff8b1660009081529101602052604090206118ff828a615a7a565b8154811061190f5761190f6159e4565b90600052602060002090600702016040518060e0016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481525050828281518110611980576119806159e4565b60200260200101819052508061199590615a42565b90506118b5565b50806119a88489615a7a565b9450945050505094509492505050565b600981600681106117bd57600080fd5b333214611a31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f7765640000000000000000000000006044820152606401610bb9565b611a39613ad7565b60068310611aa3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964206c65646765722074797065000000000000000000000000006044820152606401610bb9565b60098360068110611ab657611ab66159e4565b0154821115611b21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642065706f6368000000000000000000000000000000000000006044820152606401610bb9565b6000600f8460068110611b3657611b366159e4565b6000858152910160209081526040808320338452909152902080549091508210611bbc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420706f736974696f6e20696e646578000000000000000000006044820152606401610bb9565b6000818381548110611bd057611bd06159e4565b90600052602060002090600902019050600060158660068110611bf557611bf56159e4565b60008781529101602090815260408083203384526021909252909120909150611c22878787868686613b4a565b50505050611c306001600055565b505050565b60245473ffffffffffffffffffffffffffffffffffffffff163314611cb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4f6e6c79206f70657261746f72000000000000000000000000000000000000006044820152606401610bb9565b80611d3b5760235473ffffffffffffffffffffffffffffffffffffffff1615611d3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f54656d702061646d696e206e6f742064726f70706564000000000000000000006044820152606401610bb9565b6024805491151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b8060005b8181101561104457611dc0848483818110611da657611da66159e4565b9050602002016020810190611dbb91906152db565b61426b565b611dc981615a42565b9050611d89565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260216020526040812060048101546005820154839291611e0b91615a92565b600890910154909460ff9091169350915050565b333214611e88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f7765640000000000000000000000006044820152606401610bb9565b611e90613ad7565b60068410611efa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964206c65646765722074797065000000000000000000000000006044820152606401610bb9565b60098460068110611f0d57611f0d6159e4565b01548310611f77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f45706f6368206e6f742066696e697368656400000000000000000000000000006044820152606401610bb9565b6000600f8560068110611f8c57611f8c6159e4565b60008681529101602090815260408083203384529091528120915060158660068110611fba57611fba6159e4565b6000878152910160209081526040808320338452600c810190925282205490925090601b8860068110611fef57611fef6159e4565b336000908152910160205260409020805483908110612010576120106159e4565b60009182526020822086546007909202019250819081908890825b82811015612170578b8b82818110612045576120456159e4565b9050602002013593508184106120b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420706f736974696f6e20696e646578000000000000000000006044820152606401610bb9565b8984815481106120c9576120c96159e4565b60009182526020909120600990910201600881015490965060ff1661214a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f506f736974696f6e206e6f7420656c696769626c6500000000000000000000006044820152606401610bb9565b612154868a614355565b61215e9086615a7a565b945061216981615a42565b905061202b565b50604051600090339086908381818185875af1925050503d80600081146121b3576040519150601f19603f3d011682016040523d82523d6000602084013e6121b8565b606091505b5050905080612223576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610bb9565b50838660040160008282546122389190615a7a565b909155505060405184815233907ff383c0546bb6669c3250601085779bc0b63da3e0fb8e4881605db6fb1a9d4e829060200160405180910390a25050505050505050506110446001600055565b6000600f846006811061229a5761229a6159e4565b6000948552016020908152604080852073ffffffffffffffffffffffffffffffffffffffff94909416855292905250902054919050565b33321461233a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f7765640000000000000000000000006044820152606401610bb9565b612342613ad7565b73ffffffffffffffffffffffffffffffffffffffff81166123bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c6964207265666572726572206164647265737300000000000000006044820152606401610bb9565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602160205260408120600281015460018201549192916123fb9190615a92565b905060008111612467576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4e6f20636c61696d61626c6520616d6f756e74000000000000000000000000006044820152606401610bb9565b8082600201600082825461247b9190615a7a565b909155505060405160009073ffffffffffffffffffffffffffffffffffffffff85169083908381818185875af1925050503d80600081146124d8576040519150601f19603f3d011682016040523d82523d6000602084013e6124dd565b606091505b5050905080612548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610bb9565b508273ffffffffffffffffffffffffffffffffffffffff167f79c3760047e8d4ea109570112ef39d6f758cccf9d64193dfc3885308368c5f8e8260405161259191815260200190565b60405180910390a250506125a56001600055565b50565b333214612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f7765640000000000000000000000006044820152606401610bb9565b612619613ad7565b60068510612683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964206c65646765722074797065000000000000000000000000006044820152606401610bb9565b60098560068110612696576126966159e4565b01548414612700576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642065706f6368000000000000000000000000000000000000006044820152606401610bb9565b68056bc75e2d63100000341015612773576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f546f6f20736d616c6c00000000000000000000000000000000000000000000006044820152606401610bb9565b683635c9adc5dea000003411156127e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f546f6f206c6172676500000000000000000000000000000000000000000000006044820152606401610bb9565b60245474010000000000000000000000000000000000000000900460ff161561286b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f50617573656400000000000000000000000000000000000000000000000000006044820152606401610bb9565b336000908152602160205260408120906015876006811061288e5761288e6159e4565b6000888152910160205260408120835490925073ffffffffffffffffffffffffffffffffffffffff16801580156128d2575033600090815260226020526040902054155b15612acd5773ffffffffffffffffffffffffffffffffffffffff861615801590612912575073ffffffffffffffffffffffffffffffffffffffff86163314155b612978576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f496e76616c6964207265666572726572000000000000000000000000000000006044820152606401610bb9565b73ffffffffffffffffffffffffffffffffffffffff868116600090815260216020526040902054161515806129d1575073ffffffffffffffffffffffffffffffffffffffff861660009081526022602052604090205415155b612a37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f496e76616c6964207265666572726572000000000000000000000000000000006044820152606401610bb9565b83547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff8816908117865560008181526022602090815260408083208054600181018255908452918320909101805433951685179055519192917f477b8e22e5c741a54f282b0a52d66dc0ef3c9cb6a292100f59214814296ebd579190a35b5060006040518060a00160405280620f42406209eb1034612aee9190615ad8565b612af89190615b44565b8152602001620f4240612b0e6203f7a034615ad8565b612b189190615b44565b8152602001620f4240612b2d61ea6034615ad8565b612b379190615b44565b8152602001620f4240612b4c61271034615ad8565b612b569190615b44565b8152602001612b65858c614414565b81525090508060800151871115612bd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c696420726174696f000000000000000000000000000000000000006044820152606401610bb9565b6000601b8a60068110612bed57612bed6159e4565b336000908152910160205260409020549050801580612c59575088601b8b60068110612c1b57612c1b6159e4565b336000908152910160205260409020612c35600184615a92565b81548110612c4557612c456159e4565b906000526020600020906007020160000154105b15612d7157612c9e6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040518060e001604052808b8152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509050601b8b60068110612cec57612cec6159e4565b336000818152919092016020908152604080832080546001808201835591855283852087516007909202019081558684015181830155868301516002820155606087015160038201556080870151600482015560a0870151600582015560c0870151600690910155938352600c89019091529020839055612d6d9083615a7a565b9150505b601b8a60068110612d8457612d846159e4565b336000908152910160205260409020612d9e600183615a92565b81548110612dae57612dae6159e4565b9060005260206000209060070201925034836001016000828254612dd29190615a7a565b90915550508151600284018054600090612ded908490615a7a565b90915550508515612e9c57600385015434811015612e67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f45786365656420626f6f737420637265646974000000000000000000000000006044820152606401610bb9565b61138883608001818151612e7b9190615a7a565b905250600386018054349190600090612e95908490615a92565b9091555050505b34846003016000828254612eb09190615a7a565b90915550508151600485018054600090612ecb908490615a7a565b90915550506020820151600585018054600090612ee9908490615a7a565b925050819055506001846007016000828254612f059190615a7a565b90915550506060820151600885018054600090612f23908490615a7a565b9250508190555034846009016000828254612f3e9190615a7a565b925050819055506001846006016000828254612f5a9190615a7a565b9091555060009050600f8b60068110612f7557612f756159e4565b60008c8152910160209081526040808320338452909152812054915042908c9003612fae57612fa76201518082615a7a565b9050612fdb565b62015180612fc08d88600601546145b5565b61ffff16612fce9190615ad8565b612fd89082615a7a565b90505b60408051610120810182523481524260208201529081018290526080808601516060830152600090820181905260a0820181905260c082015260e081018390526001610100820152600f8d60068110613036576130366159e4565b60008e8152910160209081526040808320338085529083528184208054600180820183559186529484902086516009909602019485559285015192840192909255838101516002840155606084015160038401556080840151600484015560a0840151600584015560c0840151600684015560e0840151600784015561010090930151600890920180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001692151592909217909155908501516130fa925061463e565b600085600b0190506000816000600189600601546131189190615a92565b8152602081019190915260400160002080547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317815560018101849055600a8801546006890154919250603c916131719190615a92565b111561329b57600a870154600090815260208390526040812090600f8f6006811061319e5761319e6159e4565b0160008f815260200190815260200160002060008360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020826001015481548110613226576132266159e4565b6000918252602082206009918202016008810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690558054918c018054919450919290613277908490615a92565b92505081905550600189600a0160008282546132939190615a7a565b909155505050505b5050600854606084015160408501516020860151865160009473ffffffffffffffffffffffffffffffffffffffff16939291906132d89034615a92565b6132e29190615a92565b6132ec9190615a92565b6132f69190615a92565b604051600081818185875af1925050503d8060008114613332576040519150601f19603f3d011682016040523d82523d6000602084013e613337565b606091505b50509050806133a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610bb9565b50604080518281523460208201528b918d9133917f7a1ae8665412b69d0fd9db37f50dfa14e31fd10c7c46a9b5e22214e1b9b25eda910160405180910390a45050505050506117a66001600055565b600f846006811061340157600080fd5b01602052826000526040600020602052816000526040600020818154811061342857600080fd5b6000918252602090912060099091020180546001820154600283015460038401546004850154600586015460068701546007880154600890980154969b5094995092975090955093909260ff1689565b606060008281600f8960068110613491576134916159e4565b60008a815291016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8b1684529091529020549050806134ce8388615a7a565b11156134e1576134de8682615a92565b91505b60008267ffffffffffffffff8111156134fc576134fc615aa9565b60405190808252806020026020018201604052801561357e57816020015b61356b60405180610120016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b81526020019060019003908161351a5790505b50905060005b8381101561369257600f8b6006811061359f5761359f6159e4565b60008c815291016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8d16845290915290206135d8828a615a7a565b815481106135e8576135e86159e4565b600091825260209182902060408051610120810182526009909302909101805483526001810154938301939093526002830154908201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260089091015460ff1615156101008201528251839083908110613676576136766159e4565b60200260200101819052508061368b90615a42565b9050613584565b508061369e8489615a7a565b945094505050509550959350505050565b60235473ffffffffffffffffffffffffffffffffffffffff163314613730576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4f6e6c792061646d696e000000000000000000000000000000000000000000006044820152606401610bb9565b848314801561373e57508481145b6137a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c696420696e707574000000000000000000000000000000000000006044820152606401610bb9565b600085815b81811015613acc5760008989838181106137c5576137c56159e4565b90506020020160208101906137da91906152db565b73ffffffffffffffffffffffffffffffffffffffff1603613857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c696420616464726573732070726f766964656400000000000000006044820152606401610bb9565b602160008a8a8481811061386d5761386d6159e4565b905060200201602081019061388291906152db565b73ffffffffffffffffffffffffffffffffffffffff9081168252602082019290925260400160002080549094501615613917576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f526566657272657220616c7265616479207365740000000000000000000000006044820152606401610bb9565b868682818110613929576139296159e4565b905060200201602081019061393e91906152db565b83547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff91909116178355848482818110613990576139906159e4565b90506020020160208101906139a59190615b58565b6008840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055602260008888848181106139ef576139ef6159e4565b9050602002016020810190613a0491906152db565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020898983818110613a5057613a506159e4565b9050602002016020810190613a6591906152db565b81546001810183556000928352602090922090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055613ac581615a42565b90506137a9565b505050505050505050565b600260005403613b43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bb9565b6002600055565b600483015415613bb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f506f736974696f6e20616c726561647920636c61696d656400000000000000006044820152606401610bb9565b428360020154111580613bcd5750600d82015460ff165b613c33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f506f736974696f6e206e6f7420657870697265640000000000000000000000006044820152606401610bb9565b336000908152600c8301602052604081205490601b8860068110613c5957613c596159e4565b336000908152910160205260409020805483908110613c7a57613c7a6159e4565b90600052602060002090600702019050600080620f42406209eb108860000154613ca49190615ad8565b613cae9190615b44565b9050613cba8183615a7a565b91506001866007016000828254613cd19190615a92565b9250508190555080866004016000828254613cec9190615a92565b9091555050600d86015460ff16613ebe5760008a600003613d1d576001880154613d169042615a92565b9050613d34565b87600101548860020154613d319190615a92565b90505b600062015180620f4240838b600301548c60000154613d539190615ad8565b613d5d9190615ad8565b613d679190615b44565b613d719190615b44565b9050600081848b60000154613d869190615a92565b613d909190615a7a565b90508089600501541015613daf57506005880180546000909155613dbb565b60058901805482900390555b8860050154600003613ea757600d890180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560098e60068110613e0a57613e0a6159e4565b016000828254613e1a9190615a7a565b909155505060008d81526001602052604090206004810154600290910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff9092169190911790558c60098e60068110613e7b57613e7b6159e4565b01546040517f1237ad121dfe1e3abc3b4254161693eb4add51b458114b8c15502bea94a6b02b90600090a35b613eb18186615a7a565b60068b0191909155935050505b600d86015460009060ff168015613ed95750600888015460ff165b15613f4557613ee88888614355565b9050613ef48184615a7a565b925080846004016000828254613f0a9190615a7a565b909155505060405181815233907ff383c0546bb6669c3250601085779bc0b63da3e0fb8e4881605db6fb1a9d4e829060200160405180910390a25b82846003016000828254613f599190615a7a565b9250508190555081846002016000828254613f749190615a92565b9091555050600488018390558754613f8c8285615a92565b1015613fae578754600387018054600090613fa8908490615a7a565b90915550505b604051600090339085908381818185875af1925050503d8060008114613ff0576040519150601f19603f3d011682016040523d82523d6000602084013e613ff5565b606091505b5050905080614060576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610bb9565b50604080518a8152602081018590528b918d9133917f5ee38bae97be523c51d534ba1d03dc2d75c0219ab51f9abb87a4efbc0d9c6f49910160405180910390a45050505050505050505050565b60008581526001602081905260408220919082018284835b818161ffff1610156141b45787878261ffff168181106140e7576140e76159e4565b90506020020160208101906140fc9190615b7b565b6141069086615b9f565b845460018101865560008681526020902060108204018054600f9092166002026101000a61ffff818102199093168484169190910217905590955083908b908b908416818110614158576141586159e4565b905060200201602081019061416d9190615b58565b81546001810183556000928352602092839020928104909201805460ff928316601f9094166101000a93840292909302199092161790556141ad81615bc5565b90506140c5565b506002850180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff86169081179091556004860155825466470de4df820000101561425f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f73746f636b206c656e67746820746f6f206c6f6e6700000000000000000000006044820152606401610bb9565b50505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152602160205260408120805460058201546007830154929491909116929091906142b18284615a92565b9050801561434d5773ffffffffffffffffffffffffffffffffffffffff84166000908152602160205260408120600581018054919284926142f3908490615a7a565b909155505060078601849055600686015461430e9085615a7a565b600482015490945080851115614328575060048101849055835b60088201546005830154613acc9160ff16908890614347908590615a92565b85614d3b565b505050505050565b600080620f42408360090154612710856003015487600001546143789190615ad8565b6143829190615ad8565b61438c9190615b44565b6143969190615b44565b90506143a5620f424082615a7a565b836008015410156143c1575060088201805460009091556143db565b808360080160008282546143d59190615a92565b90915550505b6008840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560058401819055905092915050565b60018201546002830154600484015460009285929091849061443a90620f424090615ad8565b845490915060000361446c5760028660068110614459576144596159e4565b01544285556001850181905592506144f0565b8354620151809061447d9042615a92565b11156144f0576203f7a0620f424088600501546209eb106103e8856101696144a59190615ad8565b6144af9190615b44565b6144b99190615b44565b6144c39190615a92565b6144cd9190615ad8565b6144d79190615b44565b4285556001850181905560006002860181905590935091505b348460020160008282546145049190615a7a565b909155505082821161451e57612710945050505050610b36565b6000620f42408461452f8286615ad8565b6145399190615b44565b6145439190615a92565b9050600061455462030d4083615b44565b61455f906001615a7a565b905061456e62030d4083615be6565b60000361458357614580600182615a92565b90505b600e8111156145905750600e5b61459c816101f4615ad8565b6145a890612710615a92565b9998505050505050505050565b6000828152600160205260408120600281015482906145d990859061ffff16614de5565b905060006145e78284614e9d565b905060006145f8846001018361501e565b9050836000018161ffff1681548110614613576146136159e4565b600091825260209182902091810490910154601f9091166101000a900460ff16979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152602160209081526040808320815161030081018352848152928301849052606083018490526080830184905260a0830184905260c0830184905260e08301849052610100830184905261012083018490526101408301849052610160830184905261018083018490526101a083018490526101c083018490526101e08301849052610200830184905261022083018490526102408301849052610260830184905261028083018490526102a083018490526102c083018490526102e0830184905280549094169082015234906064614734866050615ad8565b61473e9190615b44565b6080820181905260a0820181905261475890600c90615b44565b60c0820152608081015161476c9086615a92565b60e08201819052610100820181905261478790600a90615b44565b610120820152600684015461479d908390615a7a565b6101808201819052600685015573ffffffffffffffffffffffffffffffffffffffff86166101c08201525b6032816101e0015160ff161015614be757604081015173ffffffffffffffffffffffffffffffffffffffff1615614be7576101e081015160ff1615614821578184600701600082825461481b9190615a7a565b90915550505b600580850154825260078501546101a083015260408083015173ffffffffffffffffffffffffffffffffffffffff166000908152602160209081529190209182015490830181815291945083919061487a908390615a7a565b90525080516101a082015110156148b9576101a0810151815161489d9190615a92565b816020018181516148ae9190615a7a565b905250805160078501555b60208101516005840155610180810151815182906148d8908390615a7a565b9052506004830154610160820181905281511115614900578051600484018190556101608201525b60088301546040820151610160830151602084015161492d9360ff16929161492791615a92565b86614d3b565b60ff166102808201526102a0810151614a605780610260015160ff1681610280015160ff161115614a605780610260015181610280015161496e9190615bfa565b60ff908116610220830181905261028083015190911661026083015260c082015161499891615ad8565b6060820181905260a0820151906149b390620f424090615a7a565b11156149c45760a081015160608201525b80606001518360010160008282546149dc9190615a7a565b925050819055506000816040015173ffffffffffffffffffffffffffffffffffffffff167ffbc0a3a5323dfcdb0b13c4269a5edf35bb4a7d23ae046cb626b6f0a5002e1b3e8360600151604051614a3591815260200190565b60405180910390a3606081015160a0820180519190910390819052600003614a605760016102a08201525b806102c00151614b9a57614a8f614a8a8261016001518360200151614a859190615a92565b61511f565b615269565b60ff166102008201819052610240820151614aab906001615c1d565b60ff1611614b9a5760018161024001818151614ac79190615c1d565b60ff16905250610100810151610120820151614ae790620f424090615a7a565b1115614afa576101008101516101208201525b806101200151836001016000828254614b139190615a7a565b925050819055506001816040015173ffffffffffffffffffffffffffffffffffffffff167ffbc0a3a5323dfcdb0b13c4269a5edf35bb4a7d23ae046cb626b6f0a5002e1b3e836101200151604051614b6d91815260200190565b60405180910390a3610120810151610100820180519190910390819052600003614b9a5760016102c08201525b60408101805173ffffffffffffffffffffffffffffffffffffffff9081166101c0840152845416905260068301546101808201526101e08101805160010160ff16905291925082916147c8565b60a081015115614c8c5760a081015173ffffffffffffffffffffffffffffffffffffffff871660009081526021602052604081206001018054909190614c2e908490615a7a565b9250508190555060008673ffffffffffffffffffffffffffffffffffffffff167ffbc0a3a5323dfcdb0b13c4269a5edf35bb4a7d23ae046cb626b6f0a5002e1b3e8360a00151604051614c8391815260200190565b60405180910390a35b6101008101511561434d5761010081015173ffffffffffffffffffffffffffffffffffffffff871660009081526021602052604081206001018054909190614cd5908490615a7a565b9250508190555060018673ffffffffffffffffffffffffffffffffffffffff167ffbc0a3a5323dfcdb0b13c4269a5edf35bb4a7d23ae046cb626b6f0a5002e1b3e836101000151604051614d2b91815260200190565b60405180910390a3505050505050565b600080614d478461511f565b90508560ff168160ff161115614dd9576008830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff831690811790915560405190815273ffffffffffffffffffffffffffffffffffffffff8616907f35c1accca8eeceea2c22cae5313de15369d9a4a0d4e474b0a93d33e5ebbd448f9060200160405180910390a2614ddc565b50845b95945050505050565b600061ffff8216444233614dfa600143615a92565b6040805160208101959095528401929092527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606091821b1690830152406074820152609481018590527fffff00000000000000000000000000000000000000000000000000000000000060f085901b1660b482015260b6016040516020818303038152906040528051906020012060001c614e969190615be6565b9392505050565b61ffff8083166000908152600383016020526040812054909116808203614ecc57614ec9846001615b9f565b90505b600283015460009060038501908290614eeb9060019061ffff16615c42565b61ffff908116825260208201929092526040016000908120549091169150819003614f1b5750600283015461ffff165b61ffff8581166000908152600386016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000168484161790556002860180549092169190614f6f83615c65565b82546101009290920a61ffff81810219909316918316021790915560028601805482166000908152600388016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000168785161790559054909116900390506150135760048401546002850180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff9092169190911790555b614ddc600183615c42565b81546000908190819061503390600190615a92565b905060005b615043600183615a92565b8310156150c55760026150568484615a92565b6150609190615b44565b61506a9084615a7a565b90508461ffff16868281548110615083576150836159e4565b60009182526020909120601082040154600f9091166002026101000a900461ffff1611156150b357809150615038565b6150be816001615a7a565b9250615038565b8583815481106150d7576150d76159e4565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff168561ffff16101561511557829350505050610b36565b509150610b369050565b600069021e19e0c9bab240000082101561513b57506000919050565b69152d02c7e14af680000082101561515557506001919050565b6954b40b1f852bda00000082101561516f57506002919050565b69a968163f0a57b400000082101561518957506003919050565b6a013da329b63364718000008210156151a457506004919050565b6a027b46536c66c8e30000008210156151bf57506005919050565b6a04f68ca6d8cd91c60000008210156151da57506006919050565b6a09ed194db19b238c0000008210156151f557506007919050565b6a18d0bf423c03d8de00000082101561521057506008919050565b6a31a17e847807b1bc00000082101561522b57506009919050565b6a6342fd08f00f63780000008210156152465750600a919050565b6ac685fa11e01ec6f00000008210156152615750600b919050565b50600c919050565b600060058260ff16101561527e575060020290565b50600a919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146152aa57600080fd5b919050565b600080604083850312156152c257600080fd5b823591506152d260208401615286565b90509250929050565b6000602082840312156152ed57600080fd5b614e9682615286565b6000806040838503121561530957600080fd5b50508035926020909101359150565b60008060006060848603121561532d57600080fd5b8335925061533d60208501615286565b9150604084013590509250925092565b60008083601f84011261535f57600080fd5b50813567ffffffffffffffff81111561537757600080fd5b6020830191508360208260051b850101111561539257600080fd5b9250929050565b600080600080606085870312156153af57600080fd5b8435935060208501359250604085013567ffffffffffffffff8111156153d457600080fd5b6153e08782880161534d565b95989497509550505050565b60008060006060848603121561540157600080fd5b61540a84615286565b95602085013595506040909401359392505050565b604080825283519082018190526000906020906060840190828701845b8281101561546e57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161543c565b50505092019290925292915050565b6000806040838503121561549057600080fd5b61549983615286565b946020939093013593505050565b6000602082840312156154b957600080fd5b5035919050565b6000806000606084860312156154d557600080fd5b83359250602084013591506154ec60408501615286565b90509250925092565b604080825283519082018190526000906020906060840190828701845b8281101561553157815160ff1684529284019290840190600101615512565b5050508381038285015284518082528583019183019060005b8181101561556a57835161ffff168352928401929184019160010161554a565b5090979650505050505050565b6000806000806080858703121561558d57600080fd5b5050823594602084013594506040840135936060013592509050565b60408082528351828201819052600091906020906060850190828801855b82811015615602578151805173ffffffffffffffffffffffffffffffffffffffff1685528501518585015292850192908401906001016155c7565b5050509301939093525092915050565b60008060008060006060868803121561562a57600080fd5b85359450602086013567ffffffffffffffff8082111561564957600080fd5b61565589838a0161534d565b9096509450604088013591508082111561566e57600080fd5b5061567b8882890161534d565b969995985093965092949392505050565b600080600080608085870312156156a257600080fd5b843593506156b260208601615286565b93969395505050506040820135916060013590565b6040808252835182820181905260009190606090818501906020808901865b8381101561573c578151805186528381015184870152878101518887015286810151878701526080808201519087015260a0808201519087015260c0908101519086015260e090940193908201906001016156e6565b505095909501959095525092949350505050565b60008060006060848603121561576557600080fd5b505081359360208301359350604090920135919050565b803580151581146152aa57600080fd5b60006020828403121561579e57600080fd5b614e968261577c565b600080602083850312156157ba57600080fd5b823567ffffffffffffffff8111156157d157600080fd5b6157dd8582860161534d565b90969095509350505050565b600080600080600060a0868803121561580157600080fd5b85359450602086013593506040860135925061581f60608701615286565b915061582d6080870161577c565b90509295509295909350565b6000806000806080858703121561584f57600080fd5b843593506020850135925061586660408601615286565b9396929550929360600135925050565b600080600080600060a0868803121561588e57600080fd5b85359450602086013593506158a560408701615286565b94979396509394606081013594506080013592915050565b6040808252835182820181905260009190606090818501906020808901865b8381101561573c578151805186528381015184870152878101518887015286810151878701526080808201519087015260a0808201519087015260c0808201519087015260e080820151908701526101009081015115159086015261012090940193908201906001016158dc565b6000806000806000806060878903121561596357600080fd5b863567ffffffffffffffff8082111561597b57600080fd5b6159878a838b0161534d565b909850965060208901359150808211156159a057600080fd5b6159ac8a838b0161534d565b909650945060408901359150808211156159c557600080fd5b506159d289828a0161534d565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615a7357615a73615a13565b5060010190565b60008219821115615a8d57615a8d615a13565b500190565b600082821015615aa457615aa4615a13565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615b1057615b10615a13565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615b5357615b53615b15565b500490565b600060208284031215615b6a57600080fd5b813560ff81168114614e9657600080fd5b600060208284031215615b8d57600080fd5b813561ffff81168114614e9657600080fd5b600061ffff808316818516808303821115615bbc57615bbc615a13565b01949350505050565b600061ffff808316818103615bdc57615bdc615a13565b6001019392505050565b600082615bf557615bf5615b15565b500690565b600060ff821660ff841680821015615c1457615c14615a13565b90039392505050565b600060ff821660ff84168060ff03821115615c3a57615c3a615a13565b019392505050565b600061ffff83811690831681811015615c5d57615c5d615a13565b039392505050565b600061ffff821680615c7957615c79615a13565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019291505056fea2646970667358221220ef792f634239521ec964265287f72a0a57b32f2b5162a04b9e156324b399d6f864736f6c634300080e00331237ad121dfe1e3abc3b4254161693eb4add51b458114b8c15502bea94a6b02b0000000000000000000000009ca75d0d97f0b86dea852eb0a626f7839673d9d9000000000000000000000000874292bb0d775b03e8ecec3b5dabcd51794eb674000000000000000000000000874292bb0d775b03e8ecec3b5dabcd51794eb674

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

0000000000000000000000009ca75d0d97f0b86dea852eb0a626f7839673d9d9000000000000000000000000874292bb0d775b03e8ecec3b5dabcd51794eb674000000000000000000000000874292bb0d775b03e8ecec3b5dabcd51794eb674

-----Decoded View---------------
Arg [0] : _platformAddress (address): 0x9ca75d0d97f0b86dea852eb0a626f7839673d9d9
Arg [1] : _tempAdmin (address): 0x874292bb0d775b03e8ecec3b5dabcd51794eb674
Arg [2] : _operator (address): 0x874292bb0d775b03e8ecec3b5dabcd51794eb674

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000009ca75d0d97f0b86dea852eb0a626f7839673d9d9
Arg [1] : 000000000000000000000000874292bb0d775b03e8ecec3b5dabcd51794eb674
Arg [2] : 000000000000000000000000874292bb0d775b03e8ecec3b5dabcd51794eb674


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.